Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/drivers/acpica/rsmisc.c need to be fixed.

0001 /*******************************************************************************
0002  *
0003  * Module Name: rsmisc - Miscellaneous resource descriptors
0004  *
0005  ******************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
0012  * All rights reserved.
0013  *
0014  * 2. License
0015  *
0016  * 2.1. This is your license from Intel Corp. under its intellectual property
0017  * rights.  You may have additional license terms from the party that provided
0018  * you this software, covering your right to use that party's intellectual
0019  * property rights.
0020  *
0021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0022  * copy of the source code appearing in this file ("Covered Code") an
0023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0024  * base code distributed originally by Intel ("Original Intel Code") to copy,
0025  * make derivatives, distribute, use and display any portion of the Covered
0026  * Code in any form, with the right to sublicense such rights; and
0027  *
0028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0029  * license (with the right to sublicense), under only those claims of Intel
0030  * patents that are infringed by the Original Intel Code, to make, use, sell,
0031  * offer to sell, and import the Covered Code and derivative works thereof
0032  * solely to the minimum extent necessary to exercise the above copyright
0033  * license, and in no event shall the patent license extend to any additions
0034  * to or modifications of the Original Intel Code.  No other license or right
0035  * is granted directly or by implication, estoppel or otherwise;
0036  *
0037  * The above copyright and patent license is granted only if the following
0038  * conditions are met:
0039  *
0040  * 3. Conditions
0041  *
0042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0043  * Redistribution of source code of any substantial portion of the Covered
0044  * Code or modification with rights to further distribute source must include
0045  * the above Copyright Notice, the above License, this list of Conditions,
0046  * and the following Disclaimer and Export Compliance provision.  In addition,
0047  * Licensee must cause all Covered Code to which Licensee contributes to
0048  * contain a file documenting the changes Licensee made to create that Covered
0049  * Code and the date of any change.  Licensee must include in that file the
0050  * documentation of any changes made by any predecessor Licensee.  Licensee
0051  * must include a prominent statement that the modification is derived,
0052  * directly or indirectly, from Original Intel Code.
0053  *
0054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0055  * Redistribution of source code of any substantial portion of the Covered
0056  * Code or modification without rights to further distribute source must
0057  * include the following Disclaimer and Export Compliance provision in the
0058  * documentation and/or other materials provided with distribution.  In
0059  * addition, Licensee may not authorize further sublicense of source of any
0060  * portion of the Covered Code, and must include terms to the effect that the
0061  * license from Licensee to its licensee is limited to the intellectual
0062  * property embodied in the software Licensee provides to its licensee, and
0063  * not to intellectual property embodied in modifications its licensee may
0064  * make.
0065  *
0066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0067  * substantial portion of the Covered Code or modification must reproduce the
0068  * above Copyright Notice, and the following Disclaimer and Export Compliance
0069  * provision in the documentation and/or other materials provided with the
0070  * distribution.
0071  *
0072  * 3.4. Intel retains all right, title, and interest in and to the Original
0073  * Intel Code.
0074  *
0075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0076  * Intel shall be used in advertising or otherwise to promote the sale, use or
0077  * other dealings in products derived from or relating to the Covered Code
0078  * without prior written authorization from Intel.
0079  *
0080  * 4. Disclaimer and Export Compliance
0081  *
0082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
0085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
0086  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
0087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0088  * PARTICULAR PURPOSE.
0089  *
0090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
0096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0097  * LIMITED REMEDY.
0098  *
0099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0100  * software or system incorporating such software without first obtaining any
0101  * required license or other approval from the U. S. Department of Commerce or
0102  * any other agency or department of the United States Government.  In the
0103  * event Licensee exports any such software from the United States or
0104  * re-exports any such software from a foreign destination, Licensee shall
0105  * ensure that the distribution and export/re-export of the software is in
0106  * compliance with all laws, regulations, orders, or other restrictions of the
0107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0108  * any of its subsidiaries will export/re-export any technical data, process,
0109  * software, or service, directly or indirectly, to any country for which the
0110  * United States government or any agency thereof requires an export license,
0111  * other governmental approval, or letter of assurance, without first obtaining
0112  * such license, approval or letter.
0113  *
0114  *****************************************************************************/
0115 
0116 #define __RSMISC_C__
0117 
0118 #include "acpi.h"
0119 #include "accommon.h"
0120 #include "acresrc.h"
0121 
0122 #define _COMPONENT          ACPI_RESOURCES
0123         ACPI_MODULE_NAME    ("rsmisc")
0124 
0125 
0126 #define INIT_RESOURCE_TYPE(i)       i->ResourceOffset
0127 #define INIT_RESOURCE_LENGTH(i)     i->AmlOffset
0128 #define INIT_TABLE_LENGTH(i)        i->Value
0129 
0130 #define COMPARE_OPCODE(i)           i->ResourceOffset
0131 #define COMPARE_TARGET(i)           i->AmlOffset
0132 #define COMPARE_VALUE(i)            i->Value
0133 
0134 
0135 /*******************************************************************************
0136  *
0137  * FUNCTION:    AcpiRsConvertAmlToResource
0138  *
0139  * PARAMETERS:  Resource            - Pointer to the resource descriptor
0140  *              Aml                 - Where the AML descriptor is returned
0141  *              Info                - Pointer to appropriate conversion table
0142  *
0143  * RETURN:      Status
0144  *
0145  * DESCRIPTION: Convert an external AML resource descriptor to the corresponding
0146  *              internal resource descriptor
0147  *
0148  ******************************************************************************/
0149 
0150 ACPI_STATUS
0151 AcpiRsConvertAmlToResource (
0152     ACPI_RESOURCE           *Resource,
0153     AML_RESOURCE            *Aml,
0154     ACPI_RSCONVERT_INFO     *Info)
0155 {
0156     ACPI_RS_LENGTH          AmlResourceLength;
0157     void                    *Source;
0158     void                    *Destination;
0159     char                    *Target;
0160     UINT8                   Count;
0161     UINT8                   FlagsMode = FALSE;
0162     UINT16                  ItemCount = 0;
0163     UINT16                  Temp16 = 0;
0164 
0165 
0166     ACPI_FUNCTION_TRACE (RsConvertAmlToResource);
0167 
0168 
0169     if (((ACPI_SIZE) Resource) & 0x3)
0170     {
0171         /* Each internal resource struct is expected to be 32-bit aligned */
0172 
0173         ACPI_WARNING ((AE_INFO,
0174             "Misaligned resource pointer (get): %p Type %2.2X Len %X",
0175             Resource, Resource->Type, Resource->Length));
0176     }
0177 
0178     /* Extract the resource Length field (does not include header length) */
0179 
0180     AmlResourceLength = AcpiUtGetResourceLength (Aml);
0181 
0182     /*
0183      * First table entry must be ACPI_RSC_INITxxx and must contain the
0184      * table length (# of table entries)
0185      */
0186     Count = INIT_TABLE_LENGTH (Info);
0187 
0188     while (Count)
0189     {
0190         /*
0191          * Source is the external AML byte stream buffer,
0192          * destination is the internal resource descriptor
0193          */
0194         Source      = ACPI_ADD_PTR (void, Aml, Info->AmlOffset);
0195         Destination = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset);
0196 
0197         switch (Info->Opcode)
0198         {
0199         case ACPI_RSC_INITGET:
0200             /*
0201              * Get the resource type and the initial (minimum) length
0202              */
0203             ACPI_MEMSET (Resource, 0, INIT_RESOURCE_LENGTH (Info));
0204             Resource->Type = INIT_RESOURCE_TYPE (Info);
0205             Resource->Length = INIT_RESOURCE_LENGTH (Info);
0206             break;
0207 
0208 
0209         case ACPI_RSC_INITSET:
0210             break;
0211 
0212 
0213         case ACPI_RSC_FLAGINIT:
0214 
0215             FlagsMode = TRUE;
0216             break;
0217 
0218 
0219         case ACPI_RSC_1BITFLAG:
0220             /*
0221              * Mask and shift the flag bit
0222              */
0223             ACPI_SET8 (Destination) = (UINT8)
0224                 ((ACPI_GET8 (Source) >> Info->Value) & 0x01);
0225             break;
0226 
0227 
0228         case ACPI_RSC_2BITFLAG:
0229             /*
0230              * Mask and shift the flag bits
0231              */
0232             ACPI_SET8 (Destination) = (UINT8)
0233                 ((ACPI_GET8 (Source) >> Info->Value) & 0x03);
0234             break;
0235 
0236 
0237         case ACPI_RSC_COUNT:
0238 
0239             ItemCount = ACPI_GET8 (Source);
0240             ACPI_SET8 (Destination) = (UINT8) ItemCount;
0241 
0242             Resource->Length = Resource->Length +
0243                 (Info->Value * (ItemCount - 1));
0244             break;
0245 
0246 
0247         case ACPI_RSC_COUNT16:
0248 
0249             ItemCount = AmlResourceLength;
0250             ACPI_SET16 (Destination) = ItemCount;
0251 
0252             Resource->Length = Resource->Length +
0253                 (Info->Value * (ItemCount - 1));
0254             break;
0255 
0256 
0257         case ACPI_RSC_LENGTH:
0258 
0259             Resource->Length = Resource->Length + Info->Value;
0260             break;
0261 
0262 
0263         case ACPI_RSC_MOVE8:
0264         case ACPI_RSC_MOVE16:
0265         case ACPI_RSC_MOVE32:
0266         case ACPI_RSC_MOVE64:
0267             /*
0268              * Raw data move. Use the Info value field unless ItemCount has
0269              * been previously initialized via a COUNT opcode
0270              */
0271             if (Info->Value)
0272             {
0273                 ItemCount = Info->Value;
0274             }
0275             AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
0276             break;
0277 
0278 
0279         case ACPI_RSC_SET8:
0280 
0281             ACPI_MEMSET (Destination, Info->AmlOffset, Info->Value);
0282             break;
0283 
0284 
0285         case ACPI_RSC_DATA8:
0286 
0287             Target = ACPI_ADD_PTR (char, Resource, Info->Value);
0288             ACPI_MEMCPY (Destination, Source,  ACPI_GET16 (Target));
0289             break;
0290 
0291 
0292         case ACPI_RSC_ADDRESS:
0293             /*
0294              * Common handler for address descriptor flags
0295              */
0296             if (!AcpiRsGetAddressCommon (Resource, Aml))
0297             {
0298                 return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE);
0299             }
0300             break;
0301 
0302 
0303         case ACPI_RSC_SOURCE:
0304             /*
0305              * Optional ResourceSource (Index and String)
0306              */
0307             Resource->Length +=
0308                 AcpiRsGetResourceSource (AmlResourceLength, Info->Value,
0309                     Destination, Aml, NULL);
0310             break;
0311 
0312 
0313         case ACPI_RSC_SOURCEX:
0314             /*
0315              * Optional ResourceSource (Index and String). This is the more
0316              * complicated case used by the Interrupt() macro
0317              */
0318             Target = ACPI_ADD_PTR (char, Resource, Info->AmlOffset + (ItemCount * 4));
0319 
0320             Resource->Length +=
0321                 AcpiRsGetResourceSource (AmlResourceLength,
0322                     (ACPI_RS_LENGTH) (((ItemCount - 1) * sizeof (UINT32)) + Info->Value),
0323                     Destination, Aml, Target);
0324             break;
0325 
0326 
0327         case ACPI_RSC_BITMASK:
0328             /*
0329              * 8-bit encoded bitmask (DMA macro)
0330              */
0331             ItemCount = AcpiRsDecodeBitmask (ACPI_GET8 (Source), Destination);
0332             if (ItemCount)
0333             {
0334                 Resource->Length += (ItemCount - 1);
0335             }
0336 
0337             Target = ACPI_ADD_PTR (char, Resource, Info->Value);
0338             ACPI_SET8 (Target) = (UINT8) ItemCount;
0339             break;
0340 
0341 
0342         case ACPI_RSC_BITMASK16:
0343             /*
0344              * 16-bit encoded bitmask (IRQ macro)
0345              */
0346             ACPI_MOVE_16_TO_16 (&Temp16, Source);
0347 
0348             ItemCount = AcpiRsDecodeBitmask (Temp16, Destination);
0349             if (ItemCount)
0350             {
0351                 Resource->Length += (ItemCount - 1);
0352             }
0353 
0354             Target = ACPI_ADD_PTR (char, Resource, Info->Value);
0355             ACPI_SET8 (Target) = (UINT8) ItemCount;
0356             break;
0357 
0358 
0359         case ACPI_RSC_EXIT_NE:
0360             /*
0361              * Control - Exit conversion if not equal
0362              */
0363             switch (Info->ResourceOffset)
0364             {
0365             case ACPI_RSC_COMPARE_AML_LENGTH:
0366                 if (AmlResourceLength != Info->Value)
0367                 {
0368                     goto Exit;
0369                 }
0370                 break;
0371 
0372             case ACPI_RSC_COMPARE_VALUE:
0373                 if (ACPI_GET8 (Source) != Info->Value)
0374                 {
0375                     goto Exit;
0376                 }
0377                 break;
0378 
0379             default:
0380 
0381                 ACPI_ERROR ((AE_INFO, "Invalid conversion sub-opcode"));
0382                 return_ACPI_STATUS (AE_BAD_PARAMETER);
0383             }
0384             break;
0385 
0386 
0387         default:
0388 
0389             ACPI_ERROR ((AE_INFO, "Invalid conversion opcode"));
0390             return_ACPI_STATUS (AE_BAD_PARAMETER);
0391         }
0392 
0393         Count--;
0394         Info++;
0395     }
0396 
0397 Exit:
0398     if (!FlagsMode)
0399     {
0400         /* Round the resource struct length up to the next boundary (32 or 64) */
0401 
0402         Resource->Length = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (Resource->Length);
0403     }
0404     return_ACPI_STATUS (AE_OK);
0405 }
0406 
0407 
0408 /*******************************************************************************
0409  *
0410  * FUNCTION:    AcpiRsConvertResourceToAml
0411  *
0412  * PARAMETERS:  Resource            - Pointer to the resource descriptor
0413  *              Aml                 - Where the AML descriptor is returned
0414  *              Info                - Pointer to appropriate conversion table
0415  *
0416  * RETURN:      Status
0417  *
0418  * DESCRIPTION: Convert an internal resource descriptor to the corresponding
0419  *              external AML resource descriptor.
0420  *
0421  ******************************************************************************/
0422 
0423 ACPI_STATUS
0424 AcpiRsConvertResourceToAml (
0425     ACPI_RESOURCE           *Resource,
0426     AML_RESOURCE            *Aml,
0427     ACPI_RSCONVERT_INFO     *Info)
0428 {
0429     void                    *Source = NULL;
0430     void                    *Destination;
0431     ACPI_RSDESC_SIZE        AmlLength = 0;
0432     UINT8                   Count;
0433     UINT16                  Temp16 = 0;
0434     UINT16                  ItemCount = 0;
0435 
0436 
0437     ACPI_FUNCTION_TRACE (RsConvertResourceToAml);
0438 
0439 
0440     /*
0441      * First table entry must be ACPI_RSC_INITxxx and must contain the
0442      * table length (# of table entries)
0443      */
0444     Count = INIT_TABLE_LENGTH (Info);
0445 
0446     while (Count)
0447     {
0448         /*
0449          * Source is the internal resource descriptor,
0450          * destination is the external AML byte stream buffer
0451          */
0452         Source      = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset);
0453         Destination = ACPI_ADD_PTR (void, Aml, Info->AmlOffset);
0454 
0455         switch (Info->Opcode)
0456         {
0457         case ACPI_RSC_INITSET:
0458 
0459             ACPI_MEMSET (Aml, 0, INIT_RESOURCE_LENGTH (Info));
0460             AmlLength = INIT_RESOURCE_LENGTH (Info);
0461             AcpiRsSetResourceHeader (INIT_RESOURCE_TYPE (Info), AmlLength, Aml);
0462             break;
0463 
0464 
0465         case ACPI_RSC_INITGET:
0466             break;
0467 
0468 
0469         case ACPI_RSC_FLAGINIT:
0470             /*
0471              * Clear the flag byte
0472              */
0473             ACPI_SET8 (Destination) = 0;
0474             break;
0475 
0476 
0477         case ACPI_RSC_1BITFLAG:
0478             /*
0479              * Mask and shift the flag bit
0480              */
0481             ACPI_SET8 (Destination) |= (UINT8)
0482                 ((ACPI_GET8 (Source) & 0x01) << Info->Value);
0483             break;
0484 
0485 
0486         case ACPI_RSC_2BITFLAG:
0487             /*
0488              * Mask and shift the flag bits
0489              */
0490             ACPI_SET8 (Destination) |= (UINT8)
0491                 ((ACPI_GET8 (Source) & 0x03) << Info->Value);
0492             break;
0493 
0494 
0495         case ACPI_RSC_COUNT:
0496 
0497             ItemCount = ACPI_GET8 (Source);
0498             ACPI_SET8 (Destination) = (UINT8) ItemCount;
0499 
0500             AmlLength = (UINT16) (AmlLength + (Info->Value * (ItemCount - 1)));
0501             break;
0502 
0503 
0504         case ACPI_RSC_COUNT16:
0505 
0506             ItemCount = ACPI_GET16 (Source);
0507             AmlLength = (UINT16) (AmlLength + ItemCount);
0508             AcpiRsSetResourceLength (AmlLength, Aml);
0509             break;
0510 
0511 
0512         case ACPI_RSC_LENGTH:
0513 
0514             AcpiRsSetResourceLength (Info->Value, Aml);
0515             break;
0516 
0517 
0518         case ACPI_RSC_MOVE8:
0519         case ACPI_RSC_MOVE16:
0520         case ACPI_RSC_MOVE32:
0521         case ACPI_RSC_MOVE64:
0522 
0523             if (Info->Value)
0524             {
0525                 ItemCount = Info->Value;
0526             }
0527             AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
0528             break;
0529 
0530 
0531         case ACPI_RSC_ADDRESS:
0532 
0533             /* Set the Resource Type, General Flags, and Type-Specific Flags */
0534 
0535             AcpiRsSetAddressCommon (Aml, Resource);
0536             break;
0537 
0538 
0539         case ACPI_RSC_SOURCEX:
0540             /*
0541              * Optional ResourceSource (Index and String)
0542              */
0543             AmlLength = AcpiRsSetResourceSource (
0544                             Aml, (ACPI_RS_LENGTH) AmlLength, Source);
0545             AcpiRsSetResourceLength (AmlLength, Aml);
0546             break;
0547 
0548 
0549         case ACPI_RSC_SOURCE:
0550             /*
0551              * Optional ResourceSource (Index and String). This is the more
0552              * complicated case used by the Interrupt() macro
0553              */
0554             AmlLength = AcpiRsSetResourceSource (Aml, Info->Value, Source);
0555             AcpiRsSetResourceLength (AmlLength, Aml);
0556             break;
0557 
0558 
0559         case ACPI_RSC_BITMASK:
0560             /*
0561              * 8-bit encoded bitmask (DMA macro)
0562              */
0563             ACPI_SET8 (Destination) = (UINT8)
0564                 AcpiRsEncodeBitmask (Source,
0565                     *ACPI_ADD_PTR (UINT8, Resource, Info->Value));
0566             break;
0567 
0568 
0569         case ACPI_RSC_BITMASK16:
0570             /*
0571              * 16-bit encoded bitmask (IRQ macro)
0572              */
0573             Temp16 = AcpiRsEncodeBitmask (Source,
0574                         *ACPI_ADD_PTR (UINT8, Resource, Info->Value));
0575             ACPI_MOVE_16_TO_16 (Destination, &Temp16);
0576             break;
0577 
0578 
0579         case ACPI_RSC_EXIT_LE:
0580             /*
0581              * Control - Exit conversion if less than or equal
0582              */
0583             if (ItemCount <= Info->Value)
0584             {
0585                 goto Exit;
0586             }
0587             break;
0588 
0589 
0590         case ACPI_RSC_EXIT_NE:
0591             /*
0592              * Control - Exit conversion if not equal
0593              */
0594             switch (COMPARE_OPCODE (Info))
0595             {
0596             case ACPI_RSC_COMPARE_VALUE:
0597 
0598                 if (*ACPI_ADD_PTR (UINT8, Resource,
0599                         COMPARE_TARGET (Info)) != COMPARE_VALUE (Info))
0600                 {
0601                     goto Exit;
0602                 }
0603                 break;
0604 
0605             default:
0606 
0607                 ACPI_ERROR ((AE_INFO, "Invalid conversion sub-opcode"));
0608                 return_ACPI_STATUS (AE_BAD_PARAMETER);
0609             }
0610             break;
0611 
0612 
0613         case ACPI_RSC_EXIT_EQ:
0614             /*
0615              * Control - Exit conversion if equal
0616              */
0617             if (*ACPI_ADD_PTR (UINT8, Resource,
0618                     COMPARE_TARGET (Info)) == COMPARE_VALUE (Info))
0619             {
0620                 goto Exit;
0621             }
0622             break;
0623 
0624 
0625         default:
0626 
0627             ACPI_ERROR ((AE_INFO, "Invalid conversion opcode"));
0628             return_ACPI_STATUS (AE_BAD_PARAMETER);
0629         }
0630 
0631         Count--;
0632         Info++;
0633     }
0634 
0635 Exit:
0636     return_ACPI_STATUS (AE_OK);
0637 }
0638 
0639 
0640 #if 0
0641 /* Previous resource validations */
0642 
0643     if (Aml->ExtAddress64.RevisionID != AML_RESOURCE_EXTENDED_ADDRESS_REVISION)
0644     {
0645         return_ACPI_STATUS (AE_SUPPORT);
0646     }
0647 
0648     if (Resource->Data.StartDpf.PerformanceRobustness >= 3)
0649     {
0650         return_ACPI_STATUS (AE_AML_BAD_RESOURCE_VALUE);
0651     }
0652 
0653     if (((Aml->Irq.Flags & 0x09) == 0x00) ||
0654         ((Aml->Irq.Flags & 0x09) == 0x09))
0655     {
0656         /*
0657          * Only [ActiveHigh, EdgeSensitive] or [ActiveLow, LevelSensitive]
0658          * polarity/trigger interrupts are allowed (ACPI spec, section
0659          * "IRQ Format"), so 0x00 and 0x09 are illegal.
0660          */
0661         ACPI_ERROR ((AE_INFO,
0662             "Invalid interrupt polarity/trigger in resource list, %X",
0663             Aml->Irq.Flags));
0664         return_ACPI_STATUS (AE_BAD_DATA);
0665     }
0666 
0667     Resource->Data.ExtendedIrq.InterruptCount = Temp8;
0668     if (Temp8 < 1)
0669     {
0670         /* Must have at least one IRQ */
0671 
0672         return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH);
0673     }
0674 
0675     if (Resource->Data.Dma.Transfer == 0x03)
0676     {
0677         ACPI_ERROR ((AE_INFO,
0678             "Invalid DMA.Transfer preference (3)"));
0679         return_ACPI_STATUS (AE_BAD_DATA);
0680     }
0681 #endif
0682 
0683