diff options
| -rw-r--r-- | arch/x86/boot/compressed/eboot.c | 29 | ||||
| -rw-r--r-- | arch/x86/boot/compressed/eboot.h | 4 |
2 files changed, 20 insertions, 13 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index b3e0227df2c9..d5e4044505d3 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c | |||
| @@ -276,8 +276,9 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, | |||
| 276 | nr_gops = size / sizeof(void *); | 276 | nr_gops = size / sizeof(void *); |
| 277 | for (i = 0; i < nr_gops; i++) { | 277 | for (i = 0; i < nr_gops; i++) { |
| 278 | struct efi_graphics_output_mode_info *info; | 278 | struct efi_graphics_output_mode_info *info; |
| 279 | efi_guid_t pciio_proto = EFI_PCI_IO_PROTOCOL_GUID; | 279 | efi_guid_t conout_proto = EFI_CONSOLE_OUT_DEVICE_GUID; |
| 280 | void *pciio; | 280 | bool conout_found = false; |
| 281 | void *dummy; | ||
| 281 | void *h = gop_handle[i]; | 282 | void *h = gop_handle[i]; |
| 282 | 283 | ||
| 283 | status = efi_call_phys3(sys_table->boottime->handle_protocol, | 284 | status = efi_call_phys3(sys_table->boottime->handle_protocol, |
| @@ -285,19 +286,21 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, | |||
| 285 | if (status != EFI_SUCCESS) | 286 | if (status != EFI_SUCCESS) |
| 286 | continue; | 287 | continue; |
| 287 | 288 | ||
| 288 | efi_call_phys3(sys_table->boottime->handle_protocol, | 289 | status = efi_call_phys3(sys_table->boottime->handle_protocol, |
| 289 | h, &pciio_proto, &pciio); | 290 | h, &conout_proto, &dummy); |
| 291 | |||
| 292 | if (status == EFI_SUCCESS) | ||
| 293 | conout_found = true; | ||
| 290 | 294 | ||
| 291 | status = efi_call_phys4(gop->query_mode, gop, | 295 | status = efi_call_phys4(gop->query_mode, gop, |
| 292 | gop->mode->mode, &size, &info); | 296 | gop->mode->mode, &size, &info); |
| 293 | if (status == EFI_SUCCESS && (!first_gop || pciio)) { | 297 | if (status == EFI_SUCCESS && (!first_gop || conout_found)) { |
| 294 | /* | 298 | /* |
| 295 | * Apple provide GOPs that are not backed by | 299 | * Systems that use the UEFI Console Splitter may |
| 296 | * real hardware (they're used to handle | 300 | * provide multiple GOP devices, not all of which are |
| 297 | * multiple displays). The workaround is to | 301 | * backed by real hardware. The workaround is to search |
| 298 | * search for a GOP implementing the PCIIO | 302 | * for a GOP implementing the ConOut protocol, and if |
| 299 | * protocol, and if one isn't found, to just | 303 | * one isn't found, to just fall back to the first GOP. |
| 300 | * fallback to the first GOP. | ||
| 301 | */ | 304 | */ |
| 302 | width = info->horizontal_resolution; | 305 | width = info->horizontal_resolution; |
| 303 | height = info->vertical_resolution; | 306 | height = info->vertical_resolution; |
| @@ -308,10 +311,10 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, | |||
| 308 | pixels_per_scan_line = info->pixels_per_scan_line; | 311 | pixels_per_scan_line = info->pixels_per_scan_line; |
| 309 | 312 | ||
| 310 | /* | 313 | /* |
| 311 | * Once we've found a GOP supporting PCIIO, | 314 | * Once we've found a GOP supporting ConOut, |
| 312 | * don't bother looking any further. | 315 | * don't bother looking any further. |
| 313 | */ | 316 | */ |
| 314 | if (pciio) | 317 | if (conout_found) |
| 315 | break; | 318 | break; |
| 316 | 319 | ||
| 317 | first_gop = gop; | 320 | first_gop = gop; |
diff --git a/arch/x86/boot/compressed/eboot.h b/arch/x86/boot/compressed/eboot.h index 3b6e15627c55..e5b0a8f91c5f 100644 --- a/arch/x86/boot/compressed/eboot.h +++ b/arch/x86/boot/compressed/eboot.h | |||
| @@ -14,6 +14,10 @@ | |||
| 14 | #define EFI_PAGE_SIZE (1UL << EFI_PAGE_SHIFT) | 14 | #define EFI_PAGE_SIZE (1UL << EFI_PAGE_SHIFT) |
| 15 | #define EFI_READ_CHUNK_SIZE (1024 * 1024) | 15 | #define EFI_READ_CHUNK_SIZE (1024 * 1024) |
| 16 | 16 | ||
| 17 | #define EFI_CONSOLE_OUT_DEVICE_GUID \ | ||
| 18 | EFI_GUID(0xd3b36f2c, 0xd551, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, \ | ||
| 19 | 0x3f, 0xc1, 0x4d) | ||
| 20 | |||
| 17 | #define PIXEL_RGB_RESERVED_8BIT_PER_COLOR 0 | 21 | #define PIXEL_RGB_RESERVED_8BIT_PER_COLOR 0 |
| 18 | #define PIXEL_BGR_RESERVED_8BIT_PER_COLOR 1 | 22 | #define PIXEL_BGR_RESERVED_8BIT_PER_COLOR 1 |
| 19 | #define PIXEL_BIT_MASK 2 | 23 | #define PIXEL_BIT_MASK 2 |
