aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/arm/boot.c3
-rw-r--r--include/hw/arm/boot.h7
2 files changed, 8 insertions, 2 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index ef6724960c..8fb4a63606 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -240,6 +240,9 @@ void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu,
};
uint32_t board_setup_blob[] = {
/* board setup addr */
+ 0xee110f51, /* mrc p15, 0, r0, c1, c1, 2 ;read NSACR */
+ 0xe3800b03, /* orr r0, #0xc00 ;set CP11, CP10 */
+ 0xee010f51, /* mcr p15, 0, r0, c1, c1, 2 ;write NSACR */
0xe3a00e00 + (mvbar_addr >> 4), /* mov r0, #mvbar_addr */
0xee0c0f30, /* mcr p15, 0, r0, c12, c0, 1 ;set MVBAR */
0xee110f11, /* mrc p15, 0, r0, c1 , c1, 0 ;read SCR */
diff --git a/include/hw/arm/boot.h b/include/hw/arm/boot.h
index 7f4d0ca7cd..ce2b48b88b 100644
--- a/include/hw/arm/boot.h
+++ b/include/hw/arm/boot.h
@@ -107,9 +107,12 @@ struct arm_boot_info {
void (*write_board_setup)(ARMCPU *cpu,
const struct arm_boot_info *info);
- /* If set, the board specific loader/setup blob will be run from secure
+ /*
+ * If set, the board specific loader/setup blob will be run from secure
* mode, regardless of secure_boot. The blob becomes responsible for
- * changing to non-secure state if implementing a non-secure boot
+ * changing to non-secure state if implementing a non-secure boot,
+ * including setting up EL3/Secure registers such as the NSACR as
+ * required by the Linux booting ABI before the switch to non-secure.
*/
bool secure_board_setup;