Deleted Added
full compact
exdump.c (77424) exdump.c (82367)
1/******************************************************************************
2 *
3 * Module Name: exdump - Interpreter debug output routines
1/******************************************************************************
2 *
3 * Module Name: exdump - Interpreter debug output routines
4 * $Revision: 114 $
4 * $Revision: 116 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

--- 103 unchanged lines hidden (view full) ---

116
117#define __EXDUMP_C__
118
119#include "acpi.h"
120#include "acinterp.h"
121#include "amlcode.h"
122#include "acnamesp.h"
123#include "actables.h"
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

--- 103 unchanged lines hidden (view full) ---

116
117#define __EXDUMP_C__
118
119#include "acpi.h"
120#include "acinterp.h"
121#include "amlcode.h"
122#include "acnamesp.h"
123#include "actables.h"
124#include "acparser.h"
124
125#define _COMPONENT ACPI_EXECUTER
126 MODULE_NAME ("exdump")
127
128
129/*
130 * The following routines are used for debug output only
131 */

--- 54 unchanged lines hidden (view full) ---

186 }
187
188 ShowDecimalValue = (ByteCount > 1 || Value > 9);
189 if (ShowDecimalValue)
190 {
191 Length += 3 + AcpiExDigitsNeeded (Value, 10);
192 }
193
125
126#define _COMPONENT ACPI_EXECUTER
127 MODULE_NAME ("exdump")
128
129
130/*
131 * The following routines are used for debug output only
132 */

--- 54 unchanged lines hidden (view full) ---

