x86/virt, x86/acpi: Add test for ACPI_FADT_NO_VGA
authorJuergen Gross <jgross@suse.com>
Thu, 9 Nov 2017 13:27:37 +0000 (14:27 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 10 Nov 2017 09:03:13 +0000 (10:03 +0100)
Add a test for ACPI_FADT_NO_VGA when scanning the FADT and set the new
flag x86_platform.legacy.no_vga accordingly.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: len.brown@intel.com
Cc: linux-pm@vger.kernel.org
Cc: pavel@ucw.cz
Cc: rjw@rjwysocki.net
Link: http://lkml.kernel.org/r/20171109132739.23465-4-jgross@suse.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/x86_init.h
arch/x86/kernel/acpi/boot.c

index ad15a0fda917457a1b4363cbdd2fb56de7989f0b..260e9a85fecb0ef375640d7ac669fc8829846fdd 100644 (file)
@@ -208,6 +208,7 @@ enum x86_legacy_i8042_state {
 struct x86_legacy_features {
        enum x86_legacy_i8042_state i8042;
        int rtc;
+       int no_vga;
        int reserve_bios_regions;
        struct x86_legacy_devices devices;
 };
index 079535e53e2a6435b3b4bd0fc3fa5c932cc2cd09..ef9e02e614d0691ac0c5cdba8fb2d878a59e416e 100644 (file)
@@ -961,6 +961,11 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
                x86_platform.legacy.rtc = 0;
        }
 
+       if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_VGA) {
+               pr_debug("ACPI: probing for VGA not safe\n");
+               x86_platform.legacy.no_vga = 1;
+       }
+
 #ifdef CONFIG_X86_PM_TIMER
        /* detect the location of the ACPI PM Timer */
        if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) {