lib: el3_runtime: Conditionally save/restore EL2 NEVE registers

Include EL2 registers related to Nested Virtualization in EL2 context
save/restore routines if architecture supports it and platform wants to
use these features in Secure world.

Change-Id: If006ab83bbc2576488686f5ffdff88b91adced5c
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
This commit is contained in:
Arunachalam Ganapathy 2020-05-28 11:57:09 +01:00 committed by Manish Pandey
parent 0f777eabd9
commit 062f8aaf8a
4 changed files with 15 additions and 0 deletions

View file

@ -200,8 +200,10 @@ func el2_sysregs_context_save
mrs x12, vdisr_el2
str x12, [x0, #CTX_VDISR_EL2]
#if CTX_INCLUDE_NEVE_REGS
mrs x13, vncr_el2
str x13, [x0, #CTX_VNCR_EL2]
#endif
mrs x14, vsesr_el2
str x14, [x0, #CTX_VSESR_EL2]
@ -395,8 +397,10 @@ func el2_sysregs_context_restore
ldr x13, [x0, #CTX_VDISR_EL2]
msr vdisr_el2, x13
#if CTX_INCLUDE_NEVE_REGS
ldr x14, [x0, #CTX_VNCR_EL2]
msr vncr_el2, x14
#endif
ldr x15, [x0, #CTX_VSESR_EL2]
msr vsesr_el2, x15