From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web09.895.1628224332440177850 for ; Thu, 05 Aug 2021 21:32:12 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: zhiguang.liu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10067"; a="214036305" X-IronPort-AV: E=Sophos;i="5.84,299,1620716400"; d="scan'208";a="214036305" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2021 21:32:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,299,1620716400"; d="scan'208";a="481145395" Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.158]) by fmsmga008.fm.intel.com with ESMTP; 05 Aug 2021 21:32:10 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Maurice Ma , Benjamin You Subject: [PATCH 2/4] UefiPayloadPkg: define some PCD as DynamicEX PCD Date: Fri, 6 Aug 2021 12:31:14 +0800 Message-Id: <20210806043116.1547-2-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.32.0.windows.2 In-Reply-To: <20210806043116.1547-1-zhiguang.liu@intel.com> References: <20210806043116.1547-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Zhiguang Liu --- 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/Uef= iPayloadPkg/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;=0D }=0D =0D - Status =3D PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo.Baud);=0D - if (RETURN_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D Status =3D PcdSet32S (PcdSerialClockRate, SerialPortInfo.InputHertz);=0D if (RETURN_ERROR (Status)) {=0D return Status;=0D diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf b/U= efiPayloadPkg/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=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## PRODUCES=0D - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## PRODUCES=0D gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters ## PRODUCES=0D diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platfor= mHookLib.c b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platfor= mHookLib.c index 6705f29505..bd433bdbe0 100644 --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.c +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.c @@ -70,10 +70,6 @@ PlatformHookSerialPortInitialize ( if (RETURN_ERROR (Status)) {=0D return Status;=0D }=0D - Status =3D PcdSet64S (PcdUartDefaultBaudRate, SerialPortInfo->BaudRate= );=0D - if (RETURN_ERROR (Status)) {=0D - return Status;=0D - }=0D =0D return RETURN_SUCCESS;=0D }=0D diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platfor= mHookLib.inf b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platf= ormHookLib.inf index 41e05ddf54..2dfd8b1216 100644 --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.inf +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.inf @@ -38,4 +38,3 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase ## PRODUCES=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## PRODUCES=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES=0D - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## PRODUCES=0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index ba54f2057f..d293211e46 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -308,11 +308,6 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE=0D =0D gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0=0D -!if $(TARGET) =3D=3D DEBUG=0D - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE=0D -!else=0D - gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE=0D -!endif=0D gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE=0D =0D @@ -352,11 +347,6 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|$(SERIAL_FIFO_CONTRO= L)=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|$(SERIAL_EXTE= NDED_TX_FIFO_SIZE)=0D =0D - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE= )=0D - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS= )=0D - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)=0D - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS= )=0D - gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)= =0D gEfiMdeModulePkgTokenSpaceGuid.PcdPciSerialParameters|$(PCI_SERIAL_PARAM= ETERS)=0D =0D gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|$(MAX_LOGICAL_= PROCESSORS)=0D @@ -369,6 +359,24 @@ ##########################################################################= ######=0D =0D [PcdsDynamicExDefault]=0D + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|$(UART_DEFAULT_BAUD_RATE= )=0D + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|$(UART_DEFAULT_DATA_BITS= )=0D + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)=0D + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS= )=0D + gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)= =0D + gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize=0D + gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds=0D + gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode=0D + gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress=0D + gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize=0D +!if $(TARGET) =3D=3D DEBUG=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE=0D +!else=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE=0D +!endif=0D gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FAL= SE=0D gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0=0D gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0=0D --=20 2.32.0.windows.2