mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
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
This commit is contained in:
parent
656f6e6686
commit
b83e2500ef
@ -272,6 +272,11 @@
|
|||||||
PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid|0x03101004
|
PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid|0x03101004
|
||||||
PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid|0x00051003
|
PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid|0x00051003
|
||||||
PcdUefiLibMaxPrintBufferSize|gEfiMdePkgTokenSpaceGuid|320
|
PcdUefiLibMaxPrintBufferSize|gEfiMdePkgTokenSpaceGuid|320
|
||||||
|
PcdUartDefaultBaudRate|gEfiMdePkgTokenSpaceGuid|115200
|
||||||
|
PcdUartDefaultDataBits|gEfiMdePkgTokenSpaceGuid|8
|
||||||
|
PcdUartDefaultParity|gEfiMdePkgTokenSpaceGuid|1
|
||||||
|
PcdUartDefaultStopBits|gEfiMdePkgTokenSpaceGuid|1
|
||||||
|
PcdDefaultTerminalType|gEfiMdePkgTokenSpaceGuid|0
|
||||||
|
|
||||||
PcdWinNtFirmwareFdSize|gEfiNt32PkgTokenSpaceGuid|0x2a0000
|
PcdWinNtFirmwareFdSize|gEfiNt32PkgTokenSpaceGuid|0x2a0000
|
||||||
PcdWinNtFirmwareBlockSize|gEfiNt32PkgTokenSpaceGuid|0x10000
|
PcdWinNtFirmwareBlockSize|gEfiNt32PkgTokenSpaceGuid|0x10000
|
||||||
@ -342,7 +347,7 @@
|
|||||||
PcdWinNtCpuModel|gEfiNt32PkgTokenSpaceGuid|L"NT32 Processor Emulation"|52
|
PcdWinNtCpuModel|gEfiNt32PkgTokenSpaceGuid|L"NT32 Processor Emulation"|52
|
||||||
PcdWinNtCpuSpeed|gEfiNt32PkgTokenSpaceGuid|L"1234"|8
|
PcdWinNtCpuSpeed|gEfiNt32PkgTokenSpaceGuid|L"1234"|8
|
||||||
PcdWinNtMemorySize|gEfiNt32PkgTokenSpaceGuid|L"64!64"|10
|
PcdWinNtMemorySize|gEfiNt32PkgTokenSpaceGuid|L"64!64"|10
|
||||||
PcdWinNtPhysicalDisk|gEfiNt32PkgTokenSpaceGuid|L"a:RW;2880;512!e:RW;262144;512"|58
|
PcdWinNtPhysicalDisk|gEfiNt32PkgTokenSpaceGuid|L"a:RW;2880;512!d:RO;307200;2048!j:RW;262144;512"|100
|
||||||
PcdWinNtUga|gEfiNt32PkgTokenSpaceGuid|L"UGA Window 1!UGA Window 2"|50
|
PcdWinNtUga|gEfiNt32PkgTokenSpaceGuid|L"UGA Window 1!UGA Window 2"|50
|
||||||
|
|
||||||
PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid|0
|
PcdFlashNvStorageFtwSpareBase|gEfiMdeModulePkgTokenSpaceGuid|0
|
||||||
|
@ -16,30 +16,6 @@ Module Name:
|
|||||||
Abstract:
|
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"
|
#include "WinNtSerialIo.h"
|
||||||
|
|
||||||
|
@ -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"
|
#include "WinNtSerialIo.h"
|
||||||
|
|
||||||
EFI_DRIVER_BINDING_PROTOCOL gWinNtSerialIoDriverBinding = {
|
EFI_DRIVER_BINDING_PROTOCOL gWinNtSerialIoDriverBinding = {
|
||||||
@ -780,7 +755,7 @@ Returns:
|
|||||||
// we must set the default values if a null argument is passed in.
|
// we must set the default values if a null argument is passed in.
|
||||||
//
|
//
|
||||||
if (BaudRate == 0) {
|
if (BaudRate == 0) {
|
||||||
BaudRate = SERIAL_BAUD_DEFAULT;
|
BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ReceiveFifoDepth == 0) {
|
if (ReceiveFifoDepth == 0) {
|
||||||
@ -792,15 +767,15 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Parity == DefaultParity) {
|
if (Parity == DefaultParity) {
|
||||||
Parity = NoParity;
|
Parity = FixedPcdGet8 (PcdUartDefaultParity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DataBits == 0) {
|
if (DataBits == 0) {
|
||||||
DataBits = SERIAL_DATABITS_DEFAULT;
|
DataBits = FixedPcdGet8 (PcdUartDefaultDataBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StopBits == DefaultStopBits) {
|
if (StopBits == DefaultStopBits) {
|
||||||
StopBits = OneStopBit;
|
StopBits = (EFI_STOP_BITS_TYPE) FixedPcdGet8 (PcdUartDefaultStopBits);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// See if the new attributes already match the current attributes
|
// See if the new attributes already match the current attributes
|
||||||
|
@ -21,6 +21,32 @@ Abstract:
|
|||||||
#ifndef _WIN_NT_SERIAL_IO_
|
#ifndef _WIN_NT_SERIAL_IO_
|
||||||
#define _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 SERIAL_MAX_BUFFER_SIZE 256
|
||||||
#define TIMEOUT_STALL_INTERVAL 10
|
#define TIMEOUT_STALL_INTERVAL 10
|
||||||
|
@ -66,3 +66,9 @@
|
|||||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||||
gEfiWinNtIoProtocolGuid # PROTOCOL TO_START
|
gEfiWinNtIoProtocolGuid # PROTOCOL TO_START
|
||||||
|
|
||||||
|
[PcdsFixedAtBuild.common]
|
||||||
|
PcdUartDefaultBaudRate|gEfiMdePkgTokenSpaceGuid|115200
|
||||||
|
PcdUartDefaultDataBits|gEfiMdePkgTokenSpaceGuid|8
|
||||||
|
PcdUartDefaultParity|gEfiMdePkgTokenSpaceGuid|1
|
||||||
|
PcdUartDefaultStopBits|gEfiMdePkgTokenSpaceGuid|1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user