187 }
188
189 ShowDecimalValue = (ByteCount > 1 || Value > 9);
190 if (ShowDecimalValue)
191 {
192 Length += 3 + AcpiExDigitsNeeded (Value, 10);
193 }
194
194 DEBUG_PRINT (TRACE_LOAD, (""));
195 ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, ""));
195
196 for (Length = LeadSpace; Length; --Length )
197 {
196
197 for (Length = LeadSpace; Length; --Length )
198 {
198 DEBUG_PRINT_RAW (TRACE_LOAD, (" "));
199 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_LOAD, " "));
199 }
200
201 while (ByteCount--)
202 {
200 }
201
202 while (ByteCount--)
203 {
203 DEBUG_PRINT_RAW (TRACE_LOAD, ("%02x", *AmlPtr++));
204 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_LOAD, "%02x", *AmlPtr++));
204
205 if (ByteCount)
206 {
205
206 if (ByteCount)
207 {
207 DEBUG_PRINT_RAW (TRACE_LOAD, (" "));
208 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_LOAD, " "));
208 }
209 }
210
211 if (ShowDecimalValue)
212 {
209 }
210 }
211
212 if (ShowDecimalValue)
213 {
213 DEBUG_PRINT_RAW (TRACE_LOAD, (" [%ld]", Value));
214 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_LOAD, " [%ld]", Value));
214 }
215
216 if (0 == LeadSpace)
217 {
215 }
216
217 if (0 == LeadSpace)
218 {
218 DEBUG_PRINT_RAW (TRACE_LOAD, (" "));
219 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_LOAD, " "));
219 }
220
220 }
221
221 DEBUG_PRINT_RAW (TRACE_LOAD, ("\n"));
222 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_LOAD, "\n"));
222 return_VOID;
223}
224
225
226/*****************************************************************************
227 *
228 * FUNCTION: AcpiExDumpOperand
229 *

--- 19 unchanged lines hidden (view full) ---

249
250 if (!EntryDesc)
251 {
252 /*
253 * This usually indicates that something serious is wrong --
254 * since most (if not all)
255 * code that dumps the stack expects something to be there!
256 */
223 return_VOID;
224}
225
226
227/*****************************************************************************
228 *
229 * FUNCTION: AcpiExDumpOperand
230 *

--- 19 unchanged lines hidden (view full) ---

250
251 if (!EntryDesc)
252 {
253 /*
254 * This usually indicates that something serious is wrong --
255 * since most (if not all)
256 * code that dumps the stack expects something to be there!
257 */
257 DEBUG_PRINTP (ACPI_INFO, ("Null stack entry ptr\n"));
258 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Null stack entry ptr\n"));
258 return (AE_OK);
259 }
260
261 if (VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_NAMED))
262 {
259 return (AE_OK);
260 }
261
262 if (VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_NAMED))
263 {
263 DEBUG_PRINTP (ACPI_INFO, ("Node: \n"));
264 DUMP_ENTRY (EntryDesc, ACPI_INFO);
264 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Node: \n"));
265 DUMP_ENTRY (EntryDesc, ACPI_LV_INFO);
265 return (AE_OK);
266 }
267
268 if (AcpiTbSystemTablePointer (EntryDesc))
269 {
266 return (AE_OK);
267 }
268
269 if (AcpiTbSystemTablePointer (EntryDesc))
270 {
270 DEBUG_PRINTP (ACPI_INFO, ("%p is an AML pointer\n",
271 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p is an AML pointer\n",
271 EntryDesc));
272 return (AE_OK);
273 }
274
275 if (!VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_INTERNAL))
276 {
272 EntryDesc));
273 return (AE_OK);
274 }
275
276 if (!VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_INTERNAL))
277 {
277 DEBUG_PRINTP (ACPI_INFO, ("%p Not a local object \n", EntryDesc));
278 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p Not a local object \n", EntryDesc));
278 DUMP_BUFFER (EntryDesc, sizeof (ACPI_OPERAND_OBJECT));
279 return (AE_OK);
280 }
281
282 /* EntryDesc is a valid object */
283
279 DUMP_BUFFER (EntryDesc, sizeof (ACPI_OPERAND_OBJECT));
280 return (AE_OK);
281 }
282
283 /* EntryDesc is a valid object */
284
284 DEBUG_PRINTP (ACPI_INFO, ("%p ", EntryDesc));
285 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p ", EntryDesc));
285
286 switch (EntryDesc->Common.Type)
287 {
288 case INTERNAL_TYPE_REFERENCE:
289
290 switch (EntryDesc->Reference.Opcode)
291 {
292 case AML_ZERO_OP:
293
286
287 switch (EntryDesc->Common.Type)
288 {
289 case INTERNAL_TYPE_REFERENCE:
290
291 switch (EntryDesc->Reference.Opcode)
292 {
293 case AML_ZERO_OP:
294
294 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Zero\n"));
295 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference: Zero\n"));
295 break;
296
297
298 case AML_ONE_OP:
299
296 break;
297
298
299 case AML_ONE_OP:
300
300 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: One\n"));
301 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference: One\n"));
301 break;
302
303
304 case AML_ONES_OP:
305
302 break;
303
304
305 case AML_ONES_OP:
306
306 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Ones\n"));
307 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference: Ones\n"));
307 break;
308
309
310 case AML_DEBUG_OP:
311
308 break;
309
310
311 case AML_DEBUG_OP:
312
312 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Debug\n"));
313 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference: Debug\n"));
313 break;
314
315
316 case AML_NAME_OP:
317
318 DUMP_PATHNAME (EntryDesc->Reference.Object, "Reference: Name: ",
314 break;
315
316
317 case AML_NAME_OP:
318
319 DUMP_PATHNAME (EntryDesc->Reference.Object, "Reference: Name: ",
319 ACPI_INFO, _COMPONENT);
320 DUMP_ENTRY (EntryDesc->Reference.Object, ACPI_INFO);
320 ACPI_LV_INFO, _COMPONENT);
321 DUMP_ENTRY (EntryDesc->Reference.Object, ACPI_LV_INFO);
321 break;
322
323
324 case AML_INDEX_OP:
325
322 break;
323
324
325 case AML_INDEX_OP:
326
326 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Index %p\n",
327 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference: Index %p\n",
327 EntryDesc->Reference.Object));
328 break;
329
330
331 case AML_ARG_OP:
332
328 EntryDesc->Reference.Object));
329 break;
330
331
332 case AML_ARG_OP:
333
333 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Arg%d",
334 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference: Arg%d",
334 EntryDesc->Reference.Offset));
335
336 if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
337 {
338 /* Value is a Number */
339
335 EntryDesc->Reference.Offset));
336
337 if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
338 {
339 /* Value is a Number */
340
340 DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
341 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, " value is [%ld]",
341 EntryDesc->Integer.Value));
342 }
343
342 EntryDesc->Integer.Value));
343 }
344
344 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
345 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n"));
345 break;
346
347
348 case AML_LOCAL_OP:
349
346 break;
347
348
349 case AML_LOCAL_OP:
350
350 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Local%d",
351 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference: Local%d",
351 EntryDesc->Reference.Offset));
352
353 if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
354 {
355
356 /* Value is a Number */
357
352 EntryDesc->Reference.Offset));
353
354 if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
355 {
356
357 /* Value is a Number */
358
358 DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
359 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, " value is [%ld]",
359 EntryDesc->Integer.Value));
360 }
361
360 EntryDesc->Integer.Value));
361 }
362
362 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
363 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n"));
363 break;
364
365
366 case AML_INT_NAMEPATH_OP:
364 break;
365
366
367 case AML_INT_NAMEPATH_OP:
367 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference.Node->Name %x\n",
368 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Reference.Node->Name %x\n",
368 EntryDesc->Reference.Node->Name));
369 break;
370
371 default:
372
373 /* unknown opcode */
374
369 EntryDesc->Reference.Node->Name));
370 break;
371
372 default:
373
374 /* unknown opcode */
375
375 DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown opcode=%X\n",
376 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Unknown opcode=%X\n",
376 EntryDesc->Reference.Opcode));
377 break;
378
379 }
380
381 break;
382
383
384 case ACPI_TYPE_BUFFER:
385
377 EntryDesc->Reference.Opcode));
378 break;
379
380 }
381
382 break;
383
384
385 case ACPI_TYPE_BUFFER:
386
386 DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer len %X @ %p \n",
387 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Buffer len %X @ %p \n",
387 EntryDesc->Buffer.Length,
388 EntryDesc->Buffer.Pointer));
389
390 Length = EntryDesc->Buffer.Length;
391
392 if (Length > 64)
393 {
394 Length = 64;
395 }
396
397 /* Debug only -- dump the buffer contents */
398
399 if (EntryDesc->Buffer.Pointer)
400 {
388 EntryDesc->Buffer.Length,
389 EntryDesc->Buffer.Pointer));
390
391 Length = EntryDesc->Buffer.Length;
392
393 if (Length > 64)
394 {
395 Length = 64;
396 }
397
398 /* Debug only -- dump the buffer contents */
399
400 if (EntryDesc->Buffer.Pointer)
401 {
401 DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer Contents: "));
402 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Buffer Contents: "));
402
403 for (Buf = EntryDesc->Buffer.Pointer; Length--; ++Buf)
404 {
403
404 for (Buf = EntryDesc->Buffer.Pointer; Length--; ++Buf)
405 {
405 DEBUG_PRINT_RAW (ACPI_INFO,
406 (Length ? " %02x" : " %02x", *Buf));
406 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO,
407 Length ? " %02x" : " %02x", *Buf));
407 }
408 }
408 DEBUG_PRINT_RAW (ACPI_INFO,("\n"));
409 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO,"\n"));
409 }
410
411 break;
412
413
414 case ACPI_TYPE_INTEGER:
415
410 }
411
412 break;
413
414
415 case ACPI_TYPE_INTEGER:
416
416 DEBUG_PRINT_RAW (ACPI_INFO, ("Number %lX\n",
417 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Number %lX\n",
417 EntryDesc->Integer.Value));
418 break;
419
420
421 case INTERNAL_TYPE_IF:
422
418 EntryDesc->Integer.Value));
419 break;
420
421
422 case INTERNAL_TYPE_IF:
423
423 DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] %lX\n",
424 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "If [Number] %lX\n",
424 EntryDesc->Integer.Value));
425 break;
426
427
428 case INTERNAL_TYPE_WHILE:
429
425 EntryDesc->Integer.Value));
426 break;
427
428
429 case INTERNAL_TYPE_WHILE:
430
430 DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] %lX\n",
431 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "While [Number] %lX\n",
431 EntryDesc->Integer.Value));
432 break;
433
434
435 case ACPI_TYPE_PACKAGE:
436
432 EntryDesc->Integer.Value));
433 break;
434
435
436 case ACPI_TYPE_PACKAGE:
437
437 DEBUG_PRINT_RAW (ACPI_INFO, ("Package count %X @ %p\n",
438 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Package count %X @ %p\n",
438 EntryDesc->Package.Count, EntryDesc->Package.Elements));
439
440
441 /*
442 * If elements exist, package vector pointer is valid,
443 * and debug_level exceeds 1, dump package's elements.
444 */
445 if (EntryDesc->Package.Count &&

--- 6 unchanged lines hidden (view full) ---

452 for (ElementIndex = 0, Element = EntryDesc->Package.Elements;
453 ElementIndex < EntryDesc->Package.Count;
454 ++ElementIndex, ++Element)
455 {
456 AcpiExDumpOperand (*Element);
457 }
458 }
459
439 EntryDesc->Package.Count, EntryDesc->Package.Elements));
440
441
442 /*
443 * If elements exist, package vector pointer is valid,
444 * and debug_level exceeds 1, dump package's elements.
445 */
446 if (EntryDesc->Package.Count &&

--- 6 unchanged lines hidden (view full) ---

453 for (ElementIndex = 0, Element = EntryDesc->Package.Elements;
454 ElementIndex < EntryDesc->Package.Count;
455 ++ElementIndex, ++Element)
456 {
457 AcpiExDumpOperand (*Element);
458 }
459 }
460
460 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
461 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n"));
461
462 break;
463
464
465 case ACPI_TYPE_REGION:
466
462
463 break;
464
465
466 case ACPI_TYPE_REGION:
467
467 DEBUG_PRINT_RAW (ACPI_INFO, ("Region %s (%X)",
468 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Region %s (%X)",
468 AcpiUtGetRegionName (EntryDesc->Region.SpaceId),
469 EntryDesc->Region.SpaceId));
470
471 /*
472 * If the address and length have not been evaluated,
473 * don't print them.
474 */
475 if (!(EntryDesc->Region.Flags & AOPOBJ_DATA_VALID))
476 {
469 AcpiUtGetRegionName (EntryDesc->Region.SpaceId),
470 EntryDesc->Region.SpaceId));
471
472 /*
473 * If the address and length have not been evaluated,
474 * don't print them.
475 */
476 if (!(EntryDesc->Region.Flags & AOPOBJ_DATA_VALID))
477 {
477 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
478 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n"));
478 }
479 else
480 {
479 }
480 else
481 {
481 DEBUG_PRINT_RAW (ACPI_INFO, (" base %p Length %X\n",
482 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, " base %p Length %X\n",
482 EntryDesc->Region.Address, EntryDesc->Region.Length));
483 }
484 break;
485
486
487 case ACPI_TYPE_STRING:
488
483 EntryDesc->Region.Address, EntryDesc->Region.Length));
484 }
485 break;
486
487
488 case ACPI_TYPE_STRING:
489
489 DEBUG_PRINT_RAW (ACPI_INFO, ("String length %X @ %p\n\n",
490 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "String length %X @ %p\n\n",
490 EntryDesc->String.Length, EntryDesc->String.Pointer));
491
492 for (i=0; i < EntryDesc->String.Length; i++)
493 {
491 EntryDesc->String.Length, EntryDesc->String.Pointer));
492
493 for (i=0; i < EntryDesc->String.Length; i++)
494 {
494 DEBUG_PRINT_RAW (ACPI_INFO, ("%c",
495 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "%c",
495 EntryDesc->String.Pointer[i]));
496 }
497
496 EntryDesc->String.Pointer[i]));
497 }
498
498 DEBUG_PRINT_RAW (ACPI_INFO, ("\n\n"));
499 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n\n"));
499 break;
500
501
502 case INTERNAL_TYPE_BANK_FIELD:
503
500 break;
501
502
503 case INTERNAL_TYPE_BANK_FIELD:
504
504 DEBUG_PRINT_RAW (ACPI_INFO, ("BankField\n"));
505 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "BankField\n"));
505 break;
506
507
508 case INTERNAL_TYPE_REGION_FIELD:
509
506 break;
507
508
509 case INTERNAL_TYPE_REGION_FIELD:
510
510 DEBUG_PRINT_RAW (ACPI_INFO,
511 ("RegionField: bits=%X bitaccwidth=%X lock=%X update=%X at byte=%lX bit=%X of below:\n",
511 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO,
512 "RegionField: bits=%X bitaccwidth=%X lock=%X update=%X at byte=%lX bit=%X of below:\n",
512 EntryDesc->Field.BitLength, EntryDesc->Field.AccessBitWidth,
513 EntryDesc->Field.LockRule, EntryDesc->Field.UpdateRule,
514 EntryDesc->Field.BaseByteOffset, EntryDesc->Field.StartFieldBitOffset));
515 DUMP_STACK_ENTRY (EntryDesc->Field.RegionObj);
516 break;
517
518
519 case INTERNAL_TYPE_INDEX_FIELD:
520
513 EntryDesc->Field.BitLength, EntryDesc->Field.AccessBitWidth,
514 EntryDesc->Field.LockRule, EntryDesc->Field.UpdateRule,
515 EntryDesc->Field.BaseByteOffset, EntryDesc->Field.StartFieldBitOffset));
516 DUMP_STACK_ENTRY (EntryDesc->Field.RegionObj);
517 break;
518
519
520 case INTERNAL_TYPE_INDEX_FIELD:
521
521 DEBUG_PRINT_RAW (ACPI_INFO, ("IndexField\n"));
522 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "IndexField\n"));
522 break;
523
524
525 case ACPI_TYPE_BUFFER_FIELD:
526
523 break;
524
525
526 case ACPI_TYPE_BUFFER_FIELD:
527
527 DEBUG_PRINT_RAW (ACPI_INFO,
528 ("BufferField: %X bits at byte %lX bit %X of \n",
528 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO,
529 "BufferField: %X bits at byte %lX bit %X of \n",
529 EntryDesc->BufferField.BitLength, EntryDesc->BufferField.BaseByteOffset,
530 EntryDesc->BufferField.StartFieldBitOffset));
531
532 if (!EntryDesc->BufferField.BufferObj)
533 {
530 EntryDesc->BufferField.BitLength, EntryDesc->BufferField.BaseByteOffset,
531 EntryDesc->BufferField.StartFieldBitOffset));
532
533 if (!EntryDesc->BufferField.BufferObj)
534 {
534 DEBUG_PRINT (ACPI_INFO, ("*NULL* \n"));
535 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "*NULL* \n"));
535 }
536
537 else if (ACPI_TYPE_BUFFER !=
538 EntryDesc->BufferField.BufferObj->Common.Type)
539 {
536 }
537
538 else if (ACPI_TYPE_BUFFER !=
539 EntryDesc->BufferField.BufferObj->Common.Type)
540 {
540 DEBUG_PRINT_RAW (ACPI_INFO, ("*not a Buffer* \n"));
541 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "*not a Buffer* \n"));
541 }
542
543 else
544 {
545 DUMP_STACK_ENTRY (EntryDesc->BufferField.BufferObj);
546 }
547
548 break;
549
550
551 case ACPI_TYPE_EVENT:
552
542 }
543
544 else
545 {
546 DUMP_STACK_ENTRY (EntryDesc->BufferField.BufferObj);
547 }
548
549 break;
550
551
552 case ACPI_TYPE_EVENT:
553
553 DEBUG_PRINT_RAW (ACPI_INFO, ("Event\n"));
554 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Event\n"));
554 break;
555
556
557 case ACPI_TYPE_METHOD:
558
555 break;
556
557
558 case ACPI_TYPE_METHOD:
559
559 DEBUG_PRINT_RAW (ACPI_INFO,
560 ("Method(%X) @ %p:%lX\n",
560 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO,
561 "Method(%X) @ %p:%lX\n",
561 EntryDesc->Method.ParamCount,
562 EntryDesc->Method.Pcode, EntryDesc->Method.PcodeLength));
563 break;
564
565
566 case ACPI_TYPE_MUTEX:
567
562 EntryDesc->Method.ParamCount,
563 EntryDesc->Method.Pcode, EntryDesc->Method.PcodeLength));
564 break;
565
566
567 case ACPI_TYPE_MUTEX:
568
568 DEBUG_PRINT_RAW (ACPI_INFO, ("Mutex\n"));
569 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Mutex\n"));
569 break;
570
571
572 case ACPI_TYPE_DEVICE:
573
570 break;
571
572
573 case ACPI_TYPE_DEVICE:
574
574 DEBUG_PRINT_RAW (ACPI_INFO, ("Device\n"));
575 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Device\n"));
575 break;
576
577
578 case ACPI_TYPE_POWER:
579
576 break;
577
578
579 case ACPI_TYPE_POWER:
580
580 DEBUG_PRINT_RAW (ACPI_INFO, ("Power\n"));
581 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Power\n"));
581 break;
582
583
584 case ACPI_TYPE_PROCESSOR:
585
582 break;
583
584
585 case ACPI_TYPE_PROCESSOR:
586
586 DEBUG_PRINT_RAW (ACPI_INFO, ("Processor\n"));
587 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Processor\n"));
587 break;
588
589
590 case ACPI_TYPE_THERMAL:
591
588 break;
589
590
591 case ACPI_TYPE_THERMAL:
592
592 DEBUG_PRINT_RAW (ACPI_INFO, ("Thermal\n"));
593 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Thermal\n"));
593 break;
594
595
596 default:
597 /* unknown EntryDesc->Common.Type value */
598
594 break;
595
596
597 default:
598 /* unknown EntryDesc->Common.Type value */
599
599 DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown Type %X\n",
600 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Unknown Type %X\n",
600 EntryDesc->Common.Type));
601
602 /* Back up to previous entry */
603
604 EntryDesc--;
605
606
607 /* TBD: [Restructure] Change to use dump object routine !! */

