Hi Rebecca, Ard,
On Tue, May 3, 2022 at 12:43 AM, Ard Biesheuvel wrote:
[SAMI] There is a patch at https://edk2.groups.io/g/devel/message/91113 which aims to call ProcessLibraryConstructorList(). The idea being that the DebugLib constructor would be called which initializes the serial port.// Data Cache enabled on Primary core when MMU is enabled.Given that this runs before any library constructors are called, I'd
ArmDisableDataCache ();
// Invalidate instruction cache
@@ -90,6 +95,18 @@ CEntryPoint (
// If not primary Jump to Secondary Main
if (ArmPlatformIsPrimaryCore (MpId)) {
+ // Initialize the Serial Port
+ SerialPortInitialize ();
+ CharCount = AsciiSPrint (
+ Buffer,
+ sizeof (Buffer),
+ "UEFI firmware (version %s built at %a on %a)\n\r",
+ (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString),
be inclined to use FixedPcdGetPtr() here (and [FixedPcd] in the .INFs
below), to ensure that we don't dereference garbage.
I also wonder whether we need a call to
ProcessLibraryConstructorList() somewhere.
So, maybe these patches need adjustment so that we avoid calling SerialPortInitialize () twice.
[/SAMI]
regards,
Sami Mujawar
+ __TIME__,
+ __DATE__
+ );
+ SerialPortWrite ((UINT8 *)Buffer, CharCount);