]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Include/Library/ArmLib.h
ArmPkg/ArmPkg.dec: Redefined PcdSystemMemory(Base|Size) as UINT64
[mirror_edk2.git] / ArmPkg / Include / Library / ArmLib.h
index 75f775536280b44248ba37acf263adf1f05ff842..a05f7251a1c3e8068f164f11c86b08e287b2ee68 100644 (file)
 \r
 #include <Uefi/UefiBaseType.h>\r
 \r
-#ifdef ARM_CPU_ARMv6\r
-#include <Chipset/ARM1176JZ-S.h>\r
+#ifdef MDE_CPU_ARM\r
+  #ifdef ARM_CPU_ARMv6\r
+    #include <Chipset/ARM1176JZ-S.h>\r
+  #else\r
+    #include <Chipset/ArmV7.h>\r
+  #endif\r
+#elif defined(MDE_CPU_AARCH64)\r
+  #include <Chipset/AArch64.h>\r
 #else\r
-#include <Chipset/ArmV7.h>\r
+ #error "Unknown chipset."\r
 #endif\r
 \r
 typedef enum {\r
@@ -70,7 +76,7 @@ typedef enum {
 typedef struct {\r
   EFI_PHYSICAL_ADDRESS          PhysicalBase;\r
   EFI_VIRTUAL_ADDRESS           VirtualBase;\r
-  UINT                        Length;\r
+  UINT64                        Length;\r
   ARM_MEMORY_REGION_ATTRIBUTES  Attributes;\r
 } ARM_MEMORY_REGION_DESCRIPTOR;\r
 \r
@@ -116,6 +122,7 @@ typedef enum {
 #define ARM_CLUSTER_MASK      (0xFF << 8)\r
 #define GET_CORE_ID(MpId)     ((MpId) & ARM_CORE_MASK)\r
 #define GET_CLUSTER_ID(MpId)  (((MpId) & ARM_CLUSTER_MASK) >> 8)\r
+#define GET_MPID(ClusterId, CoreId)   (((ClusterId) << 8) | (CoreId))\r
 // Get the position of the core for the Stack Offset (4 Core per Cluster)\r
 //   Position = (ClusterId * 4) + CoreId\r
 #define GET_CORE_POS(MpId)    ((((MpId) & ARM_CLUSTER_MASK) >> 6) + ((MpId) & ARM_CORE_MASK))\r
@@ -186,7 +193,25 @@ EFIAPI
 ArmInstructionCacheLineLength (\r
   VOID\r
   );\r
-  \r
+\r
+UINTN\r
+EFIAPI\r
+ArmIsArchTimerImplemented (\r
+  VOID\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+ArmReadIdPfr0 (\r
+  VOID\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+ArmReadIdPfr1 (\r
+  VOID\r
+  );\r
+\r
 UINT32\r
 EFIAPI\r
 Cp15IdCode (\r
@@ -381,11 +406,11 @@ ArmGetTTBR0BaseAddress (
   VOID\r
   );\r
 \r
-VOID\r
+RETURN_STATUS\r
 EFIAPI\r
 ArmConfigureMmu (\r
   IN  ARM_MEMORY_REGION_DESCRIPTOR  *MemoryTable,\r
-  OUT VOID                          **TranslationTableBase OPTIONAL,\r
+  OUT VOID                         **TranslationTableBase OPTIONAL,\r
   OUT UINTN                         *TranslationTableSize  OPTIONAL\r
   );\r
   \r
@@ -500,6 +525,7 @@ ArmCallWFE (
 VOID\r
 EFIAPI\r
 ArmCallWFI (\r
+\r
   VOID\r
   );\r
 \r
@@ -527,18 +553,6 @@ ArmEnableVFP (
   VOID\r
   );\r
 \r
-UINT32\r
-EFIAPI\r
-ArmReadNsacr (\r
-  VOID\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmWriteNsacr (\r
-  IN  UINT32   SetWayFormat\r
-  );\r
-\r
 UINT32\r
 EFIAPI\r
 ArmReadScr (\r