summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-05-29 18:43:33 -0400
committerLen Brown <len.brown@intel.com>2007-05-29 18:43:33 -0400
commitae00d812436dc968f4a5dea7757b6a94910b6dc4 (patch)
tree6acd68850bead001cc74597369307a82bc711f6e /drivers/acpi/osl.c
parentc420bc9f09a0926b708c3edb27eacba434a4f4ba (diff)
downloadlinux-ae00d812436dc968f4a5dea7757b6a94910b6dc4.tar.gz
linux-ae00d812436dc968f4a5dea7757b6a94910b6dc4.tar.bz2
linux-ae00d812436dc968f4a5dea7757b6a94910b6dc4.zip
ACPI: extend "acpi_osi=" boot option
The boot option "acpi_osi=" has always disabled Linux _OSI support, thus disabling all OS Interface strings which are advertised by Linux to the BIOS. Now... acpi_osi="string" adds the interface string, and acpi_osi="!string" invalidates the pre-defined interface string eg. acpi_osi="!Windows 2006" would disable Linux's claim of Vista compatibility. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b998340e23d4..f4760cfa61e1 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -73,6 +73,9 @@ static void *acpi_irq_context;
static struct workqueue_struct *kacpid_wq;
static struct workqueue_struct *kacpi_notify_wq;
+#define OSI_STRING_LENGTH_MAX 64 /* arbitrary */
+static char osi_additional_string[OSI_STRING_LENGTH_MAX];
+
static void __init acpi_request_region (struct acpi_generic_address *addr,
unsigned int length, char *desc)
{
@@ -961,19 +964,23 @@ static int __init acpi_os_name_setup(char *str)
__setup("acpi_os_name=", acpi_os_name_setup);
/*
- * _OSI control
+ * Modify the list of "OS Interfaces" reported to BIOS via _OSI
+ *
* empty string disables _OSI
- * TBD additional string adds to _OSI
+ * string starting with '!' disables that string
+ * otherwise string is added to list, augmenting built-in strings
*/
static int __init acpi_osi_setup(char *str)
{
if (str == NULL || *str == '\0') {
printk(KERN_INFO PREFIX "_OSI method disabled\n");
acpi_gbl_create_osi_method = FALSE;
- } else {
- /* TBD */
- printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n",
- str);
+ } else if (*str == '!') {
+ if (acpi_osi_invalidate(++str) == AE_OK)
+ printk(KERN_INFO PREFIX "Deleted _OSI(%s)\n", str);
+ } else if (*osi_additional_string == '\0') {
+ strncpy(osi_additional_string, str, OSI_STRING_LENGTH_MAX);
+ printk(KERN_INFO PREFIX "Added _OSI(%s)\n", str);
}
return 1;
@@ -1143,11 +1150,11 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
acpi_status
acpi_os_validate_interface (char *interface)
{
-
- return AE_SUPPORT;
+ if (!strncmp(osi_additional_string, interface, OSI_STRING_LENGTH_MAX))
+ return AE_OK;
+ return AE_SUPPORT;
}
-
/******************************************************************************
*
* FUNCTION: acpi_os_validate_address