rsdump.c revision 69746
1/******************************************************************************* 2 * 3 * Module Name: rsdump - Functions do dump out the resource structures. 4 * $Revision: 13 $ 5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights 13 * reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117 118#define __RSDUMP_C__ 119 120#include "acpi.h" 121#include "acresrc.h" 122 123#define _COMPONENT RESOURCE_MANAGER 124 MODULE_NAME ("rsdump") 125 126 127/******************************************************************************* 128 * 129 * FUNCTION: AcpiRsDumpIrq 130 * 131 * PARAMETERS: Data - pointer to the resource structure to dump. 132 * 133 * RETURN: 134 * 135 * DESCRIPTION: Prints out the various members of the Data structure type. 136 * 137 ******************************************************************************/ 138 139void 140AcpiRsDumpIrq ( 141 RESOURCE_DATA *Data) 142{ 143 IRQ_RESOURCE *IrqData = (IRQ_RESOURCE*) Data; 144 UINT8 Index = 0; 145 146 147 AcpiOsPrintf ("\tIRQ Resource\n"); 148 149 AcpiOsPrintf ("\t\t%s Triggered\n", 150 LEVEL_SENSITIVE == IrqData->EdgeLevel ? 151 "Level" : "Edge"); 152 153 AcpiOsPrintf ("\t\tActive %s\n", 154 ACTIVE_LOW == IrqData->ActiveHighLow ? 155 "Low" : "High"); 156 157 AcpiOsPrintf ("\t\t%s\n", 158 SHARED == IrqData->SharedExclusive ? 159 "Shared" : "Exclusive"); 160 161 AcpiOsPrintf ("\t\t%X Interrupts ( ", 162 IrqData->NumberOfInterrupts); 163 164 for (Index = 0; Index < IrqData->NumberOfInterrupts; Index++) 165 { 166 AcpiOsPrintf ("%X ", IrqData->Interrupts[Index]); 167 } 168 169 AcpiOsPrintf (")\n"); 170 return; 171} 172 173 174/******************************************************************************* 175 * 176 * FUNCTION: AcpiRsDumpDma 177 * 178 * PARAMETERS: Data - pointer to the resource structure to dump. 179 * 180 * RETURN: 181 * 182 * DESCRIPTION: Prints out the various members of the Data structure type. 183 * 184 ******************************************************************************/ 185 186void 187AcpiRsDumpDma ( 188 RESOURCE_DATA *Data) 189{ 190 DMA_RESOURCE *DmaData = (DMA_RESOURCE*) Data; 191 UINT8 Index = 0; 192 193 194 AcpiOsPrintf ("\tDMA Resource\n"); 195 196 switch (DmaData->Type) 197 { 198 case COMPATIBILITY: 199 AcpiOsPrintf ("\t\tCompatibility mode\n"); 200 break; 201 202 case TYPE_A: 203 AcpiOsPrintf ("\t\tType A\n"); 204 break; 205 206 case TYPE_B: 207 AcpiOsPrintf ("\t\tType B\n"); 208 break; 209 210 case TYPE_F: 211 AcpiOsPrintf ("\t\tType F\n"); 212 break; 213 214 default: 215 AcpiOsPrintf ("\t\tInvalid DMA type\n"); 216 break; 217 } 218 219 AcpiOsPrintf ("\t\t%sBus Master\n", 220 BUS_MASTER == DmaData->BusMaster ? 221 "" : "Not a "); 222 223 switch (DmaData->Transfer) 224 { 225 case TRANSFER_8: 226 AcpiOsPrintf ("\t\t8-bit only transfer\n"); 227 break; 228 229 case TRANSFER_8_16: 230 AcpiOsPrintf ("\t\t8 and 16-bit transfer\n"); 231 break; 232 233 case TRANSFER_16: 234 AcpiOsPrintf ("\t\t16 bit only transfer\n"); 235 break; 236 237 default: 238 AcpiOsPrintf ("\t\tInvalid transfer preference\n"); 239 break; 240 } 241 242 AcpiOsPrintf ("\t\tNumber of Channels: %X ( ", 243 DmaData->NumberOfChannels); 244 245 for (Index = 0; Index < DmaData->NumberOfChannels; Index++) 246 { 247 AcpiOsPrintf ("%X ", DmaData->Channels[Index]); 248 } 249 250 AcpiOsPrintf (")\n"); 251 return; 252} 253 254 255/******************************************************************************* 256 * 257 * FUNCTION: AcpiRsDumpStartDependentFunctions 258 * 259 * PARAMETERS: Data - pointer to the resource structure to dump. 260 * 261 * RETURN: 262 * 263 * DESCRIPTION: Prints out the various members of the Data structure type. 264 * 265 ******************************************************************************/ 266 267void 268AcpiRsDumpStartDependentFunctions ( 269 RESOURCE_DATA *Data) 270{ 271 START_DEPENDENT_FUNCTIONS_RESOURCE *SdfData = 272 (START_DEPENDENT_FUNCTIONS_RESOURCE*) Data; 273 274 275 AcpiOsPrintf ("\tStart Dependent Functions Resource\n"); 276 277 switch (SdfData->CompatibilityPriority) 278 { 279 case GOOD_CONFIGURATION: 280 AcpiOsPrintf ("\t\tGood configuration\n"); 281 break; 282 283 case ACCEPTABLE_CONFIGURATION: 284 AcpiOsPrintf ("\t\tAcceptable configuration\n"); 285 break; 286 287 case SUB_OPTIMAL_CONFIGURATION: 288 AcpiOsPrintf ("\t\tSub-optimal configuration\n"); 289 break; 290 291 default: 292 AcpiOsPrintf ("\t\tInvalid compatibility priority\n"); 293 break; 294 } 295 296 switch(SdfData->PerformanceRobustness) 297 { 298 case GOOD_CONFIGURATION: 299 AcpiOsPrintf ("\t\tGood configuration\n"); 300 break; 301 302 case ACCEPTABLE_CONFIGURATION: 303 AcpiOsPrintf ("\t\tAcceptable configuration\n"); 304 break; 305 306 case SUB_OPTIMAL_CONFIGURATION: 307 AcpiOsPrintf ("\t\tSub-optimal configuration\n"); 308 break; 309 310 default: 311 AcpiOsPrintf ("\t\tInvalid performance " 312 "robustness preference\n"); 313 break; 314 } 315 316 return; 317} 318 319 320/******************************************************************************* 321 * 322 * FUNCTION: AcpiRsDumpIo 323 * 324 * PARAMETERS: Data - pointer to the resource structure to dump. 325 * 326 * RETURN: 327 * 328 * DESCRIPTION: Prints out the various members of the Data structure type. 329 * 330 ******************************************************************************/ 331 332void 333AcpiRsDumpIo ( 334 RESOURCE_DATA *Data) 335{ 336 IO_RESOURCE *IoData = (IO_RESOURCE*) Data; 337 338 339 AcpiOsPrintf ("\tIo Resource\n"); 340 341 AcpiOsPrintf ("\t\t%d bit decode\n", 342 DECODE_16 == IoData->IoDecode ? 16 : 10); 343 344 AcpiOsPrintf ("\t\tRange minimum base: %08X\n", 345 IoData->MinBaseAddress); 346 347 AcpiOsPrintf ("\t\tRange maximum base: %08X\n", 348 IoData->MaxBaseAddress); 349 350 AcpiOsPrintf ("\t\tAlignment: %08X\n", 351 IoData->Alignment); 352 353 AcpiOsPrintf ("\t\tRange Length: %08X\n", 354 IoData->RangeLength); 355 356 return; 357} 358 359 360/******************************************************************************* 361 * 362 * FUNCTION: AcpiRsDumpFixedIo 363 * 364 * PARAMETERS: Data - pointer to the resource structure to dump. 365 * 366 * RETURN: 367 * 368 * DESCRIPTION: Prints out the various members of the Data structure type. 369 * 370 ******************************************************************************/ 371 372void 373AcpiRsDumpFixedIo ( 374 RESOURCE_DATA *Data) 375{ 376 FIXED_IO_RESOURCE *FixedIoData = (FIXED_IO_RESOURCE*) Data; 377 378 379 AcpiOsPrintf ("\tFixed Io Resource\n"); 380 AcpiOsPrintf ("\t\tRange base address: %08X", 381 FixedIoData->BaseAddress); 382 383 AcpiOsPrintf ("\t\tRange length: %08X", 384 FixedIoData->RangeLength); 385 386 return; 387} 388 389 390/******************************************************************************* 391 * 392 * FUNCTION: AcpiRsDumpVendorSpecific 393 * 394 * PARAMETERS: Data - pointer to the resource structure to dump. 395 * 396 * RETURN: 397 * 398 * DESCRIPTION: Prints out the various members of the Data structure type. 399 * 400 ******************************************************************************/ 401 402void 403AcpiRsDumpVendorSpecific ( 404 RESOURCE_DATA *Data) 405{ 406 VENDOR_RESOURCE *VendorData = (VENDOR_RESOURCE*) Data; 407 UINT16 Index = 0; 408 409 410 AcpiOsPrintf ("\tVendor Specific Resource\n"); 411 412 AcpiOsPrintf ("\t\tLength: %08X\n", VendorData->Length); 413 414 for (Index = 0; Index < VendorData->Length; Index++) 415 { 416 AcpiOsPrintf ("\t\tByte %X: %08X\n", 417 Index, VendorData->Reserved[Index]); 418 } 419 420 return; 421} 422 423 424/******************************************************************************* 425 * 426 * FUNCTION: AcpiRsDumpMemory24 427 * 428 * PARAMETERS: Data - pointer to the resource structure to dump. 429 * 430 * RETURN: 431 * 432 * DESCRIPTION: Prints out the various members of the Data structure type. 433 * 434 ******************************************************************************/ 435 436void 437AcpiRsDumpMemory24 ( 438 RESOURCE_DATA *Data) 439{ 440 MEMORY24_RESOURCE *Memory24Data = (MEMORY24_RESOURCE*) Data; 441 442 443 AcpiOsPrintf ("\t24-Bit Memory Range Resource\n"); 444 445 AcpiOsPrintf ("\t\tRead%s\n", 446 READ_WRITE_MEMORY == 447 Memory24Data->ReadWriteAttribute ? 448 "/Write" : " only"); 449 450 AcpiOsPrintf ("\t\tRange minimum base: %08X\n", 451 Memory24Data->MinBaseAddress); 452 453 AcpiOsPrintf ("\t\tRange maximum base: %08X\n", 454 Memory24Data->MaxBaseAddress); 455 456 AcpiOsPrintf ("\t\tAlignment: %08X\n", 457 Memory24Data->Alignment); 458 459 AcpiOsPrintf ("\t\tRange length: %08X\n", 460 Memory24Data->RangeLength); 461 462 return; 463} 464 465 466/******************************************************************************* 467 * 468 * FUNCTION: AcpiRsDumpMemory32 469 * 470 * PARAMETERS: Data - pointer to the resource structure to dump. 471 * 472 * RETURN: 473 * 474 * DESCRIPTION: Prints out the various members of the Data structure type. 475 * 476 ******************************************************************************/ 477 478void 479AcpiRsDumpMemory32 ( 480 RESOURCE_DATA *Data) 481{ 482 MEMORY32_RESOURCE *Memory32Data = (MEMORY32_RESOURCE*) Data; 483 484 485 AcpiOsPrintf ("\t32-Bit Memory Range Resource\n"); 486 487 AcpiOsPrintf ("\t\tRead%s\n", 488 READ_WRITE_MEMORY == 489 Memory32Data->ReadWriteAttribute ? 490 "/Write" : " only"); 491 492 AcpiOsPrintf ("\t\tRange minimum base: %08X\n", 493 Memory32Data->MinBaseAddress); 494 495 AcpiOsPrintf ("\t\tRange maximum base: %08X\n", 496 Memory32Data->MaxBaseAddress); 497 498 AcpiOsPrintf ("\t\tAlignment: %08X\n", 499 Memory32Data->Alignment); 500 501 AcpiOsPrintf ("\t\tRange length: %08X\n", 502 Memory32Data->RangeLength); 503 504 return; 505} 506 507 508/******************************************************************************* 509 * 510 * FUNCTION: AcpiRsDumpFixedMemory32 511 * 512 * PARAMETERS: Data - pointer to the resource structure to dump. 513 * 514 * RETURN: 515 * 516 * DESCRIPTION: Prints out the various members of the Data structure type. 517 * 518 ******************************************************************************/ 519 520void 521AcpiRsDumpFixedMemory32 ( 522 RESOURCE_DATA *Data) 523{ 524 FIXED_MEMORY32_RESOURCE *FixedMemory32Data = (FIXED_MEMORY32_RESOURCE*) Data; 525 526 527 AcpiOsPrintf ("\t32-Bit Fixed Location Memory Range Resource\n"); 528 529 AcpiOsPrintf ("\t\tRead%s\n", 530 READ_WRITE_MEMORY == 531 FixedMemory32Data->ReadWriteAttribute ? 532 "/Write" : " Only"); 533 534 AcpiOsPrintf ("\t\tRange base address: %08X\n", 535 FixedMemory32Data->RangeBaseAddress); 536 537 AcpiOsPrintf ("\t\tRange length: %08X\n", 538 FixedMemory32Data->RangeLength); 539 540 return; 541} 542 543 544/******************************************************************************* 545 * 546 * FUNCTION: AcpiRsDumpAddress16 547 * 548 * PARAMETERS: Data - pointer to the resource structure to dump. 549 * 550 * RETURN: 551 * 552 * DESCRIPTION: Prints out the various members of the Data structure type. 553 * 554 ******************************************************************************/ 555 556void 557AcpiRsDumpAddress16 ( 558 RESOURCE_DATA *Data) 559{ 560 ADDRESS16_RESOURCE *Address16Data = (ADDRESS16_RESOURCE*) Data; 561 562 563 AcpiOsPrintf ("\t16-Bit Address Space Resource\n"); 564 AcpiOsPrintf ("\t\tResource Type: "); 565 566 switch (Address16Data->ResourceType) 567 { 568 case MEMORY_RANGE: 569 570 AcpiOsPrintf ("Memory Range\n"); 571 572 switch (Address16Data->Attribute.Memory.CacheAttribute) 573 { 574 case NON_CACHEABLE_MEMORY: 575 AcpiOsPrintf ("\t\tType Specific: " 576 "Noncacheable memory\n"); 577 break; 578 579 case CACHABLE_MEMORY: 580 AcpiOsPrintf ("\t\tType Specific: " 581 "Cacheable memory\n"); 582 break; 583 584 case WRITE_COMBINING_MEMORY: 585 AcpiOsPrintf ("\t\tType Specific: " 586 "Write-combining memory\n"); 587 break; 588 589 case PREFETCHABLE_MEMORY: 590 AcpiOsPrintf ("\t\tType Specific: " 591 "Prefetchable memory\n"); 592 break; 593 594 default: 595 AcpiOsPrintf ("\t\tType Specific: " 596 "Invalid cache attribute\n"); 597 break; 598 } 599 600 AcpiOsPrintf ("\t\tType Specific: Read%s\n", 601 READ_WRITE_MEMORY == 602 Address16Data->Attribute.Memory.ReadWriteAttribute ? 603 "/Write" : " Only"); 604 break; 605 606 case IO_RANGE: 607 608 AcpiOsPrintf ("I/O Range\n"); 609 610 switch (Address16Data->Attribute.Io.RangeAttribute) 611 { 612 case NON_ISA_ONLY_RANGES: 613 AcpiOsPrintf ("\t\tType Specific: " 614 "Non-ISA Io Addresses\n"); 615 break; 616 617 case ISA_ONLY_RANGES: 618 AcpiOsPrintf ("\t\tType Specific: " 619 "ISA Io Addresses\n"); 620 break; 621 622 case ENTIRE_RANGE: 623 AcpiOsPrintf ("\t\tType Specific: " 624 "ISA and non-ISA Io Addresses\n"); 625 break; 626 627 default: 628 AcpiOsPrintf ("\t\tType Specific: " 629 "Invalid range attribute\n"); 630 break; 631 } 632 break; 633 634 case BUS_NUMBER_RANGE: 635 636 AcpiOsPrintf ("Bus Number Range\n"); 637 break; 638 639 default: 640 641 AcpiOsPrintf ("Invalid resource type. Exiting.\n"); 642 return; 643 } 644 645 AcpiOsPrintf ("\t\tResource %s\n", 646 CONSUMER == Address16Data->ProducerConsumer ? 647 "Consumer" : "Producer"); 648 649 AcpiOsPrintf ("\t\t%s decode\n", 650 SUB_DECODE == Address16Data->Decode ? 651 "Subtractive" : "Positive"); 652 653 AcpiOsPrintf ("\t\tMin address is %s fixed\n", 654 ADDRESS_FIXED == Address16Data->MinAddressFixed ? 655 "" : "not"); 656 657 AcpiOsPrintf ("\t\tMax address is %s fixed\n", 658 ADDRESS_FIXED == Address16Data->MaxAddressFixed ? 659 "" : "not"); 660 661 AcpiOsPrintf ("\t\tGranularity: %08X\n", 662 Address16Data->Granularity); 663 664 AcpiOsPrintf ("\t\tAddress range min: %08X\n", 665 Address16Data->MinAddressRange); 666 667 AcpiOsPrintf ("\t\tAddress range max: %08X\n", 668 Address16Data->MaxAddressRange); 669 670 AcpiOsPrintf ("\t\tAddress translation offset: %08X\n", 671 Address16Data->AddressTranslationOffset); 672 673 AcpiOsPrintf ("\t\tAddress Length: %08X\n", 674 Address16Data->AddressLength); 675 676 if (0xFF != Address16Data->ResourceSourceIndex) 677 { 678 AcpiOsPrintf ("\t\tResource Source Index: %X\n", 679 Address16Data->ResourceSourceIndex); 680 AcpiOsPrintf ("\t\tResource Source: %s\n", 681 Address16Data->ResourceSource); 682 } 683 684 return; 685} 686 687 688/******************************************************************************* 689 * 690 * FUNCTION: AcpiRsDumpAddress32 691 * 692 * PARAMETERS: Data - pointer to the resource structure to dump. 693 * 694 * RETURN: 695 * 696 * DESCRIPTION: Prints out the various members of the Data structure type. 697 * 698 ******************************************************************************/ 699 700void 701AcpiRsDumpAddress32 ( 702 RESOURCE_DATA *Data) 703{ 704 ADDRESS32_RESOURCE *Address32Data = (ADDRESS32_RESOURCE*) Data; 705 706 707 AcpiOsPrintf ("\t32-Bit Address Space Resource\n"); 708 709 switch (Address32Data->ResourceType) 710 { 711 case MEMORY_RANGE: 712 713 AcpiOsPrintf ("\t\tResource Type: Memory Range\n"); 714 715 switch (Address32Data->Attribute.Memory.CacheAttribute) 716 { 717 case NON_CACHEABLE_MEMORY: 718 AcpiOsPrintf ("\t\tType Specific: " 719 "Noncacheable memory\n"); 720 break; 721 722 case CACHABLE_MEMORY: 723 AcpiOsPrintf ("\t\tType Specific: " 724 "Cacheable memory\n"); 725 break; 726 727 case WRITE_COMBINING_MEMORY: 728 AcpiOsPrintf ("\t\tType Specific: " 729 "Write-combining memory\n"); 730 break; 731 732 case PREFETCHABLE_MEMORY: 733 AcpiOsPrintf ("\t\tType Specific: " 734 "Prefetchable memory\n"); 735 break; 736 737 default: 738 AcpiOsPrintf ("\t\tType Specific: " 739 "Invalid cache attribute\n"); 740 break; 741 } 742 743 AcpiOsPrintf ("\t\tType Specific: Read%s\n", 744 READ_WRITE_MEMORY == 745 Address32Data->Attribute.Memory.ReadWriteAttribute ? 746 "/Write" : " Only"); 747 break; 748 749 case IO_RANGE: 750 751 AcpiOsPrintf ("\t\tResource Type: Io Range\n"); 752 753 switch (Address32Data->Attribute.Io.RangeAttribute) 754 { 755 case NON_ISA_ONLY_RANGES: 756 AcpiOsPrintf ("\t\tType Specific: " 757 "Non-ISA Io Addresses\n"); 758 break; 759 760 case ISA_ONLY_RANGES: 761 AcpiOsPrintf ("\t\tType Specific: " 762 "ISA Io Addresses\n"); 763 break; 764 765 case ENTIRE_RANGE: 766 AcpiOsPrintf ("\t\tType Specific: " 767 "ISA and non-ISA Io Addresses\n"); 768 break; 769 770 default: 771 AcpiOsPrintf ("\t\tType Specific: " 772 "Invalid Range attribute"); 773 break; 774 } 775 break; 776 777 case BUS_NUMBER_RANGE: 778 779 AcpiOsPrintf ("\t\tResource Type: Bus Number Range\n"); 780 break; 781 782 default: 783 784 AcpiOsPrintf ("\t\tInvalid Resource Type..exiting.\n"); 785 return; 786 } 787 788 AcpiOsPrintf ("\t\tResource %s\n", 789 CONSUMER == Address32Data->ProducerConsumer ? 790 "Consumer" : "Producer"); 791 792 AcpiOsPrintf ("\t\t%s decode\n", 793 SUB_DECODE == Address32Data->Decode ? 794 "Subtractive" : "Positive"); 795 796 AcpiOsPrintf ("\t\tMin address is %s fixed\n", 797 ADDRESS_FIXED == Address32Data->MinAddressFixed ? 798 "" : "not "); 799 800 AcpiOsPrintf ("\t\tMax address is %s fixed\n", 801 ADDRESS_FIXED == Address32Data->MaxAddressFixed ? 802 "" : "not "); 803 804 AcpiOsPrintf ("\t\tGranularity: %08X\n", 805 Address32Data->Granularity); 806 807 AcpiOsPrintf ("\t\tAddress range min: %08X\n", 808 Address32Data->MinAddressRange); 809 810 AcpiOsPrintf ("\t\tAddress range max: %08X\n", 811 Address32Data->MaxAddressRange); 812 813 AcpiOsPrintf ("\t\tAddress translation offset: %08X\n", 814 Address32Data->AddressTranslationOffset); 815 816 AcpiOsPrintf ("\t\tAddress Length: %08X\n", 817 Address32Data->AddressLength); 818 819 if(0xFF != Address32Data->ResourceSourceIndex) 820 { 821 AcpiOsPrintf ("\t\tResource Source Index: %X\n", 822 Address32Data->ResourceSourceIndex); 823 AcpiOsPrintf ("\t\tResource Source: %s\n", 824 Address32Data->ResourceSource); 825 } 826 827 return; 828} 829 830 831/******************************************************************************* 832 * 833 * FUNCTION: AcpiRsDumpExtendedIrq 834 * 835 * PARAMETERS: Data - pointer to the resource structure to dump. 836 * 837 * RETURN: 838 * 839 * DESCRIPTION: Prints out the various members of the Data structure type. 840 * 841 ******************************************************************************/ 842 843void 844AcpiRsDumpExtendedIrq ( 845 RESOURCE_DATA *Data) 846{ 847 EXTENDED_IRQ_RESOURCE *ExtIrqData = (EXTENDED_IRQ_RESOURCE*) Data; 848 UINT8 Index = 0; 849 850 851 AcpiOsPrintf ("\tExtended IRQ Resource\n"); 852 853 AcpiOsPrintf ("\t\tResource %s\n", 854 CONSUMER == ExtIrqData->ProducerConsumer ? 855 "Consumer" : "Producer"); 856 857 AcpiOsPrintf ("\t\t%s\n", 858 LEVEL_SENSITIVE == ExtIrqData->EdgeLevel ? 859 "Level" : "Edge"); 860 861 AcpiOsPrintf ("\t\tActive %s\n", 862 ACTIVE_LOW == ExtIrqData->ActiveHighLow ? 863 "low" : "high"); 864 865 AcpiOsPrintf ("\t\t%s\n", 866 SHARED == ExtIrqData->SharedExclusive ? 867 "Shared" : "Exclusive"); 868 869 AcpiOsPrintf ("\t\tInterrupts : %X ( ", 870 ExtIrqData->NumberOfInterrupts); 871 872 for (Index = 0; Index < ExtIrqData->NumberOfInterrupts; Index++) 873 { 874 AcpiOsPrintf ("%X ", ExtIrqData->Interrupts[Index]); 875 } 876 877 AcpiOsPrintf (")\n"); 878 879 if(0xFF != ExtIrqData->ResourceSourceIndex) 880 { 881 AcpiOsPrintf ("\t\tResource Source Index: %X", 882 ExtIrqData->ResourceSourceIndex); 883 AcpiOsPrintf ("\t\tResource Source: %s", 884 ExtIrqData->ResourceSource); 885 } 886 887 return; 888} 889 890 891/******************************************************************************* 892 * 893 * FUNCTION: AcpiRsDumpResourceList 894 * 895 * PARAMETERS: Data - pointer to the resource structure to dump. 896 * 897 * RETURN: 898 * 899 * DESCRIPTION: Dispatches the structure to the correct dump routine. 900 * 901 ******************************************************************************/ 902 903void 904AcpiRsDumpResourceList ( 905 RESOURCE *Resource) 906{ 907 UINT8 Count = 0; 908 BOOLEAN Done = FALSE; 909 910 911 if (AcpiDbgLevel & TRACE_RESOURCES && _COMPONENT & AcpiDbgLayer) 912 { 913 while (!Done) 914 { 915 AcpiOsPrintf ("\tResource structure %x.\n", Count++); 916 917 switch (Resource->Id) 918 { 919 case Irq: 920 AcpiRsDumpIrq (&Resource->Data); 921 break; 922 923 case Dma: 924 AcpiRsDumpDma (&Resource->Data); 925 break; 926 927 case StartDependentFunctions: 928 AcpiRsDumpStartDependentFunctions (&Resource->Data); 929 break; 930 931 case EndDependentFunctions: 932 AcpiOsPrintf ("\tEndDependentFunctions Resource\n"); 933 /* AcpiRsDumpEndDependentFunctions (Resource->Data);*/ 934 break; 935 936 case Io: 937 AcpiRsDumpIo (&Resource->Data); 938 break; 939 940 case FixedIo: 941 AcpiRsDumpFixedIo (&Resource->Data); 942 break; 943 944 case VendorSpecific: 945 AcpiRsDumpVendorSpecific (&Resource->Data); 946 break; 947 948 case EndTag: 949 /*RsDumpEndTag (Resource->Data);*/ 950 AcpiOsPrintf ("\tEndTag Resource\n"); 951 Done = TRUE; 952 break; 953 954 case Memory24: 955 AcpiRsDumpMemory24 (&Resource->Data); 956 break; 957 958 case Memory32: 959 AcpiRsDumpMemory32 (&Resource->Data); 960 break; 961 962 case FixedMemory32: 963 AcpiRsDumpFixedMemory32 (&Resource->Data); 964 break; 965 966 case Address16: 967 AcpiRsDumpAddress16 (&Resource->Data); 968 break; 969 970 case Address32: 971 AcpiRsDumpAddress32 (&Resource->Data); 972 break; 973 974 case ExtendedIrq: 975 AcpiRsDumpExtendedIrq (&Resource->Data); 976 break; 977 978 default: 979 AcpiOsPrintf ("Invalid resource type\n"); 980 break; 981 982 } 983 984 Resource = (RESOURCE *) ((NATIVE_UINT) Resource + 985 (NATIVE_UINT) Resource->Length); 986 } 987 } 988 989 return; 990} 991 992/******************************************************************************* 993 * 994 * FUNCTION: AcpiRsDumpIrqList 995 * 996 * PARAMETERS: Data - pointer to the routing table to dump. 997 * 998 * RETURN: 999 * 1000 * DESCRIPTION: Dispatches the structures to the correct dump routine. 1001 * 1002 ******************************************************************************/ 1003 1004void 1005AcpiRsDumpIrqList ( 1006 UINT8 *RouteTable) 1007{ 1008 UINT8 *Buffer = RouteTable; 1009 UINT8 Count = 0; 1010 BOOLEAN Done = FALSE; 1011 PCI_ROUTING_TABLE *PrtElement; 1012 1013 1014 if (AcpiDbgLevel & TRACE_RESOURCES && _COMPONENT & AcpiDbgLayer) 1015 { 1016 PrtElement = (PCI_ROUTING_TABLE *)Buffer; 1017 1018 while (!Done) 1019 { 1020 AcpiOsPrintf ("\tPCI IRQ Routing Table structure %X.\n", Count++); 1021 1022 AcpiOsPrintf ("\t\tAddress: %X\n", 1023 PrtElement->Data.Address); 1024 1025 AcpiOsPrintf ("\t\tPin: %X\n", PrtElement->Data.Pin); 1026 1027 AcpiOsPrintf ("\t\tSource: %s\n", PrtElement->Data.Source); 1028 1029 AcpiOsPrintf ("\t\tSourceIndex: %X\n", 1030 PrtElement->Data.SourceIndex); 1031 1032 Buffer += PrtElement->Length; 1033 1034 PrtElement = (PCI_ROUTING_TABLE *)Buffer; 1035 1036 if(0 == PrtElement->Length) 1037 { 1038 Done = TRUE; 1039 } 1040 } 1041 } 1042 1043 return; 1044} 1045 1046