summaryrefslogtreecommitdiffstats
path: root/Nt32Pkg/WinNtSerialIoDxe
diff options
context:
space:
mode:
authorAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>2007-08-16 21:29:09 +0000
committerAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>2007-08-16 21:29:09 +0000
commitb83e2500ef0f7a3bc315205ce0ea4d03288bbc93 (patch)
tree2495679cc88fb63a9b21c77f059fece67e3c37be /Nt32Pkg/WinNtSerialIoDxe
parent656f6e66866a766f958d0dcde4f4c8ae153b5641 (diff)
downloadedk2-b83e2500ef0f7a3bc315205ce0ea4d03288bbc93.tar.gz
edk2-b83e2500ef0f7a3bc315205ce0ea4d03288bbc93.tar.bz2
edk2-b83e2500ef0f7a3bc315205ce0ea4d03288bbc93.zip
Added support for UART and Terminal PCD settings
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3662 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/WinNtSerialIoDxe')
-rw-r--r--Nt32Pkg/WinNtSerialIoDxe/ComponentName.c24
-rw-r--r--Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c33
-rw-r--r--Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.h26
-rw-r--r--Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIoDxe.inf6
4 files changed, 36 insertions, 53 deletions
diff --git a/Nt32Pkg/WinNtSerialIoDxe/ComponentName.c b/Nt32Pkg/WinNtSerialIoDxe/ComponentName.c
index 5454291070..d22f030f4b 100644
--- a/Nt32Pkg/WinNtSerialIoDxe/ComponentName.c
+++ b/Nt32Pkg/WinNtSerialIoDxe/ComponentName.c
@@ -16,30 +16,6 @@ Module Name:
Abstract:
--*/
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-#include <WinNtDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/WinNtIo.h>
-#include <Protocol/ComponentName.h>
-#include <Protocol/SerialIo.h>
-#include <Protocol/DriverBinding.h>
-#include <Protocol/DevicePath.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
#include "WinNtSerialIo.h"
diff --git a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c
index 85001404e0..44bbf5765c 100644
--- a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c
+++ b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c
@@ -45,31 +45,6 @@ Abstract:
--*/
-//
-// The package level header files this module uses
-//
-#include <Uefi.h>
-#include <WinNtDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/WinNtIo.h>
-#include <Protocol/ComponentName.h>
-#include <Protocol/SerialIo.h>
-#include <Protocol/DriverBinding.h>
-#include <Protocol/DevicePath.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/BaseLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/DevicePathLib.h>
-#include <Library/MemoryAllocationLib.h>
-
#include "WinNtSerialIo.h"
EFI_DRIVER_BINDING_PROTOCOL gWinNtSerialIoDriverBinding = {
@@ -780,7 +755,7 @@ Returns:
// we must set the default values if a null argument is passed in.
//
if (BaudRate == 0) {
- BaudRate = SERIAL_BAUD_DEFAULT;
+ BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate);
}
if (ReceiveFifoDepth == 0) {
@@ -792,15 +767,15 @@ Returns:
}
if (Parity == DefaultParity) {
- Parity = NoParity;
+ Parity = FixedPcdGet8 (PcdUartDefaultParity);
}
if (DataBits == 0) {
- DataBits = SERIAL_DATABITS_DEFAULT;
+ DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);
}
if (StopBits == DefaultStopBits) {
- StopBits = OneStopBit;
+ StopBits = (EFI_STOP_BITS_TYPE) FixedPcdGet8 (PcdUartDefaultStopBits);
}
//
// See if the new attributes already match the current attributes
diff --git a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.h b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.h
index c53d2e3fec..affc392b51 100644
--- a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.h
+++ b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.h
@@ -21,6 +21,32 @@ Abstract:
#ifndef _WIN_NT_SERIAL_IO_
#define _WIN_NT_SERIAL_IO_
+//
+// The package level header files this module uses
+//
+#include <Uefi.h>
+#include <WinNtDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include <Protocol/WinNtIo.h>
+#include <Protocol/ComponentName.h>
+#include <Protocol/SerialIo.h>
+#include <Protocol/DriverBinding.h>
+#include <Protocol/DevicePath.h>
+//
+// The Library classes this module consumes
+//
+#include <Library/DebugLib.h>
+#include <Library/BaseLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/DevicePathLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/PcdLib.h>
+
#define SERIAL_MAX_BUFFER_SIZE 256
#define TIMEOUT_STALL_INTERVAL 10
diff --git a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIoDxe.inf b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIoDxe.inf
index 503c225ad2..9638baa57d 100644
--- a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIoDxe.inf
+++ b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIoDxe.inf
@@ -66,3 +66,9 @@
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
gEfiWinNtIoProtocolGuid # PROTOCOL TO_START
+[PcdsFixedAtBuild.common]
+ PcdUartDefaultBaudRate|gEfiMdePkgTokenSpaceGuid|115200
+ PcdUartDefaultDataBits|gEfiMdePkgTokenSpaceGuid|8
+ PcdUartDefaultParity|gEfiMdePkgTokenSpaceGuid|1
+ PcdUartDefaultStopBits|gEfiMdePkgTokenSpaceGuid|1
+