]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/PrePi: remove bogus primary core check
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 17 Nov 2017 10:54:59 +0000 (10:54 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 23 Nov 2017 16:05:02 +0000 (16:05 +0000)
QEMU and KVM based ARM/AARCH64 virtual machines only enter UEFI on
a single core, so ArmPlatformIsPrimaryCore() always returns true.
And even if it didn't, our code does absolutely nothing meaningful
based on its return value, so don't bother calling it, and remove
another frivolous dependency on ArmPlatformLib.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S

index cc8b47e690265afbe43cd1f1f5fd6c03e64e155b..7a9c0c3787cc2b4512e48df31c3cbd2a9fff7df2 100644 (file)
@@ -128,13 +128,6 @@ _GetStackBase:
   MOV32 (x3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))\r
   bl    ASM_PFX(ArmPlatformStackSet)\r
 \r
-  // Is it the Primary Core ?\r
-  mov   x0, x10\r
-  bl    ASM_PFX(ArmPlatformIsPrimaryCore)\r
-  cmp   x0, #1\r
-  bne   _PrepareArguments\r
-\r
-_PrepareArguments:\r
   mov   x0, x20\r
   mov   x1, x21\r
   mov   x2, x22\r
index 59028d0a553ed23387cec5ef11a25cc8dd7dae9a..eebf660acdb20f411a666b6ca8289740c96c45af 100644 (file)
@@ -136,13 +136,6 @@ _GetStackBase:
   MOV32 (r3, FixedPcdGet32(PcdCPUCoreSecondaryStackSize))\r
   bl    ASM_PFX(ArmPlatformStackSet)\r
 \r
-  // Is it the Primary Core ?\r
-  mov   r0, r10\r
-  bl    ASM_PFX(ArmPlatformIsPrimaryCore)\r
-  cmp   r0, #1\r
-  bne   _PrepareArguments\r
-\r
-_PrepareArguments:\r
   mov   r0, r10\r
   mov   r1, r11\r
   mov   r2, r9\r