From 792f0d4f12ad5c01afdf9c92df8c479ff0f19a79 Mon Sep 17 00:00:00 2001 From: Zhiguang Liu Date: Mon, 29 Apr 2019 09:40:26 +0800 Subject: [PATCH] EmulatorPkg: Support a second GOP window 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 Cc: Jordan Justen Cc: Andrew Fish Cc: Ray Ni Reviewed-by: Jordan Justen --- .../Library/PlatformBmLib/PlatformBmData.c | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c b/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c index 633a97d14a..1151021606 100644 --- a/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c +++ b/EmulatorPkg/Library/PlatformBmLib/PlatformBmData.c @@ -42,6 +42,38 @@ EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath = { gEndEntire }; +EMU_PLATFORM_UGA_DEVICE_PATH gGopDevicePath2 = { + { + { + { + HARDWARE_DEVICE_PATH, + HW_VENDOR_DP, + { + (UINT8) (sizeof (EMU_VENDOR_DEVICE_PATH_NODE)), + (UINT8) ((sizeof (EMU_VENDOR_DEVICE_PATH_NODE)) >> 8) + } + }, + EMU_THUNK_PROTOCOL_GUID + }, + 0 + }, + { + { + { + HARDWARE_DEVICE_PATH, + HW_VENDOR_DP, + { + (UINT8) (sizeof (EMU_VENDOR_DEVICE_PATH_NODE)), + (UINT8) ((sizeof (EMU_VENDOR_DEVICE_PATH_NODE)) >> 8) + }, + }, + EMU_GRAPHICS_WINDOW_PROTOCOL_GUID, + }, + 1 + }, + gEndEntire +}; + // // Predefined platform default console device path // @@ -50,6 +82,10 @@ BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[] = { (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath, (CONSOLE_OUT | CONSOLE_IN) }, + { + (EFI_DEVICE_PATH_PROTOCOL *) &gGopDevicePath2, + (CONSOLE_OUT | CONSOLE_IN) + }, { NULL, 0 -- 2.39.2