]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
vt/vga: ignore ACPI_FADT_NO_VGA unless running virtualized releng-13.1b
authorRoger Pau Monné <royger@FreeBSD.org>
Thu, 24 Feb 2022 15:53:30 +0000 (16:53 +0100)
committerRoger Pau Monné <royger@FreeBSD.org>
Wed, 23 Mar 2022 14:17:41 +0000 (15:17 +0100)
There's too many broken hardware out there that wrongly has the
ACPI_FADT_NO_VGA bit set. Ignore it unless running as a virtualized
guest, as then the expectation would be that the hypervisor does
provide correct ACPI tables.

Reviewed by: emaste, 0mp, eugen
Sponsored by: Citrix Systems R&D
PR: 230172

(cherry picked from commit 0518832011caba1e9dcee054d7884797ed8a74c2)

share/man/man4/vt.4
sys/dev/vt/hw/vga/vt_vga.c

index f41acd11e4e215fd8d6c5a0d81d00c5ddc871d02..9ec24cf2e1405e5782dedc30a93f3833158c93a4 100644 (file)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 4, 2022
+.Dd March 17, 2022
 .Dt "VT" 4
 .Os
 .Sh NAME
@@ -204,6 +204,9 @@ graphics mode.
 Set to 1 to force the usage of the VGA driver regardless of whether
 ACPI IAPC_BOOT_ARCH signals no VGA support.
 Can be used to workaround firmware bugs in the ACPI tables.
+Note no VGA support is only acknowledged when running virtualized.
+There is too many broken firmware that wrongly reports no VGA support on
+physical hardware.
 .It Va kern.vty
 Set this value to
 .Ql vt
index bac8f3eb7b9761f472a4b766de860f2aa8920f49..d457f8c7b31daa9740431222cb0f5a191c9541a0 100644 (file)
@@ -1261,7 +1261,11 @@ vga_acpi_disabled(void)
        uint16_t flags;
        int ignore;
 
-       ignore = 0;
+       /*
+        * Ignore the flag on real hardware: there's a lot of buggy firmware
+        * that will wrongly set it.
+        */
+       ignore = (vm_guest == VM_GUEST_NO);
        TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", &ignore);
        if (ignore || !acpi_get_fadt_bootflags(&flags))
                return (false);