QuarkPlatformPkg: Add new package for Galileo boards

Changes for V4
==============
1) Move delete of QuarkSocPkg\QuarkNorthCluster\Binary\QuarkMicrocode
   from QuarkPlatformPkg commit to QuarkSocPkg commit
2) Fix incorrect license header in PlatformSecLibModStrs.uni

Changes for V3
==============
1) Set PcdResetOnMemoryTypeInformationChange FALSE in QuarkMin.dsc
   This is required because QuarkMin.dsc uses the emulated variable
   driver that does not preserve any non-volatile UEFI variables
   across reset.  If the condition is met where the memory type
   information variable needs to be updated, then the system will reset
   every time the UEFI Shell is run.  By setting this PCD to FALSE,
   then reset action is disabled.
2) Move one binary file to QuarkSocBinPkg
3) Change RMU.bin FILE statements to INF statement in DSC FD region
   to be compatible with PACKAGES_PATH search for QuarkSocBinPkg

Changes for V2
==============
1) Use new generic PCI serial driver PciSioSerialDxe in MdeModulePkg
2) Configure PcdPciSerialParameters for PCI serial driver for Quark
3) Use new MtrrLib API to reduce time to set MTRRs for all DRAM
4) Convert all UNI files to utf-8
5) Replace tabs with spaces and remove trailing spaces
6) Add License.txt

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19287 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Michael Kinney
2015-12-15 19:23:57 +00:00
committed by mdkinney
parent 9b6bbcdbfd
commit b303605e1b
190 changed files with 39436 additions and 0 deletions

View File

