public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code.
@ 2020-06-10  2:56 Tan, Ming
  2020-06-10  2:56 ` [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about " Tan, Ming
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Tan, Ming @ 2020-06-10  2:56 UTC (permalink / raw)
  To: devel; +Cc: Jian J Wang, Hao A Wu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786

In order to support enable/disable report status code through memory
or serial dynamic, change the following PCDs from [PcdsFeatureFlag] to
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]:
  PcdStatusCodeUseSerial
  PcdStatusCodeUseMemory
The original plaforms can use PcdsFixedAtBuild in .dsc files to save size.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
V4: No change for this 1/4 patch, just modify the 2-4/4 patchs.
V3: Split one patch to several patchs, each Pkg has one patch.
V2: Change the new type from [PcdsDynamic] to [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
    And set to PcdsFixedAtBuild in the original platform .dsc files.

 MdeModulePkg/MdeModulePkg.dec                 | 26 +++++++++----------
 .../Pei/StatusCodeHandlerPei.c                |  6 ++---
 .../Pei/StatusCodeHandlerPei.inf              |  6 ++---
 .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c  | 16 ++++++------
 .../StatusCodeHandlerRuntimeDxe.inf           |  6 ++---
 .../Smm/StatusCodeHandlerSmm.c                | 10 +++----
 .../Smm/StatusCodeHandlerSmm.inf              |  6 ++---
 7 files changed, 35 insertions(+), 41 deletions(-)

diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 4f44af694862..843e963ad34b 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -760,19 +760,6 @@ [PcdsFeatureFlag]
   # @Prompt Enable PCI bridge IO alignment probe.
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciBridgeIoAlignmentProbe|FALSE|BOOLEAN|0x0001004e
 
-  ## Indicates if StatusCode is reported via Serial port.<BR><BR>
-  #   TRUE  - Reports StatusCode via Serial port.<BR>
-  #   FALSE - Does not report StatusCode via Serial port.<BR>
-  # @Prompt Enable StatusCode via Serial port.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022
-
-  ## Indicates if StatusCode is stored in memory.
-  #  The memory is boot time memory in PEI Phase and is runtime memory in DXE Phase.<BR><BR>
-  #   TRUE  - Stores StatusCode in memory.<BR>
-  #   FALSE - Does not store StatusCode in memory.<BR>
-  # @Prompt Enable StatusCode via memory.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEAN|0x00010023
-
   ## Indicates if PEI phase StatusCode will be replayed in DXE phase.<BR><BR>
   #   TRUE  - Replays PEI phase StatusCode in DXE phased.<BR>
   #   FALSE - Does not replay PEI phase StatusCode in DXE phase.<BR>
@@ -2001,6 +1988,19 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
   # @Prompt TCG Platform Firmware Profile revision.
   gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision|0|UINT32|0x00010077
 
+  ## Indicates if StatusCode is reported via Serial port.<BR><BR>
+  #   TRUE  - Reports StatusCode via Serial port.<BR>
+  #   FALSE - Does not report StatusCode via Serial port.<BR>
+  # @Prompt Enable StatusCode via Serial port.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022
+
+  ## Indicates if StatusCode is stored in memory.
+  #  The memory is boot time memory in PEI Phase and is runtime memory in DXE Phase.<BR><BR>
+  #   TRUE  - Stores StatusCode in memory.<BR>
+  #   FALSE - Does not store StatusCode in memory.<BR>
+  # @Prompt Enable StatusCode via memory.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEAN|0x00010023
+
 [PcdsPatchableInModule]
   ## Specify memory size with page number for PEI code when
   #  Loading Module at Fixed Address feature is enabled.
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
index 1b07f92f3ce8..9b2ea4ee84d9 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
@@ -2,7 +2,7 @@
   Report Status Code Handler PEIM which produces general handlers and hook them
   onto the PEI status code router.
 
-  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -45,13 +45,13 @@ StatusCodeHandlerPeiEntry (
   // If enable UseSerial, then initialize serial port.
   // if enable UseMemory, then initialize memory status code worker.
   //
-  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
+  if (PcdGetBool (PcdStatusCodeUseSerial)) {
     Status = SerialPortInitialize();
     ASSERT_EFI_ERROR (Status);
     Status = RscHandlerPpi->Register (SerialStatusCodeReportWorker);
     ASSERT_EFI_ERROR (Status);
   }
-  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
+  if (PcdGetBool (PcdStatusCodeUseMemory)) {
     Status = MemoryStatusCodeInitializeWorker ();
     ASSERT_EFI_ERROR (Status);
     Status = RscHandlerPpi->Register (MemoryStatusCodeReportWorker);
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
index 8aef9af34a05..64380ddfaccc 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
@@ -53,11 +53,9 @@ [Guids]
 [Ppis]
   gEfiPeiRscHandlerPpiGuid                      ## CONSUMES
 
-[FeaturePcd]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
-
 [Pcd]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory    ## SOMETIMES_CONSUMES
 
 [Depex]
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c
index 79cc48fa55a4..a8c0fe5b7149 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c
@@ -2,7 +2,7 @@
   Status Code Handler Driver which produces general handlers and hook them
   onto the DXE status code router.
 
-  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -29,7 +29,7 @@ UnregisterBootTimeHandlers (
   IN VOID             *Context
   )
 {
-  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
+  if (PcdGetBool (PcdStatusCodeUseSerial)) {
     mRscHandlerProtocol->Unregister (SerialStatusCodeReportWorker);
   }
 }
@@ -80,14 +80,14 @@ InitializationDispatcherWorker (
   // If enable UseSerial, then initialize serial port.
   // if enable UseRuntimeMemory, then initialize runtime memory status code worker.
   //
-  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
+  if (PcdGetBool (PcdStatusCodeUseSerial)) {
     //
     // Call Serial Port Lib API to initialize serial port.
     //
     Status = SerialPortInitialize ();
     ASSERT_EFI_ERROR (Status);
   }
-  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
+  if (PcdGetBool (PcdStatusCodeUseMemory)) {
     Status = RtMemoryStatusCodeInitializeWorker ();
     ASSERT_EFI_ERROR (Status);
   }
@@ -115,7 +115,7 @@ InitializationDispatcherWorker (
         //
         // Dispatch records to devices based on feature flag.
         //
-        if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
+        if (PcdGetBool (PcdStatusCodeUseSerial)) {
           SerialStatusCodeReportWorker (
             Record[Index].CodeType,
             Record[Index].Value,
@@ -124,7 +124,7 @@ InitializationDispatcherWorker (
             NULL
             );
         }
-        if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
+        if (PcdGetBool (PcdStatusCodeUseMemory)) {
           RtMemoryStatusCodeReportWorker (
             Record[Index].CodeType,
             Record[Index].Value,
@@ -171,10 +171,10 @@ StatusCodeHandlerRuntimeDxeEntry (
   //
   InitializationDispatcherWorker ();
 
-  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
+  if (PcdGetBool (PcdStatusCodeUseSerial)) {
     mRscHandlerProtocol->Register (SerialStatusCodeReportWorker, TPL_HIGH_LEVEL);
   }
-  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
+  if (PcdGetBool (PcdStatusCodeUseMemory)) {
     mRscHandlerProtocol->Register (RtMemoryStatusCodeReportWorker, TPL_HIGH_LEVEL);
   }
 
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
index d74c2a55dcaf..faadfd9578fe 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
@@ -58,12 +58,10 @@ [Guids]
 [Protocols]
   gEfiRscHandlerProtocolGuid                    ## CONSUMES
 
-[FeaturePcd]
+[Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn  ## CONSUMES
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
-
-[Pcd]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory   ## SOMETIMES_CONSUMES
 
 [Depex]
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c
index f54991ed3f67..20271571ded4 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c
@@ -2,7 +2,7 @@
   Status Code Handler Driver which produces general handlers and hook them
   onto the SMM status code router.
 
-  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -28,14 +28,14 @@ InitializationDispatcherWorker (
   // If enable UseSerial, then initialize serial port.
   // if enable UseRuntimeMemory, then initialize runtime memory status code worker.
   //
-  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
+  if (PcdGetBool (PcdStatusCodeUseSerial)) {
     //
     // Call Serial Port Lib API to initialize serial port.
     //
     Status = SerialPortInitialize ();
     ASSERT_EFI_ERROR (Status);
   }
-  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
+  if (PcdGetBool (PcdStatusCodeUseMemory)) {
     Status = MemoryStatusCodeInitializeWorker ();
     ASSERT_EFI_ERROR (Status);
   }
@@ -73,10 +73,10 @@ StatusCodeHandlerSmmEntry (
   //
   InitializationDispatcherWorker ();
 
-  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
+  if (PcdGetBool (PcdStatusCodeUseSerial)) {
     mRscHandlerProtocol->Register (SerialStatusCodeReportWorker);
   }
-  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
+  if (PcdGetBool (PcdStatusCodeUseMemory)) {
     mRscHandlerProtocol->Register (MemoryStatusCodeReportWorker);
   }
 
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
index 47d0545f9591..4e24d87e55d1 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
@@ -53,11 +53,9 @@ [Guids]
 [Protocols]
   gEfiSmmRscHandlerProtocolGuid                 ## CONSUMES
 
-[FeaturePcd]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
-
 [Pcd]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128| gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory   ## SOMETIMES_CONSUMES
 
 [Depex]
-- 
2.24.0.windows.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about status code
  2020-06-10  2:56 [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
@ 2020-06-10  2:56 ` Tan, Ming
  2020-06-10  3:17   ` Ni, Ray
  2020-06-10  2:56 ` [PATCH v4 3/4] UefiPayloadPkg/UefiPayloadPkgIa*.dsc: Change some PCDs type Tan, Ming
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Tan, Ming @ 2020-06-10  2:56 UTC (permalink / raw)
  To: devel; +Cc: Jordan Justen, Andrew Fish, Ray Ni

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786

Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory
in MdeModulePkg.dec are changed, so change them from
PcdsFeatureFlag to PcdsFixedAtBuild in dsc file.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
V4: Adjust the location of PCDs, put them in the last of same TokenSpaceGuid
    instead of last of section.
