diff options
Diffstat (limited to 'ArmPlatformPkg/PrePi/ModuleEntryPoint.asm')
-rw-r--r-- | ArmPlatformPkg/PrePi/ModuleEntryPoint.asm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm b/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm index 00abcb304a..881871d34e 100644 --- a/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm +++ b/ArmPlatformPkg/PrePi/ModuleEntryPoint.asm @@ -19,6 +19,7 @@ INCLUDE AsmMacroIoLib.inc
IMPORT CEntryPoint
+ IMPORT ArmReadMpidr
EXPORT _ModuleEntryPoint
PRESERVE8
@@ -27,9 +28,10 @@ StartupAddr DCD CEntryPoint
_ModuleEntryPoint
- // Identify CPU ID
- mrc p15, 0, r0, c0, c0, 5
- and r0, #0xf
+ // Get ID of this CPU in Multicore system
+ bl ArmReadMpidr
+ LoadConstantToReg (FixedPcdGet32(PcdArmPrimaryCoreMask), r1)
+ and r5, r0, r1
_SetSVCMode
// Enter SVC mode
@@ -94,7 +96,7 @@ _PrepareArguments ldr r2, StartupAddr
// Jump to PrePiCore C code
- // r0 = core_id
+ // r0 = MpId
// r1 = UefiMemoryBase
blx r2
|