From nobody Sun Jan 4 13:21:01 2026 X-Original-To: dev-commits-src-main@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 4dkdNY6xc3z6N1xb for ; Sun, 04 Jan 2026 13:21:01 +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 4dkdNY4y8jz3Kcb for ; Sun, 04 Jan 2026 13:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767532861; 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=lAv+hbKvTcOurk0jRFovSK+co1Nhrfz6IlrJcjy0IjQ=; b=CMzbcqDHuk8kvvfYKSb+FOn/kDUYUpN33z0ttzPkxfbWQO6ScKeK0HszwAy0/lMvpf/qLf 7WD8Zf5mFGicJZCcqQy03f7RTcxabNjbrHsK1eUx0SIFYBOnsQKt/Wnsm/SzurfR4FenMB RKB0RJmo49fv2FvlJaYW1eVY+PBXZQWY+amtGhKoXAxgIE9yBpZfPJek2/KCY+BjDHNBV+ poXk3316gAeYXHjmowkhHLbMzVZ/nZGvndoFl1oN6nEooKXIELemwHNTcjVU4S1MumIKSj zbKLBRVKJpcBUd4DUNxLQkTbQMiofpOQbDLpWwikaNaA/dH4+CuV+2BPov/zaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767532861; 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=lAv+hbKvTcOurk0jRFovSK+co1Nhrfz6IlrJcjy0IjQ=; b=rW3jijNQpE5+FzflhVb/aUL7uzE/nGfwPctQvD+Napw8K5wn7yulvr0n3ikHJmT7m20pf/ 3rkn9Qa5wgYfEcYSYIOpkMMCWY+fr/oDLlwXMXx4fEcgHdtz7I9WCM3E3a3vM/mZe7V/Wv hCCmWD/Sa7Ysqe6ZH4RkPUvGp1UDaTEF7YtXUq+eyVJBMbcfL10Am8t7JocVdj8gXymQGb y7XtMWgUW6rWWatF7fLIC7AcXuieLZc/J6lUSEowjNE1khuicCXzmt+iXNPQ8cu86tdvDO h5hjCRWv91aPgTQc8Dv8n3cLXQcfGNDNZnBaDYSZKIZaEVnzRJ2KF3NEklTjTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767532861; a=rsa-sha256; cv=none; b=yzVEm0fOnQAIiwQdkKXRqv4haqXTmImixOxROkVM2p2Lyddk4mbid0Sdg0DGRY7n1AEIrX ExOo1ZJnNpekqBlvr+pamKxs5qmnCZY7S4E1DTibDc22OWrwaAQnO1NOGbFsQ3Jw76sfGd TK3OM4sgfaGcLajcxRmVAEjEq0rZAZnakSDNN8kqneNeuae5UQLsCumJJsNx8PSmKKd4pr 704uA1wargirok+EKvD3kIvKupMnnckz7JNscMNfpkQu8Mf3mDi/+/kwY8zYpfZTqGtIWi z3PaLqwfAqUMOOoMtxEV/quhiNpLaAB7jTKweAJHgrgX1ai2YGLlIVy6U8y94A== 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 4dkdNY46Cyzbp8 for ; Sun, 04 Jan 2026 13:21:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39cc4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 04 Jan 2026 13:21:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 5d85dde27b47 - main - loader.efi: probe for UGA if GOP isn't found List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 5d85dde27b4769604fc108b89328607e70e767ed Auto-Submitted: auto-generated Date: Sun, 04 Jan 2026 13:21:01 +0000 Message-Id: <695a693d.39cc4.8c196a6@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=5d85dde27b4769604fc108b89328607e70e767ed commit 5d85dde27b4769604fc108b89328607e70e767ed Author: Ahmad Khalifa AuthorDate: 2026-01-04 13:15:02 +0000 Commit: Ahmad Khalifa CommitDate: 2026-01-04 13:15: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 --- 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 08834aa7106b..dc0047de1116 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -590,53 +590,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_PROTOCOL *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 (efi_status_to_errno(status)); + } + } 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_PROTOCOL *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 (efi_status_to_errno(status)); - } } switch (gfx_state->tg_fb_type) {