@@ -0,0 +1,337 @@
/** @file
This file include all platform action which can be customized
by IBV/OEM.
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "PlatformBootManager.h"
EFI_GUID mUefiShellFileGuid = {0x7C04A583, 0x9E3E, 0x4f1c, {0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }};
/**
Return the index of the load option in the load option array.
The function consider two load options are equal when the
OptionType, Attributes, Description, FilePath and OptionalData are equal.
@param Key Pointer to the load option to be found.
@param Array Pointer to the array of load options to be found.
@param Count Number of entries in the Array.
@retval -1 Key wasn't found in the Array.
@retval 0 ~ Count-1 The index of the Key in the Array.
**/
INTN
PlatformFindLoadOption (
IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Key,
IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Array,
IN UINTN Count
)
{
UINTN Index;
for (Index = 0; Index < Count; Index++) {
if ((Key->OptionType == Array[Index].OptionType) &&
(Key->Attributes == Array[Index].Attributes) &&
(StrCmp (Key->Description, Array[Index].Description) == 0) &&
(CompareMem (Key->FilePath, Array[Index].FilePath, GetDevicePathSize (Key->FilePath)) == 0) &&
(Key->OptionalDataSize == Array[Index].OptionalDataSize) &&
(CompareMem (Key->OptionalData, Array[Index].OptionalData, Key->OptionalDataSize) == 0)) {
return (INTN) Index;
}
}
return -1;
}
VOID
PlatformRegisterFvBootOption (
EFI_GUID *FileGuid,
CHAR16 *Description,
UINT32 Attributes
)
{
EFI_STATUS Status;
EFI_HANDLE *HandleBuffer;
UINTN HandleCount;
UINTN IndexFv;
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
CHAR16 *UiSection;
UINTN UiSectionLength;
UINT32 AuthenticationStatus;
EFI_HANDLE FvHandle;
MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileNode;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;
UINTN BootOptionCount;
UINTN OptionIndex;
EFI_BOOT_MANAGER_LOAD_OPTION NewOption;
//
// Locate all available FVs.
//
HandleBuffer = NULL;
Status = gBS->LocateHandleBuffer (
ByProtocol,
&gEfiFirmwareVolume2ProtocolGuid,
NULL,
&HandleCount,
&HandleBuffer
);
if (EFI_ERROR (Status)) {
return;
}
//
// Go through FVs one by one to find the required FFS file
//
for (IndexFv = 0, FvHandle = NULL; IndexFv < HandleCount && FvHandle == NULL; IndexFv++) {
Status = gBS->HandleProtocol (
HandleBuffer[IndexFv],
&gEfiFirmwareVolume2ProtocolGuid,
(VOID **)&Fv
);
if (EFI_ERROR (Status)) {
continue;
}
//
// Attempt to read a EFI_SECTION_USER_INTERFACE section from the required FFS file
//
UiSection = NULL;
Status = Fv->ReadSection (
Fv,
FileGuid,
EFI_SECTION_USER_INTERFACE,
0,
(VOID **) &UiSection,
&UiSectionLength,
&AuthenticationStatus
);
if (EFI_ERROR (Status)) {
continue;
}
FreePool (UiSection);
//
// Save the handle of the FV where the FFS file was found
//
FvHandle = HandleBuffer[IndexFv];
}
//
// Free the buffer of FV handles
//
FreePool (HandleBuffer);
//
// If the FFS file was not found, then return
//
if (FvHandle == NULL) {
return;
}
//
// Create a device path for the FFS file that was found
//
EfiInitializeFwVolDevicepathNode (&FileNode, FileGuid);
DevicePath = AppendDevicePathNode (
DevicePathFromHandle (FvHandle),
(EFI_DEVICE_PATH_PROTOCOL *) &FileNode
);
//
// Create and add a new load option for the FFS file that was found
//
Status = EfiBootManagerInitializeLoadOption (
&NewOption,
LoadOptionNumberUnassigned,
LoadOptionTypeBoot,
Attributes,
Description,
DevicePath,
NULL,
0
);
if (!EFI_ERROR (Status)) {
BootOptions = EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOptionTypeBoot);
OptionIndex = PlatformFindLoadOption (&NewOption, BootOptions, BootOptionCount);
if (OptionIndex == -1) {
Status = EfiBootManagerAddLoadOptionVariable (&NewOption, (UINTN) -1);
ASSERT_EFI_ERROR (Status);
}
EfiBootManagerFreeLoadOption (&NewOption);
EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
}
}
VOID
EFIAPI
InternalBdsEmptyCallbackFuntion (
IN EFI_EVENT Event,
IN VOID *Context
)
{
return;
}
/**
Do the platform specific action before the console is connected.
Such as:
Update console variable;
Register new Driver#### or Boot####;
Signal ReadyToLock event.
**/
VOID
EFIAPI
PlatformBootManagerBeforeConsole (
VOID
)
{
EFI_STATUS Status;
UINTN Index;
EFI_INPUT_KEY Enter;
EFI_INPUT_KEY F2;
EFI_BOOT_MANAGER_LOAD_OPTION BootOption;
EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save;
EFI_HANDLE Handle;
EFI_EVENT EndOfDxeEvent;
//
// Update the console variables.
//
for (Index = 0; gPlatformConsole[Index].DevicePath != NULL; Index++) {
if ((gPlatformConsole[Index].ConnectType & CONSOLE_IN) == CONSOLE_IN) {
EfiBootManagerUpdateConsoleVariable (ConIn, gPlatformConsole[Index].DevicePath, NULL);
}
if ((gPlatformConsole[Index].ConnectType & CONSOLE_OUT) == CONSOLE_OUT) {
EfiBootManagerUpdateConsoleVariable (ConOut, gPlatformConsole[Index].DevicePath, NULL);
}
if ((gPlatformConsole[Index].ConnectType & STD_ERROR) == STD_ERROR) {
EfiBootManagerUpdateConsoleVariable (ErrOut, gPlatformConsole[Index].DevicePath, NULL);
}
}
//
// Register ENTER as CONTINUE key
//
Enter.ScanCode = SCAN_NULL;
Enter.UnicodeChar = CHAR_CARRIAGE_RETURN;
EfiBootManagerRegisterContinueKeyOption (0, &Enter, NULL);
//
// Map F2 to Boot Manager Menu
//
F2.ScanCode = SCAN_F2;
F2.UnicodeChar = CHAR_NULL;
EfiBootManagerGetBootManagerMenu (&BootOption);
EfiBootManagerAddKeyOptionVariable (NULL, (UINT16) BootOption.OptionNumber, 0, &F2, NULL);
//
// Register UEFI Shell
//
PlatformRegisterFvBootOption (&mUefiShellFileGuid, L"UEFI Shell", LOAD_OPTION_ACTIVE);
//
// Prepare for S3
//
Status = gBS->LocateProtocol (&gEfiAcpiS3SaveProtocolGuid, NULL, (VOID **)&AcpiS3Save);
if (!EFI_ERROR (Status)) {
AcpiS3Save->S3Save (AcpiS3Save, NULL);
}
//
// Inform PI SMM drivers that BDS may run 3rd party code
// Create and signal End of DXE event group
//
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
InternalBdsEmptyCallbackFuntion,
NULL,
&gEfiEndOfDxeEventGroupGuid,
&EndOfDxeEvent
);
ASSERT_EFI_ERROR (Status);
gBS->SignalEvent (EndOfDxeEvent);
gBS->CloseEvent (EndOfDxeEvent);
DEBUG((EFI_D_INFO,"All EndOfDxe callbacks have returned successfully\n"));
//
// Install SMM Ready To Lock protocol so all resources can be locked down
// before BDS runs 3rd party code. This action must be done last so all
// other SMM driver signals are processed before this final lock down action.
//
Handle = NULL;
Status = gBS->InstallProtocolInterface (
&Handle,
&gEfiDxeSmmReadyToLockProtocolGuid,
EFI_NATIVE_INTERFACE,
NULL
);
ASSERT_EFI_ERROR (Status);
}
/**
Do the platform specific action after the console is connected.
Such as:
Dynamically switch output mode;
Signal console ready platform customized event;
Run diagnostics like memory testing;
Connect certain devices;
Dispatch additional option ROMs
**/
VOID
EFIAPI
PlatformBootManagerAfterConsole (
VOID
)
{
EFI_STATUS Status;
Print (
L"\n"
L"F2 to enter Boot Manager Menu.\n"
L"ENTER to boot directly.\n"
L"\n"
);
//
// Use a DynamicHii type pcd to save the boot status, which is used to
// control configuration mode, such as FULL/MINIMAL/NO_CHANGES configuration.
//
if (PcdGetBool(PcdBootState)) {
Status = PcdSetBoolS (PcdBootState, FALSE);
ASSERT_EFI_ERROR (Status);
}
}
/**
This function is called each second during the boot manager waits the timeout.
@param TimeoutRemain The remaining timeout.
**/
VOID
EFIAPI
PlatformBootManagerWaitCallback (
UINT16 TimeoutRemain
)
{
Print (L"\r%-2d seconds remained...", TimeoutRemain);
}

