Blame SOURCES/0014-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch

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