aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/uteval.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/uteval.c')
-rw-r--r--drivers/acpi/acpica/uteval.c147
1 files changed, 0 insertions, 147 deletions
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c
index 6dfdeb653490..22f59ef604e0 100644
--- a/drivers/acpi/acpica/uteval.c
+++ b/drivers/acpi/acpica/uteval.c
@@ -48,153 +48,6 @@
48#define _COMPONENT ACPI_UTILITIES 48#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("uteval") 49ACPI_MODULE_NAME("uteval")
50 50
51/*
52 * Strings supported by the _OSI predefined (internal) method.
53 *
54 * March 2009: Removed "Linux" as this host no longer wants to respond true
55 * for this string. Basically, the only safe OS strings are windows-related
56 * and in many or most cases represent the only test path within the
57 * BIOS-provided ASL code.
58 *
59 * The second element of each entry is used to track the newest version of
60 * Windows that the BIOS has requested.
61 */
62static struct acpi_interface_info acpi_interfaces_supported[] = {
63 /* Operating System Vendor Strings */
64
65 {"Windows 2000", ACPI_OSI_WIN_2000}, /* Windows 2000 */
66 {"Windows 2001", ACPI_OSI_WIN_XP}, /* Windows XP */
67 {"Windows 2001 SP1", ACPI_OSI_WIN_XP_SP1}, /* Windows XP SP1 */
68 {"Windows 2001.1", ACPI_OSI_WINSRV_2003}, /* Windows Server 2003 */
69 {"Windows 2001 SP2", ACPI_OSI_WIN_XP_SP2}, /* Windows XP SP2 */
70 {"Windows 2001.1 SP1", ACPI_OSI_WINSRV_2003_SP1}, /* Windows Server 2003 SP1 - Added 03/2006 */
71 {"Windows 2006", ACPI_OSI_WIN_VISTA}, /* Windows Vista - Added 03/2006 */
72 {"Windows 2006.1", ACPI_OSI_WINSRV_2008}, /* Windows Server 2008 - Added 09/2009 */
73 {"Windows 2006 SP1", ACPI_OSI_WIN_VISTA_SP1}, /* Windows Vista SP1 - Added 09/2009 */
74 {"Windows 2009", ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */
75
76 /* Feature Group Strings */
77
78 {"Extended Address Space Descriptor", 0}
79
80 /*
81 * All "optional" feature group strings (features that are implemented
82 * by the host) should be implemented in the host version of
83 * acpi_os_validate_interface and should not be added here.
84 */
85};
86
87/*******************************************************************************
88 *
89 * FUNCTION: acpi_ut_osi_implementation
90 *
91 * PARAMETERS: walk_state - Current walk state
92 *
93 * RETURN: Status
94 *
95 * DESCRIPTION: Implementation of the _OSI predefined control method
96 *
97 ******************************************************************************/
98
99acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
100{
101 acpi_status status;
102 union acpi_operand_object *string_desc;
103 union acpi_operand_object *return_desc;
104 u32 return_value;
105 u32 i;
106
107 ACPI_FUNCTION_TRACE(ut_osi_implementation);
108
109 /* Validate the string input argument */
110
111 string_desc = walk_state->arguments[0].object;
112 if (!string_desc || (string_desc->common.type != ACPI_TYPE_STRING)) {
113 return_ACPI_STATUS(AE_TYPE);
114 }
115
116 /* Create a return object */
117
118 return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
119 if (!return_desc) {
120 return_ACPI_STATUS(AE_NO_MEMORY);
121 }
122
123 /* Default return value is 0, NOT SUPPORTED */
124
125 return_value = 0;
126
127 /* Compare input string to static table of supported interfaces */
128
129 for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) {
130 if (!ACPI_STRCMP(string_desc->string.pointer,
131 acpi_interfaces_supported[i].name)) {
132 /*
133 * The interface is supported.
134 * Update the osi_data if necessary. We keep track of the latest
135 * version of Windows that has been requested by the BIOS.
136 */
137 if (acpi_interfaces_supported[i].value >
138 acpi_gbl_osi_data) {
139 acpi_gbl_osi_data =
140 acpi_interfaces_supported[i].value;
141 }
142
143 return_value = ACPI_UINT32_MAX;
144 goto exit;
145 }
146 }
147
148 /*
149 * Did not match the string in the static table, call the host OSL to
150 * check for a match with one of the optional strings (such as
151 * "Module Device", "3.0 Thermal Model", etc.)
152 */
153 status = acpi_os_validate_interface(string_desc->string.pointer);
154 if (ACPI_SUCCESS(status)) {
155
156 /* The interface is supported */
157
158 return_value = ACPI_UINT32_MAX;
159 }
160
161exit:
162 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO,
163 "ACPI: BIOS _OSI(%s) is %ssupported\n",
164 string_desc->string.pointer, return_value == 0 ? "not " : ""));
165
166 /* Complete the return value */
167
168 return_desc->integer.value = return_value;
169 walk_state->return_desc = return_desc;
170 return_ACPI_STATUS (AE_OK);
171}
172
173/*******************************************************************************
174 *
175 * FUNCTION: acpi_osi_invalidate
176 *
177 * PARAMETERS: interface_string
178 *
179 * RETURN: Status
180 *
181 * DESCRIPTION: invalidate string in pre-defiend _OSI string list
182 *
183 ******************************************************************************/
184
185acpi_status acpi_osi_invalidate(char *interface)
186{
187 int i;
188
189 for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) {
190 if (!ACPI_STRCMP(interface, acpi_interfaces_supported[i].name)) {
191 *acpi_interfaces_supported[i].name = '\0';
192 return AE_OK;
193 }
194 }
195 return AE_NOT_FOUND;
196}
197
198/******************************************************************************* 51/*******************************************************************************
199 * 52 *
200 * FUNCTION: acpi_ut_evaluate_object 53 * FUNCTION: acpi_ut_evaluate_object