ArmPlatformPkg/PrePeiCore: Invoke constructors for SEC phase

On platforms that do not have the serial console port pre-initialized
prior to the SEC phase and due to the absence of a call to
"SerialPortInitialize", this results in missing debug logs. So, call
the auto-generated "ProcessLibraryConstructorList" function from SEC
phase to have all the dependent library constructors called
(this includes a call to "SerialPortInitialize").

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Rohit Mathew 2022-07-22 18:02:57 +01:00 committed by mergify[bot]
parent 52bf4eba45
commit 22c45b7c52
2 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Main file supporting the transition to PEI Core in Normal World for Versatile Express Main file supporting the transition to PEI Core in Normal World for Versatile Express
Copyright (c) 2011-2014, ARM Limited. All rights reserved. Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -90,6 +90,10 @@ CEntryPoint (
// If not primary Jump to Secondary Main // If not primary Jump to Secondary Main
if (ArmPlatformIsPrimaryCore (MpId)) { if (ArmPlatformIsPrimaryCore (MpId)) {
// Invoke "ProcessLibraryConstructorList" to have all library constructors
// called.
ProcessLibraryConstructorList ();
// 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);

View File

@ -1,7 +1,7 @@
/** @file /** @file
Main file supporting the transition to PEI Core in Normal World for Versatile Express Main file supporting the transition to PEI Core in Normal World for Versatile Express
Copyright (c) 2011, ARM Limited. All rights reserved. Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -73,4 +73,14 @@ PeiCommonExceptionEntry (
IN UINTN LR IN UINTN LR
); );
/*
* Autogenerated function that calls the library constructors for all of the
* module's dependent libraries.
*/
VOID
EFIAPI
ProcessLibraryConstructorList (
VOID
);
#endif #endif