]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/PrePeiCore: Invoke constructors for SEC phase
authorRohit Mathew <rohit.mathew@arm.com>
Fri, 22 Jul 2022 17:02:57 +0000 (18:02 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 5 Sep 2022 13:52:51 +0000 (13:52 +0000)
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>
ArmPlatformPkg/PrePeiCore/PrePeiCore.c
ArmPlatformPkg/PrePeiCore/PrePeiCore.h

index 6dd9bcdea24fdc966108e0525e5a239ffcd7bb9b..9c4b25df953dc371084790e468fda3371cbeb44b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file supporting the transition to PEI Core in Normal World for Versatile Express\r
 \r
-  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+  Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -90,6 +90,10 @@ CEntryPoint (
 \r
   // If not primary Jump to Secondary Main\r
   if (ArmPlatformIsPrimaryCore (MpId)) {\r
+    // Invoke "ProcessLibraryConstructorList" to have all library constructors\r
+    // called.\r
+    ProcessLibraryConstructorList ();\r
+\r
     // Initialize the Debug Agent for Source Level Debugging\r
     InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL);\r
     SaveAndSetDebugTimerInterrupt (TRUE);\r
index 0345dd7bdd2a6ec23b367996d7055ff8fb966705..c1e13e23e11e3df8b52d87591bd9d386a99845ba 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file supporting the transition to PEI Core in Normal World for Versatile Express\r
 \r
-  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+  Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -73,4 +73,14 @@ PeiCommonExceptionEntry (
   IN UINTN   LR\r
   );\r
 \r
+/*\r
+ * Autogenerated function that calls the library constructors for all of the\r
+ * module's dependent libraries.\r
+ */\r
+VOID\r
+EFIAPI\r
+ProcessLibraryConstructorList (\r
+  VOID\r
+  );\r
+\r
 #endif\r