rockchip: spl: implement fit_board_verify_required_sigs()
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I5dbebf21a8c3ae76550fec7262bee66c256b5682
This commit is contained in:
parent
5033bc62fe
commit
a5373663e8
|
|
@ -8,6 +8,7 @@
|
||||||
#include <debug_uart.h>
|
#include <debug_uart.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <key.h>
|
#include <key.h>
|
||||||
|
#include <misc.h>
|
||||||
#include <ram.h>
|
#include <ram.h>
|
||||||
#include <spl.h>
|
#include <spl.h>
|
||||||
#include <optee_include/OpteeClientInterface.h>
|
#include <optee_include/OpteeClientInterface.h>
|
||||||
|
|
@ -311,3 +312,21 @@ void spl_hang_reset(void)
|
||||||
do_reset(NULL, 0, 0, NULL);
|
do_reset(NULL, 0, 0, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int fit_board_verify_required_sigs(void)
|
||||||
|
{
|
||||||
|
uint8_t vboot = 0;
|
||||||
|
#if defined(CONFIG_SPL_ROCKCHIP_SECURE_OTP) || defined(CONFIG_SPL_ROCKCHIP_SECURE_OTP_v2)
|
||||||
|
struct udevice *dev;
|
||||||
|
|
||||||
|
dev = misc_otp_get_device(OTP_S);
|
||||||
|
if (!dev)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (misc_otp_read(dev, 0, &vboot, 1)) {
|
||||||
|
printf("Can't read verified-boot flag\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return vboot;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue