From nobody Mon Jan 12 17:33:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dqfbk3pXqz6NsBQ for ; Mon, 12 Jan 2026 17:33:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dqfbk25PWz479Z for ; Mon, 12 Jan 2026 17:33:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768239186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLzsFhXxdbeu5SG15Rc2UTPiQIBeE+A0lxokG2Wf7pQ=; b=aDIp6nsNmV0rDVi0YqQkQp+DGMUnvaC9JPLDWPsJ8cq/nA8qyIUpO/3Jq05jST6SaxkOjy KnTD6LCBgslAbeY9Q5s5yaaNMFJdWfqHrEer84YG+iUFlTLb9fQluSkhoiPTN2cfECKrGM WDFF2VnxGbWktvq4uuiFDalQ3KbC9KS0j4byc6bxjRH+EhFsIlU8Q3Clf3omgrzfB8nIuC Rz0uNikY1yrNIHvgtDE2VLuGrd7nGN6caaBpTZGdbrOY4J8OxywHXi8fRq7jkGOhoBLWnV HHifd+E/ntpye/7mioiwKeAZiF9lGQMXmT9NYmnUij8Sp1jAQRj6lsZlDpxEyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768239186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLzsFhXxdbeu5SG15Rc2UTPiQIBeE+A0lxokG2Wf7pQ=; b=ruSaEkrd7foPnwaBW9lX+MfGj1CpRaHs/WwNxDUSllRni6wmssio1FsBhLrIHozMZPafjT nms9pfQ0Yk+E/HlzPwxmMvJDLPfEnBPY0Yw1WR6oR5YXvLmTsQMZZuE+tQU/UNZGpQu6g9 YxmFtrT/cGGuE6whvha+JCGoFSvPKXDDNx9GvSHCcBcEMHgQ3zIm5DWJKVmv7i5qQNqNoi g2IlHfZ1PJfy4ICwKxtDif89j5n3PnTOn18/AIG73s13pGv83xEFZkbOiyJDoIYi0sawcH zlB5CqaTj7sj4IsI9kUAAFhkjhvb3e4itIzswXCFuvgeYaRrpj/4wgKIEhCVPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768239186; a=rsa-sha256; cv=none; b=rcSRfHODlKRztisSMrngpfLNw5OaCTQEy5LHsidXtLxyJ2XTl6aHKpKNaNFwy97XuNDLEM KCCPoRys7I11wJG9bXFEMJGICs81PZaZKIsHdDTTdXrJZBS8+VTbexn9S8qphNV77ew3Ib x8lTGA0X7CHTA6i8c4c1toyxqI7mWFY+0C9KKW16vNWe4wF2dD0Um3clKnmSqP5ToLuS55 VMjPVNFKT3b3jAssfrxYDtflGrRSsg9W+iK1XNpZ1XEq8FATRUpc/1gqEzJjFBOljxdanc TmsOaFDfZ9n9cKOBveKBaOqL/DV18IVFsjuPLASC1sQBy1ItubRPjbxT4BRWew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dqfbk1gsYzcPW for ; Mon, 12 Jan 2026 17:33:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38bd0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 12 Jan 2026 17:33:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: f4e56d1bda03 - stable/13 - loader.efi: probe for UGA if GOP isn't found List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4e56d1bda03982c9624e9d098a47bbbe2b834d5 Auto-Submitted: auto-generated Date: Mon, 12 Jan 2026 17:33:06 +0000 Message-Id: <69653052.38bd0.45e347f2@gitrepo.freebsd.org> The branch stable/13 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=f4e56d1bda03982c9624e9d098a47bbbe2b834d5 commit f4e56d1bda03982c9624e9d098a47bbbe2b834d5 Author: Ahmad Khalifa AuthorDate: 2026-01-04 13:15:02 +0000 Commit: Ahmad Khalifa CommitDate: 2026-01-12 17:28:02 +0000 loader.efi: probe for UGA if GOP isn't found Probe for UGA instead of returning early if we can't find GOP. Reviewed by: tsoome PR: 291935 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54431 (cherry picked from commit 5d85dde27b4769604fc108b89328607e70e767ed) --- stand/efi/loader/framebuffer.c | 74 ++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index 56693187b576..abd99910f42a 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -576,53 +576,55 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) if (EFI_ERROR(status)) free(hlist); } - if (EFI_ERROR(status)) - return (efi_status_to_errno(status)); - - nhandles = hsize / sizeof(*hlist); - /* - * Search for ConOut protocol, if not found, use first handle. - */ - gop_handle = NULL; - for (i = 0; i < nhandles; i++) { - EFI_GRAPHICS_OUTPUT *tgop; - void *dummy; + if (EFI_ERROR(status)) { + status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); + if (status == EFI_SUCCESS) { + gfx_state->tg_fb_type = FB_UGA; + gfx_state->tg_private = uga; + } else { + return (1); + } + } else { + nhandles = hsize / sizeof(*hlist); - status = OpenProtocolByHandle(hlist[i], &gop_guid, (void **)&tgop); - if (status != EFI_SUCCESS) - continue; + /* + * Search for ConOut protocol, if not found, use first handle. + */ + gop_handle = NULL; + for (i = 0; i < nhandles; i++) { + EFI_GRAPHICS_OUTPUT *tgop; + void *dummy; + + status = OpenProtocolByHandle(hlist[i], &gop_guid, + (void **)&tgop); + if (status != EFI_SUCCESS) + continue; - if (tgop->Mode->Info->PixelFormat == PixelBltOnly || - tgop->Mode->Info->PixelFormat >= PixelFormatMax) - continue; + if (tgop->Mode->Info->PixelFormat == PixelBltOnly || + tgop->Mode->Info->PixelFormat >= PixelFormatMax) + continue; - status = OpenProtocolByHandle(hlist[i], &conout_guid, &dummy); - if (status == EFI_SUCCESS) { - gop_handle = hlist[i]; - gop = tgop; - break; - } else if (gop_handle == NULL) { - gop_handle = hlist[i]; - gop = tgop; + status = OpenProtocolByHandle(hlist[i], &conout_guid, + &dummy); + if (status == EFI_SUCCESS) { + gop_handle = hlist[i]; + gop = tgop; + break; + } else if (gop_handle == NULL) { + gop_handle = hlist[i]; + gop = tgop; + } } - } - free(hlist); + free(hlist); + if (gop_handle == NULL) + return (ENXIO); - if (gop_handle != NULL) { gfx_state->tg_fb_type = FB_GOP; gfx_state->tg_private = gop; if (edid_info == NULL) edid_info = efifb_gop_get_edid(gop_handle); - } else { - status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); - if (status == EFI_SUCCESS) { - gfx_state->tg_fb_type = FB_UGA; - gfx_state->tg_private = uga; - } else { - return (1); - } } switch (gfx_state->tg_fb_type) {