ArmPkg: StMM: Use x24 register to store stack address
Now that the use of 18 registers for FF-A is supported. Registers from x0-x17 can be used by FF-A to return call results. StMM also uses registers x19-x23 to store SPMC boot information. Use the x24 register to store the stack address instead of x12 to avoid it being clobbered by FF-A calls. Signed-off-by: Mohamed Gamal Morsy <mohamed.morsy@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
07425903d3
commit
e0852f75d8
@@ -81,8 +81,8 @@ ASM_FUNC(SetStackPermissionFfa)
|
||||
// x1 = stmm_stack top
|
||||
mov x1, x0
|
||||
|
||||
// x12 = Compute and save the stack base
|
||||
add x12, x1, x2
|
||||
// x24 = Compute and save the stack base
|
||||
add x24, x1, x2
|
||||
|
||||
// x2 = Count of pages of stmm_stack
|
||||
lsr x2, x2, #EFI_PAGE_SHIFT
|
||||
@@ -110,7 +110,7 @@ ASM_FUNC(SetStackPermissionFfa)
|
||||
cmp x10, #0x00
|
||||
|
||||
// Set return value as base address of stack.
|
||||
mov x0, x12
|
||||
mov x0, x24
|
||||
b.ne .Lout_set_stack_perm_ffa
|
||||
// If failed, set return value as zero.
|
||||
mov x0, #0x00
|
||||
@@ -119,7 +119,7 @@ ASM_FUNC(SetStackPermissionFfa)
|
||||
mov x9, xzr
|
||||
mov x10, xzr
|
||||
mov x11, xzr
|
||||
mov x12, xzr
|
||||
mov x24, xzr
|
||||
ret
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user