#\r
\r
#include <AsmMacroIoLibV8.h>\r
-#include <Base.h>\r
#include <Library/ArmLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <AutoGen.h>\r
\r
-.text\r
-.align 2\r
-\r
-GCC_ASM_EXPORT(ArmPlatformPeiBootAction)\r
-GCC_ASM_EXPORT(ArmPlatformIsPrimaryCore)\r
-GCC_ASM_EXPORT(ArmPlatformGetPrimaryCoreMpId)\r
-GCC_ASM_EXPORT(ArmPlatformGetCorePosition)\r
-GCC_ASM_EXPORT(ArmGetCpuCountPerCluster)\r
-\r
-GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCore)\r
-GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)\r
-GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdCoreCount)\r
-\r
-ASM_PFX(ArmPlatformPeiBootAction):\r
+ASM_FUNC(ArmPlatformPeiBootAction)\r
ret\r
\r
//UINTN\r
//ArmPlatformGetPrimaryCoreMpId (\r
// VOID\r
// );\r
-ASM_PFX(ArmPlatformGetPrimaryCoreMpId):\r
- LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, x0)\r
- ldrh w0, [x0]\r
+ASM_FUNC(ArmPlatformGetPrimaryCoreMpId)\r
+ MOV32 (w0, FixedPcdGet32 (PcdArmPrimaryCore))\r
ret\r
\r
# IN None\r
# OUT x0 = number of cores present in the system\r
-ASM_PFX(ArmGetCpuCountPerCluster):\r
- LoadConstantToReg (_gPcd_FixedAtBuild_PcdCoreCount, x0)\r
- ldrh w0, [x0]\r
+ASM_FUNC(ArmGetCpuCountPerCluster)\r
+ MOV32 (w0, FixedPcdGet32 (PcdCoreCount))\r
ret\r
\r
//UINTN\r
//ArmPlatformIsPrimaryCore (\r
// IN UINTN MpId\r
// );\r
-ASM_PFX(ArmPlatformIsPrimaryCore):\r
- LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, x1)\r
- ldrh w1, [x1]\r
+ASM_FUNC(ArmPlatformIsPrimaryCore)\r
+ MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCoreMask))\r
and x0, x0, x1\r
- LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, x1)\r
- ldrh w1, [x1]\r
+ MOV32 (w1, FixedPcdGet32 (PcdArmPrimaryCore))\r
cmp w0, w1\r
b.ne 1f\r
mov x0, #1\r
// IN UINTN MpId\r
// );\r
// With this function: CorePos = (ClusterId * 4) + CoreId\r
-ASM_PFX(ArmPlatformGetCorePosition):\r
+ASM_FUNC(ArmPlatformGetCorePosition)\r
and x1, x0, #ARM_CORE_MASK\r
and x0, x0, #ARM_CLUSTER_MASK\r
add x0, x1, x0, LSR #6\r