EmulatorPkg: Support a second GOP window
authorZhiguang Liu <zhiguang.liu@intel.com>
Mon, 29 Apr 2019 01:40:26 +0000 (09:40 +0800)
committerHao A Wu <hao.a.wu@intel.com>
Wed, 8 May 2019 08:21:49 +0000 (16:21 +0800)
Two GOP screens will be created if PcdEmuGop is set in
EmulatorPkg.dsc:
gEmulatorPkgTokenSpaceGuid.PcdEmuGop|L"GOP Window 1!GOP Window 2"

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1687
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c

index 633a97d..1151021 100644 (file)
@@ -42,6 +42,38 @@ EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath = {
   gEndEntire\r
 };\r
 \r
+EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath2 = {\r
+  {\r
+    {\r
+      {\r
+        HARDWARE_DEVICE_PATH,\r
+        HW_VENDOR_DP,\r
+        {\r
+          (UINT8) (sizeof (EMU_VENDOR_DEVICE_PATH_NODE)),\r
+          (UINT8) ((sizeof (EMU_VENDOR_DEVICE_PATH_NODE)) >> 8)\r
+        }\r
+      },\r
+      EMU_THUNK_PROTOCOL_GUID\r
+    },\r
+    0\r
+  },\r
+  {\r
+    {\r
+      {\r
+        HARDWARE_DEVICE_PATH,\r
+        HW_VENDOR_DP,\r
+        {\r
+          (UINT8) (sizeof (EMU_VENDOR_DEVICE_PATH_NODE)),\r
+          (UINT8) ((sizeof (EMU_VENDOR_DEVICE_PATH_NODE)) >> 8)\r
+        },\r
+      },\r
+      EMU_GRAPHICS_WINDOW_PROTOCOL_GUID,\r
+    },\r
+    1\r
+  },\r
+  gEndEntire\r
+};\r
+\r
 //\r
 // Predefined platform default console device path\r
 //\r
@@ -51,6 +83,10 @@ BDS_CONSOLE_CONNECT_ENTRY   gPlatformConsole[] = {
     (CONSOLE_OUT | CONSOLE_IN)\r
   },\r
   {\r
+    (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath2,\r
+    (CONSOLE_OUT | CONSOLE_IN)\r
+  },\r
+  {\r
     NULL,\r
     0\r
   }\r