--- 32 unchanged lines hidden (view full) ---

640 NATIVE_CHAR *Note,
641 NATIVE_CHAR *ModuleName,
642 UINT32 LineNumber)
643{
644 NATIVE_UINT i;
645 ACPI_OPERAND_OBJECT **EntryDesc;
646
647
601 EntryDesc->Common.Type));
602
603 /* Back up to previous entry */
604
605 EntryDesc--;
606
607
608 /* TBD: [Restructure] Change to use dump object routine !! */

--- 32 unchanged lines hidden (view full) ---

641 NATIVE_CHAR *Note,
642 NATIVE_CHAR *ModuleName,
643 UINT32 LineNumber)
644{
645 NATIVE_UINT i;
646 ACPI_OPERAND_OBJECT **EntryDesc;
647
648
649 PROC_NAME ("AcpiExDumpOperands");
650
648 if (!Ident)
649 {
650 Ident = "?";
651 }
652
653 if (!Note)
654 {
655 Note = "?";
656 }
657
658
651 if (!Ident)
652 {
653 Ident = "?";
654 }
655
656 if (!Note)
657 {
658 Note = "?";
659 }
660
661
659 DEBUG_PRINT (ACPI_INFO,
660 ("************* AcpiExDumpOperands Mode=%X ******************\n",
662 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
663 "************* AcpiExDumpOperands Mode=%X ******************\n",
661 InterpreterMode));
664 InterpreterMode));
662 DEBUG_PRINT (ACPI_INFO,
663 ("From %12s(%d) %s: %s\n", ModuleName, LineNumber, Ident, Note));
665 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
666 "From %12s(%d) %s: %s\n", ModuleName, LineNumber, Ident, Note));
664
665 if (NumLevels == 0)
666 {
667 NumLevels = 1;
668 }
669
670 /* Dump the stack starting at the top, working down */
671

--- 25 unchanged lines hidden (view full) ---

697void
698AcpiExDumpNode (
699 ACPI_NAMESPACE_NODE *Node,
700 UINT32 Flags)
701{
702
703 if (!Flags)
704 {
667
668 if (NumLevels == 0)
669 {
670 NumLevels = 1;
671 }
672
673 /* Dump the stack starting at the top, working down */
674

--- 25 unchanged lines hidden (view full) ---

700void
701AcpiExDumpNode (
702 ACPI_NAMESPACE_NODE *Node,
703 UINT32 Flags)
704{
705
706 if (!Flags)
707 {
705 if (!((TRACE_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
708 if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
706 {
707 return;
708 }
709 }
710
711
712 AcpiOsPrintf ("%20s : %4.4s\n", "Name", &Node->Name);
713 AcpiOsPrintf ("%20s : %s\n", "Type", AcpiUtGetTypeName (Node->Type));

--- 18 unchanged lines hidden (view full) ---

732 *
733 ****************************************************************************/
734
735void
736AcpiExDumpObjectDescriptor (
737 ACPI_OPERAND_OBJECT *ObjDesc,
738 UINT32 Flags)
739{
709 {
710 return;
711 }
712 }
713
714
715 AcpiOsPrintf ("%20s : %4.4s\n", "Name", &Node->Name);
716 AcpiOsPrintf ("%20s : %s\n", "Type", AcpiUtGetTypeName (Node->Type));

--- 18 unchanged lines hidden (view full) ---

735 *
736 ****************************************************************************/
737
738void
739AcpiExDumpObjectDescriptor (
740 ACPI_OPERAND_OBJECT *ObjDesc,
741 UINT32 Flags)
742{
743 ACPI_OPCODE_INFO *OpInfo;
744
745
740 FUNCTION_TRACE ("ExDumpObjectDescriptor");
741
742
743 if (!Flags)
744 {
746 FUNCTION_TRACE ("ExDumpObjectDescriptor");
747
748
749 if (!Flags)
750 {
745 if (!((TRACE_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
751 if (!((ACPI_DB_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
746 {
747 return;
748 }
749 }
750
751 if (!(VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL)))
752 {
753 AcpiOsPrintf ("%p is not a valid ACPI object\n", ObjDesc);

--- 6 unchanged lines hidden (view full) ---

760 AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Common.Flags);
761
762 /* Object-specific Fields */
763
764 switch (ObjDesc->Common.Type)
765 {
766 case ACPI_TYPE_INTEGER:
767
752 {
753 return;
754 }
755 }
756
757 if (!(VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL)))
758 {
759 AcpiOsPrintf ("%p is not a valid ACPI object\n", ObjDesc);

--- 6 unchanged lines hidden (view full) ---

766 AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Common.Flags);
767
768 /* Object-specific Fields */
769
770 switch (ObjDesc->Common.Type)
771 {
772 case ACPI_TYPE_INTEGER:
773
768 AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
769 AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Integer.Value);
774 AcpiOsPrintf ("%20s : %s\n", "Type", "Integer");
775 AcpiOsPrintf ("%20s : %X%8.8X\n", "Value", HIDWORD (ObjDesc->Integer.Value),
776 LODWORD (ObjDesc->Integer.Value));
770 break;
771
772
773 case ACPI_TYPE_STRING:
774
775 AcpiOsPrintf ("%20s : %s\n", "Type", "String");
776 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->String.Length);
777 AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->String.Pointer);

--- 6 unchanged lines hidden (view full) ---

784 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Buffer.Length);
785 AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->Buffer.Pointer);
786 break;
787
788
789 case ACPI_TYPE_PACKAGE:
790
791 AcpiOsPrintf ("%20s : %s\n", "Type", "Package");
777 break;
778
779
780 case ACPI_TYPE_STRING:
781
782 AcpiOsPrintf ("%20s : %s\n", "Type", "String");
783 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->String.Length);
784 AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->String.Pointer);

--- 6 unchanged lines hidden (view full) ---

791 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Buffer.Length);
792 AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->Buffer.Pointer);
793 break;
794
795
796 case ACPI_TYPE_PACKAGE:
797
798 AcpiOsPrintf ("%20s : %s\n", "Type", "Package");
799 AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Package.Flags);
792 AcpiOsPrintf ("%20s : %X\n", "Count", ObjDesc->Package.Count);
793 AcpiOsPrintf ("%20s : %p\n", "Elements", ObjDesc->Package.Elements);
794 AcpiOsPrintf ("%20s : %p\n", "NextElement", ObjDesc->Package.NextElement);
795 break;
796
797
798 case ACPI_TYPE_BUFFER_FIELD:
799

--- 120 unchanged lines hidden (view full) ---

920 AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->IndexField.Value);
921 AcpiOsPrintf ("%20s : %X\n", "Index", ObjDesc->IndexField.IndexObj);
922 AcpiOsPrintf ("%20s : %X\n", "Data", ObjDesc->IndexField.DataObj);
923 break;
924
925
926 case INTERNAL_TYPE_REFERENCE:
927
800 AcpiOsPrintf ("%20s : %X\n", "Count", ObjDesc->Package.Count);
801 AcpiOsPrintf ("%20s : %p\n", "Elements", ObjDesc->Package.Elements);
802 AcpiOsPrintf ("%20s : %p\n", "NextElement", ObjDesc->Package.NextElement);
803 break;
804
805
806 case ACPI_TYPE_BUFFER_FIELD:
807

--- 120 unchanged lines hidden (view full) ---

928 AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->IndexField.Value);
929 AcpiOsPrintf ("%20s : %X\n", "Index", ObjDesc->IndexField.IndexObj);
930 AcpiOsPrintf ("%20s : %X\n", "Data", ObjDesc->IndexField.DataObj);
931 break;
932
933
934 case INTERNAL_TYPE_REFERENCE:
935
936 OpInfo = AcpiPsGetOpcodeInfo (ObjDesc->Reference.Opcode);
937
928 AcpiOsPrintf ("%20s : %s\n", "Type", "Reference");
929 AcpiOsPrintf ("%20s : %X\n", "TargetType", ObjDesc->Reference.TargetType);
938 AcpiOsPrintf ("%20s : %s\n", "Type", "Reference");
939 AcpiOsPrintf ("%20s : %X\n", "TargetType", ObjDesc->Reference.TargetType);
930 AcpiOsPrintf ("%20s : %X\n", "Opcode", ObjDesc->Reference.Opcode);
940 AcpiOsPrintf ("%20s : %s\n", "Opcode", OpInfo->Name);
931 AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->Reference.Offset);
932 AcpiOsPrintf ("%20s : %p\n", "ObjDesc", ObjDesc->Reference.Object);
933 AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->Reference.Node);
934 AcpiOsPrintf ("%20s : %p\n", "Where", ObjDesc->Reference.Where);
935 break;
936
937
938 case INTERNAL_TYPE_ADDRESS_HANDLER:

--- 46 unchanged lines hidden ---
941 AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->Reference.Offset);
942 AcpiOsPrintf ("%20s : %p\n", "ObjDesc", ObjDesc->Reference.Object);
943 AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->Reference.Node);
944 AcpiOsPrintf ("%20s : %p\n", "Where", ObjDesc->Reference.Where);
945 break;
946
947
948 case INTERNAL_TYPE_ADDRESS_HANDLER:

--- 46 unchanged lines hidden ---