* [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data
@ 2020-06-08 11:15 Tan, Ming
2020-06-08 11:15 ` [PATCH 2/2] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
2020-06-09 2:45 ` [edk2-devel] [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Dong, Eric
0 siblings, 2 replies; 3+ messages in thread
From: Tan, Ming @ 2020-06-08 11:15 UTC (permalink / raw)
To: devel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2787
When output string data through serial port, will not ouput \n\r now.
Caller can output several data in one line, and output \n\r when needed.
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
.../Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c | 2 +-
.../StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c | 2 +-
.../Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
index 2455f8b2a9..3aa5642b64 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
@@ -134,7 +134,7 @@ SerialStatusCodeReportWorker (
CharCount = AsciiSPrint (
Buffer,
sizeof (Buffer),
- "%a\n\r",
+ "%a",
((EFI_STATUS_CODE_STRING_DATA *) Data)->String.Ascii
);
} else {
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
index 2dc3ecfff5..0b98e7ec63 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
@@ -129,7 +129,7 @@ SerialStatusCodeReportWorker (
CharCount = AsciiSPrint (
Buffer,
sizeof (Buffer),
- "%a\n\r",
+ "%a",
((EFI_STATUS_CODE_STRING_DATA *) Data)->String.Ascii
);
} else {
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
index c0c907b32f..3df0a67126 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
@@ -129,7 +129,7 @@ SerialStatusCodeReportWorker (
CharCount = AsciiSPrint (
Buffer,
sizeof (Buffer),
- "%a\n\r",
+ "%a",
((EFI_STATUS_CODE_STRING_DATA *) Data)->String.Ascii
);
} else {
--
2.24.0.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] MdeModulePkg.dec: Change PCDs for status code.
2020-06-08 11:15 [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Tan, Ming
@ 2020-06-08 11:15 ` Tan, Ming
2020-06-09 2:45 ` [edk2-devel] [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Dong, Eric
1 sibling, 0 replies; 3+ messages in thread
From: Tan, Ming @ 2020-06-08 11:15 UTC (permalink / raw)
To: devel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2786
In order to support enable/disable report status code through
memory and serial dynamic, change the following PCDs from
PcdsFeatureFlag to PcdsDynamic:
PcdStatusCodeUseSerial
PcdStatusCodeUseMemory
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
EmulatorPkg/EmulatorPkg.dsc | 4 +--
MdeModulePkg/MdeModulePkg.dec | 27 ++++++++++---------
.../Pei/StatusCodeHandlerPei.c | 6 ++---
.../Pei/StatusCodeHandlerPei.inf | 6 ++---
.../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c | 16 +++++------
.../StatusCodeHandlerRuntimeDxe.inf | 6 ++---
.../Smm/StatusCodeHandlerSmm.c | 10 +++----
.../Smm/StatusCodeHandlerSmm.inf | 6 ++---
OvmfPkg/OvmfPkgIa32.dsc | 8 +++---
OvmfPkg/OvmfPkgIa32X64.dsc | 8 +++---
OvmfPkg/OvmfPkgX64.dsc | 8 +++---
OvmfPkg/OvmfXen.dsc | 8 +++---
UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 16 ++++++-----
UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 16 ++++++-----
14 files changed, 76 insertions(+), 69 deletions(-)
diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index 1fc924ae5a..aa4ab9b206 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 @@
[PcdsFeatureFlag]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplBuildPageTables|FALSE
@@ -229,6 +228,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
[PcdsDynamicHii.common.DEFAULT]
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|L"Setup"|gEmuSystemConfigGuid|0x0|80
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 4f44af6948..60f390e41a 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -760,19 +760,6 @@
# @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>
@@ -877,6 +864,20 @@
# @Prompt Enable process non-reset capsule image at runtime.
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportProcessCapsuleAtRuntime|FALSE|BOOLEAN|0x00010079
+[PcdsDynamic]
+ ## 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
+
[PcdsFeatureFlag.IA32, PcdsFeatureFlag.ARM, PcdsFeatureFlag.AARCH64]
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE|BOOLEAN|0x0001003a
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c
index 1b07f92f3c..9b2ea4ee84 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 8aef9af34a..64380ddfac 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
@@ -53,11 +53,9 @@
[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 79cc48fa55..a8c0fe5b71 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 d74c2a55dc..faadfd9578 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
@@ -58,12 +58,10 @@
[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 f54991ed3f..20271571de 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 47d0545f95..4e24d87e55 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
@@ -53,11 +53,9 @@
[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]
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index d0df9cbbfb..4b9146f72e 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 @@
################################################################################
[PcdsFeatureFlag]
gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -626,6 +624,10 @@
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+ # Status Code support.
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
+
[PcdsDynamicHii]
!if $(TPM_ENABLE) == TRUE && $(TPM_CONFIG_ENABLE) == TRUE
gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index b3ae62fee9..81f95fba28 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 @@
################################################################################
[PcdsFeatureFlag]
gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -634,6 +632,10 @@
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
!endif
+ # Status Code support.
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
+
[PcdsDynamicDefault.X64]
# IPv4 and IPv6 PXE Boot support.
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index f7fe75ebf5..1476a3f38b 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 @@
################################################################################
[PcdsFeatureFlag]
gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -636,6 +634,10 @@
gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01
gEfiNetworkPkgTokenSpaceGuid.PcdIPv6PXESupport|0x01
+ # Status Code support.
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
+
[PcdsDynamicHii]
!if $(TPM_ENABLE) == TRUE && $(TPM_CONFIG_ENABLE) == TRUE
gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 3af0ee7054..14b005038a 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 @@
################################################################################
[PcdsFeatureFlag]
gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
@@ -474,6 +472,10 @@
gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00
+ # Status Code support.
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|TRUE
+
################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform.
diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
index d52945442e..6ea948d71c 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 @@
#
################################################################################
[PcdsFeatureFlag]
-!if $(TARGET) == DEBUG
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-!else
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-!endif
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
@@ -358,6 +352,14 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|31
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
+ # Status Code support.
+!if $(TARGET) == DEBUG
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
+!else
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+!endif
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
+
################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform.
diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
index 0736cd9954..7c61356a87 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 @@
#
################################################################################
[PcdsFeatureFlag]
-!if $(TARGET) == DEBUG
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-!else
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-!endif
- gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
@@ -360,6 +354,14 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|31
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
+ # Status Code support.
+!if $(TARGET) == DEBUG
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
+!else
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+!endif
+ gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
+
################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform.
--
2.24.0.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data
2020-06-08 11:15 [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Tan, Ming
2020-06-08 11:15 ` [PATCH 2/2] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
@ 2020-06-09 2:45 ` Dong, Eric
1 sibling, 0 replies; 3+ messages in thread
From: Dong, Eric @ 2020-06-09 2:45 UTC (permalink / raw)
To: devel@edk2.groups.io, Tan, Ming
Hi Ming,
Agree the change, the caller should own the responsibility to format the string in the input parameter, driver should not append "\r\n" here.
Reviewed-by: Eric Dong <eric.dong@intel.com>
Next time, please Cc the Package maintainer when send the patch.
The maintainer info can be found in Maintainers.txt in the root of edk2 folder.
Thanks,
Eric
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tan,
> Ming
> Sent: Monday, June 8, 2020 7:16 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do
> not output \n\r for string data
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2787
>
> When output string data through serial port, will not ouput \n\r now.
> Caller can output several data in one line, and output \n\r when needed.
>
> Signed-off-by: Ming Tan <ming.tan@intel.com>
> ---
> .../Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c | 2 +-
> .../StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c | 2 +-
> .../Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork
> er.c
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork
> er.c
> index 2455f8b2a9..3aa5642b64 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork
> er.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWork
> e
> +++ r.c
> @@ -134,7 +134,7 @@ SerialStatusCodeReportWorker (
> CharCount = AsciiSPrint ( Buffer, sizeof (Buffer),-
> "%a\n\r",+ "%a", ((EFI_STATUS_CODE_STRING_DATA *)
> Data)->String.Ascii ); } else {diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC
> odeWorker.c
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC
> odeWorker.c
> index 2dc3ecfff5..0b98e7ec63 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC
> odeWorker.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusC
> o
> +++ deWorker.c
> @@ -129,7 +129,7 @@ SerialStatusCodeReportWorker (
> CharCount = AsciiSPrint ( Buffer, sizeof (Buffer),-
> "%a\n\r",+ "%a", ((EFI_STATUS_CODE_STRING_DATA *)
> Data)->String.Ascii ); } else {diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo
> rker.c
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo
> rker.c
> index c0c907b32f..3df0a67126 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo
> rker.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWo
> rke
> +++ r.c
> @@ -129,7 +129,7 @@ SerialStatusCodeReportWorker (
> CharCount = AsciiSPrint ( Buffer, sizeof (Buffer),-
> "%a\n\r",+ "%a", ((EFI_STATUS_CODE_STRING_DATA *)
> Data)->String.Ascii ); } else {--
> 2.24.0.windows.2
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#60857): https://edk2.groups.io/g/devel/message/60857
> Mute This Topic: https://groups.io/mt/74749510/1768733
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [eric.dong@intel.com] -
> =-=-=-=-=-=
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-09 2:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-08 11:15 [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Tan, Ming
2020-06-08 11:15 ` [PATCH 2/2] MdeModulePkg.dec: Change PCDs for status code Tan, Ming
2020-06-09 2:45 ` [edk2-devel] [PATCH 1/2] MdeModulePkg/StatusCodeHandler: do not output \n\r for string data Dong, Eric
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox