|
|
cc9195 |
From f4b7aae411d88b2b83f85d20ef06a4032a57e7de Mon Sep 17 00:00:00 2001
|
|
|
cc9195 |
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
cc9195 |
Date: Wed, 14 Oct 2015 13:59:20 +0200
|
|
|
cc9195 |
Subject: ArmPlatformPkg: PrePeiCore: write early hello message to the serial
|
|
|
cc9195 |
port (RH)
|
|
|
cc9195 |
|
|
|
cc9195 |
Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 ->
|
|
|
cc9195 |
RHEL-8.0/20180508-ee3198e672e2 rebase:
|
|
|
cc9195 |
|
|
|
cc9195 |
- reorder the rebase changelog in the commit message so that it reads like
|
|
|
cc9195 |
a blog: place more recent entries near the top
|
|
|
cc9195 |
- no changes to the patch body
|
|
|
cc9195 |
|
|
|
cc9195 |
Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase:
|
|
|
cc9195 |
|
|
|
cc9195 |
- adapt to upstream commit 7e2a8dfe8a9a ("ArmPlatformPkg/PrePeiCore: seed
|
|
|
cc9195 |
temporary stack before entering PEI core", 2017-11-09) -- conflict
|
|
|
cc9195 |
resolution in "ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf"
|
|
|
cc9195 |
|
|
|
cc9195 |
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
|
|
cc9195 |
|
|
|
cc9195 |
- no changes
|
|
|
cc9195 |
|
|
|
cc9195 |
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
|
|
cc9195 |
|
|
|
cc9195 |
- no changes
|
|
|
cc9195 |
|
|
|
cc9195 |
The FixedPcdGetSize() macro expands to an integer constant, therefore an
|
|
|
cc9195 |
optimizing compiler can eliminate the new code, if the platform DSC
|
|
|
cc9195 |
doesn't override the empty string (size=1) default of
|
|
|
cc9195 |
PcdEarlyHelloMessage.
|
|
|
cc9195 |
|
|
|
cc9195 |
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279
|
|
|
cc9195 |
Downstream only:
|
|
|
cc9195 |
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/2996/focus=3433>.
|
|
|
cc9195 |
|
|
|
cc9195 |
Contributed-under: TianoCore Contribution Agreement 1.0
|
|
|
cc9195 |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
cc9195 |
(cherry picked from commit b16c4c505ce0e27305235533eac9236aa66f132e)
|
|
|
cc9195 |
(cherry picked from commit 742e5bf6d5ce5a1e73879d6e5c0dd00feda7a9ac)
|
|
|
cc9195 |
(cherry picked from commit 93d69eb9393cf05af90676253875c59c1bec67fd)
|
|
|
cc9195 |
(cherry picked from commit 638594083b191f84f5d9333eb6147a31570f5a5a)
|
|
|
cc9195 |
---
|
|
|
cc9195 |
ArmPlatformPkg/PrePeiCore/MainMPCore.c | 5 +++++
|
|
|
cc9195 |
ArmPlatformPkg/PrePeiCore/MainUniCore.c | 5 +++++
|
|
|
cc9195 |
ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 1 +
|
|
|
cc9195 |
ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 2 ++
|
|
|
cc9195 |
ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 2 ++
|
|
|
cc9195 |
5 files changed, 15 insertions(+)
|
|
|
cc9195 |
|
|
|
cc9195 |
diff --git a/ArmPlatformPkg/PrePeiCore/MainMPCore.c b/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
|
|
cc9195 |
index dc47adb..cbd7223 100644
|
|
|
cc9195 |
--- a/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
|
|
cc9195 |
+++ b/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
|
|
cc9195 |
@@ -117,6 +117,11 @@ PrimaryMain (
|
|
|
cc9195 |
UINTN TemporaryRamBase;
|
|
|
cc9195 |
UINTN TemporaryRamSize;
|
|
|
cc9195 |
|
|
|
cc9195 |
+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) {
|
|
|
cc9195 |
+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage),
|
|
|
cc9195 |
+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1);
|
|
|
cc9195 |
+ }
|
|
|
cc9195 |
+
|
|
|
cc9195 |
CreatePpiList (&PpiListSize, &PpiList);
|
|
|
cc9195 |
|
|
|
cc9195 |
// Enable the GIC Distributor
|
|
|
cc9195 |
diff --git a/ArmPlatformPkg/PrePeiCore/MainUniCore.c b/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
|
|
cc9195 |
index 134a469..af39fc0 100644
|
|
|
cc9195 |
--- a/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
|
|
cc9195 |
+++ b/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
|
|
cc9195 |
@@ -35,6 +35,11 @@ PrimaryMain (
|
|
|
cc9195 |
UINTN TemporaryRamBase;
|
|
|
cc9195 |
UINTN TemporaryRamSize;
|
|
|
cc9195 |
|
|
|
cc9195 |
+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) {
|
|
|
cc9195 |
+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage),
|
|
|
cc9195 |
+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1);
|
|
|
cc9195 |
+ }
|
|
|
cc9195 |
+
|
|
|
cc9195 |
CreatePpiList (&PpiListSize, &PpiList);
|
|
|
cc9195 |
|
|
|
cc9195 |
// Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at
|
|
|
cc9195 |
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
|
|
cc9195 |
index 1608946..bf843d7 100644
|
|
|
cc9195 |
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
|
|
cc9195 |
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
|
|
cc9195 |
@@ -21,6 +21,7 @@
|
|
|
cc9195 |
#include <Library/DebugLib.h>
|
|
|
cc9195 |
#include <Library/IoLib.h>
|
|
|
cc9195 |
#include <Library/PcdLib.h>
|
|
|
cc9195 |
+#include <Library/SerialPortLib.h>
|
|
|
cc9195 |
|
|
|
cc9195 |
#include <PiPei.h>
|
|
|
cc9195 |
#include <Ppi/TemporaryRamSupport.h>
|
|
|
cc9195 |
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
|
|
cc9195 |
index e3a31fa..1bc0c45 100644
|
|
|
cc9195 |
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
|
|
cc9195 |
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
|
|
cc9195 |
@@ -72,6 +72,8 @@
|
|
|
cc9195 |
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
|
|
cc9195 |
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
|
|
cc9195 |
|
|
|
cc9195 |
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage
|
|
|
cc9195 |
+
|
|
|
cc9195 |
gArmTokenSpaceGuid.PcdGicDistributorBase
|
|
|
cc9195 |
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
|
|
|
cc9195 |
gArmTokenSpaceGuid.PcdGicSgiIntId
|
|
|
cc9195 |
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
|
|
cc9195 |
index ec83cec..b100820 100644
|
|
|
cc9195 |
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
|
|
cc9195 |
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
|
|
cc9195 |
@@ -70,4 +70,6 @@
|
|
|
cc9195 |
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
|
|
cc9195 |
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
|
|
cc9195 |
|
|
|
cc9195 |
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage
|
|
|
cc9195 |
+
|
|
|
cc9195 |
gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack
|
|
|
cc9195 |
--
|
|
|
cc9195 |
1.8.3.1
|
|
|
cc9195 |
|