]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/ArmPlatformLib: Introduce the function ArmPlatformGetBootMode()
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 31 Mar 2011 12:18:28 +0000 (12:18 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 31 Mar 2011 12:18:28 +0000 (12:18 +0000)
This function returns the current Boot Mode of the ARM Platform.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11480 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c
ArmPlatformPkg/Include/Library/ArmPlatformLib.h
ArmPlatformPkg/PlatformPei/PlatformPei.c
ArmPlatformPkg/PlatformPei/PlatformPei.inf

index 003f6571633d2cac64270aeccb0dcfde31ef73f8..070db6ab59b20f67759f5274002fc5928f71f2c7 100644 (file)
@@ -57,6 +57,20 @@ VOID ArmPlatformBootRemapping(VOID) {
        MmioOr32 (ARM_EB_SYSCTRL, BIT8); //EB_SP810_CTRL_BASE
 }
 
        MmioOr32 (ARM_EB_SYSCTRL, BIT8); //EB_SP810_CTRL_BASE
 }
 
+/**
+  Return the current Boot Mode
+
+  This function returns the boot reason on the platform
+
+**/
+EFI_BOOT_MODE
+ArmPlatformGetBootMode (
+  VOID
+  )
+{
+  return BOOT_WITH_FULL_CONFIGURATION;
+}
+
 /**
   Initialize controllers that must setup at the early stage
 
 /**
   Initialize controllers that must setup at the early stage
 
index 2d39207e2941fed70a6c0f30018d51c3db7b3bd7..490dda1a9229f82e9dccd1587b2c2ae53c5b8bb8 100644 (file)
@@ -137,6 +137,22 @@ VOID ArmPlatformTrustzoneInit(VOID) {
         TZASC_REGION_SIZE_256MB, TZASC_REGION_SECURITY_NSRW);
 }
 
         TZASC_REGION_SIZE_256MB, TZASC_REGION_SECURITY_NSRW);
 }
 
+/**
+  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
+  )
+{
+  return BOOT_WITH_FULL_CONFIGURATION;
+}
+
 /**
   Remap the memory at 0x0
 
 /**
   Remap the memory at 0x0
 
index c9b215e6dc84559f4028205965946e114634959a..83c19baabd61c882af717156cfdcb7ca3635d8bb 100644 (file)
@@ -67,6 +67,19 @@ VOID ArmPlatformIsMemoryInitialized(VOID);
 **/
 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
 
 /**
   Initialize controllers that must setup at the early stage
 
index a7fa4321c002b93310f0b0e6a2fbe9c8043d48e4..0d901736702170dcd3e6f22998cd8ec8b0bcee44 100644 (file)
@@ -77,12 +77,7 @@ Returns:
   \r
   BuildFvHob (FixedPcdGet32(PcdFlashFvMainBase), FixedPcdGet32(PcdFlashFvMainSize));\r
   \r
   \r
   BuildFvHob (FixedPcdGet32(PcdFlashFvMainBase), FixedPcdGet32(PcdFlashFvMainSize));\r
   \r
-  //\r
-  // Let's assume things are OK if not told otherwise\r
-  // Should we read an environment variable in order to easily change this?\r
-  //\r
-  BootMode  = BOOT_WITH_FULL_CONFIGURATION;\r
-\r
+  BootMode  = ArmPlatformGetBootMode ();\r
   Status    = (**PeiServices).SetBootMode (PeiServices, (UINT8) BootMode);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   Status    = (**PeiServices).SetBootMode (PeiServices, (UINT8) BootMode);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
index 452c0258d68fd19a691afbf5fd9cfacaf270b267..c35889a9688f86133d0a7c6a8010d71adda847ec 100644 (file)
   MdePkg/MdePkg.dec\r
   EmbeddedPkg/EmbeddedPkg.dec\r
   ArmPkg/ArmPkg.dec\r
   MdePkg/MdePkg.dec\r
   EmbeddedPkg/EmbeddedPkg.dec\r
   ArmPkg/ArmPkg.dec\r
+  ArmPlatformPkg/ArmPlatformPkg.dec\r
 \r
 [LibraryClasses]\r
   PeimEntryPoint\r
   DebugLib\r
   HobLib\r
 \r
 [LibraryClasses]\r
   PeimEntryPoint\r
   DebugLib\r
   HobLib\r
+  ArmPlatformLib\r
 \r
 [Ppis]\r
   gEfiPeiMasterBootModePpiGuid                  # PPI ALWAYS_PRODUCED\r
 \r
 [Ppis]\r
   gEfiPeiMasterBootModePpiGuid                  # PPI ALWAYS_PRODUCED\r