mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/PrePeiCore: Print the firmware version early in boot
Copy code from PrePi to PrePeiCore that prints the firmware version and build date early in the boot process. Signed-off-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Tested-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
This commit is contained in:
parent
db2c22633f
commit
56035d1c8b
|
@ -11,6 +11,8 @@
|
||||||
#include <Library/CacheMaintenanceLib.h>
|
#include <Library/CacheMaintenanceLib.h>
|
||||||
#include <Library/DebugAgentLib.h>
|
#include <Library/DebugAgentLib.h>
|
||||||
#include <Library/ArmLib.h>
|
#include <Library/ArmLib.h>
|
||||||
|
#include <Library/PrintLib.h>
|
||||||
|
#include <Library/SerialPortLib.h>
|
||||||
|
|
||||||
#include "PrePeiCore.h"
|
#include "PrePeiCore.h"
|
||||||
|
|
||||||
|
@ -52,6 +54,31 @@ CreatePpiList (
|
||||||
*PpiListSize = sizeof (gCommonPpiTable) + PlatformPpiListSize;
|
*PpiListSize = sizeof (gCommonPpiTable) + PlatformPpiListSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Prints firmware version and build time to serial console.
|
||||||
|
|
||||||
|
**/
|
||||||
|
STATIC
|
||||||
|
VOID
|
||||||
|
PrintFirmwareVersion (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
CHAR8 Buffer[100];
|
||||||
|
UINTN CharCount;
|
||||||
|
|
||||||
|
CharCount = AsciiSPrint (
|
||||||
|
Buffer,
|
||||||
|
sizeof (Buffer),
|
||||||
|
"UEFI firmware (version %s built at %a on %a)\n\r",
|
||||||
|
(CHAR16 *)PcdGetPtr (PcdFirmwareVersionString),
|
||||||
|
__TIME__,
|
||||||
|
__DATE__
|
||||||
|
);
|
||||||
|
SerialPortWrite ((UINT8 *)Buffer, CharCount);
|
||||||
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CEntryPoint (
|
CEntryPoint (
|
||||||
IN UINTN MpId,
|
IN UINTN MpId,
|
||||||
|
@ -96,6 +123,8 @@ CEntryPoint (
|
||||||
// called.
|
// called.
|
||||||
ProcessLibraryConstructorList ();
|
ProcessLibraryConstructorList ();
|
||||||
|
|
||||||
|
PrintFirmwareVersion ();
|
||||||
|
|
||||||
// Initialize the Debug Agent for Source Level Debugging
|
// Initialize the Debug Agent for Source Level Debugging
|
||||||
InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL);
|
InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL);
|
||||||
SaveAndSetDebugTimerInterrupt (TRUE);
|
SaveAndSetDebugTimerInterrupt (TRUE);
|
||||||
|
|
|
@ -54,6 +54,9 @@
|
||||||
gEfiTemporaryRamSupportPpiGuid
|
gEfiTemporaryRamSupportPpiGuid
|
||||||
gArmMpCoreInfoPpiGuid
|
gArmMpCoreInfoPpiGuid
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,9 @@
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiTemporaryRamSupportPpiGuid
|
gEfiTemporaryRamSupportPpiGuid
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue