core: pta: add Rockchip secure boot PTAThe S_OTP area for the Rockchip secure boot RSA hash and status registeris accessible only from the secure world. Thus, secure boot must beenabled from the
core: pta: add Rockchip secure boot PTAThe S_OTP area for the Rockchip secure boot RSA hash and status registeris accessible only from the secure world. Thus, secure boot must beenabled from the secure world on these board.The PTA implements 3 functions:1. Ask the TA from the non-secure world about the current status and hash of the hardware. This allows to inspect the current status of secure boot on a specific device.2. Write an RSA hash into the OTP fuses. It's the responsibility of the user to calculate the hash and ensure that it matches the key, which will be used to sign the images.3. Actually lockdown the device by enabling secure boot. This is a separate step to allow the user to verify the setup before potentially bricking a device.With these functions, a user may use a client running in the normalworld (for example in a boot loader or operating system) to enablesecure boot on a Rockchip device.Implementing secure boot setup as an OP-TEE PTA has the advantage thatsecure boot can be enabled at any time during the device setup insteadof during early boot. This allows a developer/user or additional scriptsto interact with the secure boot setup process.The hash of the root key is accepted and reported as calculated bysha256sum and internally converted to the correct byte order that needsto be burned into the fuses.Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...