View File

@@ -0,0 +1,50 @@
/** @file
Head file for BDS Platform specific code
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _PLATFORM_BOOT_MANAGER_H
#define _PLATFORM_BOOT_MANAGER_H
#include <PiDxe.h>
#include <Library/PlatformBootManagerLib.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/AcpiS3Save.h>
#include <Protocol/DxeSmmReadyToLock.h>
#include <Guid/DebugAgentGuid.h>
#include <Guid/EventGroup.h>
#include <Guid/PcAnsi.h>
#include <Guid/TtyTerm.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootManagerLib.h>
typedef struct {
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
UINTN ConnectType;
} PLATFORM_CONSOLE_CONNECT_ENTRY;
extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[];
#define CONSOLE_OUT BIT0
#define CONSOLE_IN BIT1
#define STD_ERROR BIT2
#endif // _PLATFORM_BOOT_MANAGER_H

View File

@@ -0,0 +1,72 @@
## @file
# Include all platform action which can be customized by IBV/OEM.
#
# Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.<BR>
# 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
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = PlatformBootManagerLib
FILE_GUID = EC67889B-9E62-4c81-8CA0-86E6A6EEE61A
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
CONSTRUCTOR = InitializePlatformBootManagerLib
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
[Sources]
PlatformData.c
PlatformBootManager.c
PlatformBootManager.h
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
SourceLevelDebugPkg/SourceLevelDebugPkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
PcdLib
DebugLib
DevicePathLib
MemoryAllocationLib
UefiBootServicesTableLib
UefiLib
UefiBootManagerLib
[Protocols]
gEfiFirmwareVolume2ProtocolGuid
gEfiAcpiS3SaveProtocolGuid
gEfiDxeSmmReadyToLockProtocolGuid
[Guids]
gEfiPcAnsiGuid
gEfiVT100Guid
gEfiVT100PlusGuid
gEfiVTUTF8Guid
gEfiTtyTermGuid
gEfiEndOfDxeEventGroupGuid
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState

View File

@@ -0,0 +1,281 @@
/** @file
Defined the platform specific device path which will be filled to
ConIn/ConOut variables.
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "PlatformBootManager.h"
///
/// the short form device path for Usb keyboard
///
#define CLASS_HID 3
#define SUBCLASS_BOOT 1
#define PROTOCOL_KEYBOARD 1
///
/// PcdDefaultTerminalType values
///
#define PCANSITYPE 0
#define VT100TYPE 1
#define VT100PLUSTYPE 2
#define VTUTF8TYPE 3
#define TTYTERMTYPE 4
//
// Below is the platform console device path
//
typedef struct {
ACPI_HID_DEVICE_PATH PciRootBridge;
PCI_DEVICE_PATH PciUart;
UART_DEVICE_PATH Uart;
VENDOR_DEVICE_PATH TerminalType;
EFI_DEVICE_PATH_PROTOCOL End;
} PCI_UART_DEVICE_PATH;
typedef struct {
VENDOR_DEVICE_PATH VendorHardware;
UART_DEVICE_PATH Uart;
VENDOR_DEVICE_PATH TerminalType;
EFI_DEVICE_PATH_PROTOCOL End;
} VENDOR_UART_DEVICE_PATH;
typedef struct {
USB_CLASS_DEVICE_PATH UsbClass;
EFI_DEVICE_PATH_PROTOCOL End;
} USB_CLASS_FORMAT_DEVICE_PATH;
#define PNPID_DEVICE_PATH_NODE(PnpId) \
{ \
{ \
ACPI_DEVICE_PATH, \
ACPI_DP, \
{ \
(UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \
(UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \
} \
}, \
EISA_PNP_ID((PnpId)), \
0 \
}
#define PCI_DEVICE_PATH_NODE(Func, Dev) \
{ \
{ \
HARDWARE_DEVICE_PATH, \
HW_PCI_DP, \
{ \
(UINT8) (sizeof (PCI_DEVICE_PATH)), \
(UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \
}, \
}, \
(Func), \
(Dev) \
}
#define gEndEntire \
{ \
END_DEVICE_PATH_TYPE, \
END_ENTIRE_DEVICE_PATH_SUBTYPE, \
{ \
END_DEVICE_PATH_LENGTH, \
0 \
} \
}
//
// Platform specific serial device path
//
PCI_UART_DEVICE_PATH gPciUartDevicePath0 = {
PNPID_DEVICE_PATH_NODE(0x0A03),
PCI_DEVICE_PATH_NODE(1, 20),
{
{
MESSAGING_DEVICE_PATH,
MSG_UART_DP,
{
(UINT8)(sizeof (UART_DEVICE_PATH)),
(UINT8)((sizeof (UART_DEVICE_PATH)) >> 8)
}
},
0, // Reserved
921600, // BaudRate
8, // DataBits
1, // Parity
1 // StopBits
},
{
{
MESSAGING_DEVICE_PATH,
MSG_VENDOR_DP,
{
(UINT8)(sizeof (VENDOR_DEVICE_PATH)),
(UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
},
},
DEVICE_PATH_MESSAGING_PC_ANSI
},
gEndEntire
};
PCI_UART_DEVICE_PATH gPciUartDevicePath1 = {
PNPID_DEVICE_PATH_NODE(0x0A03),
PCI_DEVICE_PATH_NODE(5, 20),
{
{
MESSAGING_DEVICE_PATH,
MSG_UART_DP,
{
(UINT8)(sizeof (UART_DEVICE_PATH)),
(UINT8)((sizeof (UART_DEVICE_PATH)) >> 8)
}
},
0, // Reserved
921600, // BaudRate
8, // DataBits
1, // Parity
1 // StopBits
},
{
{
MESSAGING_DEVICE_PATH,
MSG_VENDOR_DP,
{
(UINT8)(sizeof (VENDOR_DEVICE_PATH)),
(UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
DEVICE_PATH_MESSAGING_PC_ANSI
},
gEndEntire
};
VENDOR_UART_DEVICE_PATH gDebugAgentUartDevicePath = {
{
{
HARDWARE_DEVICE_PATH,
HW_VENDOR_DP,
{
(UINT8) (sizeof (VENDOR_DEVICE_PATH)),
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
EFI_DEBUG_AGENT_GUID,
},
{
{
MESSAGING_DEVICE_PATH,
MSG_UART_DP,
{
(UINT8) (sizeof (UART_DEVICE_PATH)),
(UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
}
},
0, // Reserved
0, // BaudRate - Default
0, // DataBits - Default
0, // Parity - Default
0, // StopBits - Default
},
{
{
MESSAGING_DEVICE_PATH,
MSG_VENDOR_DP,
{
(UINT8)(sizeof (VENDOR_DEVICE_PATH)),
(UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
DEVICE_PATH_MESSAGING_PC_ANSI
},
gEndEntire
};
USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath = {
{
{
MESSAGING_DEVICE_PATH,
MSG_USB_CLASS_DP,
{
(UINT8)(sizeof (USB_CLASS_DEVICE_PATH)),
(UINT8)((sizeof (USB_CLASS_DEVICE_PATH)) >> 8)
}
},
0xffff, // VendorId - Match any vendor
0xffff, // ProductId - Match any product
CLASS_HID, // DeviceClass
SUBCLASS_BOOT, // DeviceSubClass
PROTOCOL_KEYBOARD // DeviceProtocol
},
gEndEntire
};
//
// Predefined platform default console device path
//
PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = {
{ (EFI_DEVICE_PATH_PROTOCOL *) &gPciUartDevicePath0, (CONSOLE_OUT | CONSOLE_IN) },
{ (EFI_DEVICE_PATH_PROTOCOL *) &gPciUartDevicePath1, (CONSOLE_OUT | CONSOLE_IN) },
{ (EFI_DEVICE_PATH_PROTOCOL *) &gDebugAgentUartDevicePath, (CONSOLE_OUT | CONSOLE_IN) },
{ (EFI_DEVICE_PATH_PROTOCOL *) &gUsbClassKeyboardDevicePath, (CONSOLE_IN) },
{ NULL, 0 }
};
EFI_STATUS
EFIAPI
InitializePlatformBootManagerLib (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_GUID *TerminalTypeGuid;
//
// Update UART device path nodes based on UART PCD settings
//
gPciUartDevicePath0.Uart.BaudRate = PcdGet64 (PcdUartDefaultBaudRate);
gPciUartDevicePath0.Uart.DataBits = PcdGet8 (PcdUartDefaultDataBits);
gPciUartDevicePath0.Uart.Parity = PcdGet8 (PcdUartDefaultParity);
gPciUartDevicePath0.Uart.StopBits = PcdGet8 (PcdUartDefaultStopBits);
gPciUartDevicePath1.Uart.BaudRate = PcdGet64 (PcdUartDefaultBaudRate);
gPciUartDevicePath1.Uart.DataBits = PcdGet8 (PcdUartDefaultDataBits);
gPciUartDevicePath1.Uart.Parity = PcdGet8 (PcdUartDefaultParity);
gPciUartDevicePath1.Uart.StopBits = PcdGet8 (PcdUartDefaultStopBits);
//
// Update Vendor device path nodes based on terminal type PCD settings
//
switch (PcdGet8 (PcdDefaultTerminalType)) {
case PCANSITYPE:
TerminalTypeGuid = &gEfiPcAnsiGuid;
break;
case VT100TYPE:
TerminalTypeGuid = &gEfiVT100Guid;
break;
case VT100PLUSTYPE:
TerminalTypeGuid = &gEfiVT100PlusGuid;
break;
case VTUTF8TYPE:
TerminalTypeGuid = &gEfiVTUTF8Guid;
break;
case TTYTERMTYPE:
TerminalTypeGuid = &gEfiTtyTermGuid;
break;
default:
TerminalTypeGuid = &gEfiPcAnsiGuid;
break;
}
CopyGuid (&gPciUartDevicePath0.TerminalType.Guid, TerminalTypeGuid);
CopyGuid (&gPciUartDevicePath1.TerminalType.Guid, TerminalTypeGuid);
return EFI_SUCCESS;
}