Merge "fix(trp): Distinguish between cold and warm boot" into integration

This commit is contained in:
Bipin Ravi 2021-12-22 21:13:03 +01:00 committed by TrustedFirmware Code Review
commit 9697e4596c
1 changed files with 22 additions and 3 deletions

View File

@ -33,8 +33,19 @@
*/
trp_head:
bl plat_set_my_stack
bl plat_is_my_cpu_primary
cbz x0, trp_secondary_cpu_entry
/*
* Find out whether this is a cold or warm boot
*/
ldr x1, cold_boot_flag
cbz x1, warm_boot
/*
* Update cold boot flag to indicate cold boot is done
*/
adr x2, cold_boot_flag
str xzr, [x2]
/* ---------------------------------------------
* Zero out BSS section
@ -47,12 +58,20 @@ trp_head:
bl trp_setup
bl trp_main
trp_secondary_cpu_entry:
warm_boot:
mov_imm x0, RMI_RMM_REQ_COMPLETE
mov x1, xzr
smc #0
b trp_handler
/*
* Flag to mark if it is a cold boot.
* 1: cold boot, 0: warmboot.
*/
.align 3
cold_boot_flag:
.dword 1
/* ---------------------------------------------
* Direct SMC call to BL31 service provided by
* RMM Dispatcher