mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/PrePi: Drop secondary stack handling
This SEC driver is single CPU only now, so all of the secondary stack handling is dead code, and can be removed. This removes the last remaining user of the associated PCD, so drop that as well. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
parent
9c1bc36ad1
commit
1941a901f0
|
@ -61,7 +61,6 @@
|
|||
# Stack for CPU Cores in Non Secure Mode
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0|UINT64|0x00000009
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x10000|UINT32|0x00000037
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x1000|UINT32|0x0000000A
|
||||
|
||||
# Size of the region used by UEFI in permanent memory (Reserved 128MB by default)
|
||||
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x08000000|UINT32|0x00000015
|
||||
|
|
|
@ -11,11 +11,6 @@ ASM_FUNC(_ModuleEntryPoint)
|
|||
// Do early platform specific actions
|
||||
bl ASM_PFX(ArmPlatformPeiBootAction)
|
||||
|
||||
// Get ID of this CPU in multi-core system
|
||||
bl ASM_PFX(ArmReadMpidr)
|
||||
// Keep a copy of the MpId register value
|
||||
mov x10, x0
|
||||
|
||||
_SetSVCMode:
|
||||
// Check if we can install the stack at the top of the System Memory or if we need
|
||||
// to install the stacks at the bottom of the Firmware Device (case the FD is located
|
||||
|
@ -71,31 +66,16 @@ _GetBaseUefiMemory:
|
|||
sub x11, x1, x4
|
||||
|
||||
_GetStackBase:
|
||||
// r1 = The top of the Mpcore Stacks
|
||||
// r1 = The top of the stack
|
||||
mov sp, x1
|
||||
|
||||
// Stack for the primary core = PrimaryCoreStack
|
||||
MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
|
||||
sub x12, x1, x2
|
||||
|
||||
// Stack for the secondary core = Number of Cores - 1
|
||||
MOV32 (x1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
|
||||
sub x12, x12, x1
|
||||
// Get ID of this CPU in multi-core system
|
||||
bl ASM_PFX(ArmReadMpidr)
|
||||
|
||||
// x12 = The base of the MpCore Stacks (primary stack & secondary stacks)
|
||||
mov x0, x12
|
||||
mov x1, x10
|
||||
//ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)
|
||||
MOV32 (x2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
|
||||
MOV32 (x3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
|
||||
bl ASM_PFX(ArmPlatformStackSet)
|
||||
|
||||
// Is it the Primary Core ?
|
||||
mov x0, x10
|
||||
bl ASM_PFX(ArmPlatformIsPrimaryCore)
|
||||
cmp x0, #1
|
||||
bne _PrepareArguments
|
||||
|
||||
_PrepareArguments:
|
||||
mov x0, x10
|
||||
mov x1, x11
|
||||
mov x2, x12
|
||||
|
||||
|
|
|
@ -13,11 +13,6 @@ ASM_FUNC(_ModuleEntryPoint)
|
|||
// Do early platform specific actions
|
||||
bl ASM_PFX(ArmPlatformPeiBootAction)
|
||||
|
||||
// Get ID of this CPU in multi-core system
|
||||
bl ASM_PFX(ArmReadMpidr)
|
||||
// Keep a copy of the MpId register value
|
||||
mov r8, r0
|
||||
|
||||
_SetSVCMode:
|
||||
// Enter SVC mode, Disable FIQ and IRQ
|
||||
mov r1, #(CPSR_MODE_SVC | CPSR_IRQ | CPSR_FIQ)
|
||||
|
@ -81,34 +76,18 @@ _GetBaseUefiMemory:
|
|||
sub r9, r1, r4
|
||||
|
||||
_GetStackBase:
|
||||
// r1 = The top of the Mpcore Stacks
|
||||
// r1 = The top of the stack
|
||||
mov sp, r1
|
||||
|
||||
// Stack for the primary core = PrimaryCoreStack
|
||||
MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
|
||||
sub r10, r1, r2
|
||||
|
||||
// Stack for the secondary core = Number of Cores - 1
|
||||
MOV32 (r1, (FixedPcdGet32(PcdCoreCount) - 1) * FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
|
||||
sub r10, r10, r1
|
||||
// Get ID of this CPU in multi-core system
|
||||
bl ASM_PFX(ArmReadMpidr)
|
||||
|
||||
// r10 = The base of the MpCore Stacks (primary stack & secondary stacks)
|
||||
mov r0, r10
|
||||
mov r1, r8
|
||||
//ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)
|
||||
MOV32 (r2, FixedPcdGet32(PcdCPUCorePrimaryStackSize))
|
||||
MOV32 (r3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))
|
||||
bl ASM_PFX(ArmPlatformStackSet)
|
||||
|
||||
// Is it the Primary Core ?
|
||||
mov r0, r8
|
||||
bl ASM_PFX(ArmPlatformIsPrimaryCore)
|
||||
cmp r0, #1
|
||||
bne _PrepareArguments
|
||||
|
||||
_PrepareArguments:
|
||||
mov r0, r8
|
||||
mov r1, r9
|
||||
mov r2, r10
|
||||
mov r3, sp
|
||||
|
||||
// Move sec startup address into a data register
|
||||
// Ensure we're jumping to FV version of the code (not boot remapped alias)
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
DebugAgentLib
|
||||
PrePiLib
|
||||
ArmPlatformLib
|
||||
ArmPlatformStackLib
|
||||
MemoryAllocationLib
|
||||
HobLib
|
||||
PrePiHobListPointerLib
|
||||
|
@ -78,7 +77,6 @@
|
|||
gArmTokenSpaceGuid.PcdFvSize
|
||||
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
||||
|
||||
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
|
||||
|
||||
|
|
Loading…
Reference in New Issue