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.
This commit is contained in:
parent
b1e2a61a60
commit
1c59b81829
@ -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
|
||||
|
@ -141,13 +141,11 @@ at-xy ." `--{__________) [0m"
|
||||
;
|
||||
|
||||
: 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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -1,21 +1,3 @@
|
||||
################################################################################
|
||||
# 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user