summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwei4 <david.wei@intel.com>2016-05-21 22:12:42 +0800
committerzwei4 <david.wei@intel.com>2016-05-21 22:12:42 +0800
commitf0d5f04accd90dd8b88ebad7ebfb8e04496f3797 (patch)
treec54daf524279f2779c99ac19c01ef52e1ba09bb0
parentc2a8b44fcdde065152af63db94ad74b230f30ff8 (diff)
downloadedk2-platforms-f0d5f04accd90dd8b88ebad7ebfb8e04496f3797.tar.xz
Add serial console which is based on serial IO produced by Source Level Debug lib.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Lu, Shifei <shifeix.a.lu@intel.com> Reviewed-by: Wei, David <david.wei@intel.com>
-rw-r--r--Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.h12
-rw-r--r--Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c45
2 files changed, 54 insertions, 3 deletions
diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.h b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.h
index 9202331d84..bc746dcb1c 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.h
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.h
@@ -1,6 +1,6 @@
/*++
- Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2004 - 2016, 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 that accompanies this distribution.
@@ -211,6 +211,16 @@ typedef struct {
EFI_DEVICE_PATH_PROTOCOL End;
} PLATFORM_ISA_KEYBOARD_DEVICE_PATH;
+//
+// Serial IO Device Path definition
+//
+typedef struct {
+ VENDOR_DEVICE_PATH VendorDevicePath;
+ UART_DEVICE_PATH UartDevicePath;
+ VENDOR_DEVICE_PATH TerminalType;
+ EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
+} SERIAL_IO_DEVICE_PATH;
+
typedef struct {
VENDOR_DEVICE_PATH VendorDevicePath;
EFI_DEVICE_PATH_PROTOCOL End;
diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c
index 64e68d3941..7e4c9012a6 100644
--- a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c
+++ b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformData.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2004 - 2016, 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 that accompanies this distribution.
@@ -83,7 +83,46 @@ PLATFORM_ISA_SERIAL_DEVICE_PATH gIsaSerialDevicePath = {
gEndEntire
};
-
+//
+// Serial IO device path
+//
+SERIAL_IO_DEVICE_PATH mSerialIoDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ { 0x865a5a9b, 0xb85d, 0x474c, { 0x84, 0x55, 0x65, 0xd1, 0xbe, 0x84, 0x4b, 0xe2 } }
+ },
+ {
+ {
+ MESSAGING_DEVICE_PATH,
+ MSG_UART_DP,
+ {
+ (UINT8) (sizeof (UART_DEVICE_PATH)),
+ (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)
+ }
+ },
+ 0,
+ 0, // default BaudRate
+ 0, // default DataBits
+ 0, // default Parity
+ 0, // default StopBits
+ },
+ gPcAnsiTerminal,
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ END_DEVICE_PATH_LENGTH,
+ 0
+ }
+ }
+};
//
// Platform specific Button Array device path
//
@@ -123,6 +162,7 @@ USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath = {
//
BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole [] = {
{(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL},
+ {(EFI_DEVICE_PATH_PROTOCOL*)&mSerialIoDevicePath, CONSOLE_ALL},
{(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN},
{(EFI_DEVICE_PATH_PROTOCOL*)&gIsaKeyboardDevicePath, CONSOLE_IN},
{(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN},
@@ -241,6 +281,7 @@ EFI_DEVICE_PATH_PROTOCOL* gUserAuthenticationDevice[] = {
BDS_CONSOLE_CONNECT_ENTRY gPlatformSimpleConsole [] = {
{(EFI_DEVICE_PATH_PROTOCOL*)&gOnChipPciVgaDevicePath, CONSOLE_OUT},
{(EFI_DEVICE_PATH_PROTOCOL*)&gIsaSerialDevicePath, CONSOLE_ALL},
+ {(EFI_DEVICE_PATH_PROTOCOL*)&mSerialIoDevicePath, CONSOLE_ALL},
{(EFI_DEVICE_PATH_PROTOCOL*)&gHiiVendorDevicePath0, CONSOLE_IN},
{(EFI_DEVICE_PATH_PROTOCOL*)&gUsbClassKeyboardDevicePath, CONSOLE_IN},
{NULL, 0}