sept: validate ccplex reset vector
This commit is contained in:
@@ -138,6 +138,11 @@ void cluster_boot_cpu0(uint32_t entry)
|
||||
|
||||
MAKE_EXCP_VEC_REG(0x100) = 0;
|
||||
|
||||
/* Check for reset vector lock. */
|
||||
if (SB_CSR_0 & 2) {
|
||||
generic_panic();
|
||||
}
|
||||
|
||||
/* Set reset vector. */
|
||||
SB_AA64_RESET_LOW_0 = (entry | 1);
|
||||
SB_AA64_RESET_HIGH_0 = 0;
|
||||
@@ -146,6 +151,15 @@ void cluster_boot_cpu0(uint32_t entry)
|
||||
SB_CSR_0 = 2;
|
||||
(void)SB_CSR_0;
|
||||
|
||||
/* Validate reset vector lock + RESET_LOW/HIGH values. */
|
||||
if (!(SB_CSR_0 & 2)) {
|
||||
generic_panic();
|
||||
}
|
||||
|
||||
if (SB_AA64_RESET_LOW_0 != (entry | 1) || SB_AA64_RESET_HIGH_0 != 0) {
|
||||
generic_panic();
|
||||
}
|
||||
|
||||
/* Set CPU_STRICT_TZ_APERTURE_CHECK. */
|
||||
/* NOTE: [4.0.0+] This was added, but it breaks Exosphère. */
|
||||
/* MAKE_MC_REG(MC_TZ_SECURITY_CTRL) = 1; */
|
||||
|
||||
Reference in New Issue
Block a user