public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value.
@ 2021-08-06  4:31 Zhiguang Liu
  2021-08-06  4:31 ` [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Zhiguang Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Zhiguang Liu @ 2021-08-06  4:31 UTC (permalink / raw)
  To: devel; +Cc: Guo Dong, Ray Ni, Maurice Ma, Benjamin You

Add the three PCDs as fixed at build PCD:
  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule
  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister
  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister
The default value is defined as Macro, so it can be passed in at build
command.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index bcedf1c746..ba54f2057f 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -91,6 +91,13 @@
   DEFINE EMU_VARIABLE_ENABLE   = TRUE
   DEFINE DISABLE_RESET_SYSTEM  = FALSE
 
+  # Dfine the maximum size of the capsule image without a reset flag that the platform can support.
+  DEFINE MAX_SIZE_NON_POPULATE_CAPSULE = 0xa00000
+
+  # Define RTC related register.
+  DEFINE RTC_INDEX_REGISTER = 0x70
+  DEFINE RTC_TARGET_REGISTER = 0x71
+
 [BuildOptions]
   *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
@@ -324,7 +331,9 @@
 !else
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
 !endif
-
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|$(MAX_SIZE_NON_POPULATE_CAPSULE)
+  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
+  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
   #
   # The following parameters are set by Library/PlatformHookLib
   #
-- 
2.32.0.windows.2


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

* [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD
  2021-08-06  4:31 [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Zhiguang Liu
@ 2021-08-06  4:31 ` Zhiguang Liu
  2021-08-06 13:59   ` Ni, Ray
  2021-08-06 17:23   ` Guo Dong
  2021-08-06  4:31 ` [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs Zhiguang Liu
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Zhiguang Liu @ 2021-08-06  4:31 UTC (permalink / raw)
  To: devel; +Cc: Guo Dong, Ray Ni, Maurice Ma, Benjamin You

Define some PCDs as DynamicEX PCD to be used as global variable.
Because PcdUartDefaultBaudRate is defined as DynamicEX, remove the code
to set it in platformlib. That code was actually redundant.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c                   |  5 -----
 UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf                 |  1 -
 UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c   |  4 ----
 UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf |  1 -
 UefiPayloadPkg/UefiPayloadPkg.dsc                                          | 28 ++++++++++++++++++----------
 5 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
index 72a17dc8a7..d8453e5957 100644
--- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
+++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
@@ -75,11 +75,6 @@ PlatformHookSerialPortInitialize (
     return Status;
   }
 
-  Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo.Baud);
-  if (RETURN_ERROR (Status)) {
-    return Status;
-  }
-
   Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo.InputHertz);
   if (RETURN_ERROR (Status)) {
     return Status;
diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
index 2415d99c64..3eeb94d8fa 100644
--- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
@@ -35,5 +35,4 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate        ## PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride  ## PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate       ## PRODUCES
-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate         ## PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters   ## PRODUCES
diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
index 6705f29505..bd433bdbe0 100644
--- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
+++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
@@ -70,10 +70,6 @@ PlatformHookSerialPortInitialize (
     if (RETURN_ERROR (Status)) {
       return Status;
     }
-    Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo->BaudRate);
-    if (RETURN_ERROR (Status)) {
-      return Status;
-    }
 
     return RETURN_SUCCESS;
   }
diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
index 41e05ddf54..2dfd8b1216 100644
--- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
+++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
@@ -38,4 +38,3 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase    ## PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate        ## PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride  ## PRODUCES
-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate         ## PRODUCES
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index ba54f2057f..d293211e46 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -308,11 +308,6 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
-!if $(TARGET) == DEBUG
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
-!else
-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
-!endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
 
@@ -352,11 +347,6 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTROL)
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTENDED_TX_FIFO_SIZE)
 
-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
-  gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
 
   gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
@@ -369,6 +359,24 @@
 ################################################################################
 
 [PcdsDynamicExDefault]
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
+  gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize
+!if $(TARGET) == DEBUG
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
+!else
+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
+!endif
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
-- 
2.32.0.windows.2


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

* [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs.
  2021-08-06  4:31 [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Zhiguang Liu
  2021-08-06  4:31 ` [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Zhiguang Liu
@ 2021-08-06  4:31 ` Zhiguang Liu
  2021-08-06 13:59   ` Ni, Ray
  2021-08-06 17:20   ` Guo Dong
  2021-08-06  4:31 ` [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver Zhiguang Liu
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Zhiguang Liu @ 2021-08-06  4:31 UTC (permalink / raw)
  To: devel; +Cc: Guo Dong, Ray Ni, Maurice Ma, Benjamin You

Change the default value of the below PCDs to diable some legacy feature.
  gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE
  gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index d293211e46..002d2a8fa7 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -297,6 +297,8 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   ## This PCD specified whether ACPI SDT protocol is installed.
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE
 
 [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000
@@ -350,7 +352,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
 
   gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
-
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0
 
 ################################################################################
 #
-- 
2.32.0.windows.2


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

* [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver.
  2021-08-06  4:31 [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Zhiguang Liu
  2021-08-06  4:31 ` [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Zhiguang Liu
  2021-08-06  4:31 ` [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs Zhiguang Liu
@ 2021-08-06  4:31 ` Zhiguang Liu
  2021-08-06 14:00   ` Ni, Ray
  2021-08-06 17:19   ` Guo Dong
  2021-08-06 13:59 ` [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Ni, Ray
  2021-08-06 17:23 ` [edk2-devel] " Guo Dong
  4 siblings, 2 replies; 12+ messages in thread
From: Zhiguang Liu @ 2021-08-06  4:31 UTC (permalink / raw)
  To: devel; +Cc: Guo Dong, Ray Ni, Maurice Ma, Benjamin You

This patch doesn't change the default behavior.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 4 ++++
 UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 002d2a8fa7..b4a30be381 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -98,6 +98,8 @@
   DEFINE RTC_INDEX_REGISTER = 0x70
   DEFINE RTC_TARGET_REGISTER = 0x71
 
+  DEFINE SERIAL_DRIVER_ENABLE = TRUE
+
 [BuildOptions]
   *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
@@ -536,7 +538,9 @@
   #
   # ISA Support
   #
+!if $(SERIAL_DRIVER_ENABLE) == TRUE
   MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
+!endif
 !if $(PS2_KEYBOARD_ENABLE) == TRUE
   OvmfPkg/SioBusDxe/SioBusDxe.inf
   MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 041fed842c..b2cfb6b405 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -136,7 +136,9 @@ INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
 #
 # ISA Support
 #
+!if $(SERIAL_DRIVER_ENABLE) == TRUE
 INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
+!endif
 !if $(PS2_KEYBOARD_ENABLE) == TRUE
 INF OvmfPkg/SioBusDxe/SioBusDxe.inf
 INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
-- 
2.32.0.windows.2


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

* Re: [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD
  2021-08-06  4:31 ` [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Zhiguang Liu
@ 2021-08-06 13:59   ` Ni, Ray
  2021-08-06 17:23   ` Guo Dong
  1 sibling, 0 replies; 12+ messages in thread
From: Ni, Ray @ 2021-08-06 13:59 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Dong, Guo, Ma, Maurice, You, Benjamin

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

> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu@intel.com>
> Sent: Friday, August 6, 2021 12:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>
> Subject: [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD
> 
> Define some PCDs as DynamicEX PCD to be used as global variable.
> Because PcdUartDefaultBaudRate is defined as DynamicEX, remove the code
> to set it in platformlib. That code was actually redundant.
> 
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
> ---
>  UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c                   |  5 -----
>  UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf                 |  1 -
>  UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c   |  4 ----
>  UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf |  1 -
>  UefiPayloadPkg/UefiPayloadPkg.dsc                                          | 28 ++++++++++++++++++----------
>  5 files changed, 18 insertions(+), 21 deletions(-)
> 
> diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> index 72a17dc8a7..d8453e5957 100644
> --- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> +++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
> @@ -75,11 +75,6 @@ PlatformHookSerialPortInitialize (
>      return Status;
> 
>    }
> 
> 
> 
> -  Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo.Baud);
> 
> -  if (RETURN_ERROR (Status)) {
> 
> -    return Status;
> 
> -  }
> 
> -
> 
>    Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo.InputHertz);
> 
>    if (RETURN_ERROR (Status)) {
> 
>      return Status;
> 
> diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> index 2415d99c64..3eeb94d8fa 100644
> --- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> +++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
> @@ -35,5 +35,4 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate        ## PRODUCES
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride  ## PRODUCES
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate       ## PRODUCES
> 
> -  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate         ## PRODUCES
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters   ## PRODUCES
> 
> diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> index 6705f29505..bd433bdbe0 100644
> --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
> @@ -70,10 +70,6 @@ PlatformHookSerialPortInitialize (
>      if (RETURN_ERROR (Status)) {
> 
>        return Status;
> 
>      }
> 
> -    Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo->BaudRate);
> 
> -    if (RETURN_ERROR (Status)) {
> 
> -      return Status;
> 
> -    }
> 
> 
> 
>      return RETURN_SUCCESS;
> 
>    }
> 
> diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> index 41e05ddf54..2dfd8b1216 100644
> --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
> @@ -38,4 +38,3 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase    ## PRODUCES
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate        ## PRODUCES
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride  ## PRODUCES
> 
> -  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate         ## PRODUCES
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index ba54f2057f..d293211e46 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -308,11 +308,6 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
> 
> 
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0
> 
> -!if $(TARGET) == DEBUG
> 
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
> 
> -!else
> 
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> 
> -!endif
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
> 
> 
> 
> @@ -352,11 +347,6 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTROL)
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTENDED_TX_FIFO_SIZE)
> 
> 
> 
> -  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
> 
> -  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
> 
> -  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
> 
> -  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
> 
> -  gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
> 
> 
> 
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
> 
> @@ -369,6 +359,24 @@
>  ################################################################################
> 
> 
> 
>  [PcdsDynamicExDefault]
> 
> +  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)
> 
> +  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)
> 
> +  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
> 
> +  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
> 
> +  gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize
> 
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds
> 
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode
> 
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress
> 
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize
> 
> +!if $(TARGET) == DEBUG
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
> 
> +!else
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE
> 
> +!endif
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
> 
> --
> 2.32.0.windows.2


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

* Re: [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs.
  2021-08-06  4:31 ` [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs Zhiguang Liu
@ 2021-08-06 13:59   ` Ni, Ray
  2021-08-06 17:20   ` Guo Dong
  1 sibling, 0 replies; 12+ messages in thread
From: Ni, Ray @ 2021-08-06 13:59 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Dong, Guo, Ma, Maurice, You, Benjamin

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

> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu@intel.com>
> Sent: Friday, August 6, 2021 12:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>
> Subject: [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs.
> 
> Change the default value of the below PCDs to diable some legacy feature.
>   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
>   gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE
>   gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0
> 
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index d293211e46..002d2a8fa7 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -297,6 +297,8 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
> 
>    ## This PCD specified whether ACPI SDT protocol is installed.
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE
> 
> 
> 
>  [PcdsFixedAtBuild]
> 
>    gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000
> 
> @@ -350,7 +352,7 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)
> 
> 
> 
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)
> 
> -
> 
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0
> 
> 
> 
>  ################################################################################
> 
>  #
> 
> --
> 2.32.0.windows.2


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

* Re: [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value.
  2021-08-06  4:31 [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Zhiguang Liu
                   ` (2 preceding siblings ...)
  2021-08-06  4:31 ` [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver Zhiguang Liu
@ 2021-08-06 13:59 ` Ni, Ray
  2021-08-06 17:23 ` [edk2-devel] " Guo Dong
  4 siblings, 0 replies; 12+ messages in thread
From: Ni, Ray @ 2021-08-06 13:59 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Dong, Guo, Ma, Maurice, You, Benjamin

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

> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu@intel.com>
> Sent: Friday, August 6, 2021 12:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>
> Subject: [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value.
> 
> Add the three PCDs as fixed at build PCD:
>   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule
>   gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister
>   gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister
> The default value is defined as Macro, so it can be passed in at build
> command.
> 
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index bcedf1c746..ba54f2057f 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -91,6 +91,13 @@
>    DEFINE EMU_VARIABLE_ENABLE   = TRUE
> 
>    DEFINE DISABLE_RESET_SYSTEM  = FALSE
> 
> 
> 
> +  # Dfine the maximum size of the capsule image without a reset flag that the platform can support.
> 
> +  DEFINE MAX_SIZE_NON_POPULATE_CAPSULE = 0xa00000
> 
> +
> 
> +  # Define RTC related register.
> 
> +  DEFINE RTC_INDEX_REGISTER = 0x70
> 
> +  DEFINE RTC_TARGET_REGISTER = 0x71
> 
> +
> 
>  [BuildOptions]
> 
>    *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES
> 
>    GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
> 
> @@ -324,7 +331,9 @@
>  !else
> 
>    gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F
> 
>  !endif
> 
> -
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|$(MAX_SIZE_NON_POPULATE_CAPSULE)
> 
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)
> 
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)
> 
>    #
> 
>    # The following parameters are set by Library/PlatformHookLib
> 
>    #
> 
> --
> 2.32.0.windows.2


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

* Re: [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver.
  2021-08-06  4:31 ` [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver Zhiguang Liu
@ 2021-08-06 14:00   ` Ni, Ray
  2021-08-06 17:19   ` Guo Dong
  1 sibling, 0 replies; 12+ messages in thread
From: Ni, Ray @ 2021-08-06 14:00 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Dong, Guo, Ma, Maurice, You, Benjamin

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

> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu@intel.com>
> Sent: Friday, August 6, 2021 12:31 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin
> <benjamin.you@intel.com>
> Subject: [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver.
> 
> This patch doesn't change the default behavior.
> 
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> 
> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 4 ++++
>  UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 002d2a8fa7..b4a30be381 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -98,6 +98,8 @@
>    DEFINE RTC_INDEX_REGISTER = 0x70
> 
>    DEFINE RTC_TARGET_REGISTER = 0x71
> 
> 
> 
> +  DEFINE SERIAL_DRIVER_ENABLE = TRUE
> 
> +
> 
>  [BuildOptions]
> 
>    *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES
> 
>    GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG
> 
> @@ -536,7 +538,9 @@
>    #
> 
>    # ISA Support
> 
>    #
> 
> +!if $(SERIAL_DRIVER_ENABLE) == TRUE
> 
>    MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> 
> +!endif
> 
>  !if $(PS2_KEYBOARD_ENABLE) == TRUE
> 
>    OvmfPkg/SioBusDxe/SioBusDxe.inf
> 
>    MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
> index 041fed842c..b2cfb6b405 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.fdf
> +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
> @@ -136,7 +136,9 @@ INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>  #
> 
>  # ISA Support
> 
>  #
> 
> +!if $(SERIAL_DRIVER_ENABLE) == TRUE
> 
>  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
> 
> +!endif
> 
>  !if $(PS2_KEYBOARD_ENABLE) == TRUE
> 
>  INF OvmfPkg/SioBusDxe/SioBusDxe.inf
> 
>  INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> 
> --
> 2.32.0.windows.2


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

* Re: [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver.
  2021-08-06  4:31 ` [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver Zhiguang Liu
  2021-08-06 14:00   ` Ni, Ray
@ 2021-08-06 17:19   ` Guo Dong
  1 sibling, 0 replies; 12+ messages in thread
From: Guo Dong @ 2021-08-06 17:19 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Ni, Ray, Ma, Maurice, You, Benjamin


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

-----Original Message-----
From: Liu, Zhiguang <zhiguang.liu@intel.com> 
Sent: Thursday, August 5, 2021 9:31 PM
To: devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver.

This patch doesn't change the default behavior.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 4 ++++  UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 002d2a8fa7..b4a30be381 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -98,6 +98,8 @@
   DEFINE RTC_INDEX_REGISTER = 0x70   DEFINE RTC_TARGET_REGISTER = 0x71 +  DEFINE SERIAL_DRIVER_ENABLE = TRUE+ [BuildOptions]   *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG@@ -536,7 +538,9 @@
   #   # ISA Support   #+!if $(SERIAL_DRIVER_ENABLE) == TRUE   MdeModulePkg/Universal/SerialDxe/SerialDxe.inf+!endif !if $(PS2_KEYBOARD_ENABLE) == TRUE   OvmfPkg/SioBusDxe/SioBusDxe.inf   MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.infdiff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 041fed842c..b2cfb6b405 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -136,7 +136,9 @@ INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
 # # ISA Support #+!if $(SERIAL_DRIVER_ENABLE) == TRUE INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf+!endif !if $(PS2_KEYBOARD_ENABLE) == TRUE INF OvmfPkg/SioBusDxe/SioBusDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf--
2.32.0.windows.2


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

* Re: [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs.
  2021-08-06  4:31 ` [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs Zhiguang Liu
  2021-08-06 13:59   ` Ni, Ray
@ 2021-08-06 17:20   ` Guo Dong
  1 sibling, 0 replies; 12+ messages in thread
From: Guo Dong @ 2021-08-06 17:20 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Ni, Ray, Ma, Maurice, You, Benjamin


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

-----Original Message-----
From: Liu, Zhiguang <zhiguang.liu@intel.com> 
Sent: Thursday, August 5, 2021 9:31 PM
To: devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs.

Change the default value of the below PCDs to diable some legacy feature.
  gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE
  gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index d293211e46..002d2a8fa7 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -297,6 +297,8 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE

   ## This PCD specified whether ACPI SDT protocol is installed.

   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE

+  gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE

+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE

 

 [PcdsFixedAtBuild]

   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x10000

@@ -350,7 +352,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)

 

   gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)

-

+  gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0

 

 ################################################################################

 #

-- 
2.32.0.windows.2


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

* Re: [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD
  2021-08-06  4:31 ` [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Zhiguang Liu
  2021-08-06 13:59   ` Ni, Ray
@ 2021-08-06 17:23   ` Guo Dong
  1 sibling, 0 replies; 12+ messages in thread
From: Guo Dong @ 2021-08-06 17:23 UTC (permalink / raw)
  To: Liu, Zhiguang, devel@edk2.groups.io; +Cc: Ni, Ray, Ma, Maurice, You, Benjamin

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

-----Original Message-----
From: Liu, Zhiguang <zhiguang.liu@intel.com> 
Sent: Thursday, August 5, 2021 9:31 PM
To: devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD

Define some PCDs as DynamicEX PCD to be used as global variable.
Because PcdUartDefaultBaudRate is defined as DynamicEX, remove the code to set it in platformlib. That code was actually redundant.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c                   |  5 -----
 UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf                 |  1 -
 UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c   |  4 ----
 UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf |  1 -
 UefiPayloadPkg/UefiPayloadPkg.dsc                                          | 28 ++++++++++++++++++----------
 5 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
index 72a17dc8a7..d8453e5957 100644
--- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
+++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c
@@ -75,11 +75,6 @@ PlatformHookSerialPortInitialize (
     return Status;   } -  Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo.Baud);-  if (RETURN_ERROR (Status)) {-    return Status;-  }-   Status = PcdSet32S (PcdSerialClockRate, SerialPortInfo.InputHertz);   if (RETURN_ERROR (Status)) {     return Status;diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
index 2415d99c64..3eeb94d8fa 100644
--- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
@@ -35,5 +35,4 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate        ## PRODUCES   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride  ## PRODUCES   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate       ## PRODUCES-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate         ## PRODUCES   gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters   ## PRODUCESdiff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
index 6705f29505..bd433bdbe0 100644
--- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
+++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHoo
+++ kLib.c
@@ -70,10 +70,6 @@ PlatformHookSerialPortInitialize (
     if (RETURN_ERROR (Status)) {       return Status;     }-    Status = PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo->BaudRate);-    if (RETURN_ERROR (Status)) {-      return Status;-    }      return RETURN_SUCCESS;   }diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
index 41e05ddf54..2dfd8b1216 100644
--- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf
+++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHoo
+++ kLib.inf
@@ -38,4 +38,3 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase    ## PRODUCES   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate        ## PRODUCES   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride  ## PRODUCES-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate         ## PRODUCESdiff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index ba54f2057f..d293211e46 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -308,11 +308,6 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE    gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0-!if $(TARGET) == DEBUG-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE-!else-  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE-!endif   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE @@ -352,11 +347,6 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTROL)   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTENDED_TX_FIFO_SIZE) -  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)-  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)-  gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)   gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAMETERS)    gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_PROCESSORS)@@ -369,6 +359,24 @@
 ################################################################################  [PcdsDynamicExDefault]+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE)+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS)+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)+  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)+  gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)+  gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport+  gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport+  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport+  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize+  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds+  gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize+!if $(TARGET) == DEBUG+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE+!else+  gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE+!endif   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0-- 
2.32.0.windows.2


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

* Re: [edk2-devel] [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value.
  2021-08-06  4:31 [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Zhiguang Liu
                   ` (3 preceding siblings ...)
  2021-08-06 13:59 ` [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Ni, Ray
@ 2021-08-06 17:23 ` Guo Dong
  4 siblings, 0 replies; 12+ messages in thread
From: Guo Dong @ 2021-08-06 17:23 UTC (permalink / raw)
  To: devel@edk2.groups.io, Liu, Zhiguang; +Cc: Ni, Ray, Ma, Maurice, You, Benjamin


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

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhiguang Liu
Sent: Thursday, August 5, 2021 9:31 PM
To: devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma, Maurice <maurice.ma@intel.com>; You, Benjamin <benjamin.you@intel.com>
Subject: [edk2-devel] [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value.

Add the three PCDs as fixed at build PCD:
  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule
  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister
  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister
The default value is defined as Macro, so it can be passed in at build command.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index bcedf1c746..ba54f2057f 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -91,6 +91,13 @@
   DEFINE EMU_VARIABLE_ENABLE   = TRUE   DEFINE DISABLE_RESET_SYSTEM  = FALSE +  # Dfine the maximum size of the capsule image without a reset flag that the platform can support.+  DEFINE MAX_SIZE_NON_POPULATE_CAPSULE = 0xa00000++  # Define RTC related register.+  DEFINE RTC_INDEX_REGISTER = 0x70+  DEFINE RTC_TARGET_REGISTER = 0x71+ [BuildOptions]   *_*_*_CC_FLAGS                 = -D DISABLE_NEW_DEPRECATED_INTERFACES   GCC:*_UNIXGCC_*_CC_FLAGS       = -DMDEPKG_NDEBUG@@ -324,7 +331,9 @@
 !else   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x2F !endif-+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|$(MAX_SIZE_NON_POPULATE_CAPSULE)+  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister|$(RTC_INDEX_REGISTER)+  gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister|$(RTC_TARGET_REGISTER)   #   # The following parameters are set by Library/PlatformHookLib   #-- 
2.32.0.windows.2



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78785): https://edk2.groups.io/g/devel/message/78785
Mute This Topic: https://groups.io/mt/84701789/1781375
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [guo.dong@intel.com] -=-=-=-=-=-=



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

end of thread, other threads:[~2021-08-06 17:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-06  4:31 [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Zhiguang Liu
2021-08-06  4:31 ` [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Zhiguang Liu
2021-08-06 13:59   ` Ni, Ray
2021-08-06 17:23   ` Guo Dong
2021-08-06  4:31 ` [PATCH 3/4] UefiPayloadPkg: change the default value of some PCDs Zhiguang Liu
2021-08-06 13:59   ` Ni, Ray
2021-08-06 17:20   ` Guo Dong
2021-08-06  4:31 ` [PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver Zhiguang Liu
2021-08-06 14:00   ` Ni, Ray
2021-08-06 17:19   ` Guo Dong
2021-08-06 13:59 ` [PATCH 1/4] UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value Ni, Ray
2021-08-06 17:23 ` [edk2-devel] " Guo Dong

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