aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt5
-rw-r--r--drivers/acpi/osl.c25
-rw-r--r--drivers/acpi/utilities/uteval.c27
-rw-r--r--include/acpi/acpiosxf.h1
4 files changed, 47 insertions, 11 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index aae2282600ca..79150144dca9 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -170,7 +170,10 @@ and is between 256 and 4096 characters. It is defined in the file
170 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS 170 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
171 Format: To spoof as Windows 98: ="Microsoft Windows" 171 Format: To spoof as Windows 98: ="Microsoft Windows"
172 172
173 acpi_osi= [HW,ACPI] empty param disables _OSI 173 acpi_osi= [HW,ACPI] Modify list of supported OS interface strings
174 acpi_osi="string1" # add string1 -- only one string
175 acpi_osi="!string2" # remove built-in string2
176 acpi_osi= # disable all strings
174 177
175 acpi_serialize [HW,ACPI] force serialization of AML methods 178 acpi_serialize [HW,ACPI] force serialization of AML methods
176 179
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;
73static struct workqueue_struct *kacpid_wq; 73static struct workqueue_struct *kacpid_wq;
74static struct workqueue_struct *kacpi_notify_wq; 74static struct workqueue_struct *kacpi_notify_wq;
75 75
76#define OSI_STRING_LENGTH_MAX 64 /* arbitrary */
77static char osi_additional_string[OSI_STRING_LENGTH_MAX];
78
76static void __init acpi_request_region (struct acpi_generic_address *addr, 79static void __init acpi_request_region (struct acpi_generic_address *addr,
77 unsigned int length, char *desc) 80 unsigned int length, char *desc)
78{ 81{
@@ -961,19 +964,23 @@ static int __init acpi_os_name_setup(char *str)
961__setup("acpi_os_name=", acpi_os_name_setup); 964__setup("acpi_os_name=", acpi_os_name_setup);
962 965
963/* 966/*
964 * _OSI control 967 * Modify the list of "OS Interfaces" reported to BIOS via _OSI
968 *
965 * empty string disables _OSI 969 * empty string disables _OSI
966 * TBD additional string adds to _OSI 970 * string starting with '!' disables that string
971 * otherwise string is added to list, augmenting built-in strings
967 */ 972 */
968static int __init acpi_osi_setup(char *str) 973static int __init acpi_osi_setup(char *str)
969{ 974{
970 if (str == NULL || *str == '\0') { 975 if (str == NULL || *str == '\0') {
971 printk(KERN_INFO PREFIX "_OSI method disabled\n"); 976 printk(KERN_INFO PREFIX "_OSI method disabled\n");
972 acpi_gbl_create_osi_method = FALSE; 977 acpi_gbl_create_osi_method = FALSE;
973 } else { 978 } else if (*str == '!') {
974 /* TBD */ 979 if (acpi_osi_invalidate(++str) == AE_OK)
975 printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n", 980 printk(KERN_INFO PREFIX "Deleted _OSI(%s)\n", str);
976 str); 981 } else if (*osi_additional_string == '\0') {
982 strncpy(osi_additional_string, str, OSI_STRING_LENGTH_MAX);
983 printk(KERN_INFO PREFIX "Added _OSI(%s)\n", str);
977 } 984 }
978 985
979 return 1; 986 return 1;
@@ -1143,11 +1150,11 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
1143acpi_status 1150acpi_status
1144acpi_os_validate_interface (char *interface) 1151acpi_os_validate_interface (char *interface)
1145{ 1152{
1146 1153 if (!strncmp(osi_additional_string, interface, OSI_STRING_LENGTH_MAX))
1147 return AE_SUPPORT; 1154 return AE_OK;
1155 return AE_SUPPORT;
1148} 1156}
1149 1157
1150
1151/****************************************************************************** 1158/******************************************************************************
1152 * 1159 *
1153 * FUNCTION: acpi_os_validate_address 1160 * FUNCTION: acpi_os_validate_address
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
index 13d5879cd98b..a10120ad6982 100644
--- a/drivers/acpi/utilities/uteval.c
+++ b/drivers/acpi/utilities/uteval.c
@@ -59,7 +59,7 @@ acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc,
59/* 59/*
60 * Strings supported by the _OSI predefined (internal) method. 60 * Strings supported by the _OSI predefined (internal) method.
61 */ 61 */
62static const char *acpi_interfaces_supported[] = { 62static char *acpi_interfaces_supported[] = {
63 /* Operating System Vendor Strings */ 63 /* Operating System Vendor Strings */
64 64
65 "Linux", 65 "Linux",
@@ -158,6 +158,31 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
158 158
159/******************************************************************************* 159/*******************************************************************************
160 * 160 *
161 * FUNCTION: acpi_osi_invalidate
162 *
163 * PARAMETERS: interface_string
164 *
165 * RETURN: Status
166 *
167 * DESCRIPTION: invalidate string in pre-defiend _OSI string list
168 *
169 ******************************************************************************/
170
171acpi_status acpi_osi_invalidate(char *interface)
172{
173 int i;
174
175 for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) {
176 if (!ACPI_STRCMP(interface, acpi_interfaces_supported[i])) {
177 *acpi_interfaces_supported[i] = '\0';
178 return AE_OK;
179 }
180 }
181 return AE_NOT_FOUND;
182}
183
184/*******************************************************************************
185 *
161 * FUNCTION: acpi_ut_evaluate_object 186 * FUNCTION: acpi_ut_evaluate_object
162 * 187 *
163 * PARAMETERS: prefix_node - Starting node 188 * PARAMETERS: prefix_node - Starting node
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 5e07db0d46e9..de26ee13835c 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -236,6 +236,7 @@ acpi_os_derive_pci_id(acpi_handle rhandle,
236 * Miscellaneous 236 * Miscellaneous
237 */ 237 */
238acpi_status acpi_os_validate_interface(char *interface); 238acpi_status acpi_os_validate_interface(char *interface);
239acpi_status acpi_osi_invalidate(char* interface);
239 240
240acpi_status 241acpi_status
241acpi_os_validate_address(u8 space_id, 242acpi_os_validate_address(u8 space_id,