From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smarthost01a.ixn.mail.zen.net.uk (smarthost01a.ixn.mail.zen.net.uk [212.23.1.20]) by mx.groups.io with SMTP id smtpd.web09.2040.1644528474026831241 for ; Thu, 10 Feb 2022 13:27:54 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=permerror, err=parse error for token &{10 18 sdn.klaviyomail.com}: permanent DNS error (domain: starlabs.systems, ip: 212.23.1.20, mailfrom: sean@starlabs.systems) Received: from [217.155.46.38] (helo=sean-StarBook.lan) by smarthost01a.ixn.mail.zen.net.uk with esmtp (Exim 4.90_1) (envelope-from ) id 1nIGym-0000a5-C6; Thu, 10 Feb 2022 21:27:52 +0000 From: "Sean Rhodes" To: devel@edk2.groups.io Cc: guo.dong@intel.com, Patrick Rudolph Subject: [PATCH 15/18] UefiPayloadPkg/Library/PlatformBootManagerLib: Remove broken VGA detection Date: Thu, 10 Feb 2022 21:27:51 +0000 Message-Id: <253cc473e4d3e77a4edf6e365a52d7a54c6f1703.1644527848.git.sean@starlabs.systems> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-smarthost01a-IP: [217.155.46.38] Feedback-ID: 217.155.46.38 Content-Transfer-Encoding: quoted-printable From: Patrick Rudolph This fixes an issue where the framebuffer provided by coreboot or slimbootloader will only work on the primary VGA device. If the framebuffer corresponds to a different device the screen will stay black. In addition, the code doesn't work for multiple graphic cards, has reference to non existing functions, and is a duplication of common code. Call EfiBootManagerConnectVideoController on every display device found, not only the legacy VGA device. This is the same as OvmfPkg does. Allows to display output on the framebuffer set up by firmware, which might not be the VGA device. Signed-off-by: Patrick Rudolph --- .../PlatformBootManagerLib/PlatformConsole.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.= c b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c index c93c7c99b5..bfaf89e74c 100644 --- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c +++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c @@ -109,7 +109,7 @@ EFI_DEVICE_PATH_PROTOCOL *gPlatformRootBridges[] =3D { NULL=0D };=0D =0D -BOOLEAN mDetectVgaOnly;=0D +BOOLEAN mDetectDisplayOnly;=0D =0D /**=0D Add IsaKeyboard to ConIn; add IsaSerial to ConOut, ConIn, ErrOut.=0D @@ -482,7 +482,7 @@ DetectAndPreparePlatformPciDevicePath ( );=0D ASSERT_EFI_ERROR (Status);=0D =0D - if (!mDetectVgaOnly) {=0D + if (!mDetectDisplayOnly) {=0D //=0D // Here we decide whether it is LPC Bridge=0D //=0D @@ -515,14 +515,14 @@ DetectAndPreparePlatformPciDevicePath ( }=0D =0D //=0D - // Here we decide which VGA device to enable in PCI bus=0D + // Enable all display devices=0D //=0D - if (IS_PCI_VGA (Pci)) {=0D + if (IS_PCI_DISPLAY (Pci)) {=0D //=0D // Add them to ConOut.=0D //=0D - DEBUG ((DEBUG_INFO, "Found PCI VGA device\n"));=0D - PreparePciVgaDevicePath (Handle);=0D + DEBUG ((DEBUG_INFO, "Found PCI Display device\n"));=0D + EfiBootManagerConnectVideoController (Handle);=0D return EFI_SUCCESS;=0D }=0D =0D @@ -532,7 +532,7 @@ DetectAndPreparePlatformPciDevicePath ( /**=0D Do platform specific PCI Device check and add them to ConOut, ConIn, Err= Out=0D =0D - @param[in] DetectVgaOnly - Only detect VGA device if it's TRUE.=0D + @param[in] DetectDisplayOnly - Only detect display device if it's TRUE.= =0D =0D @retval EFI_SUCCESS - PCI Device check and Console variable update succe= ssfully.=0D @retval EFI_STATUS - PCI Device check or Console variable update fail.=0D @@ -540,10 +540,10 @@ DetectAndPreparePlatformPciDevicePath ( **/=0D EFI_STATUS=0D DetectAndPreparePlatformPciDevicePaths (=0D - BOOLEAN DetectVgaOnly=0D + BOOLEAN DetectDisplayOnly=0D )=0D {=0D - mDetectVgaOnly =3D DetectVgaOnly;=0D + mDetectDisplayOnly =3D DetectDisplayOnly;=0D =0D EfiBootManagerUpdateConsoleVariable (=0D ConIn,=0D --=20 2.32.0