]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c
Added support for UART and Terminal PCD settings
[mirror_edk2.git] / Nt32Pkg / WinNtSerialIoDxe / WinNtSerialIo.c
index 85001404e03f57cf8c7cdddb2663c00b09ab603b..44bbf5765cd8f6aa5182a81bfb3c9848456b535e 100644 (file)
@@ -45,31 +45,6 @@ Abstract:
 \r
 --*/\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <Uefi.h>\r
-#include <WinNtDxe.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Protocol/WinNtIo.h>\r
-#include <Protocol/ComponentName.h>\r
-#include <Protocol/SerialIo.h>\r
-#include <Protocol/DriverBinding.h>\r
-#include <Protocol/DevicePath.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/DevicePathLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-\r
 #include "WinNtSerialIo.h"\r
 \r
 EFI_DRIVER_BINDING_PROTOCOL gWinNtSerialIoDriverBinding = {\r
@@ -780,7 +755,7 @@ Returns:
   //   we must set the default values if a null argument is passed in.\r
   //\r
   if (BaudRate == 0) {\r
-    BaudRate = SERIAL_BAUD_DEFAULT;\r
+    BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate);\r
   }\r
 \r
   if (ReceiveFifoDepth == 0) {\r
@@ -792,15 +767,15 @@ Returns:
   }\r
 \r
   if (Parity == DefaultParity) {\r
-    Parity = NoParity;\r
+    Parity = FixedPcdGet8 (PcdUartDefaultParity);\r
   }\r
 \r
   if (DataBits == 0) {\r
-    DataBits = SERIAL_DATABITS_DEFAULT;\r
+    DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);\r
   }\r
 \r
   if (StopBits == DefaultStopBits) {\r
-    StopBits = OneStopBit;\r
+    StopBits = (EFI_STOP_BITS_TYPE) FixedPcdGet8 (PcdUartDefaultStopBits);\r
   }\r
   //\r
   // See if the new attributes already match the current attributes\r