Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'x86/efi/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/linux into x86/efi

Pull misc EFI fixlets from Matt Fleming.

Signed-off-by: Ingo Molnar <mingo@kernel.org>

+33 -15
+3
arch/x86/boot/compressed/Makefile
··· 28 28 $(obj)/string.o $(obj)/cmdline.o $(obj)/early_serial_console.o \ 29 29 $(obj)/piggy.o 30 30 31 + $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone 32 + $(obj)/efi_stub_$(BITS).o: KBUILD_CLFAGS += -fshort-wchar -mno-red-zone 33 + 31 34 ifeq ($(CONFIG_EFI_STUB), y) 32 35 VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o 33 36 endif
+20 -14
arch/x86/boot/compressed/eboot.c
··· 276 276 nr_gops = size / sizeof(void *); 277 277 for (i = 0; i < nr_gops; i++) { 278 278 struct efi_graphics_output_mode_info *info; 279 - efi_guid_t pciio_proto = EFI_PCI_IO_PROTOCOL_GUID; 280 - void *pciio; 279 + efi_guid_t conout_proto = EFI_CONSOLE_OUT_DEVICE_GUID; 280 + bool conout_found = false; 281 + void *dummy; 281 282 void *h = gop_handle[i]; 282 283 283 284 status = efi_call_phys3(sys_table->boottime->handle_protocol, ··· 286 285 if (status != EFI_SUCCESS) 287 286 continue; 288 287 289 - efi_call_phys3(sys_table->boottime->handle_protocol, 290 - h, &pciio_proto, &pciio); 288 + status = efi_call_phys3(sys_table->boottime->handle_protocol, 289 + h, &conout_proto, &dummy); 290 + 291 + if (status == EFI_SUCCESS) 292 + conout_found = true; 291 293 292 294 status = efi_call_phys4(gop->query_mode, gop, 293 295 gop->mode->mode, &size, &info); 294 - if (status == EFI_SUCCESS && (!first_gop || pciio)) { 296 + if (status == EFI_SUCCESS && (!first_gop || conout_found)) { 295 297 /* 296 - * Apple provide GOPs that are not backed by 297 - * real hardware (they're used to handle 298 - * multiple displays). The workaround is to 299 - * search for a GOP implementing the PCIIO 300 - * protocol, and if one isn't found, to just 301 - * fallback to the first GOP. 298 + * Systems that use the UEFI Console Splitter may 299 + * provide multiple GOP devices, not all of which are 300 + * backed by real hardware. The workaround is to search 301 + * for a GOP implementing the ConOut protocol, and if 302 + * one isn't found, to just fall back to the first GOP. 302 303 */ 303 304 width = info->horizontal_resolution; 304 305 height = info->vertical_resolution; ··· 311 308 pixels_per_scan_line = info->pixels_per_scan_line; 312 309 313 310 /* 314 - * Once we've found a GOP supporting PCIIO, 311 + * Once we've found a GOP supporting ConOut, 315 312 * don't bother looking any further. 316 313 */ 317 - if (pciio) 314 + if (conout_found) 318 315 break; 319 316 320 317 first_gop = gop; ··· 331 328 si->lfb_width = width; 332 329 si->lfb_height = height; 333 330 si->lfb_base = fb_base; 334 - si->lfb_size = fb_size; 335 331 si->pages = 1; 336 332 337 333 if (pixel_format == PIXEL_RGB_RESERVED_8BIT_PER_COLOR) { ··· 377 375 si->rsvd_size = 0; 378 376 si->rsvd_pos = 0; 379 377 } 378 + 379 + si->lfb_size = si->lfb_linelength * si->lfb_height; 380 + 381 + si->capabilities |= VIDEO_CAPABILITY_SKIP_QUIRKS; 380 382 381 383 free_handle: 382 384 efi_call_phys1(sys_table->boottime->free_pool, gop_handle);
+4
arch/x86/boot/compressed/eboot.h
··· 14 14 #define EFI_PAGE_SIZE (1UL << EFI_PAGE_SHIFT) 15 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 21 #define PIXEL_RGB_RESERVED_8BIT_PER_COLOR 0 18 22 #define PIXEL_BGR_RESERVED_8BIT_PER_COLOR 1 19 23 #define PIXEL_BIT_MASK 2
+1
arch/x86/platform/efi/efi.c
··· 890 890 * 891 891 * Call EFI services through wrapper functions. 892 892 */ 893 + efi.runtime_version = efi_systab.fw_revision; 893 894 efi.get_time = virt_efi_get_time; 894 895 efi.set_time = virt_efi_set_time; 895 896 efi.get_wakeup_time = virt_efi_get_wakeup_time;
+3 -1
drivers/video/efifb.c
··· 553 553 int ret; 554 554 char *option = NULL; 555 555 556 - dmi_check_system(dmi_system_table); 556 + if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI || 557 + !(screen_info.capabilities & VIDEO_CAPABILITY_SKIP_QUIRKS)) 558 + dmi_check_system(dmi_system_table); 557 559 558 560 if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI) 559 561 return -ENODEV;
+2
include/linux/screen_info.h
··· 68 68 69 69 #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ 70 70 71 + #define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0) 72 + 71 73 #ifdef __KERNEL__ 72 74 extern struct screen_info screen_info; 73 75