Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161982482
D54431.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D54431.diff
View Options
diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c
--- a/stand/efi/loader/framebuffer.c
+++ b/stand/efi/loader/framebuffer.c
@@ -590,53 +590,55 @@
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) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 9, 3:08 PM (6 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34891367
Default Alt Text
D54431.diff (2 KB)
Attached To
Mode
D54431: loader.efi: probe for UGA if GOP isn't found
Attached
Detach File
Event Timeline
Log In to Comment