]> xenbits.xensource.com Git - seabios.git/commitdiff
acpi: skip kbd init if not present
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 31 Mar 2020 12:51:52 +0000 (14:51 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 15 May 2020 11:55:29 +0000 (13:55 +0200)
Don't initialize the ps/2 keyboard in case the device is not
listed in the ACPi DSDT table.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/hw/ps2port.c

index 2c334c06b7eb6a98f248681cac07af0a9176edc8..c82521b42e1614f45100ff0416044f231f934bbf 100644 (file)
@@ -542,6 +542,10 @@ ps2port_setup(void)
     ASSERT32FLAT();
     if (! CONFIG_PS2PORT)
         return;
+    if (acpi_dsdt_present_eisaid(0x0303) == 0) {
+        dprintf(1, "ACPI: no PS/2 keyboard present\n");
+        return;
+    }
     dprintf(3, "init ps2port\n");
 
     enable_hwirq(1, FUNC16(entry_09));