summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/man/man4/acpi.42
-rw-r--r--sys/boot/forth/loader.conf.54
-rw-r--r--sys/dev/acpica/Osd/OsdTable.c12
-rw-r--r--sys/sys/kernel.h3
4 files changed, 13 insertions, 8 deletions
diff --git a/share/man/man4/acpi.4 b/share/man/man4/acpi.4
index 0da6f60..2a21373 100644
--- a/share/man/man4/acpi.4
+++ b/share/man/man4/acpi.4
@@ -317,7 +317,7 @@ Try increasing this number if you get the error
Enables calling the VESA reset BIOS vector on the resume path.
Some graphic chips have problems such as LCD white-out after resume.
Try setting this to 0 if this causes problems for you.
-.It Va hw.acpi.os_name
+.It Va hw.acpi.osname
Some systems' ASL may have problems because they look for names
of Microsoft operating systems.
This tunable overrides the value of the
diff --git a/sys/boot/forth/loader.conf.5 b/sys/boot/forth/loader.conf.5
index 89a803f..414784e 100644
--- a/sys/boot/forth/loader.conf.5
+++ b/sys/boot/forth/loader.conf.5
@@ -132,6 +132,10 @@ special value
.Dq abort ,
which aborts the bootstrap process, use of this setting should be avoided.
.El
+.Pp
+.Em WARNING:
+developers should never use these suffixes for any kernel environment
+variables (tunables) or conflicts will result.
.Sh DEFAULT SETTINGS
Most of
.Nm Ns 's
diff --git a/sys/dev/acpica/Osd/OsdTable.c b/sys/dev/acpica/Osd/OsdTable.c
index 2f057d2..0b94ad3 100644
--- a/sys/dev/acpica/Osd/OsdTable.c
+++ b/sys/dev/acpica/Osd/OsdTable.c
@@ -38,8 +38,8 @@
#undef _COMPONENT
#define _COMPONENT ACPI_TABLES
-static char acpi_os_name[128];
-TUNABLE_STR("hw.acpi.os_name", acpi_os_name, sizeof(acpi_os_name));
+static char acpi_osname[128];
+TUNABLE_STR("hw.acpi.osname", acpi_osname, sizeof(acpi_osname));
ACPI_STATUS
AcpiOsPredefinedOverride (
@@ -50,11 +50,9 @@ AcpiOsPredefinedOverride (
return (AE_BAD_PARAMETER);
*NewVal = NULL;
- if (strncmp(InitVal->Name, "_OS_", 4) == 0 &&
- getenv_string("hw.acpi.os_name", acpi_os_name, sizeof(acpi_os_name))) {
-
- printf("ACPI: Overriding _OS definition with \"%s\"\n", acpi_os_name);
- *NewVal = acpi_os_name;
+ if (strncmp(InitVal->Name, "_OS_", 4) == 0 && strlen(acpi_osname) > 0) {
+ printf("ACPI: Overriding _OS definition with \"%s\"\n", acpi_osname);
+ *NewVal = acpi_osname;
}
return (AE_OK);
diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h
index fe75bf2..d0f449d 100644
--- a/sys/sys/kernel.h
+++ b/sys/sys/kernel.h
@@ -265,6 +265,9 @@ void sysinit_add(struct sysinit **set, struct sysinit **set_end);
* Infrastructure for tunable 'constants'. Value may be specified at compile
* time or kernel load time. Rules relating tunables together can be placed
* in a SYSINIT function at SI_SUB_TUNABLES with SI_ORDER_LAST.
+ *
+ * WARNING: developers should never use the reserved suffixes specified in
+ * loader.conf(5) for any tunables or conflicts will result.
*/
extern void tunable_int_init(void *);
OpenPOWER on IntegriCloud