rslist.c revision 67754
1184610Salfred/******************************************************************************* 2184610Salfred * 3184610Salfred * Module Name: rslist - AcpiRsByteStreamToList 4184610Salfred * AcpiListToByteStream 5184610Salfred * $Revision: 8 $ 6184610Salfred * 7184610Salfred ******************************************************************************/ 8184610Salfred 9184610Salfred/****************************************************************************** 10184610Salfred * 11184610Salfred * 1. Copyright Notice 12184610Salfred * 13184610Salfred * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights 14184610Salfred * reserved. 15184610Salfred * 16184610Salfred * 2. License 17184610Salfred * 18184610Salfred * 2.1. This is your license from Intel Corp. under its intellectual property 19184610Salfred * rights. You may have additional license terms from the party that provided 20184610Salfred * you this software, covering your right to use that party's intellectual 21184610Salfred * property rights. 22184610Salfred * 23184610Salfred * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 24184610Salfred * copy of the source code appearing in this file ("Covered Code") an 25184610Salfred * irrevocable, perpetual, worldwide license under Intel's copyrights in the 26184610Salfred * base code distributed originally by Intel ("Original Intel Code") to copy, 27184610Salfred * make derivatives, distribute, use and display any portion of the Covered 28184610Salfred * Code in any form, with the right to sublicense such rights; and 29184610Salfred * 30184610Salfred * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 31184610Salfred * license (with the right to sublicense), under only those claims of Intel 32184610Salfred * patents that are infringed by the Original Intel Code, to make, use, sell, 33184610Salfred * offer to sell, and import the Covered Code and derivative works thereof 34240078Shselasky * solely to the minimum extent necessary to exercise the above copyright 35240078Shselasky * license, and in no event shall the patent license extend to any additions 36184610Salfred * to or modifications of the Original Intel Code. No other license or right 37345545Shselasky * is granted directly or by implication, estoppel or otherwise; 38240078Shselasky * 39240609Shselasky * The above copyright and patent license is granted only if the following 40240078Shselasky * conditions are met: 41240078Shselasky * 42240078Shselasky * 3. Conditions 43240078Shselasky * 44240078Shselasky * 3.1. Redistribution of Source with Rights to Further Distribute Source. 45184610Salfred * Redistribution of source code of any substantial portion of the Covered 46184610Salfred * Code or modification with rights to further distribute source must include 47184610Salfred * the above Copyright Notice, the above License, this list of Conditions, 48184610Salfred * and the following Disclaimer and Export Compliance provision. In addition, 49184610Salfred * Licensee must cause all Covered Code to which Licensee contributes to 50184610Salfred * contain a file documenting the changes Licensee made to create that Covered 51184610Salfred * Code and the date of any change. Licensee must include in that file the 52184610Salfred * documentation of any changes made by any predecessor Licensee. Licensee 53184610Salfred * must include a prominent statement that the modification is derived, 54184610Salfred * directly or indirectly, from Original Intel Code. 55184610Salfred * 56184610Salfred * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 57184610Salfred * Redistribution of source code of any substantial portion of the Covered 58240609Shselasky * Code or modification without rights to further distribute source must 59240078Shselasky * include the following Disclaimer and Export Compliance provision in the 60240078Shselasky * documentation and/or other materials provided with distribution. In 61240078Shselasky * addition, Licensee may not authorize further sublicense of source of any 62240078Shselasky * portion of the Covered Code, and must include terms to the effect that the 63240078Shselasky * license from Licensee to its licensee is limited to the intellectual 64240078Shselasky * property embodied in the software Licensee provides to its licensee, and 65240078Shselasky * not to intellectual property embodied in modifications its licensee may 66184610Salfred * make. 67209452Sthompsa * 68209452Sthompsa * 3.3. Redistribution of Executable. Redistribution in executable form of any 69209452Sthompsa * substantial portion of the Covered Code or modification must reproduce the 70209452Sthompsa * above Copyright Notice, and the following Disclaimer and Export Compliance 71209452Sthompsa * provision in the documentation and/or other materials provided with the 72192984Sthompsa * distribution. 73184610Salfred * 74184610Salfred * 3.4. Intel retains all right, title, and interest in and to the Original 75184610Salfred * Intel Code. 76184610Salfred * 77184610Salfred * 3.5. Neither the name Intel nor any other trademark owned or controlled by 78184610Salfred * Intel shall be used in advertising or otherwise to promote the sale, use or 79184610Salfred * other dealings in products derived from or relating to the Covered Code 80184610Salfred * without prior written authorization from Intel. 81184610Salfred * 82184610Salfred * 4. Disclaimer and Export Compliance 83184610Salfred * 84184610Salfred * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 85184610Salfred * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 86184610Salfred * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 87184610Salfred * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 88184610Salfred * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 89203678Sbrucec * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 90184610Salfred * PARTICULAR PURPOSE. 91203678Sbrucec * 92184610Salfred * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 93184610Salfred * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 94184610Salfred * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 95184610Salfred * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 96184610Salfred * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 97184610Salfred * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 98184610Salfred * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 99184610Salfred * LIMITED REMEDY. 100184610Salfred * 101203678Sbrucec * 4.3. Licensee shall not export, either directly or indirectly, any of this 102184610Salfred * software or system incorporating such software without first obtaining any 103184610Salfred * required license or other approval from the U. S. Department of Commerce or 104184610Salfred * any other agency or department of the United States Government. In the 105184610Salfred * event Licensee exports any such software from the United States or 106184610Salfred * re-exports any such software from a foreign destination, Licensee shall 107184610Salfred * ensure that the distribution and export/re-export of the software is in 108184610Salfred * compliance with all laws, regulations, orders, or other restrictions of the 109184610Salfred * U.S. Export Administration Regulations. Licensee agrees that neither it nor 110203678Sbrucec * any of its subsidiaries will export/re-export any technical data, process, 111184610Salfred * software, or service, directly or indirectly, to any country for which the 112184610Salfred * United States government or any agency thereof requires an export license, 113184610Salfred * other governmental approval, or letter of assurance, without first obtaining 114184610Salfred * such license, approval or letter. 115184610Salfred * 116184610Salfred *****************************************************************************/ 117184610Salfred 118184610Salfred#define __RSLIST_C__ 119184610Salfred 120184610Salfred#include "acpi.h" 121184610Salfred#include "acresrc.h" 122272254Shselasky 123272254Shselasky#define _COMPONENT RESOURCE_MANAGER 124272254Shselasky MODULE_NAME ("rslist") 125272254Shselasky 126272254Shselasky 127272254Shselasky/******************************************************************************* 128272254Shselasky * 129203678Sbrucec * FUNCTION: AcpiRsByteStreamToList 130184610Salfred * 131184610Salfred * PARAMETERS: ByteStreamBuffer - Pointer to the resource byte stream 132184610Salfred * ByteStreamBufferLength - Length of ByteStreamBuffer 133184610Salfred * OutputBuffer - Pointer to the buffer that will 134184610Salfred * contain the output structures 135184610Salfred * 136184610Salfred * RETURN: Status AE_OK if okay, else a valid ACPI_STATUS code 137184610Salfred * 138184610Salfred * DESCRIPTION: Takes the resource byte stream and parses it, creating a 139184610Salfred * linked list of resources in the caller's output buffer 140233774Shselasky * 141184610Salfred ******************************************************************************/ 142233774Shselasky 143184610SalfredACPI_STATUS 144184610SalfredAcpiRsByteStreamToList ( 145184610Salfred UINT8 *ByteStreamBuffer, 146184610Salfred UINT32 ByteStreamBufferLength, 147203678Sbrucec UINT8 **OutputBuffer) 148184610Salfred{ 149184610Salfred ACPI_STATUS Status; 150184610Salfred UINT32 BytesParsed = 0; 151184610Salfred UINT8 ResourceType = 0; 152184610Salfred UINT32 BytesConsumed = 0; 153184610Salfred UINT8 **Buffer = OutputBuffer; 154184610Salfred UINT32 StructureSize = 0; 155184610Salfred BOOLEAN EndTagProcessed = FALSE; 156184610Salfred 157184610Salfred 158184610Salfred FUNCTION_TRACE ("RsByteStreamToList"); 159184610Salfred 160184610Salfred 161184610Salfred while (BytesParsed < ByteStreamBufferLength && 162184610Salfred FALSE == EndTagProcessed) 163184610Salfred { 164184610Salfred /* 165184610Salfred * Look at the next byte in the stream 166203678Sbrucec */ 167184610Salfred ResourceType = *ByteStreamBuffer; 168184610Salfred 169184610Salfred /* 170184610Salfred * See if this is a small or large resource 171184610Salfred */ 172184610Salfred if(ResourceType & 0x80) 173184610Salfred { 174203678Sbrucec /* 175184610Salfred * Large Resource Type 176184610Salfred */ 177184610Salfred switch (ResourceType) 178184610Salfred { 179184610Salfred case MEMORY_RANGE_24: 180184610Salfred /* 181184610Salfred * 24-Bit Memory Resource 182184610Salfred */ 183184610Salfred Status = AcpiRsMemory24Resource(ByteStreamBuffer, 184184610Salfred &BytesConsumed, 185184610Salfred Buffer, 186184610Salfred &StructureSize); 187184610Salfred 188203678Sbrucec break; 189184610Salfred 190184610Salfred case LARGE_VENDOR_DEFINED: 191184610Salfred /* 192184610Salfred * Vendor Defined Resource 193184610Salfred */ 194184610Salfred Status = AcpiRsVendorResource(ByteStreamBuffer, 195184610Salfred &BytesConsumed, 196184610Salfred Buffer, 197184610Salfred &StructureSize); 198184610Salfred 199184610Salfred break; 200203678Sbrucec 201184610Salfred case MEMORY_RANGE_32: 202184610Salfred /* 203184610Salfred * 32-Bit Memory Range Resource 204184610Salfred */ 205184610Salfred Status = AcpiRsMemory32RangeResource(ByteStreamBuffer, 206184610Salfred &BytesConsumed, 207203678Sbrucec Buffer, 208184610Salfred &StructureSize); 209203678Sbrucec 210184610Salfred break; 211184610Salfred 212184610Salfred case FIXED_MEMORY_RANGE_32: 213184610Salfred /* 214184610Salfred * 32-Bit Fixed Memory Resource 215184610Salfred */ 216184610Salfred Status = AcpiRsFixedMemory32Resource(ByteStreamBuffer, 217184610Salfred &BytesConsumed, 218203678Sbrucec Buffer, 219184610Salfred &StructureSize); 220184610Salfred 221184610Salfred break; 222184610Salfred 223184610Salfred case DWORD_ADDRESS_SPACE: 224184610Salfred /* 225184610Salfred * 32-Bit Address Resource 226184610Salfred */ 227184610Salfred Status = AcpiRsAddress32Resource(ByteStreamBuffer, 228184610Salfred &BytesConsumed, 229203678Sbrucec Buffer, 230184610Salfred &StructureSize); 231184610Salfred 232184610Salfred break; 233184610Salfred 234184610Salfred case WORD_ADDRESS_SPACE: 235184610Salfred /* 236184610Salfred * 16-Bit Address Resource 237184610Salfred */ 238184610Salfred Status = AcpiRsAddress16Resource(ByteStreamBuffer, 239184610Salfred &BytesConsumed, 240184610Salfred Buffer, 241203678Sbrucec &StructureSize); 242184610Salfred 243184610Salfred break; 244184610Salfred 245184610Salfred case EXTENDED_IRQ: 246184610Salfred /* 247184610Salfred * Extended IRQ 248184610Salfred */ 249203678Sbrucec Status = AcpiRsExtendedIrqResource(ByteStreamBuffer, 250184610Salfred &BytesConsumed, 251203678Sbrucec Buffer, 252184610Salfred &StructureSize); 253184610Salfred 254184610Salfred break; 255184610Salfred 256184610Salfred/* TBD: [Future] 64-bit not currently supported */ 257184610Salfred/* 258184610Salfred case 0x8A: 259184610Salfred break; 260203678Sbrucec*/ 261184610Salfred 262184610Salfred default: 263184610Salfred /* 264184610Salfred * If we get here, everything is out of sync, 265184610Salfred * so exit with an error 266184610Salfred */ 267203678Sbrucec return_ACPI_STATUS (AE_AML_ERROR); 268184610Salfred break; 269184610Salfred } 270184610Salfred } 271184610Salfred 272184610Salfred else 273184610Salfred { 274184610Salfred /* 275203678Sbrucec * Small Resource Type 276184610Salfred * Only bits 7:3 are valid 277240078Shselasky */ 278203678Sbrucec ResourceType >>= 3; 279184610Salfred 280184610Salfred switch(ResourceType) 281184610Salfred { 282184610Salfred case IRQ_FORMAT: 283184610Salfred /* 284184610Salfred * IRQ Resource 285184610Salfred */ 286184610Salfred Status = AcpiRsIrqResource(ByteStreamBuffer, 287184610Salfred &BytesConsumed, 288184610Salfred Buffer, 289184610Salfred &StructureSize); 290184610Salfred 291184610Salfred break; 292184610Salfred 293184610Salfred case DMA_FORMAT: 294184610Salfred /* 295184610Salfred * DMA Resource 296184610Salfred */ 297184610Salfred Status = AcpiRsDmaResource(ByteStreamBuffer, 298184610Salfred &BytesConsumed, 299184610Salfred Buffer, 300184610Salfred &StructureSize); 301184610Salfred 302184610Salfred break; 303184610Salfred 304184610Salfred case START_DEPENDENT_TAG: 305184610Salfred /* 306184610Salfred * Start Dependent Functions Resource 307184610Salfred */ 308184610Salfred Status = AcpiRsStartDependentFunctionsResource(ByteStreamBuffer, 309184610Salfred &BytesConsumed, 310184610Salfred Buffer, 311184610Salfred &StructureSize); 312184610Salfred 313184610Salfred break; 314184610Salfred 315184610Salfred case END_DEPENDENT_TAG: 316184610Salfred /* 317184610Salfred * End Dependent Functions Resource 318184610Salfred */ 319184610Salfred Status = AcpiRsEndDependentFunctionsResource(ByteStreamBuffer, 320184610Salfred &BytesConsumed, 321184610Salfred Buffer, 322184610Salfred &StructureSize); 323184610Salfred 324184610Salfred break; 325184610Salfred 326184610Salfred case IO_PORT_DESCRIPTOR: 327184610Salfred /* 328184610Salfred * IO Port Resource 329184610Salfred */ 330184610Salfred Status = AcpiRsIoResource(ByteStreamBuffer, 331184610Salfred &BytesConsumed, 332184610Salfred Buffer, 333184610Salfred &StructureSize); 334184610Salfred 335184610Salfred break; 336184610Salfred 337184610Salfred case FIXED_LOCATION_IO_DESCRIPTOR: 338184610Salfred /* 339184610Salfred * Fixed IO Port Resource 340184610Salfred */ 341184610Salfred Status = AcpiRsFixedIoResource(ByteStreamBuffer, 342184610Salfred &BytesConsumed, 343184610Salfred Buffer, 344184610Salfred &StructureSize); 345184610Salfred 346184610Salfred break; 347184610Salfred 348184610Salfred case SMALL_VENDOR_DEFINED: 349184610Salfred /* 350184610Salfred * Vendor Specific Resource 351184610Salfred */ 352184610Salfred Status = AcpiRsVendorResource(ByteStreamBuffer, 353184610Salfred &BytesConsumed, 354184610Salfred Buffer, 355184610Salfred &StructureSize); 356184610Salfred 357184610Salfred break; 358184610Salfred 359184610Salfred case END_TAG: 360184610Salfred /* 361184610Salfred * End Tag 362184610Salfred */ 363184610Salfred Status = AcpiRsEndTagResource(ByteStreamBuffer, 364184610Salfred &BytesConsumed, 365184610Salfred Buffer, 366184610Salfred &StructureSize); 367184610Salfred EndTagProcessed = TRUE; 368184610Salfred 369184610Salfred break; 370184610Salfred 371184610Salfred default: 372184610Salfred /* 373184610Salfred * If we get here, everything is out of sync, 374184610Salfred * so exit with an error 375184610Salfred */ 376240609Shselasky return_ACPI_STATUS (AE_AML_ERROR); 377240078Shselasky break; 378240078Shselasky 379240078Shselasky } /* switch */ 380240078Shselasky } /* end else */ 381240078Shselasky 382240078Shselasky /* 383184610Salfred * Update the return value and counter 384184610Salfred */ 385184610Salfred BytesParsed += BytesConsumed; 386184610Salfred 387184610Salfred /* 388272254Shselasky * Set the byte stream to point to the next resource 389184610Salfred */ 390184610Salfred ByteStreamBuffer += BytesConsumed; 391184610Salfred 392240609Shselasky /* 393240078Shselasky * Set the Buffer to the next structure 394240078Shselasky */ 395184610Salfred *Buffer += StructureSize; 396184610Salfred 397184610Salfred } /* end while */ 398184610Salfred 399184610Salfred /* 400184610Salfred * Check the reason for exiting the while loop 401184610Salfred */ 402184610Salfred if (!(ByteStreamBufferLength == BytesParsed) || 403184610Salfred (TRUE != EndTagProcessed)) 404184610Salfred { 405184610Salfred return_ACPI_STATUS (AE_AML_ERROR); 406184610Salfred } 407184610Salfred 408184610Salfred return_ACPI_STATUS (AE_OK); 409184610Salfred} 410184610Salfred 411184610Salfred 412184610Salfred/******************************************************************************* 413184610Salfred * 414184610Salfred * FUNCTION: AcpiRsListToByteStream 415184610Salfred * 416184610Salfred * PARAMETERS: LinkedList - Pointer to the resource linked list 417184610Salfred * ByteSteamSizeNeeded - Calculated size of the byte stream 418184610Salfred * needed from calling 419184610Salfred * AcpiRsCalculateByteStreamLength() 420184610Salfred * The size of the OutputBuffer is 421184610Salfred * guaranteed to be >= 422184610Salfred * ByteStreamSizeNeeded 423184610Salfred * OutputBuffer - Pointer to the buffer that will 424184610Salfred * contain the byte stream 425184610Salfred * 426184610Salfred * RETURN: Status AE_OK if okay, else a valid ACPI_STATUS code 427184610Salfred * 428184610Salfred * DESCRIPTION: Takes the resource linked list and parses it, creating a 429184610Salfred * byte stream of resources in the caller's output buffer 430184610Salfred * 431184610Salfred ******************************************************************************/ 432184610Salfred 433184610SalfredACPI_STATUS 434184610SalfredAcpiRsListToByteStream ( 435184610Salfred RESOURCE *LinkedList, 436184610Salfred UINT32 ByteStreamSizeNeeded, 437184610Salfred UINT8 **OutputBuffer) 438184610Salfred{ 439184610Salfred ACPI_STATUS Status; 440184610Salfred UINT8 *Buffer = *OutputBuffer; 441240078Shselasky UINT32 BytesConsumed = 0; 442240078Shselasky BOOLEAN Done = FALSE; 443240078Shselasky 444240078Shselasky 445240078Shselasky FUNCTION_TRACE ("RsListToByteStream"); 446240609Shselasky 447240078Shselasky while (!Done) 448240078Shselasky { 449240078Shselasky switch (LinkedList->Id) 450240078Shselasky { 451240078Shselasky case Irq: 452240078Shselasky /* 453240078Shselasky * IRQ Resource 454240078Shselasky */ 455240078Shselasky Status = AcpiRsIrqStream (LinkedList, 456240078Shselasky &Buffer, 457240078Shselasky &BytesConsumed); 458240078Shselasky break; 459240078Shselasky 460240078Shselasky case Dma: 461240078Shselasky /* 462240078Shselasky * DMA Resource 463240078Shselasky */ 464240078Shselasky Status = AcpiRsDmaStream (LinkedList, 465240078Shselasky &Buffer, 466240078Shselasky &BytesConsumed); 467240078Shselasky break; 468240078Shselasky 469240078Shselasky case StartDependentFunctions: 470240078Shselasky /* 471240078Shselasky * Start Dependent Functions Resource 472240078Shselasky */ 473240078Shselasky Status = AcpiRsStartDependentFunctionsStream (LinkedList, 474240078Shselasky &Buffer, 475240078Shselasky &BytesConsumed); 476240078Shselasky break; 477240078Shselasky 478240078Shselasky case EndDependentFunctions: 479240078Shselasky /* 480240078Shselasky * End Dependent Functions Resource 481240078Shselasky */ 482240078Shselasky Status = AcpiRsEndDependentFunctionsStream (LinkedList, 483240078Shselasky &Buffer, 484240078Shselasky &BytesConsumed); 485240078Shselasky break; 486240078Shselasky 487240078Shselasky case Io: 488240078Shselasky /* 489240078Shselasky * IO Port Resource 490240078Shselasky */ 491240078Shselasky Status = AcpiRsIoStream (LinkedList, 492240078Shselasky &Buffer, 493240078Shselasky &BytesConsumed); 494240078Shselasky break; 495240078Shselasky 496240078Shselasky case FixedIo: 497240078Shselasky /* 498240078Shselasky * Fixed IO Port Resource 499240078Shselasky */ 500240609Shselasky Status = AcpiRsFixedIoStream (LinkedList, 501240609Shselasky &Buffer, 502240609Shselasky &BytesConsumed); 503240078Shselasky break; 504240078Shselasky 505240078Shselasky case VendorSpecific: 506240078Shselasky /* 507240078Shselasky * Vendor Defined Resource 508240078Shselasky */ 509240078Shselasky Status = AcpiRsVendorStream (LinkedList, 510240078Shselasky &Buffer, 511240078Shselasky &BytesConsumed); 512240078Shselasky break; 513240078Shselasky 514240078Shselasky case EndTag: 515240078Shselasky /* 516240078Shselasky * End Tag 517240078Shselasky */ 518240078Shselasky Status = AcpiRsEndTagStream (LinkedList, 519240078Shselasky &Buffer, 520240078Shselasky &BytesConsumed); 521240078Shselasky 522240078Shselasky /* 523240078Shselasky * An End Tag indicates the end of the Resource Template 524240078Shselasky */ 525240078Shselasky Done = TRUE; 526240078Shselasky break; 527240078Shselasky 528240078Shselasky case Memory24: 529240078Shselasky /* 530240078Shselasky * 24-Bit Memory Resource 531240078Shselasky */ 532240078Shselasky Status = AcpiRsMemory24Stream (LinkedList, 533240078Shselasky &Buffer, 534240078Shselasky &BytesConsumed); 535240078Shselasky break; 536240078Shselasky 537240078Shselasky case Memory32: 538240078Shselasky /* 539240078Shselasky * 32-Bit Memory Range Resource 540240078Shselasky */ 541240078Shselasky Status = AcpiRsMemory32RangeStream (LinkedList, 542240078Shselasky &Buffer, 543240078Shselasky &BytesConsumed); 544240078Shselasky break; 545240078Shselasky 546240078Shselasky case FixedMemory32: 547240078Shselasky /* 548240078Shselasky * 32-Bit Fixed Memory Resource 549240078Shselasky */ 550240078Shselasky Status = AcpiRsFixedMemory32Stream (LinkedList, 551240078Shselasky &Buffer, 552240078Shselasky &BytesConsumed); 553240078Shselasky break; 554240078Shselasky 555240078Shselasky case Address16: 556240078Shselasky /* 557240078Shselasky * 16-Bit Address Descriptor Resource 558240078Shselasky */ 559240078Shselasky Status = AcpiRsAddress16Stream (LinkedList, 560240078Shselasky &Buffer, 561240078Shselasky &BytesConsumed); 562240078Shselasky break; 563240078Shselasky 564240078Shselasky case Address32: 565240078Shselasky /* 566240078Shselasky * 32-Bit Address Descriptor Resource 567240078Shselasky */ 568240078Shselasky Status = AcpiRsAddress32Stream (LinkedList, 569240078Shselasky &Buffer, 570240078Shselasky &BytesConsumed); 571240078Shselasky break; 572240078Shselasky 573240078Shselasky case ExtendedIrq: 574240078Shselasky /* 575240078Shselasky * Extended IRQ Resource 576240078Shselasky */ 577240078Shselasky Status = AcpiRsExtendedIrqStream (LinkedList, 578240078Shselasky &Buffer, 579240078Shselasky &BytesConsumed); 580240078Shselasky break; 581240078Shselasky 582240078Shselasky default: 583240078Shselasky /* 584240078Shselasky * If we get here, everything is out of sync, 585240078Shselasky * so exit with an error 586240078Shselasky */ 587240078Shselasky return_ACPI_STATUS (AE_BAD_DATA); 588240078Shselasky break; 589240078Shselasky 590240078Shselasky } /* switch (LinkedList->Id) */ 591240078Shselasky 592240078Shselasky /* 593240078Shselasky * Set the Buffer to point to the open byte 594240078Shselasky */ 595240078Shselasky Buffer += BytesConsumed; 596240078Shselasky 597240078Shselasky /* 598240078Shselasky * Point to the next object 599240078Shselasky */ 600240078Shselasky LinkedList = (RESOURCE *) ((NATIVE_UINT) LinkedList + 601240078Shselasky (NATIVE_UINT) LinkedList->Length); 602240078Shselasky } 603240078Shselasky 604240609Shselasky return_ACPI_STATUS (AE_OK); 605240078Shselasky} 606240078Shselasky 607240078Shselasky