From fe7819402c285c2d006b79eb66981673fedf3d04 Mon Sep 17 00:00:00 2001 From: "Zeng, Star" Date: Thu, 14 Aug 2014 05:55:08 +0000 Subject: MdeModulePkg/IntelFrameworkModulePkg: Update PeiCore, SmbiosDxe and IsaSerialDxe to use PcdGetxx() instead of FixedPcdGetxx(). It changes some of the PCD declarations to add more supported PCD storage types and the change in the PCD access methods is associated with that. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zeng, Star Reviewed-by: Kinney, Michael D Reviewed-by: Gao, Liming git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15798 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf | 4 +-- .../Bus/Isa/IsaSerialDxe/Serial.c | 29 +++++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) (limited to 'IntelFrameworkModulePkg') diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf index 6f62bd4f7d..f53531f1d2 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf @@ -1,7 +1,7 @@ ## @file # Serial driver for standard UARTS on an ISA bus. # -# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -63,7 +63,7 @@ [FeaturePcd] gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdIsaBusSerialUseHalfHandshake|FALSE -[FixedPcd] +[Pcd] gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1 diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c index 4a12eb9e04..15d2bab824 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c @@ -1,7 +1,7 @@ /** @file Serial driver for standard UARTS on an ISA bus. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -43,11 +43,11 @@ SERIAL_DEV gSerialDevTempate = { { // SerialMode SERIAL_PORT_SUPPORT_CONTROL_MASK, SERIAL_PORT_DEFAULT_TIMEOUT, - FixedPcdGet64 (PcdUartDefaultBaudRate), // BaudRate + 0, SERIAL_PORT_DEFAULT_RECEIVE_FIFO_DEPTH, - FixedPcdGet8 (PcdUartDefaultDataBits), // DataBits - FixedPcdGet8 (PcdUartDefaultParity), // Parity - FixedPcdGet8 (PcdUartDefaultStopBits) // StopBits + 0, + 0, + 0 }, NULL, NULL, @@ -61,10 +61,10 @@ SERIAL_DEV gSerialDevTempate = { } }, 0, - FixedPcdGet64 (PcdUartDefaultBaudRate), - FixedPcdGet8 (PcdUartDefaultDataBits), - FixedPcdGet8 (PcdUartDefaultParity), - FixedPcdGet8 (PcdUartDefaultStopBits) + 0, + 0, + 0, + 0 }, NULL, 0, //BaseAddress @@ -163,6 +163,17 @@ InitializeIsaSerial ( ); ASSERT_EFI_ERROR (Status); + // + // Initialize UART default setting in gSerialDevTempate + // + gSerialDevTempate.SerialMode.BaudRate = PcdGet64 (PcdUartDefaultBaudRate); + gSerialDevTempate.SerialMode.DataBits = PcdGet8 (PcdUartDefaultDataBits); + gSerialDevTempate.SerialMode.Parity = PcdGet8 (PcdUartDefaultParity); + gSerialDevTempate.SerialMode.StopBits = PcdGet8 (PcdUartDefaultStopBits); + gSerialDevTempate.UartDevicePath.BaudRate = PcdGet64 (PcdUartDefaultBaudRate); + gSerialDevTempate.UartDevicePath.DataBits = PcdGet8 (PcdUartDefaultDataBits); + gSerialDevTempate.UartDevicePath.Parity = PcdGet8 (PcdUartDefaultParity); + gSerialDevTempate.UartDevicePath.StopBits = PcdGet8 (PcdUartDefaultStopBits); return Status; } -- cgit v1.2.3