2020-09-16 14:25:00 +00:00
|
|
|
From f9b6876cb7e14d4e863cc33c8999ece2cf399ff6 Mon Sep 17 00:00:00 2001
|
2017-11-14 15:05:26 +00:00
|
|
|
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
|
Date: Wed, 14 Oct 2015 13:59:20 +0200
|
2018-08-31 17:06:06 +00:00
|
|
|
Subject: [PATCH] ArmPlatformPkg: PrePeiCore: write early hello message to the
|
|
|
|
serial port (RH)
|
2017-11-14 15:05:26 +00:00
|
|
|
|
|
|
|
The FixedPcdGetSize() macro expands to an integer constant, therefore an
|
|
|
|
optimizing compiler can eliminate the new code, if the platform DSC
|
|
|
|
doesn't override the empty string (size=1) default of
|
|
|
|
PcdEarlyHelloMessage.
|
|
|
|
|
|
|
|
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279
|
|
|
|
Downstream only:
|
|
|
|
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/2996/focus=3433>.
|
|
|
|
|
|
|
|
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
|
|
|
|
|
|
|
- no changes
|
|
|
|
|
|
|
|
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
|
|
|
|
|
|
|
- no changes
|
|
|
|
|
|
|
|
Contributed-under: TianoCore Contribution Agreement 1.0
|
|
|
|
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
|
(cherry picked from commit b16c4c505ce0e27305235533eac9236aa66f132e)
|
|
|
|
(cherry picked from commit 742e5bf6d5ce5a1e73879d6e5c0dd00feda7a9ac)
|
2018-05-29 21:06:35 +00:00
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
2017-11-14 15:05:26 +00:00
|
|
|
---
|
|
|
|
ArmPlatformPkg/PrePeiCore/MainMPCore.c | 5 +++++
|
|
|
|
ArmPlatformPkg/PrePeiCore/MainUniCore.c | 5 +++++
|
|
|
|
ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 1 +
|
|
|
|
ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 2 ++
|
|
|
|
ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 2 ++
|
|
|
|
5 files changed, 15 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/ArmPlatformPkg/PrePeiCore/MainMPCore.c b/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
2019-07-11 23:42:10 +00:00
|
|
|
index d379ad8b7a..ff1672f94d 100644
|
2017-11-14 15:05:26 +00:00
|
|
|
--- a/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
|
|
|
+++ b/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
2019-07-11 23:42:10 +00:00
|
|
|
@@ -111,6 +111,11 @@ PrimaryMain (
|
2017-11-14 15:05:26 +00:00
|
|
|
UINTN TemporaryRamBase;
|
|
|
|
UINTN TemporaryRamSize;
|
|
|
|
|
|
|
|
+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) {
|
|
|
|
+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage),
|
|
|
|
+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
CreatePpiList (&PpiListSize, &PpiList);
|
|
|
|
|
|
|
|
// Enable the GIC Distributor
|
|
|
|
diff --git a/ArmPlatformPkg/PrePeiCore/MainUniCore.c b/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
2019-07-11 23:42:10 +00:00
|
|
|
index 1500d2bd51..5b0790beac 100644
|
2017-11-14 15:05:26 +00:00
|
|
|
--- a/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
|
|
|
+++ b/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
2019-07-11 23:42:10 +00:00
|
|
|
@@ -29,6 +29,11 @@ PrimaryMain (
|
2017-11-14 15:05:26 +00:00
|
|
|
UINTN TemporaryRamBase;
|
|
|
|
UINTN TemporaryRamSize;
|
|
|
|
|
|
|
|
+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) {
|
|
|
|
+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage),
|
|
|
|
+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
CreatePpiList (&PpiListSize, &PpiList);
|
|
|
|
|
|
|
|
// Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at
|
|
|
|
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
2019-07-11 23:42:10 +00:00
|
|
|
index 7140c7f5b5..1d69a2b468 100644
|
2017-11-14 15:05:26 +00:00
|
|
|
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
|
|
|
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
2019-07-11 23:42:10 +00:00
|
|
|
@@ -15,6 +15,7 @@
|
2017-11-14 15:05:26 +00:00
|
|
|
#include <Library/DebugLib.h>
|
|
|
|
#include <Library/IoLib.h>
|
|
|
|
#include <Library/PcdLib.h>
|
|
|
|
+#include <Library/SerialPortLib.h>
|
|
|
|
|
|
|
|
#include <PiPei.h>
|
|
|
|
#include <Ppi/TemporaryRamSupport.h>
|
|
|
|
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
2020-09-16 14:25:00 +00:00
|
|
|
index fb01dd1a11..a6681c1032 100644
|
2017-11-14 15:05:26 +00:00
|
|
|
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
|
|
|
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
2020-09-16 14:25:00 +00:00
|
|
|
@@ -69,6 +69,8 @@
|
2017-11-14 15:05:26 +00:00
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
|
|
|
|
|
|
|
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage
|
|
|
|
+
|
|
|
|
gArmTokenSpaceGuid.PcdGicDistributorBase
|
|
|
|
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
|
|
|
|
gArmTokenSpaceGuid.PcdGicSgiIntId
|
|
|
|
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
2020-09-16 14:25:00 +00:00
|
|
|
index e9eb092d3a..a02ff39b7a 100644
|
2017-11-14 15:05:26 +00:00
|
|
|
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
|
|
|
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
2020-09-16 14:25:00 +00:00
|
|
|
@@ -68,3 +68,5 @@
|
2017-11-14 15:05:26 +00:00
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
2018-05-29 21:06:35 +00:00
|
|
|
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack
|
2017-11-14 15:05:26 +00:00
|
|
|
+
|
|
|
|
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage
|