mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 00:54:06 +02:00
ArmPlatformPkg/ArmPlatformLib: Introduce the function ArmPlatformGetBootMode()
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
This commit is contained in:
parent
cf3a77a02a
commit
a534d71480
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -77,12 +77,7 @@ Returns:
|
|||||||
|
|
||||||
BuildFvHob (FixedPcdGet32(PcdFlashFvMainBase), FixedPcdGet32(PcdFlashFvMainSize));
|
BuildFvHob (FixedPcdGet32(PcdFlashFvMainBase), FixedPcdGet32(PcdFlashFvMainSize));
|
||||||
|
|
||||||
//
|
BootMode = ArmPlatformGetBootMode ();
|
||||||
// Let's assume things are OK if not told otherwise
|
|
||||||
// Should we read an environment variable in order to easily change this?
|
|
||||||
//
|
|
||||||
BootMode = BOOT_WITH_FULL_CONFIGURATION;
|
|
||||||
|
|
||||||
Status = (**PeiServices).SetBootMode (PeiServices, (UINT8) BootMode);
|
Status = (**PeiServices).SetBootMode (PeiServices, (UINT8) BootMode);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
@ -34,11 +34,13 @@
|
|||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
EmbeddedPkg/EmbeddedPkg.dec
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
ArmPkg/ArmPkg.dec
|
ArmPkg/ArmPkg.dec
|
||||||
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
PeimEntryPoint
|
PeimEntryPoint
|
||||||
DebugLib
|
DebugLib
|
||||||
HobLib
|
HobLib
|
||||||
|
ArmPlatformLib
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
|
gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user