]> git.lizzy.rs Git - plan9front.git/commitdiff
archacpi: make *acpi=1 the default
authorcinap_lenrek <cinap_lenrek@felloff.net>
Thu, 15 Jul 2021 16:07:54 +0000 (16:07 +0000)
committercinap_lenrek <cinap_lenrek@felloff.net>
Thu, 15 Jul 2021 16:07:54 +0000 (16:07 +0000)
sys/man/8/plan9.ini
sys/src/9/pc/archacpi.c

index 94a575798cbc32781ae4800a5f54636e730215b1..a3bcc09acf2d301a0aa939b42c89738fbf630938 100644 (file)
@@ -887,16 +887,27 @@ For example:
     umbexclude=0xD1800-0xD3FFF
 .EE
 .SS \fL*acpi=\fIvalue\fP
-The presence of this option enables ACPI and the export of the
+This option controls the search for ACPI tables by the kernel.
+The
+.I value
+is the hexadecimal physical address of the RSD structure
+and is passed by the EFI bootloer
+.IR 9boot (8)
+automatically.
+The special
+.I value
+of 1 or empty make the kernel search for the structure
+in BIOS memory area (This is the default).
+The
+special
+.I value
+of 0 will disable ACPI support (for interrupt routing)
+in the kernel,
+but still make table data available in
 .B #P/acpitbls
-file in
+file of the
 .IR arch (3)
-device. In multiprocessor mode, the kernel will use the ACPI
-tables to configure APIC interrupts unless a
-.I value
-of
-.B 0
-is specified.
+device.
 .SS \fLapm0=\fP
 This enables the ``advanced power management'' interface
 as described in
index 01c91146868e70c6747dd0307deb90fc12aef232..044825a8c56b4ca53af76abf91cd622d058921da 100644 (file)
@@ -787,18 +787,18 @@ readtbls(Chan*, void *v, long n, vlong o)
 static int
 identify(void)
 {
-       uvlong pa;
+       uvlong v;
        char *cp;
        Tbl *t;
 
        if((cp = getconf("*acpi")) == nil)
-               return 1;
-       pa = (uintptr)strtoull(cp, nil, 16);
-       if(pa <= 1)
+               cp = "1";       /* search for rsd by default */
+       v = (uintptr)strtoull(cp, nil, 16);
+       if(v <= 1)
                rsd = rsdsearch();
        else {
-               memreserve(pa, sizeof(Rsd));
-               rsd = vmap(pa, sizeof(Rsd));
+               memreserve(v, sizeof(Rsd));
+               rsd = vmap(v, sizeof(Rsd));
        }
        if(rsd == nil)
                return 1;
@@ -807,7 +807,7 @@ identify(void)
        maptables();
        addarchfile("acpitbls", 0444, readtbls, nil);
        addarchfile("acpimem", 0600, readmem, writemem);
-       if(strcmp(cp, "0") == 0 || findtable("APIC") == nil)
+       if(v == 0 || findtable("APIC") == nil)
                return 1;
        if((cp = getconf("*nomp")) != nil && strcmp(cp, "0") != 0)
                return 1;