167754Smsmith/****************************************************************************** 267754Smsmith * 367754Smsmith * Name: acresrc.h - Resource Manager function prototypes 467754Smsmith * 567754Smsmith *****************************************************************************/ 667754Smsmith 7316303Sjkim/****************************************************************************** 8316303Sjkim * 9316303Sjkim * 1. Copyright Notice 10316303Sjkim * 11316303Sjkim * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. 1270243Smsmith * All rights reserved. 1367754Smsmith * 14316303Sjkim * 2. License 15316303Sjkim * 16316303Sjkim * 2.1. This is your license from Intel Corp. under its intellectual property 17316303Sjkim * rights. You may have additional license terms from the party that provided 18316303Sjkim * you this software, covering your right to use that party's intellectual 19316303Sjkim * property rights. 20316303Sjkim * 21316303Sjkim * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22316303Sjkim * copy of the source code appearing in this file ("Covered Code") an 23316303Sjkim * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24316303Sjkim * base code distributed originally by Intel ("Original Intel Code") to copy, 25316303Sjkim 26316303Sjkim * make derivatives, distribute, use and display any portion of the Covered 27316303Sjkim * Code in any form, with the right to sublicense such rights; and 28316303Sjkim * 29316303Sjkim * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30316303Sjkim * license (with the right to sublicense), under only those claims of Intel 31316303Sjkim * patents that are infringed by the Original Intel Code, to make, use, sell, 32316303Sjkim * offer to sell, and import the Covered Code and derivative works thereof 33316303Sjkim * solely to the minimum extent necessary to exercise the above copyright 34316303Sjkim * license, and in no event shall the patent license extend to any additions 35316303Sjkim * to or modifications of the Original Intel Code. No other license or right 36316303Sjkim * is granted directly or by implication, estoppel or otherwise; 37316303Sjkim * 38316303Sjkim * The above copyright and patent license is granted only if the following 39316303Sjkim * conditions are met: 40316303Sjkim * 41316303Sjkim * 3. Conditions 42316303Sjkim * 43316303Sjkim * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44316303Sjkim * Redistribution of source code of any substantial portion of the Covered 45316303Sjkim * Code or modification with rights to further distribute source must include 46316303Sjkim * the above Copyright Notice, the above License, this list of Conditions, 47316303Sjkim * and the following Disclaimer and Export Compliance provision. In addition, 48316303Sjkim * Licensee must cause all Covered Code to which Licensee contributes to 49316303Sjkim * contain a file documenting the changes Licensee made to create that Covered 50316303Sjkim * Code and the date of any change. Licensee must include in that file the 51316303Sjkim * documentation of any changes made by any predecessor Licensee. Licensee 52316303Sjkim * must include a prominent statement that the modification is derived, 53316303Sjkim * directly or indirectly, from Original Intel Code. 54316303Sjkim * 55316303Sjkim * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56316303Sjkim * Redistribution of source code of any substantial portion of the Covered 57316303Sjkim * Code or modification without rights to further distribute source must 58316303Sjkim * include the following Disclaimer and Export Compliance provision in the 59316303Sjkim * documentation and/or other materials provided with distribution. In 60316303Sjkim * addition, Licensee may not authorize further sublicense of source of any 61316303Sjkim * portion of the Covered Code, and must include terms to the effect that the 62316303Sjkim * license from Licensee to its licensee is limited to the intellectual 63316303Sjkim * property embodied in the software Licensee provides to its licensee, and 64316303Sjkim * not to intellectual property embodied in modifications its licensee may 65316303Sjkim * make. 66316303Sjkim * 67316303Sjkim * 3.3. Redistribution of Executable. Redistribution in executable form of any 68316303Sjkim * substantial portion of the Covered Code or modification must reproduce the 69316303Sjkim * above Copyright Notice, and the following Disclaimer and Export Compliance 70316303Sjkim * provision in the documentation and/or other materials provided with the 71316303Sjkim * distribution. 72316303Sjkim * 73316303Sjkim * 3.4. Intel retains all right, title, and interest in and to the Original 74316303Sjkim * Intel Code. 75316303Sjkim * 76316303Sjkim * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77316303Sjkim * Intel shall be used in advertising or otherwise to promote the sale, use or 78316303Sjkim * other dealings in products derived from or relating to the Covered Code 79316303Sjkim * without prior written authorization from Intel. 80316303Sjkim * 81316303Sjkim * 4. Disclaimer and Export Compliance 82316303Sjkim * 83316303Sjkim * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84316303Sjkim * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85316303Sjkim * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86316303Sjkim * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87316303Sjkim * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88316303Sjkim * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89316303Sjkim * PARTICULAR PURPOSE. 90316303Sjkim * 91316303Sjkim * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92316303Sjkim * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93316303Sjkim * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94316303Sjkim * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95316303Sjkim * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96316303Sjkim * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97316303Sjkim * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98316303Sjkim * LIMITED REMEDY. 99316303Sjkim * 100316303Sjkim * 4.3. Licensee shall not export, either directly or indirectly, any of this 101316303Sjkim * software or system incorporating such software without first obtaining any 102316303Sjkim * required license or other approval from the U. S. Department of Commerce or 103316303Sjkim * any other agency or department of the United States Government. In the 104316303Sjkim * event Licensee exports any such software from the United States or 105316303Sjkim * re-exports any such software from a foreign destination, Licensee shall 106316303Sjkim * ensure that the distribution and export/re-export of the software is in 107316303Sjkim * compliance with all laws, regulations, orders, or other restrictions of the 108316303Sjkim * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109316303Sjkim * any of its subsidiaries will export/re-export any technical data, process, 110316303Sjkim * software, or service, directly or indirectly, to any country for which the 111316303Sjkim * United States government or any agency thereof requires an export license, 112316303Sjkim * other governmental approval, or letter of assurance, without first obtaining 113316303Sjkim * such license, approval or letter. 114316303Sjkim * 115316303Sjkim ***************************************************************************** 116316303Sjkim * 117316303Sjkim * Alternatively, you may choose to be licensed under the terms of the 118316303Sjkim * following license: 119316303Sjkim * 120217365Sjkim * Redistribution and use in source and binary forms, with or without 121217365Sjkim * modification, are permitted provided that the following conditions 122217365Sjkim * are met: 123217365Sjkim * 1. Redistributions of source code must retain the above copyright 124217365Sjkim * notice, this list of conditions, and the following disclaimer, 125217365Sjkim * without modification. 126217365Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 127217365Sjkim * substantially similar to the "NO WARRANTY" disclaimer below 128217365Sjkim * ("Disclaimer") and any redistribution must be conditioned upon 129217365Sjkim * including a substantially similar Disclaimer requirement for further 130217365Sjkim * binary redistribution. 131217365Sjkim * 3. Neither the names of the above-listed copyright holders nor the names 132217365Sjkim * of any contributors may be used to endorse or promote products derived 133217365Sjkim * from this software without specific prior written permission. 13467754Smsmith * 135316303Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 136316303Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 137316303Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 138316303Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 139316303Sjkim * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 140316303Sjkim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 141316303Sjkim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 142316303Sjkim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 143316303Sjkim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 144316303Sjkim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 145316303Sjkim * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 146316303Sjkim * 147316303Sjkim * Alternatively, you may choose to be licensed under the terms of the 148217365Sjkim * GNU General Public License ("GPL") version 2 as published by the Free 149217365Sjkim * Software Foundation. 15067754Smsmith * 151316303Sjkim *****************************************************************************/ 15267754Smsmith 15367754Smsmith#ifndef __ACRESRC_H__ 15467754Smsmith#define __ACRESRC_H__ 15567754Smsmith 156151937Sjkim/* Need the AML resource descriptor structs */ 15767754Smsmith 158193341Sjkim#include <contrib/dev/acpica/include/amlresrc.h> 159151937Sjkim 160151937Sjkim 16167754Smsmith/* 162151937Sjkim * If possible, pack the following structures to byte alignment, since we 163167802Sjkim * don't care about performance for debug output. Two cases where we cannot 164167802Sjkim * pack the structures: 165167802Sjkim * 166167802Sjkim * 1) Hardware does not support misaligned memory transfers 167167802Sjkim * 2) Compiler does not support pointers within packed structures 16867754Smsmith */ 169167802Sjkim#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) 170151937Sjkim#pragma pack(1) 171151937Sjkim#endif 17267754Smsmith 173151937Sjkim/* 174151937Sjkim * Individual entry for the resource conversion tables 175151937Sjkim */ 176151937Sjkimtypedef const struct acpi_rsconvert_info 177151937Sjkim{ 178151937Sjkim UINT8 Opcode; 179151937Sjkim UINT8 ResourceOffset; 180151937Sjkim UINT8 AmlOffset; 181151937Sjkim UINT8 Value; 18267754Smsmith 183151937Sjkim} ACPI_RSCONVERT_INFO; 18467754Smsmith 185151937Sjkim/* Resource conversion opcodes */ 18667754Smsmith 187228110Sjkimtypedef enum 188228110Sjkim{ 189228110Sjkim ACPI_RSC_INITGET = 0, 190228110Sjkim ACPI_RSC_INITSET, 191228110Sjkim ACPI_RSC_FLAGINIT, 192228110Sjkim ACPI_RSC_1BITFLAG, 193228110Sjkim ACPI_RSC_2BITFLAG, 194228110Sjkim ACPI_RSC_3BITFLAG, 195228110Sjkim ACPI_RSC_ADDRESS, 196228110Sjkim ACPI_RSC_BITMASK, 197228110Sjkim ACPI_RSC_BITMASK16, 198228110Sjkim ACPI_RSC_COUNT, 199228110Sjkim ACPI_RSC_COUNT16, 200228110Sjkim ACPI_RSC_COUNT_GPIO_PIN, 201228110Sjkim ACPI_RSC_COUNT_GPIO_RES, 202228110Sjkim ACPI_RSC_COUNT_GPIO_VEN, 203228110Sjkim ACPI_RSC_COUNT_SERIAL_RES, 204228110Sjkim ACPI_RSC_COUNT_SERIAL_VEN, 205228110Sjkim ACPI_RSC_DATA8, 206228110Sjkim ACPI_RSC_EXIT_EQ, 207228110Sjkim ACPI_RSC_EXIT_LE, 208228110Sjkim ACPI_RSC_EXIT_NE, 209228110Sjkim ACPI_RSC_LENGTH, 210228110Sjkim ACPI_RSC_MOVE_GPIO_PIN, 211228110Sjkim ACPI_RSC_MOVE_GPIO_RES, 212228110Sjkim ACPI_RSC_MOVE_SERIAL_RES, 213228110Sjkim ACPI_RSC_MOVE_SERIAL_VEN, 214228110Sjkim ACPI_RSC_MOVE8, 215228110Sjkim ACPI_RSC_MOVE16, 216228110Sjkim ACPI_RSC_MOVE32, 217228110Sjkim ACPI_RSC_MOVE64, 218228110Sjkim ACPI_RSC_SET8, 219228110Sjkim ACPI_RSC_SOURCE, 220228110Sjkim ACPI_RSC_SOURCEX 22167754Smsmith 222228110Sjkim} ACPI_RSCONVERT_OPCODES; 223228110Sjkim 224151937Sjkim/* Resource Conversion sub-opcodes */ 225114237Snjl 226151937Sjkim#define ACPI_RSC_COMPARE_AML_LENGTH 0 227151937Sjkim#define ACPI_RSC_COMPARE_VALUE 1 22867754Smsmith 229151937Sjkim#define ACPI_RSC_TABLE_SIZE(d) (sizeof (d) / sizeof (ACPI_RSCONVERT_INFO)) 23067754Smsmith 231151937Sjkim#define ACPI_RS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_RESOURCE,f) 232151937Sjkim#define AML_OFFSET(f) (UINT8) ACPI_OFFSET (AML_RESOURCE,f) 23367754Smsmith 23467754Smsmith 235228110Sjkim/* 236228110Sjkim * Individual entry for the resource dump tables 237228110Sjkim */ 238151937Sjkimtypedef const struct acpi_rsdump_info 239151937Sjkim{ 240151937Sjkim UINT8 Opcode; 241151937Sjkim UINT8 Offset; 242298714Sjkim const char *Name; 243167802Sjkim const char **Pointer; 24499679Siwasaki 245151937Sjkim} ACPI_RSDUMP_INFO; 246102550Siwasaki 247151937Sjkim/* Values for the Opcode field above */ 24899679Siwasaki 249228110Sjkimtypedef enum 250228110Sjkim{ 251228110Sjkim ACPI_RSD_TITLE = 0, 252228110Sjkim ACPI_RSD_1BITFLAG, 253228110Sjkim ACPI_RSD_2BITFLAG, 254228110Sjkim ACPI_RSD_3BITFLAG, 255228110Sjkim ACPI_RSD_ADDRESS, 256228110Sjkim ACPI_RSD_DWORDLIST, 257228110Sjkim ACPI_RSD_LITERAL, 258228110Sjkim ACPI_RSD_LONGLIST, 259228110Sjkim ACPI_RSD_SHORTLIST, 260228110Sjkim ACPI_RSD_SHORTLISTX, 261228110Sjkim ACPI_RSD_SOURCE, 262228110Sjkim ACPI_RSD_STRING, 263228110Sjkim ACPI_RSD_UINT8, 264228110Sjkim ACPI_RSD_UINT16, 265228110Sjkim ACPI_RSD_UINT32, 266228110Sjkim ACPI_RSD_UINT64, 267322877Sjkim ACPI_RSD_WORDLIST, 268322877Sjkim ACPI_RSD_LABEL, 269322877Sjkim ACPI_RSD_SOURCE_LABEL, 27099679Siwasaki 271228110Sjkim} ACPI_RSDUMP_OPCODES; 272228110Sjkim 273151937Sjkim/* restore default alignment */ 27499679Siwasaki 275151937Sjkim#pragma pack() 27699679Siwasaki 27799679Siwasaki 278151937Sjkim/* Resource tables indexed by internal resource type */ 27999679Siwasaki 280151937Sjkimextern const UINT8 AcpiGbl_AmlResourceSizes[]; 281228110Sjkimextern const UINT8 AcpiGbl_AmlResourceSerialBusSizes[]; 282151937Sjkimextern ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[]; 28399679Siwasaki 284151937Sjkim/* Resource tables indexed by raw AML resource descriptor type */ 28567754Smsmith 286167802Sjkimextern const UINT8 AcpiGbl_ResourceStructSizes[]; 287228110Sjkimextern const UINT8 AcpiGbl_ResourceStructSerialBusSizes[]; 288167802Sjkimextern ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[]; 28967754Smsmith 290228110Sjkimextern ACPI_RSCONVERT_INFO *AcpiGbl_ConvertResourceSerialBusDispatch[]; 29167754Smsmith 292167802Sjkimtypedef struct acpi_vendor_walk_info 293167802Sjkim{ 294167802Sjkim ACPI_VENDOR_UUID *Uuid; 295167802Sjkim ACPI_BUFFER *Buffer; 296167802Sjkim ACPI_STATUS Status; 297167802Sjkim 298167802Sjkim} ACPI_VENDOR_WALK_INFO; 299167802Sjkim 300167802Sjkim 301151937Sjkim/* 302151937Sjkim * rscreate 303151937Sjkim */ 30467754SmsmithACPI_STATUS 305151937SjkimAcpiRsCreateResourceList ( 306151937Sjkim ACPI_OPERAND_OBJECT *AmlBuffer, 307151937Sjkim ACPI_BUFFER *OutputBuffer); 30867754Smsmith 30967754SmsmithACPI_STATUS 310151937SjkimAcpiRsCreateAmlResources ( 311272444Sjkim ACPI_BUFFER *ResourceList, 312151937Sjkim ACPI_BUFFER *OutputBuffer); 31367754Smsmith 31467754SmsmithACPI_STATUS 315151937SjkimAcpiRsCreatePciRoutingTable ( 31667754Smsmith ACPI_OPERAND_OBJECT *PackageObject, 317151937Sjkim ACPI_BUFFER *OutputBuffer); 31867754Smsmith 31967754Smsmith 320151937Sjkim/* 321151937Sjkim * rsutils 322151937Sjkim */ 32367754SmsmithACPI_STATUS 324151937SjkimAcpiRsGetPrtMethodData ( 325167802Sjkim ACPI_NAMESPACE_NODE *Node, 326151937Sjkim ACPI_BUFFER *RetBuffer); 32767754Smsmith 32867754SmsmithACPI_STATUS 329151937SjkimAcpiRsGetCrsMethodData ( 330167802Sjkim ACPI_NAMESPACE_NODE *Node, 331151937Sjkim ACPI_BUFFER *RetBuffer); 33267754Smsmith 33367754SmsmithACPI_STATUS 334151937SjkimAcpiRsGetPrsMethodData ( 335167802Sjkim ACPI_NAMESPACE_NODE *Node, 336151937Sjkim ACPI_BUFFER *RetBuffer); 33767754Smsmith 33867754SmsmithACPI_STATUS 339151937SjkimAcpiRsGetMethodData ( 340151937Sjkim ACPI_HANDLE Handle, 341298714Sjkim const char *Path, 342151937Sjkim ACPI_BUFFER *RetBuffer); 34367754Smsmith 34467754SmsmithACPI_STATUS 345151937SjkimAcpiRsSetSrsMethodData ( 346167802Sjkim ACPI_NAMESPACE_NODE *Node, 347151937Sjkim ACPI_BUFFER *RetBuffer); 34867754Smsmith 349228110SjkimACPI_STATUS 350228110SjkimAcpiRsGetAeiMethodData ( 351228110Sjkim ACPI_NAMESPACE_NODE *Node, 352228110Sjkim ACPI_BUFFER *RetBuffer); 35367754Smsmith 354151937Sjkim/* 355151937Sjkim * rscalc 356151937Sjkim */ 35767754SmsmithACPI_STATUS 358151937SjkimAcpiRsGetListLength ( 359151937Sjkim UINT8 *AmlBuffer, 360151937Sjkim UINT32 AmlBufferLength, 361151937Sjkim ACPI_SIZE *SizeNeeded); 36267754Smsmith 36367754SmsmithACPI_STATUS 364151937SjkimAcpiRsGetAmlLength ( 365272444Sjkim ACPI_RESOURCE *ResourceList, 366272444Sjkim ACPI_SIZE ResourceListSize, 367151937Sjkim ACPI_SIZE *SizeNeeded); 36867754Smsmith 36967754SmsmithACPI_STATUS 370151937SjkimAcpiRsGetPciRoutingTableLength ( 371151937Sjkim ACPI_OPERAND_OBJECT *PackageObject, 372151937Sjkim ACPI_SIZE *BufferSizeNeeded); 37367754Smsmith 37467754SmsmithACPI_STATUS 375151937SjkimAcpiRsConvertAmlToResources ( 376167802Sjkim UINT8 *Aml, 377167802Sjkim UINT32 Length, 378167802Sjkim UINT32 Offset, 379167802Sjkim UINT8 ResourceIndex, 380245582Sjkim void **Context); 38167754Smsmith 38267754SmsmithACPI_STATUS 383151937SjkimAcpiRsConvertResourcesToAml ( 384151937Sjkim ACPI_RESOURCE *Resource, 385151937Sjkim ACPI_SIZE AmlSizeNeeded, 386151937Sjkim UINT8 *OutputBuffer); 38767754Smsmith 38867754Smsmith 389151937Sjkim/* 390151937Sjkim * rsaddr 391151937Sjkim */ 392151937Sjkimvoid 393151937SjkimAcpiRsSetAddressCommon ( 394151937Sjkim AML_RESOURCE *Aml, 395151937Sjkim ACPI_RESOURCE *Resource); 39667754Smsmith 397151937SjkimBOOLEAN 398151937SjkimAcpiRsGetAddressCommon ( 399151937Sjkim ACPI_RESOURCE *Resource, 400151937Sjkim AML_RESOURCE *Aml); 40177424Smsmith 40277424Smsmith 403151937Sjkim/* 404151937Sjkim * rsmisc 405151937Sjkim */ 40677424SmsmithACPI_STATUS 407151937SjkimAcpiRsConvertAmlToResource ( 408151937Sjkim ACPI_RESOURCE *Resource, 409151937Sjkim AML_RESOURCE *Aml, 410151937Sjkim ACPI_RSCONVERT_INFO *Info); 41167754Smsmith 41267754SmsmithACPI_STATUS 413151937SjkimAcpiRsConvertResourceToAml ( 414151937Sjkim ACPI_RESOURCE *Resource, 415151937Sjkim AML_RESOURCE *Aml, 416151937Sjkim ACPI_RSCONVERT_INFO *Info); 41767754Smsmith 41867754Smsmith 419151937Sjkim/* 420151937Sjkim * rsutils 421151937Sjkim */ 422151937Sjkimvoid 423151937SjkimAcpiRsMoveData ( 424151937Sjkim void *Destination, 425151937Sjkim void *Source, 426151937Sjkim UINT16 ItemCount, 427151937Sjkim UINT8 MoveType); 42867754Smsmith 429151937SjkimUINT8 430151937SjkimAcpiRsDecodeBitmask ( 431151937Sjkim UINT16 Mask, 432151937Sjkim UINT8 *List); 43367754Smsmith 434151937SjkimUINT16 435151937SjkimAcpiRsEncodeBitmask ( 436151937Sjkim UINT8 *List, 437151937Sjkim UINT8 Count); 43867754Smsmith 439151937SjkimACPI_RS_LENGTH 440151937SjkimAcpiRsGetResourceSource ( 441151937Sjkim ACPI_RS_LENGTH ResourceLength, 442151937Sjkim ACPI_RS_LENGTH MinimumLength, 443151937Sjkim ACPI_RESOURCE_SOURCE *ResourceSource, 444151937Sjkim AML_RESOURCE *Aml, 445151937Sjkim char *StringPtr); 44667754Smsmith 447151937SjkimACPI_RSDESC_SIZE 448151937SjkimAcpiRsSetResourceSource ( 449151937Sjkim AML_RESOURCE *Aml, 450151937Sjkim ACPI_RS_LENGTH MinimumLength, 451151937Sjkim ACPI_RESOURCE_SOURCE *ResourceSource); 45267754Smsmith 453151937Sjkimvoid 454151937SjkimAcpiRsSetResourceHeader ( 455151937Sjkim UINT8 DescriptorType, 456151937Sjkim ACPI_RSDESC_SIZE TotalLength, 457151937Sjkim AML_RESOURCE *Aml); 45867754Smsmith 459151937Sjkimvoid 460151937SjkimAcpiRsSetResourceLength ( 461151937Sjkim ACPI_RSDESC_SIZE TotalLength, 462151937Sjkim AML_RESOURCE *Aml); 46367754Smsmith 46467754Smsmith 465151937Sjkim/* 466281396Sjkim * rsdump - Debugger support 467151937Sjkim */ 468281396Sjkim#ifdef ACPI_DEBUGGER 469151937Sjkimvoid 470151937SjkimAcpiRsDumpResourceList ( 471151937Sjkim ACPI_RESOURCE *Resource); 47267754Smsmith 473151937Sjkimvoid 474151937SjkimAcpiRsDumpIrqList ( 475151937Sjkim UINT8 *RouteTable); 476281396Sjkim#endif 47767754Smsmith 47867754Smsmith 479151937Sjkim/* 480151937Sjkim * Resource conversion tables 481151937Sjkim */ 482151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertDma[]; 483151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertEndDpf[]; 484151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertIo[]; 485151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertFixedIo[]; 486151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertEndTag[]; 487151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertMemory24[]; 488151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertGenericReg[]; 489151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertMemory32[]; 490151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertFixedMemory32[]; 491151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertAddress32[]; 492151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertAddress16[]; 493151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertExtIrq[]; 494151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertAddress64[]; 495151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[]; 496228110Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertGpio[]; 497228110Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertFixedDma[]; 498228110Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[]; 499228110Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[]; 500228110Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[]; 501322877Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertPinFunction[]; 502322877Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertPinConfig[]; 503322877Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertPinGroup[]; 504322877Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertPinGroupFunction[]; 505322877Sjkimextern ACPI_RSCONVERT_INFO AcpiRsConvertPinGroupConfig[]; 50667754Smsmith 507151937Sjkim/* These resources require separate get/set tables */ 50867754Smsmith 509151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsGetIrq[]; 510151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsGetStartDpf[]; 511151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsGetVendorSmall[]; 512151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsGetVendorLarge[]; 513151937Sjkim 514151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsSetIrq[]; 515151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsSetStartDpf[]; 516151937Sjkimextern ACPI_RSCONVERT_INFO AcpiRsSetVendor[]; 517151937Sjkim 518151937Sjkim 519151937Sjkim#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 520151937Sjkim/* 521151937Sjkim * rsinfo 522151937Sjkim */ 523151937Sjkimextern ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[]; 524228110Sjkimextern ACPI_RSDUMP_INFO *AcpiGbl_DumpSerialBusDispatch[]; 525151937Sjkim 526151937Sjkim/* 527245582Sjkim * rsdumpinfo 528151937Sjkim */ 529151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpIrq[]; 530245582Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpPrt[]; 531151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpDma[]; 532151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpStartDpf[]; 533151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpEndDpf[]; 534151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpIo[]; 535245582Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpIoFlags[]; 536151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpFixedIo[]; 537151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpVendor[]; 538151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpEndTag[]; 539151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpMemory24[]; 540151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpMemory32[]; 541245582Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpMemoryFlags[]; 542151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpFixedMemory32[]; 543151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpAddress16[]; 544151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpAddress32[]; 545151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpAddress64[]; 546151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpExtAddress64[]; 547151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpExtIrq[]; 548151937Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpGenericReg[]; 549228110Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpGpio[]; 550322877Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[]; 551228110Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpFixedDma[]; 552228110Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[]; 553228110Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[]; 554228110Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[]; 555228110Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[]; 556245582Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpGeneralFlags[]; 557322877Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpPinConfig[]; 558322877Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpPinGroup[]; 559322877Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpPinGroupFunction[]; 560322877Sjkimextern ACPI_RSDUMP_INFO AcpiRsDumpPinGroupConfig[]; 561151937Sjkim#endif 562151937Sjkim 56367754Smsmith#endif /* __ACRESRC_H__ */ 564