]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/AArch64/RTSMHelper.S
ArmPlatformPkg: Fix and Implement ArmPlatformGetPrimaryCoreMpId
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Library / ArmVExpressLibRTSM / AArch64 / RTSMHelper.S
index 50703ec275157efcd89ba7dcf61afc3bb98d5d9b..b24085cb248f2c5b33dac259ac2d3ce275d9dd23 100644 (file)
@@ -22,6 +22,7 @@
 \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
@@ -32,6 +33,15 @@ GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdCoreCount)
 ASM_PFX(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
+  ret\r
+\r
 # IN None\r
 # OUT x0 = number of cores present in the system\r
 ASM_PFX(ArmGetCpuCountPerCluster):\r