]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
OvmgPkg/PlatformBootManagerLib: Add Debug Agent console
[mirror_edk2.git] / OvmfPkg / Library / PlatformBootManagerLib / PlatformData.c
index e9737a7577c971a52746569284dc957608a1c899..82f294577ecf41f50458432d6e220381a8f710ad 100644 (file)
@@ -2,7 +2,7 @@
   Defined the platform specific device path which will be used by\r
   platform Bbd to perform the platform policy connect.\r
 \r
-  Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 \r
 #include "BdsPlatform.h"\r
 \r
+//\r
+// Debug Agent UART Device Path structure\r
+//\r
+#pragma pack(1)\r
+typedef struct {\r
+  VENDOR_DEVICE_PATH        VendorHardware;\r
+  UART_DEVICE_PATH          Uart;\r
+  VENDOR_DEVICE_PATH        TerminalType;\r
+  EFI_DEVICE_PATH_PROTOCOL  End;\r
+} VENDOR_UART_DEVICE_PATH;\r
+#pragma pack()\r
+\r
 ACPI_HID_DEVICE_PATH       gPnpPs2KeyboardDeviceNode  = gPnpPs2Keyboard;\r
 ACPI_HID_DEVICE_PATH       gPnp16550ComPortDeviceNode = gPnp16550ComPort;\r
 UART_DEVICE_PATH           gUartDeviceNode            = gUart;\r
@@ -24,10 +36,50 @@ VENDOR_DEVICE_PATH         gTerminalTypeDeviceNode    = gPcAnsiTerminal;
 // Platform specific keyboard device path\r
 //\r
 \r
+\r
+//\r
+// Debug Agent UART Device Path\r
+//\r
+VENDOR_UART_DEVICE_PATH gDebugAgentUartDevicePath = {\r
+  {\r
+    {\r
+      HARDWARE_DEVICE_PATH,\r
+      HW_VENDOR_DP,\r
+      {\r
+        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    EFI_DEBUG_AGENT_GUID,\r
+  },\r
+  {\r
+    {\r
+      MESSAGING_DEVICE_PATH,\r
+      MSG_UART_DP,\r
+      {\r
+        (UINT8) (sizeof (UART_DEVICE_PATH)),\r
+        (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8)\r
+      }\r
+    },\r
+    0,  // Reserved\r
+    0,  // BaudRate - Default\r
+    0,  // DataBits - Default\r
+    0,  // Parity   - Default\r
+    0,  // StopBits - Default\r
+  },\r
+  gPcAnsiTerminal,\r
+  gEndEntire\r
+};\r
+\r
+\r
 //\r
 // Predefined platform default console device path\r
 //\r
 PLATFORM_CONSOLE_CONNECT_ENTRY   gPlatformConsole[] = {\r
+  {\r
+    (EFI_DEVICE_PATH_PROTOCOL *) &gDebugAgentUartDevicePath,\r
+    (CONSOLE_OUT | CONSOLE_IN | STD_ERROR)\r
+  },\r
   {\r
     NULL,\r
     0\r