blob: 524c5a5300b83ad80603e15bee48078aa64b1c75 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*******************************************************************************
2 *
3 * Module Name: rsdump - Functions to display the resource structures.
4 *
5 ******************************************************************************/
6
7/*
Bob Moorefbb7a2d2014-02-08 09:42:25 +08008 * Copyright (C) 2000 - 2014, Intel Corp.
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#include <acpi/acpi.h>
Len Browne2f7a772009-01-09 00:30:03 -050045#include "accommon.h"
46#include "acresrc.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
48#define _COMPONENT ACPI_RESOURCES
Len Brown4be44fc2005-08-05 00:44:28 -040049ACPI_MODULE_NAME("rsdump")
Lv Zheng33348612014-02-08 09:42:46 +080050
51#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBER) || defined(ACPI_DEBUGGER)
Robert Moore44f6c012005-04-18 22:49:35 -040052/* Local prototypes */
Robert Moorebda663d2005-09-16 16:51:15 -040053static void acpi_rs_out_string(char *title, char *value);
54
55static void acpi_rs_out_integer8(char *title, u8 value);
56
57static void acpi_rs_out_integer16(char *title, u16 value);
58
59static void acpi_rs_out_integer32(char *title, u32 value);
60
61static void acpi_rs_out_integer64(char *title, u64 value);
62
63static void acpi_rs_out_title(char *title);
64
Lin Minge0fe0a82011-11-16 14:38:13 +080065static void acpi_rs_dump_byte_list(u16 length, u8 *data);
Robert Moorebda663d2005-09-16 16:51:15 -040066
Lin Minge0fe0a82011-11-16 14:38:13 +080067static void acpi_rs_dump_word_list(u16 length, u16 *data);
Robert Moorebda663d2005-09-16 16:51:15 -040068
Lin Minge0fe0a82011-11-16 14:38:13 +080069static void acpi_rs_dump_dword_list(u8 length, u32 *data);
70
71static void acpi_rs_dump_short_byte_list(u8 length, u8 *data);
Robert Moorebda663d2005-09-16 16:51:15 -040072
73static void
74acpi_rs_dump_resource_source(struct acpi_resource_source *resource_source);
75
76static void acpi_rs_dump_address_common(union acpi_resource_data *resource);
77
Bob Moore08978312005-10-21 00:00:00 -040078static void
79acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table);
80
Bob Moore08978312005-10-21 00:00:00 -040081/*******************************************************************************
82 *
83 * FUNCTION: acpi_rs_dump_descriptor
84 *
Bob Moore42f8fb72013-01-11 13:08:51 +010085 * PARAMETERS: resource - Buffer containing the resource
86 * table - Table entry to decode the resource
Bob Moore08978312005-10-21 00:00:00 -040087 *
88 * RETURN: None
89 *
Bob Moore42f8fb72013-01-11 13:08:51 +010090 * DESCRIPTION: Dump a resource descriptor based on a dump table entry.
Bob Moore08978312005-10-21 00:00:00 -040091 *
92 ******************************************************************************/
93
94static void
95acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
96{
Bob Moore96db2552005-11-02 00:00:00 -050097 u8 *target = NULL;
98 u8 *previous_target;
Bob Moore08978312005-10-21 00:00:00 -040099 char *name;
100 u8 count;
101
102 /* First table entry must contain the table length (# of table entries) */
103
104 count = table->offset;
105
106 while (count) {
107 previous_target = target;
Bob Moorec51a4de2005-11-17 13:07:00 -0500108 target = ACPI_ADD_PTR(u8, resource, table->offset);
Bob Moore08978312005-10-21 00:00:00 -0400109 name = table->name;
110
111 switch (table->opcode) {
112 case ACPI_RSD_TITLE:
113 /*
114 * Optional resource title
115 */
116 if (table->name) {
117 acpi_os_printf("%s Resource\n", name);
118 }
119 break;
120
121 /* Strings */
122
123 case ACPI_RSD_LITERAL:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000124
Bob Moore96db2552005-11-02 00:00:00 -0500125 acpi_rs_out_string(name,
126 ACPI_CAST_PTR(char, table->pointer));
Bob Moore08978312005-10-21 00:00:00 -0400127 break;
128
129 case ACPI_RSD_STRING:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000130
Bob Moore96db2552005-11-02 00:00:00 -0500131 acpi_rs_out_string(name, ACPI_CAST_PTR(char, target));
Bob Moore08978312005-10-21 00:00:00 -0400132 break;
133
134 /* Data items, 8/16/32/64 bit */
135
136 case ACPI_RSD_UINT8:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000137
Lin Minge0fe0a82011-11-16 14:38:13 +0800138 if (table->pointer) {
139 acpi_rs_out_string(name, ACPI_CAST_PTR(char,
140 table->
141 pointer
142 [*target]));
143 } else {
144 acpi_rs_out_integer8(name, ACPI_GET8(target));
145 }
Bob Moore08978312005-10-21 00:00:00 -0400146 break;
147
148 case ACPI_RSD_UINT16:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000149
Bob Moorec51a4de2005-11-17 13:07:00 -0500150 acpi_rs_out_integer16(name, ACPI_GET16(target));
Bob Moore08978312005-10-21 00:00:00 -0400151 break;
152
153 case ACPI_RSD_UINT32:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000154
Bob Moorec51a4de2005-11-17 13:07:00 -0500155 acpi_rs_out_integer32(name, ACPI_GET32(target));
Bob Moore08978312005-10-21 00:00:00 -0400156 break;
157
158 case ACPI_RSD_UINT64:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000159
Bob Moorec51a4de2005-11-17 13:07:00 -0500160 acpi_rs_out_integer64(name, ACPI_GET64(target));
Bob Moore08978312005-10-21 00:00:00 -0400161 break;
162
163 /* Flags: 1-bit and 2-bit flags supported */
164
165 case ACPI_RSD_1BITFLAG:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000166
Bob Moore96db2552005-11-02 00:00:00 -0500167 acpi_rs_out_string(name, ACPI_CAST_PTR(char,
168 table->
169 pointer[*target &
170 0x01]));
Bob Moore08978312005-10-21 00:00:00 -0400171 break;
172
173 case ACPI_RSD_2BITFLAG:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000174
Bob Moore96db2552005-11-02 00:00:00 -0500175 acpi_rs_out_string(name, ACPI_CAST_PTR(char,
176 table->
177 pointer[*target &
178 0x03]));
Bob Moore08978312005-10-21 00:00:00 -0400179 break;
180
Lin Minge0fe0a82011-11-16 14:38:13 +0800181 case ACPI_RSD_3BITFLAG:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000182
Lin Minge0fe0a82011-11-16 14:38:13 +0800183 acpi_rs_out_string(name, ACPI_CAST_PTR(char,
184 table->
185 pointer[*target &
186 0x07]));
187 break;
188
Bob Moore08978312005-10-21 00:00:00 -0400189 case ACPI_RSD_SHORTLIST:
190 /*
191 * Short byte list (single line output) for DMA and IRQ resources
192 * Note: The list length is obtained from the previous table entry
193 */
194 if (previous_target) {
195 acpi_rs_out_title(name);
Bob Moore96db2552005-11-02 00:00:00 -0500196 acpi_rs_dump_short_byte_list(*previous_target,
197 target);
Bob Moore08978312005-10-21 00:00:00 -0400198 }
199 break;
200
Lin Minge0fe0a82011-11-16 14:38:13 +0800201 case ACPI_RSD_SHORTLISTX:
202 /*
203 * Short byte list (single line output) for GPIO vendor data
204 * Note: The list length is obtained from the previous table entry
205 */
206 if (previous_target) {
207 acpi_rs_out_title(name);
208 acpi_rs_dump_short_byte_list(*previous_target,
209 *
210 (ACPI_CAST_INDIRECT_PTR
211 (u8, target)));
212 }
213 break;
214
Bob Moore08978312005-10-21 00:00:00 -0400215 case ACPI_RSD_LONGLIST:
216 /*
217 * Long byte list for Vendor resource data
218 * Note: The list length is obtained from the previous table entry
219 */
220 if (previous_target) {
Bob Moorec51a4de2005-11-17 13:07:00 -0500221 acpi_rs_dump_byte_list(ACPI_GET16
222 (previous_target),
Bob Moore96db2552005-11-02 00:00:00 -0500223 target);
Bob Moore08978312005-10-21 00:00:00 -0400224 }
225 break;
226
227 case ACPI_RSD_DWORDLIST:
228 /*
229 * Dword list for Extended Interrupt resources
230 * Note: The list length is obtained from the previous table entry
231 */
232 if (previous_target) {
Bob Moore96db2552005-11-02 00:00:00 -0500233 acpi_rs_dump_dword_list(*previous_target,
234 ACPI_CAST_PTR(u32,
235 target));
Bob Moore08978312005-10-21 00:00:00 -0400236 }
237 break;
238
Lin Minge0fe0a82011-11-16 14:38:13 +0800239 case ACPI_RSD_WORDLIST:
240 /*
241 * Word list for GPIO Pin Table
242 * Note: The list length is obtained from the previous table entry
243 */
244 if (previous_target) {
245 acpi_rs_dump_word_list(*previous_target,
246 *(ACPI_CAST_INDIRECT_PTR
247 (u16, target)));
248 }
249 break;
250
Bob Moore08978312005-10-21 00:00:00 -0400251 case ACPI_RSD_ADDRESS:
252 /*
253 * Common flags for all Address resources
254 */
Bob Moore96db2552005-11-02 00:00:00 -0500255 acpi_rs_dump_address_common(ACPI_CAST_PTR
256 (union acpi_resource_data,
257 target));
Bob Moore08978312005-10-21 00:00:00 -0400258 break;
259
260 case ACPI_RSD_SOURCE:
261 /*
262 * Optional resource_source for Address resources
263 */
Lv Zheng3e8214e2012-12-19 05:37:15 +0000264 acpi_rs_dump_resource_source(ACPI_CAST_PTR
265 (struct
Len Brownfd350942007-05-09 23:34:35 -0400266 acpi_resource_source,
267 target));
Bob Moore08978312005-10-21 00:00:00 -0400268 break;
269
270 default:
Chao Guan1d1ea1b2013-06-08 00:58:14 +0000271
Bob Moore08978312005-10-21 00:00:00 -0400272 acpi_os_printf("**** Invalid table opcode [%X] ****\n",
273 table->opcode);
274 return;
275 }
276
277 table++;
278 count--;
279 }
280}
281
282/*******************************************************************************
283 *
284 * FUNCTION: acpi_rs_dump_resource_source
285 *
286 * PARAMETERS: resource_source - Pointer to a Resource Source struct
287 *
288 * RETURN: None
289 *
290 * DESCRIPTION: Common routine for dumping the optional resource_source and the
291 * corresponding resource_source_index.
292 *
293 ******************************************************************************/
294
295static void
296acpi_rs_dump_resource_source(struct acpi_resource_source *resource_source)
297{
298 ACPI_FUNCTION_ENTRY();
299
300 if (resource_source->index == 0xFF) {
301 return;
302 }
303
304 acpi_rs_out_integer8("Resource Source Index", resource_source->index);
305
306 acpi_rs_out_string("Resource Source",
307 resource_source->string_ptr ?
308 resource_source->string_ptr : "[Not Specified]");
309}
310
311/*******************************************************************************
312 *
313 * FUNCTION: acpi_rs_dump_address_common
314 *
Bob Mooreba494be2012-07-12 09:40:10 +0800315 * PARAMETERS: resource - Pointer to an internal resource descriptor
Bob Moore08978312005-10-21 00:00:00 -0400316 *
317 * RETURN: None
318 *
319 * DESCRIPTION: Dump the fields that are common to all Address resource
320 * descriptors
321 *
322 ******************************************************************************/
323
324static void acpi_rs_dump_address_common(union acpi_resource_data *resource)
325{
326 ACPI_FUNCTION_ENTRY();
327
328 /* Decode the type-specific flags */
329
330 switch (resource->address.resource_type) {
331 case ACPI_MEMORY_RANGE:
332
333 acpi_rs_dump_descriptor(resource, acpi_rs_dump_memory_flags);
334 break;
335
336 case ACPI_IO_RANGE:
337
338 acpi_rs_dump_descriptor(resource, acpi_rs_dump_io_flags);
339 break;
340
341 case ACPI_BUS_NUMBER_RANGE:
342
343 acpi_rs_out_string("Resource Type", "Bus Number Range");
344 break;
345
346 default:
347
348 acpi_rs_out_integer8("Resource Type",
349 (u8) resource->address.resource_type);
350 break;
351 }
352
353 /* Decode the general flags */
354
355 acpi_rs_dump_descriptor(resource, acpi_rs_dump_general_flags);
356}
357
358/*******************************************************************************
359 *
360 * FUNCTION: acpi_rs_dump_resource_list
361 *
362 * PARAMETERS: resource_list - Pointer to a resource descriptor list
363 *
364 * RETURN: None
365 *
366 * DESCRIPTION: Dispatches the structure to the correct dump routine.
367 *
368 ******************************************************************************/
369
370void acpi_rs_dump_resource_list(struct acpi_resource *resource_list)
371{
372 u32 count = 0;
373 u32 type;
374
375 ACPI_FUNCTION_ENTRY();
376
Bob Moore10e9e752012-12-31 00:06:27 +0000377 /* Check if debug output enabled */
378
379 if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
Bob Moore08978312005-10-21 00:00:00 -0400380 return;
381 }
382
383 /* Walk list and dump all resource descriptors (END_TAG terminates) */
384
385 do {
386 acpi_os_printf("\n[%02X] ", count);
387 count++;
388
389 /* Validate Type before dispatch */
390
391 type = resource_list->type;
392 if (type > ACPI_RESOURCE_TYPE_MAX) {
393 acpi_os_printf
394 ("Invalid descriptor type (%X) in resource list\n",
395 resource_list->type);
396 return;
397 }
398
Bob Moorec13085e2013-03-08 09:19:38 +0000399 /* Sanity check the length. It must not be zero, or we loop forever */
400
401 if (!resource_list->length) {
402 acpi_os_printf
403 ("Invalid zero length descriptor in resource list\n");
404 return;
405 }
406
Bob Moore08978312005-10-21 00:00:00 -0400407 /* Dump the resource descriptor */
408
Lin Minge0fe0a82011-11-16 14:38:13 +0800409 if (type == ACPI_RESOURCE_TYPE_SERIAL_BUS) {
410 acpi_rs_dump_descriptor(&resource_list->data,
411 acpi_gbl_dump_serial_bus_dispatch
412 [resource_list->data.
413 common_serial_bus.type]);
414 } else {
415 acpi_rs_dump_descriptor(&resource_list->data,
416 acpi_gbl_dump_resource_dispatch
417 [type]);
418 }
Bob Moore08978312005-10-21 00:00:00 -0400419
420 /* Point to the next resource structure */
421
Lin Minge0fe0a82011-11-16 14:38:13 +0800422 resource_list = ACPI_NEXT_RESOURCE(resource_list);
Bob Moore08978312005-10-21 00:00:00 -0400423
424 /* Exit when END_TAG descriptor is reached */
425
426 } while (type != ACPI_RESOURCE_TYPE_END_TAG);
427}
428
429/*******************************************************************************
430 *
431 * FUNCTION: acpi_rs_dump_irq_list
432 *
433 * PARAMETERS: route_table - Pointer to the routing table to dump.
434 *
435 * RETURN: None
436 *
437 * DESCRIPTION: Print IRQ routing table
438 *
439 ******************************************************************************/
440
441void acpi_rs_dump_irq_list(u8 * route_table)
442{
443 struct acpi_pci_routing_table *prt_element;
444 u8 count;
445
446 ACPI_FUNCTION_ENTRY();
447
Bob Moore10e9e752012-12-31 00:06:27 +0000448 /* Check if debug output enabled */
449
450 if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
Bob Moore08978312005-10-21 00:00:00 -0400451 return;
452 }
453
454 prt_element = ACPI_CAST_PTR(struct acpi_pci_routing_table, route_table);
455
456 /* Dump all table elements, Exit on zero length element */
457
458 for (count = 0; prt_element->length; count++) {
459 acpi_os_printf("\n[%02X] PCI IRQ Routing Table Package\n",
460 count);
461 acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
462
Bob Moorec51a4de2005-11-17 13:07:00 -0500463 prt_element = ACPI_ADD_PTR(struct acpi_pci_routing_table,
464 prt_element, prt_element->length);
Bob Moore08978312005-10-21 00:00:00 -0400465 }
466}
467
Linus Torvalds1da177e2005-04-16 15:20:36 -0700468/*******************************************************************************
469 *
Robert Moorebda663d2005-09-16 16:51:15 -0400470 * FUNCTION: acpi_rs_out*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700471 *
Bob Mooreba494be2012-07-12 09:40:10 +0800472 * PARAMETERS: title - Name of the resource field
473 * value - Value of the resource field
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474 *
475 * RETURN: None
476 *
Robert Moorebda663d2005-09-16 16:51:15 -0400477 * DESCRIPTION: Miscellaneous helper functions to consistently format the
478 * output of the resource dump routines
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479 *
480 ******************************************************************************/
481
Robert Moorebda663d2005-09-16 16:51:15 -0400482static void acpi_rs_out_string(char *title, char *value)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700483{
Bob Mooreb8e4d892006-01-27 16:43:00 -0500484 acpi_os_printf("%27s : %s", title, value);
485 if (!*value) {
486 acpi_os_printf("[NULL NAMESTRING]");
487 }
488 acpi_os_printf("\n");
Robert Moorebda663d2005-09-16 16:51:15 -0400489}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490
Robert Moorebda663d2005-09-16 16:51:15 -0400491static void acpi_rs_out_integer8(char *title, u8 value)
492{
Bob Moore50eca3e2005-09-30 19:03:00 -0400493 acpi_os_printf("%27s : %2.2X\n", title, value);
Robert Moorebda663d2005-09-16 16:51:15 -0400494}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700495
Robert Moorebda663d2005-09-16 16:51:15 -0400496static void acpi_rs_out_integer16(char *title, u16 value)
497{
Bob Moore50eca3e2005-09-30 19:03:00 -0400498 acpi_os_printf("%27s : %4.4X\n", title, value);
Robert Moorebda663d2005-09-16 16:51:15 -0400499}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700500
Robert Moorebda663d2005-09-16 16:51:15 -0400501static void acpi_rs_out_integer32(char *title, u32 value)
502{
Bob Moore50eca3e2005-09-30 19:03:00 -0400503 acpi_os_printf("%27s : %8.8X\n", title, value);
Robert Moorebda663d2005-09-16 16:51:15 -0400504}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505
Robert Moorebda663d2005-09-16 16:51:15 -0400506static void acpi_rs_out_integer64(char *title, u64 value)
507{
Bob Moore50eca3e2005-09-30 19:03:00 -0400508 acpi_os_printf("%27s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64(value));
Robert Moorebda663d2005-09-16 16:51:15 -0400509}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700510
Robert Moorebda663d2005-09-16 16:51:15 -0400511static void acpi_rs_out_title(char *title)
512{
Bob Moore50eca3e2005-09-30 19:03:00 -0400513 acpi_os_printf("%27s : ", title);
Robert Moorebda663d2005-09-16 16:51:15 -0400514}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700515
Robert Moorebda663d2005-09-16 16:51:15 -0400516/*******************************************************************************
517 *
518 * FUNCTION: acpi_rs_dump*List
519 *
Bob Mooreba494be2012-07-12 09:40:10 +0800520 * PARAMETERS: length - Number of elements in the list
521 * data - Start of the list
Robert Moorebda663d2005-09-16 16:51:15 -0400522 *
523 * RETURN: None
524 *
525 * DESCRIPTION: Miscellaneous functions to dump lists of raw data
526 *
527 ******************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700528
Bob Moore08978312005-10-21 00:00:00 -0400529static void acpi_rs_dump_byte_list(u16 length, u8 * data)
Robert Moorebda663d2005-09-16 16:51:15 -0400530{
Bob Moore08978312005-10-21 00:00:00 -0400531 u8 i;
Robert Moorebda663d2005-09-16 16:51:15 -0400532
533 for (i = 0; i < length; i++) {
Bob Moore50eca3e2005-09-30 19:03:00 -0400534 acpi_os_printf("%25s%2.2X : %2.2X\n", "Byte", i, data[i]);
Robert Moorebda663d2005-09-16 16:51:15 -0400535 }
536}
537
Bob Moore08978312005-10-21 00:00:00 -0400538static void acpi_rs_dump_short_byte_list(u8 length, u8 * data)
Robert Moorebda663d2005-09-16 16:51:15 -0400539{
Bob Moore08978312005-10-21 00:00:00 -0400540 u8 i;
Robert Moorebda663d2005-09-16 16:51:15 -0400541
542 for (i = 0; i < length; i++) {
543 acpi_os_printf("%X ", data[i]);
544 }
545 acpi_os_printf("\n");
546}
547
Bob Moore08978312005-10-21 00:00:00 -0400548static void acpi_rs_dump_dword_list(u8 length, u32 * data)
Bob Moore50eca3e2005-09-30 19:03:00 -0400549{
Bob Moore08978312005-10-21 00:00:00 -0400550 u8 i;
Bob Moore50eca3e2005-09-30 19:03:00 -0400551
Bob Moore08978312005-10-21 00:00:00 -0400552 for (i = 0; i < length; i++) {
553 acpi_os_printf("%25s%2.2X : %8.8X\n", "Dword", i, data[i]);
Robert Moorebda663d2005-09-16 16:51:15 -0400554 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555}
556
Lin Minge0fe0a82011-11-16 14:38:13 +0800557static void acpi_rs_dump_word_list(u16 length, u16 *data)
558{
559 u16 i;
560
561 for (i = 0; i < length; i++) {
562 acpi_os_printf("%25s%2.2X : %4.4X\n", "Word", i, data[i]);
563 }
564}
565
Linus Torvalds1da177e2005-04-16 15:20:36 -0700566#endif