aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rsutils.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/resources/rsutils.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/resources/rsutils.c')
-rw-r--r--drivers/acpi/resources/rsutils.c53
1 files changed, 25 insertions, 28 deletions
diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c
index ee9ce13c053d..700cf7d65d76 100644
--- a/drivers/acpi/resources/rsutils.c
+++ b/drivers/acpi/resources/rsutils.c
@@ -83,10 +83,10 @@ acpi_rs_get_prt_method_data (
83 83
84 /* Parameters guaranteed valid by caller */ 84 /* Parameters guaranteed valid by caller */
85 85
86 /* 86 /* Execute the method, no parameters */
87 * Execute the method, no parameters 87
88 */ 88 status = acpi_ut_evaluate_object (handle, METHOD_NAME__PRT,
89 status = acpi_ut_evaluate_object (handle, "_PRT", ACPI_BTYPE_PACKAGE, &obj_desc); 89 ACPI_BTYPE_PACKAGE, &obj_desc);
90 if (ACPI_FAILURE (status)) { 90 if (ACPI_FAILURE (status)) {
91 return_ACPI_STATUS (status); 91 return_ACPI_STATUS (status);
92 } 92 }
@@ -136,10 +136,10 @@ acpi_rs_get_crs_method_data (
136 136
137 /* Parameters guaranteed valid by caller */ 137 /* Parameters guaranteed valid by caller */
138 138
139 /* 139 /* Execute the method, no parameters */
140 * Execute the method, no parameters 140
141 */ 141 status = acpi_ut_evaluate_object (handle, METHOD_NAME__CRS,
142 status = acpi_ut_evaluate_object (handle, "_CRS", ACPI_BTYPE_BUFFER, &obj_desc); 142 ACPI_BTYPE_BUFFER, &obj_desc);
143 if (ACPI_FAILURE (status)) { 143 if (ACPI_FAILURE (status)) {
144 return_ACPI_STATUS (status); 144 return_ACPI_STATUS (status);
145 } 145 }
@@ -175,6 +175,7 @@ acpi_rs_get_crs_method_data (
175 * and the contents of the callers buffer is undefined. 175 * and the contents of the callers buffer is undefined.
176 * 176 *
177 ******************************************************************************/ 177 ******************************************************************************/
178
178#ifdef ACPI_FUTURE_USAGE 179#ifdef ACPI_FUTURE_USAGE
179acpi_status 180acpi_status
180acpi_rs_get_prs_method_data ( 181acpi_rs_get_prs_method_data (
@@ -190,10 +191,10 @@ acpi_rs_get_prs_method_data (
190 191
191 /* Parameters guaranteed valid by caller */ 192 /* Parameters guaranteed valid by caller */
192 193
193 /* 194 /* Execute the method, no parameters */
194 * Execute the method, no parameters 195
195 */ 196 status = acpi_ut_evaluate_object (handle, METHOD_NAME__PRS,
196 status = acpi_ut_evaluate_object (handle, "_PRS", ACPI_BTYPE_BUFFER, &obj_desc); 197 ACPI_BTYPE_BUFFER, &obj_desc);
197 if (ACPI_FAILURE (status)) { 198 if (ACPI_FAILURE (status)) {
198 return_ACPI_STATUS (status); 199 return_ACPI_STATUS (status);
199 } 200 }
@@ -218,6 +219,7 @@ acpi_rs_get_prs_method_data (
218 * FUNCTION: acpi_rs_get_method_data 219 * FUNCTION: acpi_rs_get_method_data
219 * 220 *
220 * PARAMETERS: Handle - a handle to the containing object 221 * PARAMETERS: Handle - a handle to the containing object
222 * Path - Path to method, relative to Handle
221 * ret_buffer - a pointer to a buffer structure for the 223 * ret_buffer - a pointer to a buffer structure for the
222 * results 224 * results
223 * 225 *
@@ -246,9 +248,8 @@ acpi_rs_get_method_data (
246 248
247 /* Parameters guaranteed valid by caller */ 249 /* Parameters guaranteed valid by caller */
248 250
249 /* 251 /* Execute the method, no parameters */
250 * Execute the method, no parameters 252
251 */
252 status = acpi_ut_evaluate_object (handle, path, ACPI_BTYPE_BUFFER, &obj_desc); 253 status = acpi_ut_evaluate_object (handle, path, ACPI_BTYPE_BUFFER, &obj_desc);
253 if (ACPI_FAILURE (status)) { 254 if (ACPI_FAILURE (status)) {
254 return_ACPI_STATUS (status); 255 return_ACPI_STATUS (status);
@@ -314,18 +315,16 @@ acpi_rs_set_srs_method_data (
314 return_ACPI_STATUS (status); 315 return_ACPI_STATUS (status);
315 } 316 }
316 317
317 /* 318 /* Init the param object */
318 * Init the param object 319
319 */
320 params[0] = acpi_ut_create_internal_object (ACPI_TYPE_BUFFER); 320 params[0] = acpi_ut_create_internal_object (ACPI_TYPE_BUFFER);
321 if (!params[0]) { 321 if (!params[0]) {
322 acpi_os_free (buffer.pointer); 322 acpi_os_free (buffer.pointer);
323 return_ACPI_STATUS (AE_NO_MEMORY); 323 return_ACPI_STATUS (AE_NO_MEMORY);
324 } 324 }
325 325
326 /* 326 /* Set up the parameter object */
327 * Set up the parameter object 327
328 */
329 params[0]->buffer.length = (u32) buffer.length; 328 params[0]->buffer.length = (u32) buffer.length;
330 params[0]->buffer.pointer = buffer.pointer; 329 params[0]->buffer.pointer = buffer.pointer;
331 params[0]->common.flags = AOPOBJ_DATA_VALID; 330 params[0]->common.flags = AOPOBJ_DATA_VALID;
@@ -335,10 +334,9 @@ acpi_rs_set_srs_method_data (
335 info.parameters = params; 334 info.parameters = params;
336 info.parameter_type = ACPI_PARAM_ARGS; 335 info.parameter_type = ACPI_PARAM_ARGS;
337 336
338 /* 337 /* Execute the method, no return value */
339 * Execute the method, no return value 338
340 */ 339 status = acpi_ns_evaluate_relative (METHOD_NAME__SRS, &info);
341 status = acpi_ns_evaluate_relative ("_SRS", &info);
342 if (ACPI_SUCCESS (status)) { 340 if (ACPI_SUCCESS (status)) {
343 /* Delete any return object (especially if implicit_return is enabled) */ 341 /* Delete any return object (especially if implicit_return is enabled) */
344 342
@@ -347,9 +345,8 @@ acpi_rs_set_srs_method_data (
347 } 345 }
348 } 346 }
349 347
350 /* 348 /* Clean up and return the status from acpi_ns_evaluate_relative */
351 * Clean up and return the status from acpi_ns_evaluate_relative 349
352 */
353 acpi_ut_remove_reference (params[0]); 350 acpi_ut_remove_reference (params[0]);
354 return_ACPI_STATUS (status); 351 return_ACPI_STATUS (status);
355} 352}