Commit f462ed93 authored by Matthew Garrett's avatar Matthew Garrett Committed by Matt Fleming

efifb: Skip DMI checks if the bootloader knows what it's doing

The majority of the DMI checks in efifb are for cases where the bootloader
has provided invalid information. However, on some machines the overrides
may do more harm than good due to configuration differences between machines
with the same machine identifier. It turns out that it's possible for the
bootloader to get the correct information on GOP-based systems, but we
can't guarantee that the kernel's being booted with one that's been updated
to do so. Add support for a capabilities flag that can be set by the
bootloader, and skip the DMI checks in that case. Additionally, set this
flag in the UEFI stub code.
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
Acked-by: default avatarPeter Jones <pjones@redhat.com>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
parent d6cf86d8
...@@ -379,6 +379,8 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto, ...@@ -379,6 +379,8 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
si->rsvd_pos = 0; si->rsvd_pos = 0;
} }
si->capabilities |= VIDEO_CAPABILITY_SKIP_QUIRKS;
free_handle: free_handle:
efi_call_phys1(sys_table->boottime->free_pool, gop_handle); efi_call_phys1(sys_table->boottime->free_pool, gop_handle);
return status; return status;
......
...@@ -553,6 +553,8 @@ static int __init efifb_init(void) ...@@ -553,6 +553,8 @@ static int __init efifb_init(void)
int ret; int ret;
char *option = NULL; char *option = NULL;
if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI ||
!(screen_info.capabilities & VIDEO_CAPABILITY_SKIP_QUIRKS))
dmi_check_system(dmi_system_table); dmi_check_system(dmi_system_table);
if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI) if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
......
...@@ -68,6 +68,8 @@ struct screen_info { ...@@ -68,6 +68,8 @@ struct screen_info {
#define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */
#define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0)
#ifdef __KERNEL__ #ifdef __KERNEL__
extern struct screen_info screen_info; extern struct screen_info screen_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment