]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Include/Library/ArmPlatformLib.h
ArmPlatformPkg: Introduce Primary core macros
[mirror_edk2.git] / ArmPlatformPkg / Include / Library / ArmPlatformLib.h
index c9b215e6dc84559f4028205965946e114634959a..4ea640f0d269317455a4fbb7d53888443225a78e 100644 (file)
@@ -27,7 +27,6 @@
 #include <Guid/MemoryTypeInformation.h>
 
 #include <Library/ArmLib.h>
-#include <ArmPlatform.h>
 
 /**
   This structure is used by ArmVExpressGetEfiMemoryMap to describes a region of the EFI memory map
@@ -65,7 +64,23 @@ VOID ArmPlatformIsMemoryInitialized(VOID);
   pointer is not used (probably required to use assembly language)
 
 **/
-VOID ArmPlatformInitializeBootMemory(VOID);
+VOID
+ArmPlatformInitializeBootMemory (
+  VOID
+  );
+
+/**
+  Return the current Boot Mode
+
+  This function returns the boot reason on the platform
+
+  @return   Return the current Boot Mode of the platform
+
+**/
+EFI_BOOT_MODE
+ArmPlatformGetBootMode (
+  VOID
+  );
 
 /**
   Initialize controllers that must setup at the early stage
@@ -75,7 +90,32 @@ VOID ArmPlatformInitializeBootMemory(VOID);
 
 **/
 VOID
-ArmPlatformInitialize (
+ArmPlatformSecInitialize (
+  VOID
+  );
+
+/**
+  Call before jumping to Normal World
+
+  This function allows the firmware platform to do extra actions before
+  jumping to the Normal World
+
+**/
+VOID
+ArmPlatformSecExtraAction (
+  IN  UINTN         MpId,
+  OUT UINTN*        JumpAddress
+  );
+
+/**
+  Initialize controllers that must setup in the normal world
+
+  This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
+  in the PEI phase.
+
+**/
+VOID
+ArmPlatformNormalInitialize (
   VOID
   );
 
@@ -85,7 +125,10 @@ ArmPlatformInitialize (
   This memory is generally represented by the DRAM.
 
 **/
-VOID ArmPlatformInitializeSystemMemory(VOID);
+VOID
+ArmPlatformInitializeSystemMemory (
+  VOID
+  );
 
 /**
   Remap the memory at 0x0
@@ -94,7 +137,10 @@ VOID ArmPlatformInitializeSystemMemory(VOID);
   This function can do nothing if this feature is not relevant to your platform.
 
 **/
-VOID ArmPlatformBootRemapping(VOID);
+VOID
+ArmPlatformBootRemapping (
+  VOID
+  );
 
 /**
   Return if Trustzone is supported by your platform
@@ -107,7 +153,10 @@ VOID ArmPlatformBootRemapping(VOID);
   @return   A non-zero value if Trustzone supported.
 
 **/
-UINTN ArmPlatformTrustzoneSupported(VOID);
+UINTN
+ArmPlatformTrustzoneSupported (
+  VOID
+  );
 
 /**
   Initialize the Secure peripherals and memory regions
@@ -116,22 +165,10 @@ UINTN ArmPlatformTrustzoneSupported(VOID);
   of the secure peripherals and memory regions.
 
 **/
-VOID ArmPlatformTrustzoneInit(VOID);
-
-/**
-  Return the information about the memory region in permanent memory used by PEI
-
-  One of the PEI Module must install the permament memory used by PEI. This function returns the
-  information about this region for your platform to this PEIM module.
-
-  @param[out]   PeiMemoryBase       Base of the memory region used by PEI core and modules
-  @param[out]   PeiMemorySize       Size of the memory region used by PEI core and modules
-
-**/
-VOID ArmPlatformGetPeiMemory (
-    OUT UINTN*                                   PeiMemoryBase,
-    OUT UINTN*                                   PeiMemorySize
-    );
+VOID
+ArmPlatformTrustzoneInit (
+  VOID
+  );
 
 /**
   Return the Virtual Memory Map of your platform
@@ -143,9 +180,10 @@ VOID ArmPlatformGetPeiMemory (
                                     entry
 
 **/
-VOID ArmPlatformGetVirtualMemoryMap (
-    OUT ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap
-);
+VOID
+ArmPlatformGetVirtualMemoryMap (
+  OUT ARM_MEMORY_REGION_DESCRIPTOR** VirtualMemoryMap
+  );
 
 /**
   Return the EFI Memory Map of your platform
@@ -157,8 +195,9 @@ VOID ArmPlatformGetVirtualMemoryMap (
                                     EFI Memory region. This array must be ended by a zero-filled entry
 
 **/
-VOID ArmPlatformGetEfiMemoryMap (
-    OUT ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR** EfiMemoryMap
-);
+EFI_STATUS
+ArmPlatformGetAdditionalSystemMemory (
+  OUT ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR** EfiMemoryMap
+  );
 
 #endif