diff options
Diffstat (limited to 'drivers/acpi/executer')
23 files changed, 652 insertions, 632 deletions
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 1ce365d651d8..109d0255a5bb 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -413,9 +413,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
413 | (!ACPI_STRNCMP(table_ptr->signature, | 413 | (!ACPI_STRNCMP(table_ptr->signature, |
414 | acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, | 414 | acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, |
415 | acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { | 415 | acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { |
416 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 416 | ACPI_REPORT_ERROR(("Table has invalid signature [%4.4s], must be SSDT or PSDT\n", table_ptr->signature)); |
417 | "Table has invalid signature [%4.4s], must be SSDT or PSDT\n", | ||
418 | table_ptr->signature)); | ||
419 | status = AE_BAD_SIGNATURE; | 417 | status = AE_BAD_SIGNATURE; |
420 | goto cleanup; | 418 | goto cleanup; |
421 | } | 419 | } |
diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c index 04e5194989a6..e6f55cf8ad31 100644 --- a/drivers/acpi/executer/exconvrt.c +++ b/drivers/acpi/executer/exconvrt.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -504,18 +504,12 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, | |||
504 | } | 504 | } |
505 | 505 | ||
506 | /* | 506 | /* |
507 | * Perform the conversion. | 507 | * Create a new string object and string buffer |
508 | * (-1 because of extra separator included in string_length from above) | 508 | * (-1 because of extra separator included in string_length from above) |
509 | */ | 509 | */ |
510 | string_length--; | ||
511 | if (string_length > ACPI_MAX_STRING_CONVERSION) { /* ACPI limit */ | ||
512 | return_ACPI_STATUS(AE_AML_STRING_LIMIT); | ||
513 | } | ||
514 | |||
515 | /* Create a new string object and string buffer */ | ||
516 | |||
517 | return_desc = | 510 | return_desc = |
518 | acpi_ut_create_string_object((acpi_size) string_length); | 511 | acpi_ut_create_string_object((acpi_size) |
512 | (string_length - 1)); | ||
519 | if (!return_desc) { | 513 | if (!return_desc) { |
520 | return_ACPI_STATUS(AE_NO_MEMORY); | 514 | return_ACPI_STATUS(AE_NO_MEMORY); |
521 | } | 515 | } |
@@ -660,17 +654,8 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, | |||
660 | break; | 654 | break; |
661 | 655 | ||
662 | default: | 656 | default: |
663 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 657 | ACPI_REPORT_ERROR(("Unknown Target type ID 0x%X aml_opcode %X dest_type %s\n", GET_CURRENT_ARG_TYPE(walk_state->op_info->runtime_args), walk_state->opcode, acpi_ut_get_type_name(destination_type))); |
664 | "Unknown Target type ID 0x%X Op %s dest_type %s\n", | 658 | status = AE_AML_INTERNAL; |
665 | GET_CURRENT_ARG_TYPE(walk_state->op_info-> | ||
666 | runtime_args), | ||
667 | walk_state->op_info->name, | ||
668 | acpi_ut_get_type_name(destination_type))); | ||
669 | |||
670 | ACPI_REPORT_ERROR(("Bad Target Type (ARGI): %X\n", | ||
671 | GET_CURRENT_ARG_TYPE(walk_state->op_info-> | ||
672 | runtime_args))) | ||
673 | status = AE_AML_INTERNAL; | ||
674 | } | 659 | } |
675 | 660 | ||
676 | /* | 661 | /* |
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index 91c49188fb07..da313dad576a 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index bc2fa996047e..a7cca8d4f855 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -55,20 +55,386 @@ ACPI_MODULE_NAME("exdump") | |||
55 | */ | 55 | */ |
56 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 56 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
57 | /* Local prototypes */ | 57 | /* Local prototypes */ |
58 | #ifdef ACPI_FUTURE_USAGE | ||
59 | static void acpi_ex_out_string(char *title, char *value); | 58 | static void acpi_ex_out_string(char *title, char *value); |
60 | 59 | ||
61 | static void acpi_ex_out_pointer(char *title, void *value); | 60 | static void acpi_ex_out_pointer(char *title, void *value); |
62 | 61 | ||
63 | static void acpi_ex_out_integer(char *title, u32 value); | ||
64 | |||
65 | static void acpi_ex_out_address(char *title, acpi_physical_address value); | 62 | static void acpi_ex_out_address(char *title, acpi_physical_address value); |
66 | 63 | ||
67 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc); | 64 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc); |
68 | 65 | ||
69 | static void | 66 | static void |
70 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index); | 67 | acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, |
71 | #endif /* ACPI_FUTURE_USAGE */ | 68 | u32 level, u32 index); |
69 | |||
70 | /******************************************************************************* | ||
71 | * | ||
72 | * Object Descriptor info tables | ||
73 | * | ||
74 | * Note: The first table entry must be an INIT opcode and must contain | ||
75 | * the table length (number of table entries) | ||
76 | * | ||
77 | ******************************************************************************/ | ||
78 | |||
79 | static struct acpi_exdump_info acpi_ex_dump_integer[2] = { | ||
80 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_integer), NULL}, | ||
81 | {ACPI_EXD_UINT64, ACPI_EXD_OFFSET(integer.value), "Value"} | ||
82 | }; | ||
83 | |||
84 | static struct acpi_exdump_info acpi_ex_dump_string[4] = { | ||
85 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_string), NULL}, | ||
86 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(string.length), "Length"}, | ||
87 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(string.pointer), "Pointer"}, | ||
88 | {ACPI_EXD_STRING, 0, NULL} | ||
89 | }; | ||
90 | |||
91 | static struct acpi_exdump_info acpi_ex_dump_buffer[4] = { | ||
92 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL}, | ||
93 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"}, | ||
94 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"}, | ||
95 | {ACPI_EXD_BUFFER, 0, NULL} | ||
96 | }; | ||
97 | |||
98 | static struct acpi_exdump_info acpi_ex_dump_package[5] = { | ||
99 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL}, | ||
100 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"}, | ||
101 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"}, | ||
102 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"}, | ||
103 | {ACPI_EXD_PACKAGE, 0, NULL} | ||
104 | }; | ||
105 | |||
106 | static struct acpi_exdump_info acpi_ex_dump_device[4] = { | ||
107 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, | ||
108 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"}, | ||
109 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.system_notify), | ||
110 | "System Notify"}, | ||
111 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.device_notify), | ||
112 | "Device Notify"} | ||
113 | }; | ||
114 | |||
115 | static struct acpi_exdump_info acpi_ex_dump_event[2] = { | ||
116 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_event), NULL}, | ||
117 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.semaphore), "Semaphore"} | ||
118 | }; | ||
119 | |||
120 | static struct acpi_exdump_info acpi_ex_dump_method[8] = { | ||
121 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL}, | ||
122 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "param_count"}, | ||
123 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"}, | ||
124 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"}, | ||
125 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, | ||
126 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"}, | ||
127 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"}, | ||
128 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"} | ||
129 | }; | ||
130 | |||
131 | static struct acpi_exdump_info acpi_ex_dump_mutex[5] = { | ||
132 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_mutex), NULL}, | ||
133 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(mutex.sync_level), "Sync Level"}, | ||
134 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.owner_thread), "Owner Thread"}, | ||
135 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(mutex.acquisition_depth), | ||
136 | "Acquire Depth"}, | ||
137 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.semaphore), "Semaphore"} | ||
138 | }; | ||
139 | |||
140 | static struct acpi_exdump_info acpi_ex_dump_region[7] = { | ||
141 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL}, | ||
142 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"}, | ||
143 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"}, | ||
144 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"}, | ||
145 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"}, | ||
146 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.handler), "Handler"}, | ||
147 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"} | ||
148 | }; | ||
149 | |||
150 | static struct acpi_exdump_info acpi_ex_dump_power[5] = { | ||
151 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL}, | ||
152 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level), | ||
153 | "System Level"}, | ||
154 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.resource_order), | ||
155 | "Resource Order"}, | ||
156 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.system_notify), | ||
157 | "System Notify"}, | ||
158 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.device_notify), | ||
159 | "Device Notify"} | ||
160 | }; | ||
161 | |||
162 | static struct acpi_exdump_info acpi_ex_dump_processor[7] = { | ||
163 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_processor), NULL}, | ||
164 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"}, | ||
165 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.length), "Length"}, | ||
166 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"}, | ||
167 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.system_notify), | ||
168 | "System Notify"}, | ||
169 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.device_notify), | ||
170 | "Device Notify"}, | ||
171 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.handler), "Handler"} | ||
172 | }; | ||
173 | |||
174 | static struct acpi_exdump_info acpi_ex_dump_thermal[4] = { | ||
175 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_thermal), NULL}, | ||
176 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.system_notify), | ||
177 | "System Notify"}, | ||
178 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.device_notify), | ||
179 | "Device Notify"}, | ||
180 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.handler), "Handler"} | ||
181 | }; | ||
182 | |||
183 | static struct acpi_exdump_info acpi_ex_dump_buffer_field[3] = { | ||
184 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer_field), NULL}, | ||
185 | {ACPI_EXD_FIELD, 0, NULL}, | ||
186 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer_field.buffer_obj), | ||
187 | "Buffer Object"} | ||
188 | }; | ||
189 | |||
190 | static struct acpi_exdump_info acpi_ex_dump_region_field[3] = { | ||
191 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region_field), NULL}, | ||
192 | {ACPI_EXD_FIELD, 0, NULL}, | ||
193 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"} | ||
194 | }; | ||
195 | |||
196 | static struct acpi_exdump_info acpi_ex_dump_bank_field[5] = { | ||
197 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL}, | ||
198 | {ACPI_EXD_FIELD, 0, NULL}, | ||
199 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(bank_field.value), "Value"}, | ||
200 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.region_obj), | ||
201 | "Region Object"}, | ||
202 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.bank_obj), "Bank Object"} | ||
203 | }; | ||
204 | |||
205 | static struct acpi_exdump_info acpi_ex_dump_index_field[5] = { | ||
206 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL}, | ||
207 | {ACPI_EXD_FIELD, 0, NULL}, | ||
208 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(index_field.value), "Value"}, | ||
209 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.index_obj), | ||
210 | "Index Object"}, | ||
211 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} | ||
212 | }; | ||
213 | |||
214 | static struct acpi_exdump_info acpi_ex_dump_reference[7] = { | ||
215 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, | ||
216 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, | ||
217 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"}, | ||
218 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, | ||
219 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, | ||
220 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, | ||
221 | {ACPI_EXD_REFERENCE, 0, NULL} | ||
222 | }; | ||
223 | |||
224 | static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = { | ||
225 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler), | ||
226 | NULL}, | ||
227 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"}, | ||
228 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.next), "Next"}, | ||
229 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.region_list), | ||
230 | "Region List"}, | ||
231 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.node), "Node"}, | ||
232 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} | ||
233 | }; | ||
234 | |||
235 | static struct acpi_exdump_info acpi_ex_dump_notify[3] = { | ||
236 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, | ||
237 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"}, | ||
238 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"} | ||
239 | }; | ||
240 | |||
241 | /* Miscellaneous tables */ | ||
242 | |||
243 | static struct acpi_exdump_info acpi_ex_dump_common[4] = { | ||
244 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL}, | ||
245 | {ACPI_EXD_TYPE, 0, NULL}, | ||
246 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count), | ||
247 | "Reference Count"}, | ||
248 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"} | ||
249 | }; | ||
250 | |||
251 | static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { | ||
252 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_field_common), NULL}, | ||
253 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.field_flags), | ||
254 | "Field Flags"}, | ||
255 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.access_byte_width), | ||
256 | "Access Byte Width"}, | ||
257 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.bit_length), | ||
258 | "Bit Length"}, | ||
259 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.start_field_bit_offset), | ||
260 | "Field Bit Offset"}, | ||
261 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset), | ||
262 | "Base Byte Offset"}, | ||
263 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} | ||
264 | }; | ||
265 | |||
266 | static struct acpi_exdump_info acpi_ex_dump_node[6] = { | ||
267 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, | ||
268 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, | ||
269 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, | ||
270 | {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(reference_count), | ||
271 | "Reference Count"}, | ||
272 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, | ||
273 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} | ||
274 | }; | ||
275 | |||
276 | /* Dispatch table, indexed by object type */ | ||
277 | |||
278 | static struct acpi_exdump_info *acpi_ex_dump_info[] = { | ||
279 | NULL, | ||
280 | acpi_ex_dump_integer, | ||
281 | acpi_ex_dump_string, | ||
282 | acpi_ex_dump_buffer, | ||
283 | acpi_ex_dump_package, | ||
284 | NULL, | ||
285 | acpi_ex_dump_device, | ||
286 | acpi_ex_dump_event, | ||
287 | acpi_ex_dump_method, | ||
288 | acpi_ex_dump_mutex, | ||
289 | acpi_ex_dump_region, | ||
290 | acpi_ex_dump_power, | ||
291 | acpi_ex_dump_processor, | ||
292 | acpi_ex_dump_thermal, | ||
293 | acpi_ex_dump_buffer_field, | ||
294 | NULL, | ||
295 | NULL, | ||
296 | acpi_ex_dump_region_field, | ||
297 | acpi_ex_dump_bank_field, | ||
298 | acpi_ex_dump_index_field, | ||
299 | acpi_ex_dump_reference, | ||
300 | NULL, | ||
301 | NULL, | ||
302 | acpi_ex_dump_notify, | ||
303 | acpi_ex_dump_address_handler, | ||
304 | NULL, | ||
305 | NULL, | ||
306 | NULL | ||
307 | }; | ||
308 | |||
309 | /******************************************************************************* | ||
310 | * | ||
311 | * FUNCTION: acpi_ex_dump_object | ||
312 | * | ||
313 | * PARAMETERS: obj_desc - Descriptor to dump | ||
314 | * Info - Info table corresponding to this object | ||
315 | * type | ||
316 | * | ||
317 | * RETURN: None | ||
318 | * | ||
319 | * DESCRIPTION: Walk the info table for this object | ||
320 | * | ||
321 | ******************************************************************************/ | ||
322 | |||
323 | static void | ||
324 | acpi_ex_dump_object(union acpi_operand_object *obj_desc, | ||
325 | struct acpi_exdump_info *info) | ||
326 | { | ||
327 | u8 *target; | ||
328 | char *name; | ||
329 | u8 count; | ||
330 | |||
331 | if (!info) { | ||
332 | acpi_os_printf | ||
333 | ("ex_dump_object: Display not implemented for object type %s\n", | ||
334 | acpi_ut_get_object_type_name(obj_desc)); | ||
335 | return; | ||
336 | } | ||
337 | |||
338 | /* First table entry must contain the table length (# of table entries) */ | ||
339 | |||
340 | count = info->offset; | ||
341 | |||
342 | while (count) { | ||
343 | target = ACPI_ADD_PTR(u8, obj_desc, info->offset); | ||
344 | name = info->name; | ||
345 | |||
346 | switch (info->opcode) { | ||
347 | case ACPI_EXD_INIT: | ||
348 | break; | ||
349 | |||
350 | case ACPI_EXD_TYPE: | ||
351 | acpi_ex_out_string("Type", | ||
352 | acpi_ut_get_object_type_name | ||
353 | (obj_desc)); | ||
354 | break; | ||
355 | |||
356 | case ACPI_EXD_UINT8: | ||
357 | |||
358 | acpi_os_printf("%20s : %2.2X\n", name, *target); | ||
359 | break; | ||
360 | |||
361 | case ACPI_EXD_UINT16: | ||
362 | |||
363 | acpi_os_printf("%20s : %4.4X\n", name, | ||
364 | ACPI_GET16(target)); | ||
365 | break; | ||
366 | |||
367 | case ACPI_EXD_UINT32: | ||
368 | |||
369 | acpi_os_printf("%20s : %8.8X\n", name, | ||
370 | ACPI_GET32(target)); | ||
371 | break; | ||
372 | |||
373 | case ACPI_EXD_UINT64: | ||
374 | |||
375 | acpi_os_printf("%20s : %8.8X%8.8X\n", "Value", | ||
376 | ACPI_FORMAT_UINT64(ACPI_GET64(target))); | ||
377 | break; | ||
378 | |||
379 | case ACPI_EXD_POINTER: | ||
380 | |||
381 | acpi_ex_out_pointer(name, | ||
382 | *ACPI_CAST_PTR(void *, target)); | ||
383 | break; | ||
384 | |||
385 | case ACPI_EXD_ADDRESS: | ||
386 | |||
387 | acpi_ex_out_address(name, | ||
388 | *ACPI_CAST_PTR | ||
389 | (acpi_physical_address, target)); | ||
390 | break; | ||
391 | |||
392 | case ACPI_EXD_STRING: | ||
393 | |||
394 | acpi_ut_print_string(obj_desc->string.pointer, | ||
395 | ACPI_UINT8_MAX); | ||
396 | acpi_os_printf("\n"); | ||
397 | break; | ||
398 | |||
399 | case ACPI_EXD_BUFFER: | ||
400 | |||
401 | ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, | ||
402 | obj_desc->buffer.length); | ||
403 | break; | ||
404 | |||
405 | case ACPI_EXD_PACKAGE: | ||
406 | |||
407 | /* Dump the package contents */ | ||
408 | |||
409 | acpi_os_printf("\nPackage Contents:\n"); | ||
410 | acpi_ex_dump_package_obj(obj_desc, 0, 0); | ||
411 | break; | ||
412 | |||
413 | case ACPI_EXD_FIELD: | ||
414 | |||
415 | acpi_ex_dump_object(obj_desc, | ||
416 | acpi_ex_dump_field_common); | ||
417 | break; | ||
418 | |||
419 | case ACPI_EXD_REFERENCE: | ||
420 | |||
421 | acpi_ex_out_string("Opcode", | ||
422 | (acpi_ps_get_opcode_info | ||
423 | (obj_desc->reference.opcode))-> | ||
424 | name); | ||
425 | acpi_ex_dump_reference_obj(obj_desc); | ||
426 | break; | ||
427 | |||
428 | default: | ||
429 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", | ||
430 | info->opcode); | ||
431 | return; | ||
432 | } | ||
433 | |||
434 | info++; | ||
435 | count--; | ||
436 | } | ||
437 | } | ||
72 | 438 | ||
73 | /******************************************************************************* | 439 | /******************************************************************************* |
74 | * | 440 | * |
@@ -214,7 +580,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
214 | 580 | ||
215 | case ACPI_TYPE_BUFFER: | 581 | case ACPI_TYPE_BUFFER: |
216 | 582 | ||
217 | acpi_os_printf("Buffer len %X @ %p \n", | 583 | acpi_os_printf("Buffer len %X @ %p\n", |
218 | obj_desc->buffer.length, | 584 | obj_desc->buffer.length, |
219 | obj_desc->buffer.pointer); | 585 | obj_desc->buffer.pointer); |
220 | 586 | ||
@@ -320,17 +686,17 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
320 | 686 | ||
321 | case ACPI_TYPE_BUFFER_FIELD: | 687 | case ACPI_TYPE_BUFFER_FIELD: |
322 | 688 | ||
323 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of \n", | 689 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of\n", |
324 | obj_desc->buffer_field.bit_length, | 690 | obj_desc->buffer_field.bit_length, |
325 | obj_desc->buffer_field.base_byte_offset, | 691 | obj_desc->buffer_field.base_byte_offset, |
326 | obj_desc->buffer_field.start_field_bit_offset); | 692 | obj_desc->buffer_field.start_field_bit_offset); |
327 | 693 | ||
328 | if (!obj_desc->buffer_field.buffer_obj) { | 694 | if (!obj_desc->buffer_field.buffer_obj) { |
329 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL* \n")); | 695 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n")); |
330 | } else | 696 | } else |
331 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) | 697 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) |
332 | != ACPI_TYPE_BUFFER) { | 698 | != ACPI_TYPE_BUFFER) { |
333 | acpi_os_printf("*not a Buffer* \n"); | 699 | acpi_os_printf("*not a Buffer*\n"); |
334 | } else { | 700 | } else { |
335 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, | 701 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, |
336 | depth + 1); | 702 | depth + 1); |
@@ -441,7 +807,6 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
441 | return; | 807 | return; |
442 | } | 808 | } |
443 | 809 | ||
444 | #ifdef ACPI_FUTURE_USAGE | ||
445 | /******************************************************************************* | 810 | /******************************************************************************* |
446 | * | 811 | * |
447 | * FUNCTION: acpi_ex_out* functions | 812 | * FUNCTION: acpi_ex_out* functions |
@@ -465,11 +830,6 @@ static void acpi_ex_out_pointer(char *title, void *value) | |||
465 | acpi_os_printf("%20s : %p\n", title, value); | 830 | acpi_os_printf("%20s : %p\n", title, value); |
466 | } | 831 | } |
467 | 832 | ||
468 | static void acpi_ex_out_integer(char *title, u32 value) | ||
469 | { | ||
470 | acpi_os_printf("%20s : %.2X\n", title, value); | ||
471 | } | ||
472 | |||
473 | static void acpi_ex_out_address(char *title, acpi_physical_address value) | 833 | static void acpi_ex_out_address(char *title, acpi_physical_address value) |
474 | { | 834 | { |
475 | 835 | ||
@@ -482,16 +842,16 @@ static void acpi_ex_out_address(char *title, acpi_physical_address value) | |||
482 | 842 | ||
483 | /******************************************************************************* | 843 | /******************************************************************************* |
484 | * | 844 | * |
485 | * FUNCTION: acpi_ex_dump_node | 845 | * FUNCTION: acpi_ex_dump_namespace_node |
486 | * | 846 | * |
487 | * PARAMETERS: *Node - Descriptor to dump | 847 | * PARAMETERS: Node - Descriptor to dump |
488 | * Flags - Force display if TRUE | 848 | * Flags - Force display if TRUE |
489 | * | 849 | * |
490 | * DESCRIPTION: Dumps the members of the given.Node | 850 | * DESCRIPTION: Dumps the members of the given.Node |
491 | * | 851 | * |
492 | ******************************************************************************/ | 852 | ******************************************************************************/ |
493 | 853 | ||
494 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | 854 | void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags) |
495 | { | 855 | { |
496 | 856 | ||
497 | ACPI_FUNCTION_ENTRY(); | 857 | ACPI_FUNCTION_ENTRY(); |
@@ -506,19 +866,17 @@ void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | |||
506 | 866 | ||
507 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); | 867 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); |
508 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); | 868 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); |
509 | acpi_ex_out_integer("Flags", node->flags); | ||
510 | acpi_ex_out_integer("Owner Id", node->owner_id); | ||
511 | acpi_ex_out_integer("Reference Count", node->reference_count); | ||
512 | acpi_ex_out_pointer("Attached Object", | 869 | acpi_ex_out_pointer("Attached Object", |
513 | acpi_ns_get_attached_object(node)); | 870 | acpi_ns_get_attached_object(node)); |
514 | acpi_ex_out_pointer("child_list", node->child); | ||
515 | acpi_ex_out_pointer("next_peer", node->peer); | ||
516 | acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node)); | 871 | acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node)); |
872 | |||
873 | acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node), | ||
874 | acpi_ex_dump_node); | ||
517 | } | 875 | } |
518 | 876 | ||
519 | /******************************************************************************* | 877 | /******************************************************************************* |
520 | * | 878 | * |
521 | * FUNCTION: acpi_ex_dump_reference | 879 | * FUNCTION: acpi_ex_dump_reference_obj |
522 | * | 880 | * |
523 | * PARAMETERS: Object - Descriptor to dump | 881 | * PARAMETERS: Object - Descriptor to dump |
524 | * | 882 | * |
@@ -526,14 +884,16 @@ void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | |||
526 | * | 884 | * |
527 | ******************************************************************************/ | 885 | ******************************************************************************/ |
528 | 886 | ||
529 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | 887 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) |
530 | { | 888 | { |
531 | struct acpi_buffer ret_buf; | 889 | struct acpi_buffer ret_buf; |
532 | acpi_status status; | 890 | acpi_status status; |
533 | 891 | ||
892 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | ||
893 | |||
534 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { | 894 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { |
535 | acpi_os_printf("Named Object %p ", obj_desc->reference.node); | 895 | acpi_os_printf("Named Object %p ", obj_desc->reference.node); |
536 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | 896 | |
537 | status = | 897 | status = |
538 | acpi_ns_handle_to_pathname(obj_desc->reference.node, | 898 | acpi_ns_handle_to_pathname(obj_desc->reference.node, |
539 | &ret_buf); | 899 | &ret_buf); |
@@ -551,9 +911,9 @@ static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | |||
551 | 911 | ||
552 | /******************************************************************************* | 912 | /******************************************************************************* |
553 | * | 913 | * |
554 | * FUNCTION: acpi_ex_dump_package | 914 | * FUNCTION: acpi_ex_dump_package_obj |
555 | * | 915 | * |
556 | * PARAMETERS: Object - Descriptor to dump | 916 | * PARAMETERS: obj_desc - Descriptor to dump |
557 | * Level - Indentation Level | 917 | * Level - Indentation Level |
558 | * Index - Package index for this object | 918 | * Index - Package index for this object |
559 | * | 919 | * |
@@ -562,7 +922,8 @@ static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | |||
562 | ******************************************************************************/ | 922 | ******************************************************************************/ |
563 | 923 | ||
564 | static void | 924 | static void |
565 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | 925 | acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, |
926 | u32 level, u32 index) | ||
566 | { | 927 | { |
567 | u32 i; | 928 | u32 i; |
568 | 929 | ||
@@ -608,7 +969,8 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
608 | acpi_os_printf("[Buffer] Length %.2X = ", | 969 | acpi_os_printf("[Buffer] Length %.2X = ", |
609 | obj_desc->buffer.length); | 970 | obj_desc->buffer.length); |
610 | if (obj_desc->buffer.length) { | 971 | if (obj_desc->buffer.length) { |
611 | acpi_ut_dump_buffer((u8 *) obj_desc->buffer.pointer, | 972 | acpi_ut_dump_buffer(ACPI_CAST_PTR |
973 | (u8, obj_desc->buffer.pointer), | ||
612 | obj_desc->buffer.length, | 974 | obj_desc->buffer.length, |
613 | DB_DWORD_DISPLAY, _COMPONENT); | 975 | DB_DWORD_DISPLAY, _COMPONENT); |
614 | } else { | 976 | } else { |
@@ -618,19 +980,19 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
618 | 980 | ||
619 | case ACPI_TYPE_PACKAGE: | 981 | case ACPI_TYPE_PACKAGE: |
620 | 982 | ||
621 | acpi_os_printf("[Package] Contains %d Elements: \n", | 983 | acpi_os_printf("[Package] Contains %d Elements:\n", |
622 | obj_desc->package.count); | 984 | obj_desc->package.count); |
623 | 985 | ||
624 | for (i = 0; i < obj_desc->package.count; i++) { | 986 | for (i = 0; i < obj_desc->package.count; i++) { |
625 | acpi_ex_dump_package(obj_desc->package.elements[i], | 987 | acpi_ex_dump_package_obj(obj_desc->package.elements[i], |
626 | level + 1, i); | 988 | level + 1, i); |
627 | } | 989 | } |
628 | break; | 990 | break; |
629 | 991 | ||
630 | case ACPI_TYPE_LOCAL_REFERENCE: | 992 | case ACPI_TYPE_LOCAL_REFERENCE: |
631 | 993 | ||
632 | acpi_os_printf("[Object Reference] "); | 994 | acpi_os_printf("[Object Reference] "); |
633 | acpi_ex_dump_reference(obj_desc); | 995 | acpi_ex_dump_reference_obj(obj_desc); |
634 | break; | 996 | break; |
635 | 997 | ||
636 | default: | 998 | default: |
@@ -645,7 +1007,7 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
645 | * | 1007 | * |
646 | * FUNCTION: acpi_ex_dump_object_descriptor | 1008 | * FUNCTION: acpi_ex_dump_object_descriptor |
647 | * | 1009 | * |
648 | * PARAMETERS: Object - Descriptor to dump | 1010 | * PARAMETERS: obj_desc - Descriptor to dump |
649 | * Flags - Force display if TRUE | 1011 | * Flags - Force display if TRUE |
650 | * | 1012 | * |
651 | * DESCRIPTION: Dumps the members of the object descriptor given. | 1013 | * DESCRIPTION: Dumps the members of the object descriptor given. |
@@ -670,11 +1032,13 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
670 | } | 1032 | } |
671 | 1033 | ||
672 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { | 1034 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { |
673 | acpi_ex_dump_node((struct acpi_namespace_node *)obj_desc, | 1035 | acpi_ex_dump_namespace_node((struct acpi_namespace_node *) |
674 | flags); | 1036 | obj_desc, flags); |
1037 | |||
675 | acpi_os_printf("\nAttached Object (%p):\n", | 1038 | acpi_os_printf("\nAttached Object (%p):\n", |
676 | ((struct acpi_namespace_node *)obj_desc)-> | 1039 | ((struct acpi_namespace_node *)obj_desc)-> |
677 | object); | 1040 | object); |
1041 | |||
678 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) | 1042 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) |
679 | obj_desc)->object, flags); | 1043 | obj_desc)->object, flags); |
680 | return_VOID; | 1044 | return_VOID; |
@@ -687,233 +1051,18 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
687 | return_VOID; | 1051 | return_VOID; |
688 | } | 1052 | } |
689 | 1053 | ||
690 | /* Common Fields */ | 1054 | if (obj_desc->common.type > ACPI_TYPE_NS_NODE_MAX) { |
691 | 1055 | return_VOID; | |
692 | acpi_ex_out_string("Type", acpi_ut_get_object_type_name(obj_desc)); | 1056 | } |
693 | acpi_ex_out_integer("Reference Count", | ||
694 | obj_desc->common.reference_count); | ||
695 | acpi_ex_out_integer("Flags", obj_desc->common.flags); | ||
696 | |||
697 | /* Object-specific Fields */ | ||
698 | |||
699 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | ||
700 | case ACPI_TYPE_INTEGER: | ||
701 | |||
702 | acpi_os_printf("%20s : %8.8X%8.8X\n", "Value", | ||
703 | ACPI_FORMAT_UINT64(obj_desc->integer.value)); | ||
704 | break; | ||
705 | |||
706 | case ACPI_TYPE_STRING: | ||
707 | |||
708 | acpi_ex_out_integer("Length", obj_desc->string.length); | ||
709 | |||
710 | acpi_os_printf("%20s : %p ", "Pointer", | ||
711 | obj_desc->string.pointer); | ||
712 | acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX); | ||
713 | acpi_os_printf("\n"); | ||
714 | break; | ||
715 | |||
716 | case ACPI_TYPE_BUFFER: | ||
717 | |||
718 | acpi_ex_out_integer("Length", obj_desc->buffer.length); | ||
719 | acpi_ex_out_pointer("Pointer", obj_desc->buffer.pointer); | ||
720 | ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, | ||
721 | obj_desc->buffer.length); | ||
722 | break; | ||
723 | |||
724 | case ACPI_TYPE_PACKAGE: | ||
725 | |||
726 | acpi_ex_out_integer("Flags", obj_desc->package.flags); | ||
727 | acpi_ex_out_integer("Elements", obj_desc->package.count); | ||
728 | acpi_ex_out_pointer("Element List", obj_desc->package.elements); | ||
729 | |||
730 | /* Dump the package contents */ | ||
731 | |||
732 | acpi_os_printf("\nPackage Contents:\n"); | ||
733 | acpi_ex_dump_package(obj_desc, 0, 0); | ||
734 | break; | ||
735 | |||
736 | case ACPI_TYPE_DEVICE: | ||
737 | |||
738 | acpi_ex_out_pointer("Handler", obj_desc->device.handler); | ||
739 | acpi_ex_out_pointer("system_notify", | ||
740 | obj_desc->device.system_notify); | ||
741 | acpi_ex_out_pointer("device_notify", | ||
742 | obj_desc->device.device_notify); | ||
743 | break; | ||
744 | |||
745 | case ACPI_TYPE_EVENT: | ||
746 | |||
747 | acpi_ex_out_pointer("Semaphore", obj_desc->event.semaphore); | ||
748 | break; | ||
749 | |||
750 | case ACPI_TYPE_METHOD: | ||
751 | |||
752 | acpi_ex_out_integer("param_count", | ||
753 | obj_desc->method.param_count); | ||
754 | acpi_ex_out_integer("Concurrency", | ||
755 | obj_desc->method.concurrency); | ||
756 | acpi_ex_out_pointer("Semaphore", obj_desc->method.semaphore); | ||
757 | acpi_ex_out_integer("owner_id", obj_desc->method.owner_id); | ||
758 | acpi_ex_out_integer("aml_length", obj_desc->method.aml_length); | ||
759 | acpi_ex_out_pointer("aml_start", obj_desc->method.aml_start); | ||
760 | break; | ||
761 | |||
762 | case ACPI_TYPE_MUTEX: | ||
763 | |||
764 | acpi_ex_out_integer("sync_level", obj_desc->mutex.sync_level); | ||
765 | acpi_ex_out_pointer("owner_thread", | ||
766 | obj_desc->mutex.owner_thread); | ||
767 | acpi_ex_out_integer("acquire_depth", | ||
768 | obj_desc->mutex.acquisition_depth); | ||
769 | acpi_ex_out_pointer("Semaphore", obj_desc->mutex.semaphore); | ||
770 | break; | ||
771 | |||
772 | case ACPI_TYPE_REGION: | ||
773 | |||
774 | acpi_ex_out_integer("space_id", obj_desc->region.space_id); | ||
775 | acpi_ex_out_integer("Flags", obj_desc->region.flags); | ||
776 | acpi_ex_out_address("Address", obj_desc->region.address); | ||
777 | acpi_ex_out_integer("Length", obj_desc->region.length); | ||
778 | acpi_ex_out_pointer("Handler", obj_desc->region.handler); | ||
779 | acpi_ex_out_pointer("Next", obj_desc->region.next); | ||
780 | break; | ||
781 | |||
782 | case ACPI_TYPE_POWER: | ||
783 | |||
784 | acpi_ex_out_integer("system_level", | ||
785 | obj_desc->power_resource.system_level); | ||
786 | acpi_ex_out_integer("resource_order", | ||
787 | obj_desc->power_resource.resource_order); | ||
788 | acpi_ex_out_pointer("system_notify", | ||
789 | obj_desc->power_resource.system_notify); | ||
790 | acpi_ex_out_pointer("device_notify", | ||
791 | obj_desc->power_resource.device_notify); | ||
792 | break; | ||
793 | |||
794 | case ACPI_TYPE_PROCESSOR: | ||
795 | |||
796 | acpi_ex_out_integer("Processor ID", | ||
797 | obj_desc->processor.proc_id); | ||
798 | acpi_ex_out_integer("Length", obj_desc->processor.length); | ||
799 | acpi_ex_out_address("Address", | ||
800 | (acpi_physical_address) obj_desc->processor. | ||
801 | address); | ||
802 | acpi_ex_out_pointer("system_notify", | ||
803 | obj_desc->processor.system_notify); | ||
804 | acpi_ex_out_pointer("device_notify", | ||
805 | obj_desc->processor.device_notify); | ||
806 | acpi_ex_out_pointer("Handler", obj_desc->processor.handler); | ||
807 | break; | ||
808 | |||
809 | case ACPI_TYPE_THERMAL: | ||
810 | |||
811 | acpi_ex_out_pointer("system_notify", | ||
812 | obj_desc->thermal_zone.system_notify); | ||
813 | acpi_ex_out_pointer("device_notify", | ||
814 | obj_desc->thermal_zone.device_notify); | ||
815 | acpi_ex_out_pointer("Handler", obj_desc->thermal_zone.handler); | ||
816 | break; | ||
817 | |||
818 | case ACPI_TYPE_BUFFER_FIELD: | ||
819 | case ACPI_TYPE_LOCAL_REGION_FIELD: | ||
820 | case ACPI_TYPE_LOCAL_BANK_FIELD: | ||
821 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | ||
822 | |||
823 | acpi_ex_out_integer("field_flags", | ||
824 | obj_desc->common_field.field_flags); | ||
825 | acpi_ex_out_integer("access_byte_width", | ||
826 | obj_desc->common_field.access_byte_width); | ||
827 | acpi_ex_out_integer("bit_length", | ||
828 | obj_desc->common_field.bit_length); | ||
829 | acpi_ex_out_integer("fld_bit_offset", | ||
830 | obj_desc->common_field. | ||
831 | start_field_bit_offset); | ||
832 | acpi_ex_out_integer("base_byte_offset", | ||
833 | obj_desc->common_field.base_byte_offset); | ||
834 | acpi_ex_out_pointer("parent_node", obj_desc->common_field.node); | ||
835 | |||
836 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | ||
837 | case ACPI_TYPE_BUFFER_FIELD: | ||
838 | acpi_ex_out_pointer("buffer_obj", | ||
839 | obj_desc->buffer_field.buffer_obj); | ||
840 | break; | ||
841 | |||
842 | case ACPI_TYPE_LOCAL_REGION_FIELD: | ||
843 | acpi_ex_out_pointer("region_obj", | ||
844 | obj_desc->field.region_obj); | ||
845 | break; | ||
846 | |||
847 | case ACPI_TYPE_LOCAL_BANK_FIELD: | ||
848 | acpi_ex_out_integer("Value", | ||
849 | obj_desc->bank_field.value); | ||
850 | acpi_ex_out_pointer("region_obj", | ||
851 | obj_desc->bank_field.region_obj); | ||
852 | acpi_ex_out_pointer("bank_obj", | ||
853 | obj_desc->bank_field.bank_obj); | ||
854 | break; | ||
855 | |||
856 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | ||
857 | acpi_ex_out_integer("Value", | ||
858 | obj_desc->index_field.value); | ||
859 | acpi_ex_out_pointer("Index", | ||
860 | obj_desc->index_field.index_obj); | ||
861 | acpi_ex_out_pointer("Data", | ||
862 | obj_desc->index_field.data_obj); | ||
863 | break; | ||
864 | |||
865 | default: | ||
866 | /* All object types covered above */ | ||
867 | break; | ||
868 | } | ||
869 | break; | ||
870 | |||
871 | case ACPI_TYPE_LOCAL_REFERENCE: | ||
872 | |||
873 | acpi_ex_out_integer("target_type", | ||
874 | obj_desc->reference.target_type); | ||
875 | acpi_ex_out_string("Opcode", | ||
876 | (acpi_ps_get_opcode_info | ||
877 | (obj_desc->reference.opcode))->name); | ||
878 | acpi_ex_out_integer("Offset", obj_desc->reference.offset); | ||
879 | acpi_ex_out_pointer("obj_desc", obj_desc->reference.object); | ||
880 | acpi_ex_out_pointer("Node", obj_desc->reference.node); | ||
881 | acpi_ex_out_pointer("Where", obj_desc->reference.where); | ||
882 | |||
883 | acpi_ex_dump_reference(obj_desc); | ||
884 | break; | ||
885 | |||
886 | case ACPI_TYPE_LOCAL_ADDRESS_HANDLER: | ||
887 | |||
888 | acpi_ex_out_integer("space_id", | ||
889 | obj_desc->address_space.space_id); | ||
890 | acpi_ex_out_pointer("Next", obj_desc->address_space.next); | ||
891 | acpi_ex_out_pointer("region_list", | ||
892 | obj_desc->address_space.region_list); | ||
893 | acpi_ex_out_pointer("Node", obj_desc->address_space.node); | ||
894 | acpi_ex_out_pointer("Context", obj_desc->address_space.context); | ||
895 | break; | ||
896 | 1057 | ||
897 | case ACPI_TYPE_LOCAL_NOTIFY: | 1058 | /* Common Fields */ |
898 | 1059 | ||
899 | acpi_ex_out_pointer("Node", obj_desc->notify.node); | 1060 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_common); |
900 | acpi_ex_out_pointer("Context", obj_desc->notify.context); | ||
901 | break; | ||
902 | 1061 | ||
903 | case ACPI_TYPE_LOCAL_ALIAS: | 1062 | /* Object-specific fields */ |
904 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: | ||
905 | case ACPI_TYPE_LOCAL_EXTRA: | ||
906 | case ACPI_TYPE_LOCAL_DATA: | ||
907 | default: | ||
908 | |||
909 | acpi_os_printf | ||
910 | ("ex_dump_object_descriptor: Display not implemented for object type %s\n", | ||
911 | acpi_ut_get_object_type_name(obj_desc)); | ||
912 | break; | ||
913 | } | ||
914 | 1063 | ||
1064 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]); | ||
915 | return_VOID; | 1065 | return_VOID; |
916 | } | 1066 | } |
917 | 1067 | ||
918 | #endif /* ACPI_FUTURE_USAGE */ | ||
919 | #endif | 1068 | #endif |
diff --git a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c index ab1ba399aa28..78a76f91a1c9 100644 --- a/drivers/acpi/executer/exfield.c +++ b/drivers/acpi/executer/exfield.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c index ba6e08843c29..9fe27fd04a2f 100644 --- a/drivers/acpi/executer/exfldio.c +++ b/drivers/acpi/executer/exfldio.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -94,10 +94,9 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
94 | /* We must have a valid region */ | 94 | /* We must have a valid region */ |
95 | 95 | ||
96 | if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) { | 96 | if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) { |
97 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 97 | ACPI_REPORT_ERROR(("Needed Region, found type %X (%s)\n", |
98 | "Needed Region, found type %X (%s)\n", | 98 | ACPI_GET_OBJECT_TYPE(rgn_desc), |
99 | ACPI_GET_OBJECT_TYPE(rgn_desc), | 99 | acpi_ut_get_object_type_name(rgn_desc))); |
100 | acpi_ut_get_object_type_name(rgn_desc))); | ||
101 | 100 | ||
102 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 101 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
103 | } | 102 | } |
@@ -162,31 +161,14 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
162 | * than the region itself. For example, a region of length one | 161 | * than the region itself. For example, a region of length one |
163 | * byte, and a field with Dword access specified. | 162 | * byte, and a field with Dword access specified. |
164 | */ | 163 | */ |
165 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 164 | ACPI_REPORT_ERROR(("Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n", acpi_ut_get_node_name(obj_desc->common_field.node), obj_desc->common_field.access_byte_width, acpi_ut_get_node_name(rgn_desc->region.node), rgn_desc->region.length)); |
166 | "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n", | ||
167 | acpi_ut_get_node_name(obj_desc-> | ||
168 | common_field. | ||
169 | node), | ||
170 | obj_desc->common_field. | ||
171 | access_byte_width, | ||
172 | acpi_ut_get_node_name(rgn_desc-> | ||
173 | region.node), | ||
174 | rgn_desc->region.length)); | ||
175 | } | 165 | } |
176 | 166 | ||
177 | /* | 167 | /* |
178 | * Offset rounded up to next multiple of field width | 168 | * Offset rounded up to next multiple of field width |
179 | * exceeds region length, indicate an error | 169 | * exceeds region length, indicate an error |
180 | */ | 170 | */ |
181 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 171 | ACPI_REPORT_ERROR(("Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n", acpi_ut_get_node_name(obj_desc->common_field.node), obj_desc->common_field.base_byte_offset, field_datum_byte_offset, obj_desc->common_field.access_byte_width, acpi_ut_get_node_name(rgn_desc->region.node), rgn_desc->region.length)); |
182 | "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n", | ||
183 | acpi_ut_get_node_name(obj_desc->common_field. | ||
184 | node), | ||
185 | obj_desc->common_field.base_byte_offset, | ||
186 | field_datum_byte_offset, | ||
187 | obj_desc->common_field.access_byte_width, | ||
188 | acpi_ut_get_node_name(rgn_desc->region.node), | ||
189 | rgn_desc->region.length)); | ||
190 | 172 | ||
191 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); | 173 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); |
192 | } | 174 | } |
@@ -270,12 +252,11 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, | |||
270 | 252 | ||
271 | if (ACPI_FAILURE(status)) { | 253 | if (ACPI_FAILURE(status)) { |
272 | if (status == AE_NOT_IMPLEMENTED) { | 254 | if (status == AE_NOT_IMPLEMENTED) { |
273 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 255 | ACPI_REPORT_ERROR(("Region %s(%X) not implemented\n", |
274 | "Region %s(%X) not implemented\n", | 256 | acpi_ut_get_region_name(rgn_desc-> |
275 | acpi_ut_get_region_name(rgn_desc-> | 257 | region. |
276 | region. | 258 | space_id), |
277 | space_id), | 259 | rgn_desc->region.space_id)); |
278 | rgn_desc->region.space_id)); | ||
279 | } else if (status == AE_NOT_EXIST) { | 260 | } else if (status == AE_NOT_EXIST) { |
280 | ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n", | 261 | ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n", |
281 | acpi_ut_get_region_name(rgn_desc-> | 262 | acpi_ut_get_region_name(rgn_desc-> |
@@ -618,11 +599,10 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, | |||
618 | 599 | ||
619 | default: | 600 | default: |
620 | 601 | ||
621 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 602 | ACPI_REPORT_ERROR(("Unknown update_rule value: %X\n", |
622 | "write_with_update_rule: Unknown update_rule setting: %X\n", | 603 | (obj_desc->common_field. |
623 | (obj_desc->common_field. | 604 | field_flags & |
624 | field_flags & | 605 | AML_FIELD_UPDATE_RULE_MASK))); |
625 | AML_FIELD_UPDATE_RULE_MASK))); | ||
626 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 606 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
627 | } | 607 | } |
628 | } | 608 | } |
@@ -677,10 +657,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, | |||
677 | 657 | ||
678 | if (buffer_length < | 658 | if (buffer_length < |
679 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { | 659 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { |
680 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 660 | ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length)); |
681 | "Field size %X (bits) is too large for buffer (%X)\n", | ||
682 | obj_desc->common_field.bit_length, | ||
683 | buffer_length)); | ||
684 | 661 | ||
685 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 662 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
686 | } | 663 | } |
@@ -792,10 +769,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, | |||
792 | 769 | ||
793 | if (buffer_length < | 770 | if (buffer_length < |
794 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { | 771 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { |
795 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 772 | ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length)); |
796 | "Field size %X (bits) is too large for buffer (%X)\n", | ||
797 | obj_desc->common_field.bit_length, | ||
798 | buffer_length)); | ||
799 | 773 | ||
800 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 774 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
801 | } | 775 | } |
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c index a3f4d72bedc9..5ad34566738c 100644 --- a/drivers/acpi/executer/exmisc.c +++ b/drivers/acpi/executer/exmisc.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -45,6 +45,7 @@ | |||
45 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
46 | #include <acpi/acinterp.h> | 46 | #include <acpi/acinterp.h> |
47 | #include <acpi/amlcode.h> | 47 | #include <acpi/amlcode.h> |
48 | #include <acpi/amlresrc.h> | ||
48 | 49 | ||
49 | #define _COMPONENT ACPI_EXECUTER | 50 | #define _COMPONENT ACPI_EXECUTER |
50 | ACPI_MODULE_NAME("exmisc") | 51 | ACPI_MODULE_NAME("exmisc") |
@@ -97,7 +98,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, | |||
97 | 98 | ||
98 | default: | 99 | default: |
99 | 100 | ||
100 | ACPI_REPORT_ERROR(("Unknown Reference opcode in get_reference %X\n", obj_desc->reference.opcode)); | 101 | ACPI_REPORT_ERROR(("Unknown Reference opcode %X\n", |
102 | obj_desc->reference.opcode)); | ||
101 | return_ACPI_STATUS(AE_AML_INTERNAL); | 103 | return_ACPI_STATUS(AE_AML_INTERNAL); |
102 | } | 104 | } |
103 | break; | 105 | break; |
@@ -112,7 +114,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, | |||
112 | 114 | ||
113 | default: | 115 | default: |
114 | 116 | ||
115 | ACPI_REPORT_ERROR(("Invalid descriptor type in get_reference: %X\n", ACPI_GET_DESCRIPTOR_TYPE(obj_desc))); | 117 | ACPI_REPORT_ERROR(("Invalid descriptor type %X\n", |
118 | ACPI_GET_DESCRIPTOR_TYPE(obj_desc))); | ||
116 | return_ACPI_STATUS(AE_TYPE); | 119 | return_ACPI_STATUS(AE_TYPE); |
117 | } | 120 | } |
118 | 121 | ||
@@ -157,48 +160,58 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
157 | union acpi_operand_object **actual_return_desc, | 160 | union acpi_operand_object **actual_return_desc, |
158 | struct acpi_walk_state *walk_state) | 161 | struct acpi_walk_state *walk_state) |
159 | { | 162 | { |
163 | acpi_status status; | ||
160 | union acpi_operand_object *return_desc; | 164 | union acpi_operand_object *return_desc; |
161 | u8 *new_buf; | 165 | u8 *new_buf; |
162 | u8 *end_tag1; | 166 | u8 *end_tag; |
163 | u8 *end_tag2; | 167 | acpi_size length0; |
164 | acpi_size length1; | 168 | acpi_size length1; |
165 | acpi_size length2; | ||
166 | 169 | ||
167 | ACPI_FUNCTION_TRACE("ex_concat_template"); | 170 | ACPI_FUNCTION_TRACE("ex_concat_template"); |
168 | 171 | ||
169 | /* Find the end_tags in each resource template */ | 172 | /* |
173 | * Find the end_tag descriptor in each resource template. | ||
174 | * Note: returned pointers point TO the end_tag, not past it. | ||
175 | * | ||
176 | * Compute the length of each resource template | ||
177 | */ | ||
178 | status = acpi_ut_get_resource_end_tag(operand0, &end_tag); | ||
179 | if (ACPI_FAILURE(status)) { | ||
180 | return_ACPI_STATUS(status); | ||
181 | } | ||
182 | |||
183 | length0 = ACPI_PTR_DIFF(end_tag, operand0->buffer.pointer); | ||
170 | 184 | ||
171 | end_tag1 = acpi_ut_get_resource_end_tag(operand0); | 185 | status = acpi_ut_get_resource_end_tag(operand1, &end_tag); |
172 | end_tag2 = acpi_ut_get_resource_end_tag(operand1); | 186 | if (ACPI_FAILURE(status)) { |
173 | if (!end_tag1 || !end_tag2) { | 187 | return_ACPI_STATUS(status); |
174 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | ||
175 | } | 188 | } |
176 | 189 | ||
177 | /* Compute the length of each part */ | 190 | /* Include the end_tag in the second template length */ |
178 | 191 | ||
179 | length1 = ACPI_PTR_DIFF(end_tag1, operand0->buffer.pointer); | 192 | length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer) + |
180 | length2 = ACPI_PTR_DIFF(end_tag2, operand1->buffer.pointer) + 2; /* Size of END_TAG */ | 193 | sizeof(struct aml_resource_end_tag); |
181 | 194 | ||
182 | /* Create a new buffer object for the result */ | 195 | /* Create a new buffer object for the result */ |
183 | 196 | ||
184 | return_desc = acpi_ut_create_buffer_object(length1 + length2); | 197 | return_desc = acpi_ut_create_buffer_object(length0 + length1); |
185 | if (!return_desc) { | 198 | if (!return_desc) { |
186 | return_ACPI_STATUS(AE_NO_MEMORY); | 199 | return_ACPI_STATUS(AE_NO_MEMORY); |
187 | } | 200 | } |
188 | 201 | ||
189 | /* Copy the templates to the new descriptor */ | 202 | /* |
190 | 203 | * Copy the templates to the new buffer, 0 first, then 1 follows. One | |
204 | * end_tag descriptor is copied from Operand1. | ||
205 | */ | ||
191 | new_buf = return_desc->buffer.pointer; | 206 | new_buf = return_desc->buffer.pointer; |
192 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length1); | 207 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); |
193 | ACPI_MEMCPY(new_buf + length1, operand1->buffer.pointer, length2); | 208 | ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); |
194 | 209 | ||
195 | /* Compute the new checksum */ | 210 | /* Set the end_tag checksum to zero, means "ignore checksum" */ |
196 | 211 | ||
197 | new_buf[return_desc->buffer.length - 1] = | 212 | new_buf[return_desc->buffer.length - 1] = 0; |
198 | acpi_ut_generate_checksum(return_desc->buffer.pointer, | ||
199 | (return_desc->buffer.length - 1)); | ||
200 | 213 | ||
201 | /* Return the completed template descriptor */ | 214 | /* Return the completed resource template */ |
202 | 215 | ||
203 | *actual_return_desc = return_desc; | 216 | *actual_return_desc = return_desc; |
204 | return_ACPI_STATUS(AE_OK); | 217 | return_ACPI_STATUS(AE_OK); |
@@ -229,7 +242,6 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
229 | union acpi_operand_object *return_desc; | 242 | union acpi_operand_object *return_desc; |
230 | char *new_buf; | 243 | char *new_buf; |
231 | acpi_status status; | 244 | acpi_status status; |
232 | acpi_size new_length; | ||
233 | 245 | ||
234 | ACPI_FUNCTION_TRACE("ex_do_concatenate"); | 246 | ACPI_FUNCTION_TRACE("ex_do_concatenate"); |
235 | 247 | ||
@@ -256,7 +268,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
256 | break; | 268 | break; |
257 | 269 | ||
258 | default: | 270 | default: |
259 | ACPI_REPORT_ERROR(("Concat - invalid obj type: %X\n", | 271 | ACPI_REPORT_ERROR(("Invalid object type: %X\n", |
260 | ACPI_GET_OBJECT_TYPE(operand0))); | 272 | ACPI_GET_OBJECT_TYPE(operand0))); |
261 | status = AE_AML_INTERNAL; | 273 | status = AE_AML_INTERNAL; |
262 | } | 274 | } |
@@ -296,8 +308,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
296 | 308 | ||
297 | /* Copy the first integer, LSB first */ | 309 | /* Copy the first integer, LSB first */ |
298 | 310 | ||
299 | ACPI_MEMCPY(new_buf, | 311 | ACPI_MEMCPY(new_buf, &operand0->integer.value, |
300 | &operand0->integer.value, | ||
301 | acpi_gbl_integer_byte_width); | 312 | acpi_gbl_integer_byte_width); |
302 | 313 | ||
303 | /* Copy the second integer (LSB first) after the first */ | 314 | /* Copy the second integer (LSB first) after the first */ |
@@ -311,14 +322,11 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
311 | 322 | ||
312 | /* Result of two Strings is a String */ | 323 | /* Result of two Strings is a String */ |
313 | 324 | ||
314 | new_length = (acpi_size) operand0->string.length + | 325 | return_desc = acpi_ut_create_string_object((acpi_size) |
315 | (acpi_size) local_operand1->string.length; | 326 | (operand0->string. |
316 | if (new_length > ACPI_MAX_STRING_CONVERSION) { | 327 | length + |
317 | status = AE_AML_STRING_LIMIT; | 328 | local_operand1-> |
318 | goto cleanup; | 329 | string.length)); |
319 | } | ||
320 | |||
321 | return_desc = acpi_ut_create_string_object(new_length); | ||
322 | if (!return_desc) { | 330 | if (!return_desc) { |
323 | status = AE_NO_MEMORY; | 331 | status = AE_NO_MEMORY; |
324 | goto cleanup; | 332 | goto cleanup; |
@@ -338,11 +346,10 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
338 | /* Result of two Buffers is a Buffer */ | 346 | /* Result of two Buffers is a Buffer */ |
339 | 347 | ||
340 | return_desc = acpi_ut_create_buffer_object((acpi_size) | 348 | return_desc = acpi_ut_create_buffer_object((acpi_size) |
341 | operand0->buffer. | 349 | (operand0->buffer. |
342 | length + | 350 | length + |
343 | (acpi_size) | 351 | local_operand1-> |
344 | local_operand1-> | 352 | buffer.length)); |
345 | buffer.length); | ||
346 | if (!return_desc) { | 353 | if (!return_desc) { |
347 | status = AE_NO_MEMORY; | 354 | status = AE_NO_MEMORY; |
348 | goto cleanup; | 355 | goto cleanup; |
@@ -352,8 +359,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
352 | 359 | ||
353 | /* Concatenate the buffers */ | 360 | /* Concatenate the buffers */ |
354 | 361 | ||
355 | ACPI_MEMCPY(new_buf, | 362 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, |
356 | operand0->buffer.pointer, operand0->buffer.length); | 363 | operand0->buffer.length); |
357 | ACPI_MEMCPY(new_buf + operand0->buffer.length, | 364 | ACPI_MEMCPY(new_buf + operand0->buffer.length, |
358 | local_operand1->buffer.pointer, | 365 | local_operand1->buffer.pointer, |
359 | local_operand1->buffer.length); | 366 | local_operand1->buffer.length); |
@@ -363,7 +370,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
363 | 370 | ||
364 | /* Invalid object type, should not happen here */ | 371 | /* Invalid object type, should not happen here */ |
365 | 372 | ||
366 | ACPI_REPORT_ERROR(("Concatenate - Invalid object type: %X\n", | 373 | ACPI_REPORT_ERROR(("Invalid object type: %X\n", |
367 | ACPI_GET_OBJECT_TYPE(operand0))); | 374 | ACPI_GET_OBJECT_TYPE(operand0))); |
368 | status = AE_AML_INTERNAL; | 375 | status = AE_AML_INTERNAL; |
369 | goto cleanup; | 376 | goto cleanup; |
@@ -625,9 +632,8 @@ acpi_ex_do_logical_op(u16 opcode, | |||
625 | 632 | ||
626 | /* Lexicographic compare: compare the data bytes */ | 633 | /* Lexicographic compare: compare the data bytes */ |
627 | 634 | ||
628 | compare = ACPI_MEMCMP((const char *)operand0->buffer.pointer, | 635 | compare = ACPI_MEMCMP(operand0->buffer.pointer, |
629 | (const char *)local_operand1->buffer. | 636 | local_operand1->buffer.pointer, |
630 | pointer, | ||
631 | (length0 > length1) ? length1 : length0); | 637 | (length0 > length1) ? length1 : length0); |
632 | 638 | ||
633 | switch (opcode) { | 639 | switch (opcode) { |
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c index ab47f6d8b5c0..89b8ab79410b 100644 --- a/drivers/acpi/executer/exmutex.c +++ b/drivers/acpi/executer/exmutex.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c index 239d8473e9a5..de3216b6a4fc 100644 --- a/drivers/acpi/executer/exnames.c +++ b/drivers/acpi/executer/exnames.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -99,7 +99,8 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) | |||
99 | */ | 99 | */ |
100 | name_string = ACPI_MEM_ALLOCATE(size_needed); | 100 | name_string = ACPI_MEM_ALLOCATE(size_needed); |
101 | if (!name_string) { | 101 | if (!name_string) { |
102 | ACPI_REPORT_ERROR(("ex_allocate_name_string: Could not allocate size %d\n", size_needed)); | 102 | ACPI_REPORT_ERROR(("Could not allocate size %d\n", |
103 | size_needed)); | ||
103 | return_PTR(NULL); | 104 | return_PTR(NULL); |
104 | } | 105 | } |
105 | 106 | ||
@@ -167,8 +168,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
167 | char_buf[0] = *aml_address; | 168 | char_buf[0] = *aml_address; |
168 | 169 | ||
169 | if ('0' <= char_buf[0] && char_buf[0] <= '9') { | 170 | if ('0' <= char_buf[0] && char_buf[0] <= '9') { |
170 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "leading digit: %c\n", | 171 | ACPI_REPORT_ERROR(("Invalid leading digit: %c\n", char_buf[0])); |
171 | char_buf[0])); | ||
172 | return_ACPI_STATUS(AE_CTRL_PENDING); | 172 | return_ACPI_STATUS(AE_CTRL_PENDING); |
173 | } | 173 | } |
174 | 174 | ||
@@ -191,10 +191,10 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
191 | if (name_string) { | 191 | if (name_string) { |
192 | ACPI_STRCAT(name_string, char_buf); | 192 | ACPI_STRCAT(name_string, char_buf); |
193 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 193 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
194 | "Appended to - %s \n", name_string)); | 194 | "Appended to - %s\n", name_string)); |
195 | } else { | 195 | } else { |
196 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 196 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
197 | "No Name string - %s \n", char_buf)); | 197 | "No Name string - %s\n", char_buf)); |
198 | } | 198 | } |
199 | } else if (index == 0) { | 199 | } else if (index == 0) { |
200 | /* | 200 | /* |
@@ -211,12 +211,11 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
211 | * the required 4 | 211 | * the required 4 |
212 | */ | 212 | */ |
213 | status = AE_AML_BAD_NAME; | 213 | status = AE_AML_BAD_NAME; |
214 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 214 | ACPI_REPORT_ERROR(("Bad character %02x in name, at %p\n", |
215 | "Bad character %02x in name, at %p\n", | 215 | *aml_address, aml_address)); |
216 | *aml_address, aml_address)); | ||
217 | } | 216 | } |
218 | 217 | ||
219 | *in_aml_address = (u8 *) aml_address; | 218 | *in_aml_address = ACPI_CAST_PTR(u8, aml_address); |
220 | return_ACPI_STATUS(status); | 219 | return_ACPI_STATUS(status); |
221 | } | 220 | } |
222 | 221 | ||
@@ -412,8 +411,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, | |||
412 | if (AE_CTRL_PENDING == status && has_prefix) { | 411 | if (AE_CTRL_PENDING == status && has_prefix) { |
413 | /* Ran out of segments after processing a prefix */ | 412 | /* Ran out of segments after processing a prefix */ |
414 | 413 | ||
415 | ACPI_REPORT_ERROR(("ex_do_name: Malformed Name at %p\n", | 414 | ACPI_REPORT_ERROR(("Malformed Name at %p\n", name_string)); |
416 | name_string)); | ||
417 | status = AE_AML_BAD_NAME; | 415 | status = AE_AML_BAD_NAME; |
418 | } | 416 | } |
419 | 417 | ||
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 97e34542f5e4..bc8837ecb716 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -111,7 +111,8 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) | |||
111 | 111 | ||
112 | default: /* Unknown opcode */ | 112 | default: /* Unknown opcode */ |
113 | 113 | ||
114 | ACPI_REPORT_ERROR(("acpi_ex_opcode_0A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 114 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
115 | walk_state->opcode)); | ||
115 | status = AE_AML_BAD_OPCODE; | 116 | status = AE_AML_BAD_OPCODE; |
116 | break; | 117 | break; |
117 | } | 118 | } |
@@ -188,7 +189,8 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state) | |||
188 | 189 | ||
189 | default: /* Unknown opcode */ | 190 | default: /* Unknown opcode */ |
190 | 191 | ||
191 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 192 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
193 | walk_state->opcode)); | ||
192 | status = AE_AML_BAD_OPCODE; | 194 | status = AE_AML_BAD_OPCODE; |
193 | break; | 195 | break; |
194 | } | 196 | } |
@@ -227,7 +229,8 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state) | |||
227 | 229 | ||
228 | default: /* Unknown opcode */ | 230 | default: /* Unknown opcode */ |
229 | 231 | ||
230 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_1T_0R: Unknown opcode %X\n", walk_state->opcode)); | 232 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
233 | walk_state->opcode)); | ||
231 | status = AE_AML_BAD_OPCODE; | 234 | status = AE_AML_BAD_OPCODE; |
232 | goto cleanup; | 235 | goto cleanup; |
233 | } | 236 | } |
@@ -346,9 +349,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
346 | /* Check the range of the digit */ | 349 | /* Check the range of the digit */ |
347 | 350 | ||
348 | if (temp32 > 9) { | 351 | if (temp32 > 9) { |
349 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 352 | ACPI_REPORT_ERROR(("BCD digit too large (not decimal): 0x%X\n", temp32)); |
350 | "BCD digit too large (not decimal): 0x%X\n", | ||
351 | temp32)); | ||
352 | 353 | ||
353 | status = AE_AML_NUMERIC_OVERFLOW; | 354 | status = AE_AML_NUMERIC_OVERFLOW; |
354 | goto cleanup; | 355 | goto cleanup; |
@@ -393,12 +394,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
393 | /* Overflow if there is any data left in Digit */ | 394 | /* Overflow if there is any data left in Digit */ |
394 | 395 | ||
395 | if (digit > 0) { | 396 | if (digit > 0) { |
396 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 397 | ACPI_REPORT_ERROR(("Integer too large to convert to BCD: %8.8X%8.8X\n", ACPI_FORMAT_UINT64(operand[0]->integer.value))); |
397 | "Integer too large to convert to BCD: %8.8X%8.8X\n", | ||
398 | ACPI_FORMAT_UINT64(operand | ||
399 | [0]-> | ||
400 | integer. | ||
401 | value))); | ||
402 | status = AE_AML_NUMERIC_OVERFLOW; | 398 | status = AE_AML_NUMERIC_OVERFLOW; |
403 | goto cleanup; | 399 | goto cleanup; |
404 | } | 400 | } |
@@ -525,15 +521,16 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
525 | 521 | ||
526 | /* These are two obsolete opcodes */ | 522 | /* These are two obsolete opcodes */ |
527 | 523 | ||
528 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 524 | ACPI_REPORT_ERROR(("%s is obsolete and not implemented\n", |
529 | "%s is obsolete and not implemented\n", | 525 | acpi_ps_get_opcode_name(walk_state-> |
530 | acpi_ps_get_opcode_name(walk_state->opcode))); | 526 | opcode))); |
531 | status = AE_SUPPORT; | 527 | status = AE_SUPPORT; |
532 | goto cleanup; | 528 | goto cleanup; |
533 | 529 | ||
534 | default: /* Unknown opcode */ | 530 | default: /* Unknown opcode */ |
535 | 531 | ||
536 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_1T_1R: Unknown opcode %X\n", walk_state->opcode)); | 532 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
533 | walk_state->opcode)); | ||
537 | status = AE_AML_BAD_OPCODE; | 534 | status = AE_AML_BAD_OPCODE; |
538 | goto cleanup; | 535 | goto cleanup; |
539 | } | 536 | } |
@@ -639,11 +636,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
639 | acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, | 636 | acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, |
640 | walk_state); | 637 | walk_state); |
641 | if (ACPI_FAILURE(status)) { | 638 | if (ACPI_FAILURE(status)) { |
642 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 639 | ACPI_REPORT_ERROR(("%s: bad operand(s) %s\n", |
643 | "%s: bad operand(s) %s\n", | 640 | acpi_ps_get_opcode_name(walk_state-> |
644 | acpi_ps_get_opcode_name(walk_state-> | 641 | opcode), |
645 | opcode), | 642 | acpi_format_exception(status))); |
646 | acpi_format_exception(status))); | ||
647 | 643 | ||
648 | goto cleanup; | 644 | goto cleanup; |
649 | } | 645 | } |
@@ -742,9 +738,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
742 | break; | 738 | break; |
743 | 739 | ||
744 | default: | 740 | default: |
745 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 741 | ACPI_REPORT_ERROR(("Operand is not Buf/Int/Str/Pkg - found type %s\n", acpi_ut_get_type_name(type))); |
746 | "size_of - Operand is not Buf/Int/Str/Pkg - found type %s\n", | ||
747 | acpi_ut_get_type_name(type))); | ||
748 | status = AE_AML_OPERAND_TYPE; | 742 | status = AE_AML_OPERAND_TYPE; |
749 | goto cleanup; | 743 | goto cleanup; |
750 | } | 744 | } |
@@ -941,11 +935,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
941 | 935 | ||
942 | default: | 936 | default: |
943 | 937 | ||
944 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 938 | ACPI_REPORT_ERROR(("Unknown Index target_type %X in obj %p\n", operand[0]->reference.target_type, operand[0])); |
945 | "Unknown Index target_type %X in obj %p\n", | ||
946 | operand[0]->reference. | ||
947 | target_type, | ||
948 | operand[0])); | ||
949 | status = AE_AML_OPERAND_TYPE; | 939 | status = AE_AML_OPERAND_TYPE; |
950 | goto cleanup; | 940 | goto cleanup; |
951 | } | 941 | } |
@@ -971,11 +961,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
971 | break; | 961 | break; |
972 | 962 | ||
973 | default: | 963 | default: |
974 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 964 | ACPI_REPORT_ERROR(("Unknown opcode in ref(%p) - %X\n", operand[0], operand[0]->reference.opcode)); |
975 | "Unknown opcode in ref(%p) - %X\n", | ||
976 | operand[0], | ||
977 | operand[0]->reference. | ||
978 | opcode)); | ||
979 | 965 | ||
980 | status = AE_TYPE; | 966 | status = AE_TYPE; |
981 | goto cleanup; | 967 | goto cleanup; |
@@ -985,7 +971,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
985 | 971 | ||
986 | default: | 972 | default: |
987 | 973 | ||
988 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 974 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
975 | walk_state->opcode)); | ||
989 | status = AE_AML_BAD_OPCODE; | 976 | status = AE_AML_BAD_OPCODE; |
990 | goto cleanup; | 977 | goto cleanup; |
991 | } | 978 | } |
diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c index 8d70c6beef00..7c59dda40946 100644 --- a/drivers/acpi/executer/exoparg2.c +++ b/drivers/acpi/executer/exoparg2.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -111,9 +111,7 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) | |||
111 | /* Are notifies allowed on this object? */ | 111 | /* Are notifies allowed on this object? */ |
112 | 112 | ||
113 | if (!acpi_ev_is_notify_object(node)) { | 113 | if (!acpi_ev_is_notify_object(node)) { |
114 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 114 | ACPI_REPORT_ERROR(("Unexpected notify object type [%s]\n", acpi_ut_get_type_name(node->type))); |
115 | "Unexpected notify object type [%s]\n", | ||
116 | acpi_ut_get_type_name(node->type))); | ||
117 | 115 | ||
118 | status = AE_AML_OPERAND_TYPE; | 116 | status = AE_AML_OPERAND_TYPE; |
119 | break; | 117 | break; |
@@ -157,7 +155,8 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) | |||
157 | 155 | ||
158 | default: | 156 | default: |
159 | 157 | ||
160 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 158 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
159 | walk_state->opcode)); | ||
161 | status = AE_AML_BAD_OPCODE; | 160 | status = AE_AML_BAD_OPCODE; |
162 | } | 161 | } |
163 | 162 | ||
@@ -221,7 +220,8 @@ acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state) | |||
221 | 220 | ||
222 | default: | 221 | default: |
223 | 222 | ||
224 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_2T_1R: Unknown opcode %X\n", walk_state->opcode)); | 223 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
224 | walk_state->opcode)); | ||
225 | status = AE_AML_BAD_OPCODE; | 225 | status = AE_AML_BAD_OPCODE; |
226 | goto cleanup; | 226 | goto cleanup; |
227 | } | 227 | } |
@@ -344,10 +344,6 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
344 | (length < operand[1]->integer.value) && | 344 | (length < operand[1]->integer.value) && |
345 | (operand[0]->buffer.pointer[length])) { | 345 | (operand[0]->buffer.pointer[length])) { |
346 | length++; | 346 | length++; |
347 | if (length > ACPI_MAX_STRING_CONVERSION) { | ||
348 | status = AE_AML_STRING_LIMIT; | ||
349 | goto cleanup; | ||
350 | } | ||
351 | } | 347 | } |
352 | 348 | ||
353 | /* Allocate a new string object */ | 349 | /* Allocate a new string object */ |
@@ -358,8 +354,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
358 | goto cleanup; | 354 | goto cleanup; |
359 | } | 355 | } |
360 | 356 | ||
361 | /* Copy the raw buffer data with no transform. NULL terminated already */ | 357 | /* |
362 | 358 | * Copy the raw buffer data with no transform. | |
359 | * (NULL terminated already) | ||
360 | */ | ||
363 | ACPI_MEMCPY(return_desc->string.pointer, | 361 | ACPI_MEMCPY(return_desc->string.pointer, |
364 | operand[0]->buffer.pointer, length); | 362 | operand[0]->buffer.pointer, length); |
365 | break; | 363 | break; |
@@ -391,10 +389,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
391 | /* Object to be indexed is a Package */ | 389 | /* Object to be indexed is a Package */ |
392 | 390 | ||
393 | if (index >= operand[0]->package.count) { | 391 | if (index >= operand[0]->package.count) { |
394 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 392 | ACPI_REPORT_ERROR(("Index value (%X%8.8X) beyond package end (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->package.count)); |
395 | "Index value (%X%8.8X) beyond package end (%X)\n", | ||
396 | ACPI_FORMAT_UINT64(index), | ||
397 | operand[0]->package.count)); | ||
398 | status = AE_AML_PACKAGE_LIMIT; | 393 | status = AE_AML_PACKAGE_LIMIT; |
399 | goto cleanup; | 394 | goto cleanup; |
400 | } | 395 | } |
@@ -407,10 +402,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
407 | /* Object to be indexed is a Buffer/String */ | 402 | /* Object to be indexed is a Buffer/String */ |
408 | 403 | ||
409 | if (index >= operand[0]->buffer.length) { | 404 | if (index >= operand[0]->buffer.length) { |
410 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 405 | ACPI_REPORT_ERROR(("Index value (%X%8.8X) beyond end of buffer (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->buffer.length)); |
411 | "Index value (%X%8.8X) beyond end of buffer (%X)\n", | ||
412 | ACPI_FORMAT_UINT64(index), | ||
413 | operand[0]->buffer.length)); | ||
414 | status = AE_AML_BUFFER_LIMIT; | 406 | status = AE_AML_BUFFER_LIMIT; |
415 | goto cleanup; | 407 | goto cleanup; |
416 | } | 408 | } |
@@ -442,7 +434,8 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
442 | 434 | ||
443 | default: | 435 | default: |
444 | 436 | ||
445 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_1T_1R: Unknown opcode %X\n", walk_state->opcode)); | 437 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
438 | walk_state->opcode)); | ||
446 | status = AE_AML_BAD_OPCODE; | 439 | status = AE_AML_BAD_OPCODE; |
447 | break; | 440 | break; |
448 | } | 441 | } |
@@ -546,7 +539,8 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state) | |||
546 | 539 | ||
547 | default: | 540 | default: |
548 | 541 | ||
549 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 542 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
543 | walk_state->opcode)); | ||
550 | status = AE_AML_BAD_OPCODE; | 544 | status = AE_AML_BAD_OPCODE; |
551 | goto cleanup; | 545 | goto cleanup; |
552 | } | 546 | } |
diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c index 483365777670..a979b338a491 100644 --- a/drivers/acpi/executer/exoparg3.c +++ b/drivers/acpi/executer/exoparg3.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -119,7 +119,8 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) | |||
119 | 119 | ||
120 | default: | 120 | default: |
121 | 121 | ||
122 | ACPI_REPORT_ERROR(("acpi_ex_opcode_3A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 122 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
123 | walk_state->opcode)); | ||
123 | status = AE_AML_BAD_OPCODE; | 124 | status = AE_AML_BAD_OPCODE; |
124 | goto cleanup; | 125 | goto cleanup; |
125 | } | 126 | } |
@@ -223,8 +224,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) | |||
223 | goto cleanup; | 224 | goto cleanup; |
224 | } | 225 | } |
225 | 226 | ||
226 | if (length > 0) { | 227 | if (buffer) { |
227 | /* Copy the portion requested */ | 228 | /* We have a buffer, copy the portion requested */ |
228 | 229 | ||
229 | ACPI_MEMCPY(buffer, operand[0]->string.pointer + index, | 230 | ACPI_MEMCPY(buffer, operand[0]->string.pointer + index, |
230 | length); | 231 | length); |
@@ -242,7 +243,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) | |||
242 | 243 | ||
243 | default: | 244 | default: |
244 | 245 | ||
245 | ACPI_REPORT_ERROR(("acpi_ex_opcode_3A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 246 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
247 | walk_state->opcode)); | ||
246 | status = AE_AML_BAD_OPCODE; | 248 | status = AE_AML_BAD_OPCODE; |
247 | goto cleanup; | 249 | goto cleanup; |
248 | } | 250 | } |
diff --git a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c index 5dee77139576..05e7f9b67f29 100644 --- a/drivers/acpi/executer/exoparg6.c +++ b/drivers/acpi/executer/exoparg6.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -234,8 +234,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
234 | 234 | ||
235 | if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) || | 235 | if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) || |
236 | (operand[3]->integer.value > MAX_MATCH_OPERATOR)) { | 236 | (operand[3]->integer.value > MAX_MATCH_OPERATOR)) { |
237 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 237 | ACPI_REPORT_ERROR(("Match operator out of range\n")); |
238 | "Match operator out of range\n")); | ||
239 | status = AE_AML_OPERAND_VALUE; | 238 | status = AE_AML_OPERAND_VALUE; |
240 | goto cleanup; | 239 | goto cleanup; |
241 | } | 240 | } |
@@ -244,10 +243,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
244 | 243 | ||
245 | index = operand[5]->integer.value; | 244 | index = operand[5]->integer.value; |
246 | if (index >= operand[0]->package.count) { | 245 | if (index >= operand[0]->package.count) { |
247 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 246 | ACPI_REPORT_ERROR(("Index (%X%8.8X) beyond package end (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->package.count)); |
248 | "Index (%X%8.8X) beyond package end (%X)\n", | ||
249 | ACPI_FORMAT_UINT64(index), | ||
250 | operand[0]->package.count)); | ||
251 | status = AE_AML_PACKAGE_LIMIT; | 247 | status = AE_AML_PACKAGE_LIMIT; |
252 | goto cleanup; | 248 | goto cleanup; |
253 | } | 249 | } |
@@ -316,7 +312,8 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
316 | 312 | ||
317 | default: | 313 | default: |
318 | 314 | ||
319 | ACPI_REPORT_ERROR(("acpi_ex_opcode_6A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 315 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", |
316 | walk_state->opcode)); | ||
320 | status = AE_AML_BAD_OPCODE; | 317 | status = AE_AML_BAD_OPCODE; |
321 | goto cleanup; | 318 | goto cleanup; |
322 | } | 319 | } |
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c index 7476c363e407..3bde780c94cf 100644 --- a/drivers/acpi/executer/exprep.c +++ b/drivers/acpi/executer/exprep.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -274,9 +274,8 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, | |||
274 | default: | 274 | default: |
275 | /* Invalid field access type */ | 275 | /* Invalid field access type */ |
276 | 276 | ||
277 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 277 | ACPI_REPORT_ERROR(("Unknown field access type %X\n", access)); |
278 | "Unknown field access type %X\n", access)); | 278 | return_UINT32(0); |
279 | return_VALUE(0); | ||
280 | } | 279 | } |
281 | 280 | ||
282 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { | 281 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { |
@@ -289,7 +288,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, | |||
289 | } | 288 | } |
290 | 289 | ||
291 | *return_byte_alignment = byte_alignment; | 290 | *return_byte_alignment = byte_alignment; |
292 | return_VALUE(bit_length); | 291 | return_UINT32(bit_length); |
293 | } | 292 | } |
294 | 293 | ||
295 | /******************************************************************************* | 294 | /******************************************************************************* |
@@ -422,15 +421,13 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
422 | 421 | ||
423 | if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { | 422 | if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { |
424 | if (!info->region_node) { | 423 | if (!info->region_node) { |
425 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Null region_node\n")); | 424 | ACPI_REPORT_ERROR(("Null region_node\n")); |
426 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 425 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
427 | } | 426 | } |
428 | 427 | ||
429 | type = acpi_ns_get_type(info->region_node); | 428 | type = acpi_ns_get_type(info->region_node); |
430 | if (type != ACPI_TYPE_REGION) { | 429 | if (type != ACPI_TYPE_REGION) { |
431 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 430 | ACPI_REPORT_ERROR(("Needed Region, found type %X (%s)\n", type, acpi_ut_get_type_name(type))); |
432 | "Needed Region, found type %X (%s)\n", | ||
433 | type, acpi_ut_get_type_name(type))); | ||
434 | 431 | ||
435 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 432 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
436 | } | 433 | } |
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index 9a2f5bea3afe..82983575cca6 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -77,7 +77,7 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
77 | struct acpi_mem_space_context *mem_info = region_context; | 77 | struct acpi_mem_space_context *mem_info = region_context; |
78 | u32 length; | 78 | u32 length; |
79 | acpi_size window_size; | 79 | acpi_size window_size; |
80 | #ifndef ACPI_MISALIGNED_TRANSFERS | 80 | #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED |
81 | u32 remainder; | 81 | u32 remainder; |
82 | #endif | 82 | #endif |
83 | 83 | ||
@@ -103,13 +103,12 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
103 | break; | 103 | break; |
104 | 104 | ||
105 | default: | 105 | default: |
106 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 106 | ACPI_REPORT_ERROR(("Invalid system_memory width %d\n", |
107 | "Invalid system_memory width %d\n", | 107 | bit_width)); |
108 | bit_width)); | ||
109 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 108 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
110 | } | 109 | } |
111 | 110 | ||
112 | #ifndef ACPI_MISALIGNED_TRANSFERS | 111 | #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED |
113 | /* | 112 | /* |
114 | * Hardware does not support non-aligned data transfers, we must verify | 113 | * Hardware does not support non-aligned data transfers, we must verify |
115 | * the request. | 114 | * the request. |
@@ -159,10 +158,7 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
159 | (void **)&mem_info-> | 158 | (void **)&mem_info-> |
160 | mapped_logical_address); | 159 | mapped_logical_address); |
161 | if (ACPI_FAILURE(status)) { | 160 | if (ACPI_FAILURE(status)) { |
162 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 161 | ACPI_REPORT_ERROR(("Could not map memory at %8.8X%8.8X, size %X\n", ACPI_FORMAT_UINT64(address), (u32) window_size)); |
163 | "Could not map memory at %8.8X%8.8X, size %X\n", | ||
164 | ACPI_FORMAT_UINT64(address), | ||
165 | (u32) window_size)); | ||
166 | mem_info->mapped_length = 0; | 162 | mem_info->mapped_length = 0; |
167 | return_ACPI_STATUS(status); | 163 | return_ACPI_STATUS(status); |
168 | } | 164 | } |
@@ -199,20 +195,20 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
199 | *value = 0; | 195 | *value = 0; |
200 | switch (bit_width) { | 196 | switch (bit_width) { |
201 | case 8: | 197 | case 8: |
202 | *value = (acpi_integer) * ((u8 *) logical_addr_ptr); | 198 | *value = (acpi_integer) ACPI_GET8(logical_addr_ptr); |
203 | break; | 199 | break; |
204 | 200 | ||
205 | case 16: | 201 | case 16: |
206 | *value = (acpi_integer) * ((u16 *) logical_addr_ptr); | 202 | *value = (acpi_integer) ACPI_GET16(logical_addr_ptr); |
207 | break; | 203 | break; |
208 | 204 | ||
209 | case 32: | 205 | case 32: |
210 | *value = (acpi_integer) * ((u32 *) logical_addr_ptr); | 206 | *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); |
211 | break; | 207 | break; |
212 | 208 | ||
213 | #if ACPI_MACHINE_WIDTH != 16 | 209 | #if ACPI_MACHINE_WIDTH != 16 |
214 | case 64: | 210 | case 64: |
215 | *value = (acpi_integer) * ((u64 *) logical_addr_ptr); | 211 | *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); |
216 | break; | 212 | break; |
217 | #endif | 213 | #endif |
218 | default: | 214 | default: |
@@ -225,20 +221,20 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
225 | 221 | ||
226 | switch (bit_width) { | 222 | switch (bit_width) { |
227 | case 8: | 223 | case 8: |
228 | *(u8 *) logical_addr_ptr = (u8) * value; | 224 | ACPI_SET8(logical_addr_ptr) = (u8) * value; |
229 | break; | 225 | break; |
230 | 226 | ||
231 | case 16: | 227 | case 16: |
232 | *(u16 *) logical_addr_ptr = (u16) * value; | 228 | ACPI_SET16(logical_addr_ptr) = (u16) * value; |
233 | break; | 229 | break; |
234 | 230 | ||
235 | case 32: | 231 | case 32: |
236 | *(u32 *) logical_addr_ptr = (u32) * value; | 232 | ACPI_SET32(logical_addr_ptr) = (u32) * value; |
237 | break; | 233 | break; |
238 | 234 | ||
239 | #if ACPI_MACHINE_WIDTH != 16 | 235 | #if ACPI_MACHINE_WIDTH != 16 |
240 | case 64: | 236 | case 64: |
241 | *(u64 *) logical_addr_ptr = (u64) * value; | 237 | ACPI_SET64(logical_addr_ptr) = (u64) * value; |
242 | break; | 238 | break; |
243 | #endif | 239 | #endif |
244 | 240 | ||
diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c index ff5d8f97e8eb..a5cca7eda210 100644 --- a/drivers/acpi/executer/exresnte.c +++ b/drivers/acpi/executer/exresnte.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -122,8 +122,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
122 | } | 122 | } |
123 | 123 | ||
124 | if (!source_desc) { | 124 | if (!source_desc) { |
125 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 125 | ACPI_REPORT_ERROR(("No object attached to node %p\n", node)); |
126 | "No object attached to node %p\n", node)); | ||
127 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 126 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
128 | } | 127 | } |
129 | 128 | ||
@@ -135,10 +134,9 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
135 | case ACPI_TYPE_PACKAGE: | 134 | case ACPI_TYPE_PACKAGE: |
136 | 135 | ||
137 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) { | 136 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) { |
138 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 137 | ACPI_REPORT_ERROR(("Object not a Package, type %s\n", |
139 | "Object not a Package, type %s\n", | 138 | acpi_ut_get_object_type_name |
140 | acpi_ut_get_object_type_name | 139 | (source_desc))); |
141 | (source_desc))); | ||
142 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 140 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
143 | } | 141 | } |
144 | 142 | ||
@@ -154,10 +152,9 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
154 | case ACPI_TYPE_BUFFER: | 152 | case ACPI_TYPE_BUFFER: |
155 | 153 | ||
156 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { | 154 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { |
157 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 155 | ACPI_REPORT_ERROR(("Object not a Buffer, type %s\n", |
158 | "Object not a Buffer, type %s\n", | 156 | acpi_ut_get_object_type_name |
159 | acpi_ut_get_object_type_name | 157 | (source_desc))); |
160 | (source_desc))); | ||
161 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 158 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
162 | } | 159 | } |
163 | 160 | ||
@@ -173,10 +170,9 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
173 | case ACPI_TYPE_STRING: | 170 | case ACPI_TYPE_STRING: |
174 | 171 | ||
175 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) { | 172 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) { |
176 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 173 | ACPI_REPORT_ERROR(("Object not a String, type %s\n", |
177 | "Object not a String, type %s\n", | 174 | acpi_ut_get_object_type_name |
178 | acpi_ut_get_object_type_name | 175 | (source_desc))); |
179 | (source_desc))); | ||
180 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 176 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
181 | } | 177 | } |
182 | 178 | ||
@@ -189,10 +185,9 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
189 | case ACPI_TYPE_INTEGER: | 185 | case ACPI_TYPE_INTEGER: |
190 | 186 | ||
191 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) { | 187 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) { |
192 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 188 | ACPI_REPORT_ERROR(("Object not a Integer, type %s\n", |
193 | "Object not a Integer, type %s\n", | 189 | acpi_ut_get_object_type_name |
194 | acpi_ut_get_object_type_name | 190 | (source_desc))); |
195 | (source_desc))); | ||
196 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 191 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
197 | } | 192 | } |
198 | 193 | ||
@@ -236,9 +231,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
236 | 231 | ||
237 | case ACPI_TYPE_ANY: | 232 | case ACPI_TYPE_ANY: |
238 | 233 | ||
239 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 234 | ACPI_REPORT_ERROR(("Untyped entry %p, no attached object!\n", |
240 | "Untyped entry %p, no attached object!\n", | 235 | node)); |
241 | node)); | ||
242 | 236 | ||
243 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); /* Cannot be AE_TYPE */ | 237 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); /* Cannot be AE_TYPE */ |
244 | 238 | ||
@@ -257,12 +251,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
257 | default: | 251 | default: |
258 | /* No named references are allowed here */ | 252 | /* No named references are allowed here */ |
259 | 253 | ||
260 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 254 | ACPI_REPORT_ERROR(("Unsupported Reference opcode %X (%s)\n", source_desc->reference.opcode, acpi_ps_get_opcode_name(source_desc->reference.opcode))); |
261 | "Unsupported Reference opcode %X (%s)\n", | ||
262 | source_desc->reference.opcode, | ||
263 | acpi_ps_get_opcode_name(source_desc-> | ||
264 | reference. | ||
265 | opcode))); | ||
266 | 255 | ||
267 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 256 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
268 | } | 257 | } |
@@ -272,9 +261,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
272 | 261 | ||
273 | /* Default case is for unknown types */ | 262 | /* Default case is for unknown types */ |
274 | 263 | ||
275 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 264 | ACPI_REPORT_ERROR(("Node %p - Unknown object type %X\n", |
276 | "Node %p - Unknown object type %X\n", | 265 | node, entry_type)); |
277 | node, entry_type)); | ||
278 | 266 | ||
279 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 267 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
280 | 268 | ||
diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c index 97eecbd3242d..ae2d2da00844 100644 --- a/drivers/acpi/executer/exresolv.c +++ b/drivers/acpi/executer/exresolv.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -81,7 +81,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, | |||
81 | ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr); | 81 | ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr); |
82 | 82 | ||
83 | if (!stack_ptr || !*stack_ptr) { | 83 | if (!stack_ptr || !*stack_ptr) { |
84 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Internal - null pointer\n")); | 84 | ACPI_REPORT_ERROR(("Internal - null pointer\n")); |
85 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 85 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
86 | } | 86 | } |
87 | 87 | ||
@@ -97,8 +97,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, | |||
97 | } | 97 | } |
98 | 98 | ||
99 | if (!*stack_ptr) { | 99 | if (!*stack_ptr) { |
100 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 100 | ACPI_REPORT_ERROR(("Internal - null pointer\n")); |
101 | "Internal - null pointer\n")); | ||
102 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 101 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
103 | } | 102 | } |
104 | } | 103 | } |
@@ -228,9 +227,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
228 | * A NULL object descriptor means an unitialized element of | 227 | * A NULL object descriptor means an unitialized element of |
229 | * the package, can't dereference it | 228 | * the package, can't dereference it |
230 | */ | 229 | */ |
231 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 230 | ACPI_REPORT_ERROR(("Attempt to deref an Index to NULL pkg element Idx=%p\n", stack_desc)); |
232 | "Attempt to deref an Index to NULL pkg element Idx=%p\n", | ||
233 | stack_desc)); | ||
234 | status = AE_AML_UNINITIALIZED_ELEMENT; | 231 | status = AE_AML_UNINITIALIZED_ELEMENT; |
235 | } | 232 | } |
236 | break; | 233 | break; |
@@ -239,7 +236,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
239 | 236 | ||
240 | /* Invalid reference object */ | 237 | /* Invalid reference object */ |
241 | 238 | ||
242 | ACPI_REPORT_ERROR(("During resolve, Unknown target_type %X in Index/Reference obj %p\n", stack_desc->reference.target_type, stack_desc)); | 239 | ACPI_REPORT_ERROR(("Unknown target_type %X in Index/Reference obj %p\n", stack_desc->reference.target_type, stack_desc)); |
243 | status = AE_AML_INTERNAL; | 240 | status = AE_AML_INTERNAL; |
244 | break; | 241 | break; |
245 | } | 242 | } |
@@ -264,7 +261,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
264 | 261 | ||
265 | default: | 262 | default: |
266 | 263 | ||
267 | ACPI_REPORT_ERROR(("During resolve, Unknown Reference opcode %X (%s) in %p\n", opcode, acpi_ps_get_opcode_name(opcode), stack_desc)); | 264 | ACPI_REPORT_ERROR(("Unknown Reference opcode %X (%s) in %p\n", opcode, acpi_ps_get_opcode_name(opcode), stack_desc)); |
268 | status = AE_AML_INTERNAL; | 265 | status = AE_AML_INTERNAL; |
269 | break; | 266 | break; |
270 | } | 267 | } |
@@ -386,7 +383,10 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
386 | 383 | ||
387 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != | 384 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != |
388 | ACPI_DESC_TYPE_NAMED) { | 385 | ACPI_DESC_TYPE_NAMED) { |
389 | ACPI_REPORT_ERROR(("acpi_ex_resolve_multiple: Not a NS node %p [%s]\n", node, acpi_ut_get_descriptor_name(node))); | 386 | ACPI_REPORT_ERROR(("Not a NS node %p [%s]\n", |
387 | node, | ||
388 | acpi_ut_get_descriptor_name | ||
389 | (node))); | ||
390 | return_ACPI_STATUS(AE_AML_INTERNAL); | 390 | return_ACPI_STATUS(AE_AML_INTERNAL); |
391 | } | 391 | } |
392 | 392 | ||
@@ -442,7 +442,10 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
442 | 442 | ||
443 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != | 443 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != |
444 | ACPI_DESC_TYPE_NAMED) { | 444 | ACPI_DESC_TYPE_NAMED) { |
445 | ACPI_REPORT_ERROR(("acpi_ex_resolve_multiple: Not a NS node %p [%s]\n", node, acpi_ut_get_descriptor_name(node))); | 445 | ACPI_REPORT_ERROR(("Not a NS node %p [%s]\n", |
446 | node, | ||
447 | acpi_ut_get_descriptor_name | ||
448 | (node))); | ||
446 | return_ACPI_STATUS(AE_AML_INTERNAL); | 449 | return_ACPI_STATUS(AE_AML_INTERNAL); |
447 | } | 450 | } |
448 | 451 | ||
@@ -511,7 +514,8 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
511 | 514 | ||
512 | default: | 515 | default: |
513 | 516 | ||
514 | ACPI_REPORT_ERROR(("acpi_ex_resolve_multiple: Unknown Reference subtype %X\n", obj_desc->reference.opcode)); | 517 | ACPI_REPORT_ERROR(("Unknown Reference subtype %X\n", |
518 | obj_desc->reference.opcode)); | ||
515 | return_ACPI_STATUS(AE_AML_INTERNAL); | 519 | return_ACPI_STATUS(AE_AML_INTERNAL); |
516 | } | 520 | } |
517 | } | 521 | } |
diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c index ff064e79ab90..804faebf825c 100644 --- a/drivers/acpi/executer/exresop.c +++ b/drivers/acpi/executer/exresop.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -73,7 +73,7 @@ static acpi_status | |||
73 | acpi_ex_check_object_type(acpi_object_type type_needed, | 73 | acpi_ex_check_object_type(acpi_object_type type_needed, |
74 | acpi_object_type this_type, void *object) | 74 | acpi_object_type this_type, void *object) |
75 | { | 75 | { |
76 | ACPI_FUNCTION_NAME("ex_check_object_type"); | 76 | ACPI_FUNCTION_ENTRY(); |
77 | 77 | ||
78 | if (type_needed == ACPI_TYPE_ANY) { | 78 | if (type_needed == ACPI_TYPE_ANY) { |
79 | /* All types OK, so we don't perform any typechecks */ | 79 | /* All types OK, so we don't perform any typechecks */ |
@@ -95,10 +95,9 @@ acpi_ex_check_object_type(acpi_object_type type_needed, | |||
95 | } | 95 | } |
96 | 96 | ||
97 | if (type_needed != this_type) { | 97 | if (type_needed != this_type) { |
98 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 98 | ACPI_REPORT_ERROR(("Needed type [%s], found [%s] %p\n", |
99 | "Needed [%s], found [%s] %p\n", | 99 | acpi_ut_get_type_name(type_needed), |
100 | acpi_ut_get_type_name(type_needed), | 100 | acpi_ut_get_type_name(this_type), object)); |
101 | acpi_ut_get_type_name(this_type), object)); | ||
102 | 101 | ||
103 | return (AE_AML_OPERAND_TYPE); | 102 | return (AE_AML_OPERAND_TYPE); |
104 | } | 103 | } |
@@ -151,13 +150,13 @@ acpi_ex_resolve_operands(u16 opcode, | |||
151 | 150 | ||
152 | arg_types = op_info->runtime_args; | 151 | arg_types = op_info->runtime_args; |
153 | if (arg_types == ARGI_INVALID_OPCODE) { | 152 | if (arg_types == ARGI_INVALID_OPCODE) { |
154 | ACPI_REPORT_ERROR(("resolve_operands: %X is not a valid AML opcode\n", opcode)); | 153 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", opcode)); |
155 | 154 | ||
156 | return_ACPI_STATUS(AE_AML_INTERNAL); | 155 | return_ACPI_STATUS(AE_AML_INTERNAL); |
157 | } | 156 | } |
158 | 157 | ||
159 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 158 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
160 | "Opcode %X [%s] required_operand_types=%8.8X \n", | 159 | "Opcode %X [%s] required_operand_types=%8.8X\n", |
161 | opcode, op_info->name, arg_types)); | 160 | opcode, op_info->name, arg_types)); |
162 | 161 | ||
163 | /* | 162 | /* |
@@ -169,7 +168,8 @@ acpi_ex_resolve_operands(u16 opcode, | |||
169 | */ | 168 | */ |
170 | while (GET_CURRENT_ARG_TYPE(arg_types)) { | 169 | while (GET_CURRENT_ARG_TYPE(arg_types)) { |
171 | if (!stack_ptr || !*stack_ptr) { | 170 | if (!stack_ptr || !*stack_ptr) { |
172 | ACPI_REPORT_ERROR(("resolve_operands: Null stack entry at %p\n", stack_ptr)); | 171 | ACPI_REPORT_ERROR(("Null stack entry at %p\n", |
172 | stack_ptr)); | ||
173 | 173 | ||
174 | return_ACPI_STATUS(AE_AML_INTERNAL); | 174 | return_ACPI_STATUS(AE_AML_INTERNAL); |
175 | } | 175 | } |
@@ -198,9 +198,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
198 | /* Check for bad acpi_object_type */ | 198 | /* Check for bad acpi_object_type */ |
199 | 199 | ||
200 | if (!acpi_ut_valid_object_type(object_type)) { | 200 | if (!acpi_ut_valid_object_type(object_type)) { |
201 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 201 | ACPI_REPORT_ERROR(("Bad operand object type [%X]\n", object_type)); |
202 | "Bad operand object type [%X]\n", | ||
203 | object_type)); | ||
204 | 202 | ||
205 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 203 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
206 | } | 204 | } |
@@ -238,13 +236,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
238 | break; | 236 | break; |
239 | 237 | ||
240 | default: | 238 | default: |
241 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 239 | ACPI_REPORT_ERROR(("Operand is a Reference, Unknown Reference Opcode: %X\n", obj_desc->reference.opcode)); |
242 | "Operand is a Reference, Unknown Reference Opcode %X [%s]\n", | ||
243 | obj_desc->reference. | ||
244 | opcode, | ||
245 | (acpi_ps_get_opcode_info | ||
246 | (obj_desc->reference. | ||
247 | opcode))->name)); | ||
248 | 240 | ||
249 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 241 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
250 | } | 242 | } |
@@ -255,11 +247,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
255 | 247 | ||
256 | /* Invalid descriptor */ | 248 | /* Invalid descriptor */ |
257 | 249 | ||
258 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 250 | ACPI_REPORT_ERROR(("Invalid descriptor %p [%s]\n", |
259 | "Invalid descriptor %p [%s]\n", | 251 | obj_desc, |
260 | obj_desc, | 252 | acpi_ut_get_descriptor_name |
261 | acpi_ut_get_descriptor_name | 253 | (obj_desc))); |
262 | (obj_desc))); | ||
263 | 254 | ||
264 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 255 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
265 | } | 256 | } |
@@ -417,11 +408,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
417 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); | 408 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); |
418 | if (ACPI_FAILURE(status)) { | 409 | if (ACPI_FAILURE(status)) { |
419 | if (status == AE_TYPE) { | 410 | if (status == AE_TYPE) { |
420 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 411 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
421 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
422 | acpi_ut_get_object_type_name | ||
423 | (obj_desc), | ||
424 | obj_desc)); | ||
425 | 412 | ||
426 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 413 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
427 | } | 414 | } |
@@ -444,11 +431,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
444 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); | 431 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); |
445 | if (ACPI_FAILURE(status)) { | 432 | if (ACPI_FAILURE(status)) { |
446 | if (status == AE_TYPE) { | 433 | if (status == AE_TYPE) { |
447 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 434 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
448 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
449 | acpi_ut_get_object_type_name | ||
450 | (obj_desc), | ||
451 | obj_desc)); | ||
452 | 435 | ||
453 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 436 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
454 | } | 437 | } |
@@ -472,11 +455,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
472 | ACPI_IMPLICIT_CONVERT_HEX); | 455 | ACPI_IMPLICIT_CONVERT_HEX); |
473 | if (ACPI_FAILURE(status)) { | 456 | if (ACPI_FAILURE(status)) { |
474 | if (status == AE_TYPE) { | 457 | if (status == AE_TYPE) { |
475 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 458 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
476 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
477 | acpi_ut_get_object_type_name | ||
478 | (obj_desc), | ||
479 | obj_desc)); | ||
480 | 459 | ||
481 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 460 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
482 | } | 461 | } |
@@ -502,10 +481,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
502 | break; | 481 | break; |
503 | 482 | ||
504 | default: | 483 | default: |
505 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 484 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
506 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
507 | acpi_ut_get_object_type_name | ||
508 | (obj_desc), obj_desc)); | ||
509 | 485 | ||
510 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 486 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
511 | } | 487 | } |
@@ -539,10 +515,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
539 | break; | 515 | break; |
540 | 516 | ||
541 | default: | 517 | default: |
542 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 518 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
543 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
544 | acpi_ut_get_object_type_name | ||
545 | (obj_desc), obj_desc)); | ||
546 | 519 | ||
547 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 520 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
548 | } | 521 | } |
@@ -566,10 +539,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
566 | break; | 539 | break; |
567 | 540 | ||
568 | default: | 541 | default: |
569 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 542 | ACPI_REPORT_ERROR(("Needed [Buffer/String/Package/Reference], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
570 | "Needed [Buffer/String/Package/Reference], found [%s] %p\n", | ||
571 | acpi_ut_get_object_type_name | ||
572 | (obj_desc), obj_desc)); | ||
573 | 543 | ||
574 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 544 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
575 | } | 545 | } |
@@ -588,10 +558,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
588 | break; | 558 | break; |
589 | 559 | ||
590 | default: | 560 | default: |
591 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 561 | ACPI_REPORT_ERROR(("Needed [Buffer/String/Package], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
592 | "Needed [Buffer/String/Package], found [%s] %p\n", | ||
593 | acpi_ut_get_object_type_name | ||
594 | (obj_desc), obj_desc)); | ||
595 | 562 | ||
596 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 563 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
597 | } | 564 | } |
@@ -611,10 +578,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
611 | break; | 578 | break; |
612 | 579 | ||
613 | default: | 580 | default: |
614 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 581 | ACPI_REPORT_ERROR(("Needed [Region/region_field], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
615 | "Needed [Region/region_field], found [%s] %p\n", | ||
616 | acpi_ut_get_object_type_name | ||
617 | (obj_desc), obj_desc)); | ||
618 | 582 | ||
619 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 583 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
620 | } | 584 | } |
@@ -656,10 +620,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
656 | break; | 620 | break; |
657 | } | 621 | } |
658 | 622 | ||
659 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 623 | ACPI_REPORT_ERROR(("Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
660 | "Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", | ||
661 | acpi_ut_get_object_type_name | ||
662 | (obj_desc), obj_desc)); | ||
663 | 624 | ||
664 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 625 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
665 | } | 626 | } |
@@ -669,9 +630,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
669 | 630 | ||
670 | /* Unknown type */ | 631 | /* Unknown type */ |
671 | 632 | ||
672 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 633 | ACPI_REPORT_ERROR(("Internal - Unknown ARGI (required operand) type %X\n", this_arg_type)); |
673 | "Internal - Unknown ARGI (required operand) type %X\n", | ||
674 | this_arg_type)); | ||
675 | 634 | ||
676 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 635 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
677 | } | 636 | } |
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index a7d8eea305c2..202ebe1eb957 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -250,7 +250,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
250 | /* Validate parameters */ | 250 | /* Validate parameters */ |
251 | 251 | ||
252 | if (!source_desc || !dest_desc) { | 252 | if (!source_desc || !dest_desc) { |
253 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Null parameter\n")); | 253 | ACPI_REPORT_ERROR(("Null parameter\n")); |
254 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 254 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
255 | } | 255 | } |
256 | 256 | ||
@@ -290,10 +290,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
290 | 290 | ||
291 | /* Destination is not a Reference object */ | 291 | /* Destination is not a Reference object */ |
292 | 292 | ||
293 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 293 | ACPI_REPORT_ERROR(("Target is not a Reference or Constant object - %s [%p]\n", acpi_ut_get_object_type_name(dest_desc), dest_desc)); |
294 | "Target is not a Reference or Constant object - %s [%p]\n", | ||
295 | acpi_ut_get_object_type_name(dest_desc), | ||
296 | dest_desc)); | ||
297 | 294 | ||
298 | ACPI_DUMP_STACK_ENTRY(source_desc); | 295 | ACPI_DUMP_STACK_ENTRY(source_desc); |
299 | ACPI_DUMP_STACK_ENTRY(dest_desc); | 296 | ACPI_DUMP_STACK_ENTRY(dest_desc); |
@@ -360,7 +357,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
360 | 357 | ||
361 | default: | 358 | default: |
362 | 359 | ||
363 | ACPI_REPORT_ERROR(("ex_store: Unknown Reference opcode %X\n", | 360 | ACPI_REPORT_ERROR(("Unknown Reference opcode %X\n", |
364 | ref_desc->reference.opcode)); | 361 | ref_desc->reference.opcode)); |
365 | ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR); | 362 | ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR); |
366 | 363 | ||
@@ -490,10 +487,7 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, | |||
490 | 487 | ||
491 | /* All other types are invalid */ | 488 | /* All other types are invalid */ |
492 | 489 | ||
493 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 490 | ACPI_REPORT_ERROR(("Source must be Integer/Buffer/String type, not %s\n", acpi_ut_get_object_type_name(source_desc))); |
494 | "Source must be Integer/Buffer/String type, not %s\n", | ||
495 | acpi_ut_get_object_type_name | ||
496 | (source_desc))); | ||
497 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 491 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
498 | } | 492 | } |
499 | 493 | ||
@@ -503,8 +497,7 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, | |||
503 | break; | 497 | break; |
504 | 498 | ||
505 | default: | 499 | default: |
506 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 500 | ACPI_REPORT_ERROR(("Target is not a Package or buffer_field\n")); |
507 | "Target is not a Package or buffer_field\n")); | ||
508 | status = AE_AML_OPERAND_TYPE; | 501 | status = AE_AML_OPERAND_TYPE; |
509 | break; | 502 | break; |
510 | } | 503 | } |
diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c index 382f63c14ea1..25bbc1d78547 100644 --- a/drivers/acpi/executer/exstoren.c +++ b/drivers/acpi/executer/exstoren.c | |||
@@ -7,7 +7,7 @@ | |||
7 | *****************************************************************************/ | 7 | *****************************************************************************/ |
8 | 8 | ||
9 | /* | 9 | /* |
10 | * Copyright (C) 2000 - 2005, R. Byron Moore | 10 | * Copyright (C) 2000 - 2006, R. Byron Moore |
11 | * All rights reserved. | 11 | * All rights reserved. |
12 | * | 12 | * |
13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without |
@@ -123,11 +123,7 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, | |||
123 | && (source_desc->reference.opcode == AML_LOAD_OP))) { | 123 | && (source_desc->reference.opcode == AML_LOAD_OP))) { |
124 | /* Conversion successful but still not a valid type */ | 124 | /* Conversion successful but still not a valid type */ |
125 | 125 | ||
126 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 126 | ACPI_REPORT_ERROR(("Cannot assign type %s to %s (must be type Int/Str/Buf)\n", acpi_ut_get_object_type_name(source_desc), acpi_ut_get_type_name(target_type))); |
127 | "Cannot assign type %s to %s (must be type Int/Str/Buf)\n", | ||
128 | acpi_ut_get_object_type_name | ||
129 | (source_desc), | ||
130 | acpi_ut_get_type_name(target_type))); | ||
131 | status = AE_AML_OPERAND_TYPE; | 127 | status = AE_AML_OPERAND_TYPE; |
132 | } | 128 | } |
133 | break; | 129 | break; |
@@ -280,9 +276,8 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, | |||
280 | /* | 276 | /* |
281 | * All other types come here. | 277 | * All other types come here. |
282 | */ | 278 | */ |
283 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, | 279 | ACPI_REPORT_WARNING(("Store into type %s not implemented\n", |
284 | "Store into type %s not implemented\n", | 280 | acpi_ut_get_object_type_name(dest_desc))); |
285 | acpi_ut_get_object_type_name(dest_desc))); | ||
286 | 281 | ||
287 | status = AE_NOT_IMPLEMENTED; | 282 | status = AE_NOT_IMPLEMENTED; |
288 | break; | 283 | break; |
diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c index c4ff654a6697..6ab707087750 100644 --- a/drivers/acpi/executer/exstorob.c +++ b/drivers/acpi/executer/exstorob.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -71,7 +71,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, | |||
71 | 71 | ||
72 | /* We know that source_desc is a buffer by now */ | 72 | /* We know that source_desc is a buffer by now */ |
73 | 73 | ||
74 | buffer = (u8 *) source_desc->buffer.pointer; | 74 | buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer); |
75 | length = source_desc->buffer.length; | 75 | length = source_desc->buffer.length; |
76 | 76 | ||
77 | /* | 77 | /* |
@@ -160,7 +160,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, | |||
160 | 160 | ||
161 | /* We know that source_desc is a string by now */ | 161 | /* We know that source_desc is a string by now */ |
162 | 162 | ||
163 | buffer = (u8 *) source_desc->string.pointer; | 163 | buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer); |
164 | length = source_desc->string.length; | 164 | length = source_desc->string.length; |
165 | 165 | ||
166 | /* | 166 | /* |
diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c index 8a88b841237d..9a3684d3cf87 100644 --- a/drivers/acpi/executer/exsystem.c +++ b/drivers/acpi/executer/exsystem.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -129,7 +129,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) | |||
129 | * (ACPI specifies 100 usec as max, but this gives some slack in | 129 | * (ACPI specifies 100 usec as max, but this gives some slack in |
130 | * order to support existing BIOSs) | 130 | * order to support existing BIOSs) |
131 | */ | 131 | */ |
132 | ACPI_REPORT_ERROR(("Stall: Time parameter is too large (%d)\n", | 132 | ACPI_REPORT_ERROR(("Time parameter is too large (%d)\n", |
133 | how_long)); | 133 | how_long)); |
134 | status = AE_AML_OPERAND_VALUE; | 134 | status = AE_AML_OPERAND_VALUE; |
135 | } else { | 135 | } else { |
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c index 1ee79d8c8f88..990c40e0c041 100644 --- a/drivers/acpi/executer/exutils.c +++ b/drivers/acpi/executer/exutils.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -200,13 +200,11 @@ u8 acpi_ex_acquire_global_lock(u32 field_flags) | |||
200 | if (ACPI_SUCCESS(status)) { | 200 | if (ACPI_SUCCESS(status)) { |
201 | locked = TRUE; | 201 | locked = TRUE; |
202 | } else { | 202 | } else { |
203 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 203 | ACPI_REPORT_ERROR(("Could not acquire Global Lock, %s\n", acpi_format_exception(status))); |
204 | "Could not acquire Global Lock, %s\n", | ||
205 | acpi_format_exception(status))); | ||
206 | } | 204 | } |
207 | } | 205 | } |
208 | 206 | ||
209 | return_VALUE(locked); | 207 | return_UINT8(locked); |
210 | } | 208 | } |
211 | 209 | ||
212 | /******************************************************************************* | 210 | /******************************************************************************* |
@@ -268,7 +266,7 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) | |||
268 | /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ | 266 | /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ |
269 | 267 | ||
270 | if (value == 0) { | 268 | if (value == 0) { |
271 | return_VALUE(1); | 269 | return_UINT32(1); |
272 | } | 270 | } |
273 | 271 | ||
274 | current_value = value; | 272 | current_value = value; |
@@ -282,7 +280,7 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) | |||
282 | num_digits++; | 280 | num_digits++; |
283 | } | 281 | } |
284 | 282 | ||
285 | return_VALUE(num_digits); | 283 | return_UINT32(num_digits); |
286 | } | 284 | } |
287 | 285 | ||
288 | /******************************************************************************* | 286 | /******************************************************************************* |