V3: Split one patch to several patchs, each Pkg has one patch.
 EmulatorPkg/EmulatorPkg.dsc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index 1fc924ae5a16..86a62717353b 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -4,7 +4,7 @@
 # The Emulation Platform can be used to debug individual modules, prior to creating
 # a real platform. This also provides an example for how an DSC is created.
 #
-# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
 # Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -174,7 +174,6 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_DRIVER, Li
 
 [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables|FALSE
 
@@ -186,6 +185,7 @@ [PcdsFixedAtBuild]
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x1f
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|0x0
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule|0x0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
 
   gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x002a0000
   gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0x10000
-- 
2.24.0.windows.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v4 3/4] UefiPayloadPkg/UefiPayloadPkgIa*.dsc: Change some PCDs type
  2020-06-10  2:56 [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
  2020-06-10  2:56 ` [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about " Tan, Ming
@ 2020-06-10  2:56 ` Tan, Ming
  2020-06-12  0:41   ` Guo Dong
  2020-06-10  2:56 ` [PATCH v4 4/4] OvmfPkg/OvmfPkg*.dsc: Change PCDs type about status code Tan, Ming
  2020-06-17  6:55 ` [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for " Wang, Jian J
  3 siblings, 1 reply; 8+ messages in thread
From: Tan, Ming @ 2020-06-10  2:56 UTC (permalink / raw)
  To: devel; +Cc: Maurice Ma, Guo Dong, Benjamin You

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786

Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory
in MdeModulePkg.dec are changed, so change them from
PcdsFeatureFlag to PcdsFixedAtBuild in dsc files.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
V4: Adjust the location of PCDs, put them after PcdVpdBaseAddress,
    and make PCDs together with same TokenSpaceGuid
    instead of put them in the last of section.
V3: Split one patch to several patchs, each Pkg has one patch.
 UefiPayloadPkg/UefiPayloadPkgIa32.dsc    | 14 +++++++-------
 UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
index d52945442e0e..c6c47833871b 100644
--- a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
@@ -3,7 +3,7 @@
 #
 # Provides drivers and definitions to create uefi payload for bootloaders.
 #
-# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -264,12 +264,6 @@ [LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
 #
 ################################################################################
 [PcdsFeatureFlag]
-!if $(TARGET) == DEBUG
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-!else
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-!endif
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
@@ -284,6 +278,12 @@ [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
+!if $(TARGET) == DEBUG
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
+!else
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+!endif
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
 
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|$(PCIE_BASE)
diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
index 0736cd995476..5559b1258521 100644
--- a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
@@ -3,7 +3,7 @@
 #
 # Provides drivers and definitions to create uefi payload for bootloaders.
 #
-# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -265,12 +265,6 @@ [LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
 #
 ################################################################################
 [PcdsFeatureFlag]
-!if $(TARGET) == DEBUG
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-!else
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-!endif
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
@@ -285,6 +279,12 @@ [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
+!if $(TARGET) == DEBUG
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
+!else
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+!endif
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
 
-- 
2.24.0.windows.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v4 4/4] OvmfPkg/OvmfPkg*.dsc: Change PCDs type about status code
  2020-06-10  2:56 [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
  2020-06-10  2:56 ` [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about " Tan, Ming
  2020-06-10  2:56 ` [PATCH v4 3/4] UefiPayloadPkg/UefiPayloadPkgIa*.dsc: Change some PCDs type Tan, Ming
@ 2020-06-10  2:56 ` Tan, Ming
  2020-06-11 14:23   ` Laszlo Ersek
  2020-06-17  6:55 ` [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for " Wang, Jian J
  3 siblings, 1 reply; 8+ messages in thread
From: Tan, Ming @ 2020-06-10  2:56 UTC (permalink / raw)
  To: devel; +Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786

Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory
in MdeModulePkg.dec are changed, so change them from
PcdsFeatureFlag to PcdsFixedAtBuild in dsc files.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
V4: Adjust the location of PCDs, put them after PcdVpdBaseAddress,
    and make PCDs together with same TokenSpaceGuid
    instead of put them in the last of section.
V3: Split one patch to several patchs, each Pkg has one patch.
 OvmfPkg/OvmfPkgIa32.dsc    | 6 +++---
 OvmfPkg/OvmfPkgIa32X64.dsc | 6 +++---
 OvmfPkg/OvmfPkgX64.dsc     | 6 +++---
 OvmfPkg/OvmfXen.dsc        | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index d0df9cbbfb2b..468beb7e8226 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
 #
-#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -449,8 +449,6 @@ [LibraryClasses.common.SMM_CORE]
 ################################################################################
 [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -493,6 +491,8 @@ [PcdsFixedAtBuild]
 !endif
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
 
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
 
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index b3ae62fee92b..3c9623923dc9 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
 #
-#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -453,8 +453,6 @@ [LibraryClasses.common.SMM_CORE]
 ################################################################################
 [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -497,6 +495,8 @@ [PcdsFixedAtBuild]
 !endif
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
 
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
 
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index f7fe75ebf531..af2a78521093 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
 #
-#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -453,8 +453,6 @@ [LibraryClasses.common.SMM_CORE]
 ################################################################################
 [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -497,6 +495,8 @@ [PcdsFixedAtBuild]
 !endif
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
 
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
 
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 3af0ee705407..782803cb2787 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
 #
-#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
 #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
 #  Copyright (c) 2019, Citrix Systems, Inc.
 #
@@ -334,8 +334,6 @@ [LibraryClasses.common.UEFI_APPLICATION]
 ################################################################################
 [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -371,6 +369,8 @@ [PcdsFixedAtBuild]
 !endif
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
 
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
 
-- 
2.24.0.windows.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about status code
  2020-06-10  2:56 ` [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about " Tan, Ming
@ 2020-06-10  3:17   ` Ni, Ray
  0 siblings, 0 replies; 8+ messages in thread
From: Ni, Ray @ 2020-06-10  3:17 UTC (permalink / raw)
  To: Tan, Ming, devel@edk2.groups.io; +Cc: Justen, Jordan L, Andrew Fish

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Tan, Ming <ming.tan@intel.com>
> Sent: Wednesday, June 10, 2020 10:57 AM
> To: devel@edk2.groups.io
> Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about status code
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786
> 
> Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory
> in MdeModulePkg.dec are changed, so change them from
> PcdsFeatureFlag to PcdsFixedAtBuild in dsc file.
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Ming Tan <ming.tan@intel.com>
> ---
> V4: Adjust the location of PCDs, put them in the last of same TokenSpaceGuid
>     instead of last of section.
> V3: Split one patch to several patchs, each Pkg has one patch.
>  EmulatorPkg/EmulatorPkg.dsc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
> index 1fc924ae5a16..86a62717353b 100644
> --- a/EmulatorPkg/EmulatorPkg.dsc
> +++ b/EmulatorPkg/EmulatorPkg.dsc
> @@ -4,7 +4,7 @@
>  # The Emulation Platform can be used to debug individual modules, prior to creating
>  # a real platform. This also provides an example for how an DSC is created.
>  #
> -# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
>  # Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> @@ -174,7 +174,6 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_DRIVER, Li
> 
>  [PcdsFeatureFlag]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables|FALSE
> 
> @@ -186,6 +185,7 @@ [PcdsFixedAtBuild]
>    gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x1f
>    gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|0x0
>    gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule|0x0
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
> 
>    gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareFdSize|0x002a0000
>    gEmulatorPkgTokenSpaceGuid.PcdEmuFirmwareBlockSize|0x10000
> --
> 2.24.0.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 4/4] OvmfPkg/OvmfPkg*.dsc: Change PCDs type about status code
  2020-06-10  2:56 ` [PATCH v4 4/4] OvmfPkg/OvmfPkg*.dsc: Change PCDs type about status code Tan, Ming
@ 2020-06-11 14:23   ` Laszlo Ersek
  0 siblings, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2020-06-11 14:23 UTC (permalink / raw)
  To: Ming Tan, devel; +Cc: Jordan Justen, Ard Biesheuvel

On 06/10/20 04:56, Ming Tan wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786
> 
> Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory
> in MdeModulePkg.dec are changed, so change them from
> PcdsFeatureFlag to PcdsFixedAtBuild in dsc files.
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Ming Tan <ming.tan@intel.com>
> ---
> V4: Adjust the location of PCDs, put them after PcdVpdBaseAddress,
>     and make PCDs together with same TokenSpaceGuid
>     instead of put them in the last of section.
> V3: Split one patch to several patchs, each Pkg has one patch.
>  OvmfPkg/OvmfPkgIa32.dsc    | 6 +++---
>  OvmfPkg/OvmfPkgIa32X64.dsc | 6 +++---
>  OvmfPkg/OvmfPkgX64.dsc     | 6 +++---
>  OvmfPkg/OvmfXen.dsc        | 6 +++---
>  4 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index d0df9cbbfb2b..468beb7e8226 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
>  #
> -#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
>  #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
> @@ -449,8 +449,6 @@ [LibraryClasses.common.SMM_CORE]
>  ################################################################################
>  [PcdsFeatureFlag]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
> @@ -493,6 +491,8 @@ [PcdsFixedAtBuild]
>  !endif
>  
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>  
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
>  
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index b3ae62fee92b..3c9623923dc9 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
>  #
> -#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
>  #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
> @@ -453,8 +453,6 @@ [LibraryClasses.common.SMM_CORE]
>  ################################################################################
>  [PcdsFeatureFlag]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
> @@ -497,6 +495,8 @@ [PcdsFixedAtBuild]
>  !endif
>  
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>  
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
>  
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index f7fe75ebf531..af2a78521093 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
>  #
> -#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
>  #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
> @@ -453,8 +453,6 @@ [LibraryClasses.common.SMM_CORE]
>  ################################################################################
>  [PcdsFeatureFlag]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
> @@ -497,6 +495,8 @@ [PcdsFixedAtBuild]
>  !endif
>  
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>  
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
>  
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 3af0ee705407..782803cb2787 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  EFI/Framework Open Virtual Machine Firmware (OVMF) platform
>  #
> -#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
>  #  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
>  #  Copyright (c) 2019, Citrix Systems, Inc.
>  #
> @@ -334,8 +334,6 @@ [LibraryClasses.common.UEFI_APPLICATION]
>  ################################################################################
>  [PcdsFeatureFlag]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
> @@ -371,6 +369,8 @@ [PcdsFixedAtBuild]
>  !endif
>  
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
>  
>    gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
>  
> 

Thanks for the update!

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 3/4] UefiPayloadPkg/UefiPayloadPkgIa*.dsc: Change some PCDs type
  2020-06-10  2:56 ` [PATCH v4 3/4] UefiPayloadPkg/UefiPayloadPkgIa*.dsc: Change some PCDs type Tan, Ming
@ 2020-06-12  0:41   ` Guo Dong
  0 siblings, 0 replies; 8+ messages in thread
From: Guo Dong @ 2020-06-12  0:41 UTC (permalink / raw)
  To: Tan, Ming, devel@edk2.groups.io; +Cc: Ma, Maurice, You, Benjamin


Reviewed-by: Dong, Guo <guo.dong@intel.com>

Thanks,
Guo

> -----Original Message-----
> From: Tan, Ming <ming.tan@intel.com>
> Sent: Tuesday, June 9, 2020 7:57 PM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo
> <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>
> Subject: [PATCH v4 3/4] UefiPayloadPkg/UefiPayloadPkgIa*.dsc: Change
> some PCDs type
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786
> 
> Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory
> in MdeModulePkg.dec are changed, so change them from
> PcdsFeatureFlag to PcdsFixedAtBuild in dsc files.
> 
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> Signed-off-by: Ming Tan <ming.tan@intel.com>
> ---
> V4: Adjust the location of PCDs, put them after PcdVpdBaseAddress,
>     and make PCDs together with same TokenSpaceGuid
>     instead of put them in the last of section.
> V3: Split one patch to several patchs, each Pkg has one patch.
>  UefiPayloadPkg/UefiPayloadPkgIa32.dsc    | 14 +++++++-------
>  UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 14 +++++++-------
>  2 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
> b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
> index d52945442e0e..c6c47833871b 100644
> --- a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
> @@ -3,7 +3,7 @@
>  #
>  # Provides drivers and definitions to create uefi payload for bootloaders.
>  #
> -# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
>  ##
> @@ -264,12 +264,6 @@
> [LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLIC
> ATION]
>  #
> 
> ##########################################################
> ######################
>  [PcdsFeatureFlag]
> -!if $(TARGET) == DEBUG
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
> -!else
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> -!endif
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
> @@ -284,6 +278,12 @@ [PcdsFixedAtBuild]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
> +!if $(TARGET) == DEBUG
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
> +!else
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> +!endif
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21,
> 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66,
> 0x23, 0x31 }
> 
>    gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|$(PCIE_BASE)
> diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> index 0736cd995476..5559b1258521 100644
> --- a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> @@ -3,7 +3,7 @@
>  #
>  # Provides drivers and definitions to create uefi payload for bootloaders.
>  #
> -# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
>  ##
> @@ -265,12 +265,6 @@
> [LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLIC
> ATION]
>  #
> 
> ##########################################################
> ######################
>  [PcdsFeatureFlag]
> -!if $(TARGET) == DEBUG
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
> -!else
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> -!endif
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
> @@ -285,6 +279,12 @@ [PcdsFixedAtBuild]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
> +!if $(TARGET) == DEBUG
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
> +!else
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> +!endif
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
>    gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21,
> 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66,
> 0x23, 0x31 }
> 
> --
> 2.24.0.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code.
  2020-06-10  2:56 [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
                   ` (2 preceding siblings ...)
  2020-06-10  2:56 ` [PATCH v4 4/4] OvmfPkg/OvmfPkg*.dsc: Change PCDs type about status code Tan, Ming
@ 2020-06-17  6:55 ` Wang, Jian J
  3 siblings, 0 replies; 8+ messages in thread
From: Wang, Jian J @ 2020-06-17  6:55 UTC (permalink / raw)
  To: Tan, Ming, devel@edk2.groups.io; +Cc: Wu, Hao A

Hi Ming,

I'd suggest to keep the type of FeatureFlag for these two PCDs.
So those platforms, which don't want to use dynamic type, have
no need to update it's dsc file.

Regards,
Jian

> -----Original Message-----
> From: Tan, Ming <ming.tan@intel.com>
> Sent: Wednesday, June 10, 2020 10:57 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> Subject: [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786
> 
> In order to support enable/disable report status code through memory
> or serial dynamic, change the following PCDs from [PcdsFeatureFlag] to
> [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]:
>   PcdStatusCodeUseSerial
>   PcdStatusCodeUseMemory
> The original plaforms can use PcdsFixedAtBuild in .dsc files to save size.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Signed-off-by: Ming Tan <ming.tan@intel.com>
> ---
> V4: No change for this 1/4 patch, just modify the 2-4/4 patchs.
> V3: Split one patch to several patchs, each Pkg has one patch.
> V2: Change the new type from [PcdsDynamic] to [PcdsFixedAtBuild,
> PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>     And set to PcdsFixedAtBuild in the original platform .dsc files.
> 
>  MdeModulePkg/MdeModulePkg.dec                 | 26 +++++++++----------
>  .../Pei/StatusCodeHandlerPei.c                |  6 ++---
>  .../Pei/StatusCodeHandlerPei.inf              |  6 ++---
>  .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c  | 16 ++++++------
>  .../StatusCodeHandlerRuntimeDxe.inf           |  6 ++---
>  .../Smm/StatusCodeHandlerSmm.c                | 10 +++----
>  .../Smm/StatusCodeHandlerSmm.inf              |  6 ++---
>  7 files changed, 35 insertions(+), 41 deletions(-)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dec
> b/MdeModulePkg/MdeModulePkg.dec
> index 4f44af694862..843e963ad34b 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -760,19 +760,6 @@ [PcdsFeatureFlag]
>    # @Prompt Enable PCI bridge IO alignment probe.
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdPciBridgeIoAlignmentProbe|FALSE|BOO
> LEAN|0x0001004e
> 
> -  ## Indicates if StatusCode is reported via Serial port.<BR><BR>
> -  #   TRUE  - Reports StatusCode via Serial port.<BR>
> -  #   FALSE - Does not report StatusCode via Serial port.<BR>
> -  # @Prompt Enable StatusCode via Serial port.
> -
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|
> 0x00010022
> -
> -  ## Indicates if StatusCode is stored in memory.
> -  #  The memory is boot time memory in PEI Phase and is runtime memory in
> DXE Phase.<BR><BR>
> -  #   TRUE  - Stores StatusCode in memory.<BR>
> -  #   FALSE - Does not store StatusCode in memory.<BR>
> -  # @Prompt Enable StatusCode via memory.
> -
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEA
> N|0x00010023
> -
>    ## Indicates if PEI phase StatusCode will be replayed in DXE phase.<BR><BR>
>    #   TRUE  - Replays PEI phase StatusCode in DXE phased.<BR>
>    #   FALSE - Does not replay PEI phase StatusCode in DXE phase.<BR>
> @@ -2001,6 +1988,19 @@ [PcdsFixedAtBuild, PcdsPatchableInModule,
> PcdsDynamic, PcdsDynamicEx]
>    # @Prompt TCG Platform Firmware Profile revision.
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision|0|UINT3
> 2|0x00010077
> 
> +  ## Indicates if StatusCode is reported via Serial port.<BR><BR>
> +  #   TRUE  - Reports StatusCode via Serial port.<BR>
> +  #   FALSE - Does not report StatusCode via Serial port.<BR>
> +  # @Prompt Enable StatusCode via Serial port.
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|
> 0x00010022
> +
> +  ## Indicates if StatusCode is stored in memory.
> +  #  The memory is boot time memory in PEI Phase and is runtime memory in
> DXE Phase.<BR><BR>
> +  #   TRUE  - Stores StatusCode in memory.<BR>
> +  #   FALSE - Does not store StatusCode in memory.<BR>
> +  # @Prompt Enable StatusCode via memory.
> +
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE|BOOLEA
> N|0x00010023
> +
>  [PcdsPatchableInModule]
>    ## Specify memory size with page number for PEI code when
>    #  Loading Module at Fixed Address feature is enabled.
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
> index 1b07f92f3ce8..9b2ea4ee84d9 100644
> --- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
> @@ -2,7 +2,7 @@
>    Report Status Code Handler PEIM which produces general handlers and hook
> them
>    onto the PEI status code router.
> 
> -  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -45,13 +45,13 @@ StatusCodeHandlerPeiEntry (
>    // If enable UseSerial, then initialize serial port.
>    // if enable UseMemory, then initialize memory status code worker.
>    //
> -  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
> +  if (PcdGetBool (PcdStatusCodeUseSerial)) {
>      Status = SerialPortInitialize();
>      ASSERT_EFI_ERROR (Status);
>      Status = RscHandlerPpi->Register (SerialStatusCodeReportWorker);
>      ASSERT_EFI_ERROR (Status);
>    }
> -  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
> +  if (PcdGetBool (PcdStatusCodeUseMemory)) {
>      Status = MemoryStatusCodeInitializeWorker ();
>      ASSERT_EFI_ERROR (Status);
>      Status = RscHandlerPpi->Register (MemoryStatusCodeReportWorker);
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
> index 8aef9af34a05..64380ddfaccc 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
> @@ -53,11 +53,9 @@ [Guids]
>  [Ppis]
>    gEfiPeiRscHandlerPpiGuid                      ## CONSUMES
> 
> -[FeaturePcd]
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ##
> CONSUMES
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
> -
>  [Pcd]
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ##
> CONSUMES
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|gEfiMdeMod
> ulePkgTokenSpaceGuid.PcdStatusCodeUseMemory    ##
> SOMETIMES_CONSUMES
> 
>  [Depex]
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> index 79cc48fa55a4..a8c0fe5b7149 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> @@ -2,7 +2,7 @@
>    Status Code Handler Driver which produces general handlers and hook them
>    onto the DXE status code router.
> 
> -  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -29,7 +29,7 @@ UnregisterBootTimeHandlers (
>    IN VOID             *Context
>    )
>  {
> -  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
> +  if (PcdGetBool (PcdStatusCodeUseSerial)) {
>      mRscHandlerProtocol->Unregister (SerialStatusCodeReportWorker);
>    }
>  }
> @@ -80,14 +80,14 @@ InitializationDispatcherWorker (
>    // If enable UseSerial, then initialize serial port.
>    // if enable UseRuntimeMemory, then initialize runtime memory status code
> worker.
>    //
> -  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
> +  if (PcdGetBool (PcdStatusCodeUseSerial)) {
>      //
>      // Call Serial Port Lib API to initialize serial port.
>      //
>      Status = SerialPortInitialize ();
>      ASSERT_EFI_ERROR (Status);
>    }
> -  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
> +  if (PcdGetBool (PcdStatusCodeUseMemory)) {
>      Status = RtMemoryStatusCodeInitializeWorker ();
>      ASSERT_EFI_ERROR (Status);
>    }
> @@ -115,7 +115,7 @@ InitializationDispatcherWorker (
>          //
>          // Dispatch records to devices based on feature flag.
>          //
> -        if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
> +        if (PcdGetBool (PcdStatusCodeUseSerial)) {
>            SerialStatusCodeReportWorker (
>              Record[Index].CodeType,
>              Record[Index].Value,
> @@ -124,7 +124,7 @@ InitializationDispatcherWorker (
>              NULL
>              );
>          }
> -        if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
> +        if (PcdGetBool (PcdStatusCodeUseMemory)) {
>            RtMemoryStatusCodeReportWorker (
>              Record[Index].CodeType,
>              Record[Index].Value,
> @@ -171,10 +171,10 @@ StatusCodeHandlerRuntimeDxeEntry (
>    //
>    InitializationDispatcherWorker ();
> 
> -  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
> +  if (PcdGetBool (PcdStatusCodeUseSerial)) {
>      mRscHandlerProtocol->Register (SerialStatusCodeReportWorker,
> TPL_HIGH_LEVEL);
>    }
> -  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
> +  if (PcdGetBool (PcdStatusCodeUseMemory)) {
>      mRscHandlerProtocol->Register (RtMemoryStatusCodeReportWorker,
> TPL_HIGH_LEVEL);
>    }
> 
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.inf
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.inf
> index d74c2a55dcaf..faadfd9578fe 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.inf
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.inf
> @@ -58,12 +58,10 @@ [Guids]
>  [Protocols]
>    gEfiRscHandlerProtocolGuid                    ## CONSUMES
> 
> -[FeaturePcd]
> +[Pcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeReplayIn  ## CONSUMES
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ##
> CONSUMES
>    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
> -
> -[Pcd]
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ##
> CONSUMES
>    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128|
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory   ##
> SOMETIMES_CONSUMES
> 
>  [Depex]
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.
> c
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.
> c
> index f54991ed3f67..20271571ded4 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.
> c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.
> c
> @@ -2,7 +2,7 @@
>    Status Code Handler Driver which produces general handlers and hook them
>    onto the SMM status code router.
> 
> -  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -28,14 +28,14 @@ InitializationDispatcherWorker (
>    // If enable UseSerial, then initialize serial port.
>    // if enable UseRuntimeMemory, then initialize runtime memory status code
> worker.
>    //
> -  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
> +  if (PcdGetBool (PcdStatusCodeUseSerial)) {
>      //
>      // Call Serial Port Lib API to initialize serial port.
>      //
>      Status = SerialPortInitialize ();
>      ASSERT_EFI_ERROR (Status);
>    }
> -  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
> +  if (PcdGetBool (PcdStatusCodeUseMemory)) {
>      Status = MemoryStatusCodeInitializeWorker ();
>      ASSERT_EFI_ERROR (Status);
>    }
> @@ -73,10 +73,10 @@ StatusCodeHandlerSmmEntry (
>    //
>    InitializationDispatcherWorker ();
> 
> -  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
> +  if (PcdGetBool (PcdStatusCodeUseSerial)) {
>      mRscHandlerProtocol->Register (SerialStatusCodeReportWorker);
>    }
> -  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {
> +  if (PcdGetBool (PcdStatusCodeUseMemory)) {
>      mRscHandlerProtocol->Register (MemoryStatusCodeReportWorker);
>    }
> 
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i
> nf
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i
> nf
> index 47d0545f9591..4e24d87e55d1 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i
> nf
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.i
> nf
> @@ -53,11 +53,9 @@ [Guids]
>  [Protocols]
>    gEfiSmmRscHandlerProtocolGuid                 ## CONSUMES
> 
> -[FeaturePcd]
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ##
> CONSUMES
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
> -
>  [Pcd]
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial ## CONSUMES
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory ##
> CONSUMES
>    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize |128|
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory   ##
> SOMETIMES_CONSUMES
> 
>  [Depex]
> --
> 2.24.0.windows.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-17  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10  2:56 [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
2020-06-10  2:56 ` [PATCH v4 2/4] EmulatorPkg/EmulatorPkg.dsc: Change PCDs type about " Tan, Ming
2020-06-10  3:17   ` Ni, Ray
2020-06-10  2:56 ` [PATCH v4 3/4] UefiPayloadPkg/UefiPayloadPkgIa*.dsc: Change some PCDs type Tan, Ming
2020-06-12  0:41   ` Guo Dong
2020-06-10  2:56 ` [PATCH v4 4/4] OvmfPkg/OvmfPkg*.dsc: Change PCDs type about status code Tan, Ming
2020-06-11 14:23   ` Laszlo Ersek
2020-06-17  6:55 ` [PATCH v4 1/4] MdeModulePkg.dec: Change PCDs for " Wang, Jian J

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox