Author: jhb
Date: Mon Nov  8 21:50:45 2010
New Revision: 215016
URL: http://svn.freebsd.org/changeset/base/215016

Log:
  Remove support for autoloading ACPI from the loader.  Leave in the code to
  detect ACPI and export info such as the location of the RSDP via hints as
  that is still useful.

Modified:
  head/sys/boot/common/loader.8
  head/sys/boot/forth/beastie.4th
  head/sys/boot/i386/libi386/biosacpi.c
  head/sys/boot/i386/libi386/i386_module.c
  head/sys/boot/i386/loader/help.i386

Modified: head/sys/boot/common/loader.8
==============================================================================
--- head/sys/boot/common/loader.8       Mon Nov  8 21:23:28 2010        
(r215015)
+++ head/sys/boot/common/loader.8       Mon Nov  8 21:50:45 2010        
(r215016)
@@ -334,12 +334,6 @@ Some options may require a value,
 while others define behavior just by being set.
 Both types of builtin variables are described below.
 .Bl -tag -width bootfile
-.It Va acpi_load
-Unset this to disable automatic loading of the ACPI module.
-See also
-.Va hint.acpi.0.disabled
-in
-.Xr device.hints 5 .
 .It Va autoboot_delay
 Number of seconds
 .Ic autoboot

Modified: head/sys/boot/forth/beastie.4th
==============================================================================
--- head/sys/boot/forth/beastie.4th     Mon Nov  8 21:23:28 2010        
(r215015)
+++ head/sys/boot/forth/beastie.4th     Mon Nov  8 21:50:45 2010        
(r215016)
@@ -141,13 +141,11 @@ at-xy ."         `--{__________) "
 ;
 
 : acpienabled? ( -- flag )
-       s" acpi_load" getenv
+       s" hint.acpi.0.rsdp" getenv
        dup -1 = if
                drop false exit
        then
-       s" YES" compare-insensitive 0<> if
-               false exit
-       then
+       2drop
        s" hint.acpi.0.disabled" getenv
        dup -1 <> if
                s" 0" compare 0<> if
@@ -254,11 +252,9 @@ set-current
                dup bootkey @ = if 0 boot then
                dup bootacpikey @ = if
                        acpienabled? if
-                               s" acpi_load" unsetenv
                                s" 1" s" hint.acpi.0.disabled" setenv
                                s" 1" s" loader.acpi_disabled_by_user" setenv
                        else
-                               s" YES" s" acpi_load" setenv
                                s" 0" s" hint.acpi.0.disabled" setenv
                        then
                        0 boot
@@ -266,7 +262,6 @@ set-current
                dup bootsafekey @ = if
                        s" arch-i386" environment? if
                                drop
-                               s" acpi_load" unsetenv
                                s" 1" s" hint.acpi.0.disabled" setenv
                                s" 1" s" loader.acpi_disabled_by_user" setenv
                                s" 1" s" hint.apic.0.disabled" setenv

Modified: head/sys/boot/i386/libi386/biosacpi.c
==============================================================================
--- head/sys/boot/i386/libi386/biosacpi.c       Mon Nov  8 21:23:28 2010        
(r215015)
+++ head/sys/boot/i386/libi386/biosacpi.c       Mon Nov  8 21:50:45 2010        
(r215016)
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
 #include "actbl.h"
 
 /*
- * Detect ACPI and export information about the APCI BIOS into the
+ * Detect ACPI and export information about the ACPI BIOS into the
  * environment.
  */
 
@@ -56,8 +56,6 @@ biosacpi_detect(void)
     char               buf[24];
     int                        revision;
 
-    /* XXX check the BIOS datestamp */
-
     /* locate and validate the RSDP */
     if ((rsdp = biosacpi_find_rsdp()) == NULL)
        return;
@@ -82,9 +80,6 @@ biosacpi_detect(void)
        sprintf(buf, "%d", rsdp->Length);
        setenv("hint.acpi.0.xsdt_length", buf, 1);
     }
-    /* XXX other tables? */
-
-    setenv("acpi_load", "YES", 1);
 }
 
 /*

Modified: head/sys/boot/i386/libi386/i386_module.c
==============================================================================
--- head/sys/boot/i386/libi386/i386_module.c    Mon Nov  8 21:23:28 2010        
(r215015)
+++ head/sys/boot/i386/libi386/i386_module.c    Mon Nov  8 21:50:45 2010        
(r215016)
@@ -44,25 +44,7 @@ __FBSDID("$FreeBSD$");
 int
 i386_autoload(void)
 {
-    int                error;
-    int                disabled;
-    char       *rv;
 
     /* XXX use PnP to locate stuff here */
-
-    /* autoload ACPI support */
-    /* XXX should be in 4th keyed off acpi_load */
-    disabled = 0;
-    rv = getenv("hint.acpi.0.disabled");
-    if (rv != NULL && strncmp(rv, "0", 1) != 0) {
-       disabled = 1;
-    }
-
-    if (getenv("acpi_load") && (!disabled)) {
-       error = mod_load("acpi", NULL, 0, NULL);
-       if (error != 0)
-           printf("ACPI autoload failed - %s\n", strerror(error));
-    }
-
     return(0);
 }

Modified: head/sys/boot/i386/loader/help.i386
==============================================================================
--- head/sys/boot/i386/loader/help.i386 Mon Nov  8 21:23:28 2010        
(r215015)
+++ head/sys/boot/i386/loader/help.i386 Mon Nov  8 21:50:45 2010        
(r215016)
@@ -1,22 +1,4 @@
 
################################################################################
-# TACPI DControl ACPI module behaviour
-
-       $acpi_load
-
-       If set, the ACPI module will be loaded.  Clear it with
-
-       unset acpi_load
-
-       $hint.acpi.0.disabled="1"
-
-       If set, the ACPI module won't be loaded.
-
-       Note that the ACPI autodetection sets a number of hints to
-       pass information to the ACPI module.  These should not be 
-       overridden, or system behaviour will be undefined.
-
-
-################################################################################
 # Treboot DReboot the system
 
        reboot
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to