mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 22:35:42 +00:00
Do basic CryptoCell LCS check
This patch implements the basic lifecycle state check when CryptoCell SBROM is initialized. Currently the check ensures that if the lifecycle state is Security Disabled (SD), the boot process does not proceed further. Change-Id: I5101335453cd3ea413e97bcfb9138a96c05e1aea Signed-off-by: Soby Mathew <soby.mathew@arm.com>
This commit is contained in:
parent
e60f2af949
commit
fd2b42f4ae
1 changed files with 14 additions and 0 deletions
|
@ -55,6 +55,7 @@
|
||||||
static void init(void)
|
static void init(void)
|
||||||
{
|
{
|
||||||
CCError_t ret;
|
CCError_t ret;
|
||||||
|
uint32_t lcs;
|
||||||
|
|
||||||
/* Initialize CC SBROM */
|
/* Initialize CC SBROM */
|
||||||
ret = CC_BsvSbromInit((uintptr_t)PLAT_CRYPTOCELL_BASE);
|
ret = CC_BsvSbromInit((uintptr_t)PLAT_CRYPTOCELL_BASE);
|
||||||
|
@ -62,6 +63,19 @@ static void init(void)
|
||||||
ERROR("CryptoCell CC_BsvSbromInit() error %x\n", ret);
|
ERROR("CryptoCell CC_BsvSbromInit() error %x\n", ret);
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Initialize lifecycle state */
|
||||||
|
ret = CC_BsvLcsGetAndInit((uintptr_t)PLAT_CRYPTOCELL_BASE, &lcs);
|
||||||
|
if (ret != CC_OK) {
|
||||||
|
ERROR("CryptoCell CC_BsvLcsGetAndInit() error %x\n", ret);
|
||||||
|
panic();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If the lifecyclestate is `SD`, then stop further execution */
|
||||||
|
if (lcs == CC_BSV_SECURITY_DISABLED_LCS) {
|
||||||
|
ERROR("CryptoCell LCS is security-disabled\n");
|
||||||
|
panic();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue