From nobody Mon Jan 12 17:33:15 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 4dqfbv4gfyz6NsNp for ; Mon, 12 Jan 2026 17:33:15 +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 4dqfbv1lrxz46kv for ; Mon, 12 Jan 2026 17:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768239195; 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=iUsVdWtu5NjqjcUMYfquVSgzcBZB37UHJ1b+xgiTE+k=; b=yqxP0P30r9OfPmMS4Uqmpx2Qg59fYbpxSLoVEAE71ubNYUqZ9vekyFSpVDzCXmUDOfBdYd 2EpzwyGzfGZDi48Ksj2sB8bPIFgTHQMUMxP5Btdc8092RGtFNZHvCxnSsw/YA44jXNqOhI +LQfya933Vo/YM3EiilMLeVw/FV4y21C/zso9oeKbL/XSKTTwxgVs73GelwC7DiWp1NWrC fyyqoXV8D7LW1TGYNbNhiNVsBP+9X+XkBrNOzx0SQNYcAqKSyCyEk5xN/nTw/2wio2tnSe 5JMaG/IW5UtlFeMlUitQmnu/YO6KiV+UiA45gWU9nI+4RzcCOLU5dKpifN9AFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768239195; 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=iUsVdWtu5NjqjcUMYfquVSgzcBZB37UHJ1b+xgiTE+k=; b=hoG6BidPErNaG7krYFFvt6CUGjicgBHEDZOo7dmRJjtaFGxsJXkeUqxTo6rCvBbsBXUBfK 4QjhXAGiK6tsQ2z4mjx+PfeZFomS6VmJ3dUz0yryAaqXMtBcLHyZrylWn+xgjTG9NNS5AV SmMDFqGdwbBhGmn2ZkiycCF3mxVxZJcFjKmQ3P51YA+u2mwmmOf7H5faB7ieXiR2tXH5Gr ILJwQnHylMSW+6tof9ft2ixM71Rb/Qa8mB31dIZRLalBE/IxxsRKNrAaApd+5ZZ7krvxUz 409yNDWU0V5xgI69djOgkKZAz1oUSUaEA5Oi/MKp0wOHuKZOJlBKU4wBhB6lbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768239195; a=rsa-sha256; cv=none; b=gfKTKi2OWKotNKnhRZosxN05qeMQBTFm4pPc/ynQPhXCPoA7ibXD891uxKmP5uutW/3BrM d15H1CPuLA5zNEWKHAOOk+hJjf3mRLlQZnwCG63+1eIvY7uIz4AWibdzS8SLjveq+xiFLm Io5RsFQB72KE0iEWt+xrYJ/WOZkS9Uze3mYOx60RT606W/hZdm9lZftV/f2GuXv+VDO4qC 0c+KGjQcEhTsWPSsgpE8O3uzDxa01BU8ZlYTjG9//UJmIlju4zOa5i+i0ev7sTF06DGjHE 7YYCs7Mk/miIdvfOS0RKxYP55J3JWYtckFjvfGGaCL6szSvhXAC3gPdIZLFY/Q== 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 4dqfbv0jlrzcgt for ; Mon, 12 Jan 2026 17:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3979a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 12 Jan 2026 17:33:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: 5a9e2c59cb08 - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: 5a9e2c59cb08bf1c1a428cd8a9ebd2886381a051 Auto-Submitted: auto-generated Date: Mon, 12 Jan 2026 17:33:15 +0000 Message-Id: <6965305b.3979a.50053d8c@gitrepo.freebsd.org> The branch stable/15 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=5a9e2c59cb08bf1c1a428cd8a9ebd2886381a051 commit 5a9e2c59cb08bf1c1a428cd8a9ebd2886381a051 Author: Ahmad Khalifa AuthorDate: 2026-01-04 13:15:02 +0000 Commit: Ahmad Khalifa CommitDate: 2026-01-12 17:24:55 +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 141a29305f7c..981b92c7a9a3 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -585,53 +585,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) {