1 /******************************************************************************
3 * Module Name: aslpld - Implementation of ASL ToPLD macro
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
152 #include "aslcompiler.h"
153 #include "aslcompiler.y.h"
156 #define _COMPONENT ACPI_COMPILER
157 ACPI_MODULE_NAME ("aslpld")
160 /* Local prototypes */
164 ACPI_PLD_INFO
*PldInfo
);
173 /*******************************************************************************
177 * PARAMETERS: Op - Current parse node
181 * DESCRIPTION: Convert ToPLD macro to 20-byte buffer
183 * The ToPLD parse tree looks like this:
193 ******************************************************************************/
197 ACPI_PARSE_OBJECT
*Op
)
199 ACPI_PLD_INFO PldInfo
;
201 ACPI_PARSE_OBJECT
*ThisOp
;
202 ACPI_PARSE_OBJECT
*NewOp
;
209 AslError (ASL_ERROR
, ASL_MSG_NOT_EXIST
, Op
, NULL
);
213 if (Op
->Asl
.ParseOpcode
!= PARSEOP_TOPLD
)
215 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, Op
, NULL
);
219 memset (&PldInfo
, 0, sizeof (ACPI_PLD_INFO
));
221 /* Traverse the list of PLD Ops (one per PLD field) */
223 ThisOp
= Op
->Asl
.Child
;
226 /* Get child values */
228 ParseOpcode
= ThisOp
->Asl
.Child
->Asl
.ParseOpcode
;
229 Value
= (UINT32
) ThisOp
->Asl
.Child
->Asl
.Value
.Integer
;
231 switch (ThisOp
->Asl
.ParseOpcode
)
233 case PARSEOP_PLD_REVISION
:
235 if (ParseOpcode
!= PARSEOP_INTEGER
)
237 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
243 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
247 PldInfo
.Revision
= (UINT8
) Value
;
250 case PARSEOP_PLD_IGNORECOLOR
:
252 if (ParseOpcode
!= PARSEOP_INTEGER
)
254 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
260 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
264 PldInfo
.IgnoreColor
= (UINT8
) Value
;
267 case PARSEOP_PLD_RED
:
268 case PARSEOP_PLD_GREEN
:
269 case PARSEOP_PLD_BLUE
:
271 if (ParseOpcode
!= PARSEOP_INTEGER
)
273 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
279 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
283 if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_RED
)
285 PldInfo
.Red
= (UINT8
) Value
;
287 else if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_GREEN
)
289 PldInfo
.Green
= (UINT8
) Value
;
291 else /* PARSEOP_PLD_BLUE */
293 PldInfo
.Blue
= (UINT8
) Value
;
297 case PARSEOP_PLD_WIDTH
:
298 case PARSEOP_PLD_HEIGHT
:
300 if (ParseOpcode
!= PARSEOP_INTEGER
)
302 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
308 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
312 if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_WIDTH
)
314 PldInfo
.Width
= (UINT16
) Value
;
316 else /* PARSEOP_PLD_HEIGHT */
318 PldInfo
.Height
= (UINT16
) Value
;
323 case PARSEOP_PLD_USERVISIBLE
:
324 case PARSEOP_PLD_DOCK
:
325 case PARSEOP_PLD_LID
:
327 if (ParseOpcode
!= PARSEOP_INTEGER
)
329 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
335 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
339 if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_USERVISIBLE
)
341 PldInfo
.UserVisible
= (UINT8
) Value
;
343 else if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_DOCK
)
345 PldInfo
.Dock
= (UINT8
) Value
;
349 PldInfo
.Lid
= (UINT8
) Value
;
354 case PARSEOP_PLD_PANEL
:
356 if (ParseOpcode
== PARSEOP_INTEGER
)
360 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
364 else /* PARSEOP_STRING */
366 if (!OpcFindName (AcpiGbl_PldPanelList
,
367 ThisOp
->Asl
.Child
->Asl
.Value
.String
,
370 AslError (ASL_ERROR
, ASL_MSG_INVALID_OPERAND
, ThisOp
, NULL
);
375 PldInfo
.Panel
= (UINT8
) Value
;
378 case PARSEOP_PLD_VERTICALPOSITION
:
380 if (ParseOpcode
== PARSEOP_INTEGER
)
384 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
388 else /* PARSEOP_STRING */
390 if (!OpcFindName (AcpiGbl_PldVerticalPositionList
,
391 ThisOp
->Asl
.Child
->Asl
.Value
.String
,
394 AslError (ASL_ERROR
, ASL_MSG_INVALID_OPERAND
, ThisOp
, NULL
);
399 PldInfo
.VerticalPosition
= (UINT8
) Value
;
402 case PARSEOP_PLD_HORIZONTALPOSITION
:
404 if (ParseOpcode
== PARSEOP_INTEGER
)
408 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
412 else /* PARSEOP_STRING */
414 if (!OpcFindName (AcpiGbl_PldHorizontalPositionList
,
415 ThisOp
->Asl
.Child
->Asl
.Value
.String
,
418 AslError (ASL_ERROR
, ASL_MSG_INVALID_OPERAND
, ThisOp
, NULL
);
423 PldInfo
.HorizontalPosition
= (UINT8
) Value
;
426 case PARSEOP_PLD_SHAPE
:
428 if (ParseOpcode
== PARSEOP_INTEGER
)
432 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
436 else /* PARSEOP_STRING */
438 if (!OpcFindName (AcpiGbl_PldShapeList
,
439 ThisOp
->Asl
.Child
->Asl
.Value
.String
,
442 AslError (ASL_ERROR
, ASL_MSG_INVALID_OPERAND
, ThisOp
, NULL
);
447 PldInfo
.Shape
= (UINT8
) Value
;
450 case PARSEOP_PLD_GROUPORIENTATION
:
452 if (ParseOpcode
!= PARSEOP_INTEGER
)
454 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
460 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
464 PldInfo
.GroupOrientation
= (UINT8
) Value
;
467 case PARSEOP_PLD_GROUPTOKEN
:
468 case PARSEOP_PLD_GROUPPOSITION
:
470 if (ParseOpcode
!= PARSEOP_INTEGER
)
472 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
478 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
482 if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_GROUPTOKEN
)
484 PldInfo
.GroupToken
= (UINT8
) Value
;
486 else /* PARSEOP_PLD_GROUPPOSITION */
488 PldInfo
.GroupPosition
= (UINT8
) Value
;
493 case PARSEOP_PLD_BAY
:
494 case PARSEOP_PLD_EJECTABLE
:
495 case PARSEOP_PLD_EJECTREQUIRED
:
497 if (ParseOpcode
!= PARSEOP_INTEGER
)
499 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
505 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
509 if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_BAY
)
511 PldInfo
.Bay
= (UINT8
) Value
;
513 else if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_EJECTABLE
)
515 PldInfo
.Ejectable
= (UINT8
) Value
;
517 else /* PARSEOP_PLD_EJECTREQUIRED */
519 PldInfo
.OspmEjectRequired
= (UINT8
) Value
;
524 case PARSEOP_PLD_CABINETNUMBER
:
525 case PARSEOP_PLD_CARDCAGENUMBER
:
527 if (ParseOpcode
!= PARSEOP_INTEGER
)
529 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
535 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
539 if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_CABINETNUMBER
)
541 PldInfo
.CabinetNumber
= (UINT8
) Value
;
543 else /* PARSEOP_PLD_CARDCAGENUMBER */
545 PldInfo
.CardCageNumber
= (UINT8
) Value
;
550 case PARSEOP_PLD_REFERENCE
:
552 if (ParseOpcode
!= PARSEOP_INTEGER
)
554 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
560 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
564 PldInfo
.Reference
= (UINT8
) Value
;
567 case PARSEOP_PLD_ROTATION
:
569 if (ParseOpcode
!= PARSEOP_INTEGER
)
571 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
616 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
621 PldInfo
.Rotation
= (UINT8
) Value
;
624 case PARSEOP_PLD_ORDER
:
626 if (ParseOpcode
!= PARSEOP_INTEGER
)
628 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
634 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
638 PldInfo
.Order
= (UINT8
) Value
;
641 case PARSEOP_PLD_VERTICALOFFSET
:
642 case PARSEOP_PLD_HORIZONTALOFFSET
:
644 if (ParseOpcode
!= PARSEOP_INTEGER
)
646 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
652 AslError (ASL_ERROR
, ASL_MSG_RANGE
, ThisOp
, NULL
);
656 if (ThisOp
->Asl
.ParseOpcode
== PARSEOP_PLD_VERTICALOFFSET
)
658 PldInfo
.VerticalOffset
= (UINT16
) Value
;
660 else /* PARSEOP_PLD_HORIZONTALOFFSET */
662 PldInfo
.HorizontalOffset
= (UINT16
) Value
;
669 AslError (ASL_ERROR
, ASL_MSG_INVALID_TYPE
, ThisOp
, NULL
);
673 ThisOp
= ThisOp
->Asl
.Next
;
676 Buffer
= OpcEncodePldBuffer (&PldInfo
);
678 /* Change Op to a Buffer */
680 Op
->Asl
.ParseOpcode
= PARSEOP_BUFFER
;
681 Op
->Common
.AmlOpcode
= AML_BUFFER_OP
;
683 /* Disable further optimization */
685 Op
->Asl
.CompileFlags
&= ~OP_COMPILE_TIME_CONST
;
686 UtSetParseOpName (Op
);
688 /* Child node is the buffer length */
690 NewOp
= TrAllocateOp (PARSEOP_INTEGER
);
692 NewOp
->Asl
.AmlOpcode
= AML_BYTE_OP
;
693 NewOp
->Asl
.Value
.Integer
= 20;
694 NewOp
->Asl
.Parent
= Op
;
696 Op
->Asl
.Child
= NewOp
;
699 /* Peer to the child is the raw buffer data */
701 NewOp
= TrAllocateOp (PARSEOP_RAW_DATA
);
702 NewOp
->Asl
.AmlOpcode
= AML_RAW_DATA_BUFFER
;
703 NewOp
->Asl
.AmlLength
= 20;
704 NewOp
->Asl
.Value
.String
= ACPI_CAST_PTR (char, Buffer
);
705 NewOp
->Asl
.Parent
= Op
->Asl
.Parent
;
707 Op
->Asl
.Next
= NewOp
;
711 /*******************************************************************************
713 * FUNCTION: OpcEncodePldBuffer
715 * PARAMETERS: PldInfo - _PLD buffer struct (Using local struct)
717 * RETURN: Encode _PLD buffer suitable for return value from _PLD
719 * DESCRIPTION: Bit-packs a _PLD buffer struct.
721 ******************************************************************************/
725 ACPI_PLD_INFO
*PldInfo
)
731 Buffer
= ACPI_CAST_PTR (UINT32
, UtLocalCacheCalloc (ACPI_PLD_BUFFER_SIZE
));
736 ACPI_PLD_SET_REVISION (&Dword
, PldInfo
->Revision
);
737 ACPI_PLD_SET_IGNORE_COLOR (&Dword
, PldInfo
->IgnoreColor
);
738 ACPI_PLD_SET_RED (&Dword
, PldInfo
->Red
);
739 ACPI_PLD_SET_GREEN (&Dword
, PldInfo
->Green
);
740 ACPI_PLD_SET_BLUE (&Dword
, PldInfo
->Blue
);
741 ACPI_MOVE_32_TO_32 (&Buffer
[0], &Dword
);
746 ACPI_PLD_SET_WIDTH (&Dword
, PldInfo
->Width
);
747 ACPI_PLD_SET_HEIGHT (&Dword
, PldInfo
->Height
);
748 ACPI_MOVE_32_TO_32 (&Buffer
[1], &Dword
);
753 ACPI_PLD_SET_USER_VISIBLE (&Dword
, PldInfo
->UserVisible
);
754 ACPI_PLD_SET_DOCK (&Dword
, PldInfo
->Dock
);
755 ACPI_PLD_SET_LID (&Dword
, PldInfo
->Lid
);
756 ACPI_PLD_SET_PANEL (&Dword
, PldInfo
->Panel
);
757 ACPI_PLD_SET_VERTICAL (&Dword
, PldInfo
->VerticalPosition
);
758 ACPI_PLD_SET_HORIZONTAL (&Dword
, PldInfo
->HorizontalPosition
);
759 ACPI_PLD_SET_SHAPE (&Dword
, PldInfo
->Shape
);
760 ACPI_PLD_SET_ORIENTATION (&Dword
, PldInfo
->GroupOrientation
);
761 ACPI_PLD_SET_TOKEN (&Dword
, PldInfo
->GroupToken
);
762 ACPI_PLD_SET_POSITION (&Dword
, PldInfo
->GroupPosition
);
763 ACPI_PLD_SET_BAY (&Dword
, PldInfo
->Bay
);
764 ACPI_MOVE_32_TO_32 (&Buffer
[2], &Dword
);
769 ACPI_PLD_SET_EJECTABLE (&Dword
, PldInfo
->Ejectable
);
770 ACPI_PLD_SET_OSPM_EJECT (&Dword
, PldInfo
->OspmEjectRequired
);
771 ACPI_PLD_SET_CABINET (&Dword
, PldInfo
->CabinetNumber
);
772 ACPI_PLD_SET_CARD_CAGE (&Dword
, PldInfo
->CardCageNumber
);
773 ACPI_PLD_SET_REFERENCE (&Dword
, PldInfo
->Reference
);
774 ACPI_PLD_SET_ROTATION (&Dword
, PldInfo
->Rotation
);
775 ACPI_PLD_SET_ORDER (&Dword
, PldInfo
->Order
);
776 ACPI_MOVE_32_TO_32 (&Buffer
[3], &Dword
);
778 /* Revision 2 adds an additional DWORD */
780 if (PldInfo
->Revision
>= 2)
785 ACPI_PLD_SET_VERT_OFFSET (&Dword
, PldInfo
->VerticalOffset
);
786 ACPI_PLD_SET_HORIZ_OFFSET (&Dword
, PldInfo
->HorizontalOffset
);
787 ACPI_MOVE_32_TO_32 (&Buffer
[4], &Dword
);
790 return (ACPI_CAST_PTR (UINT8
, Buffer
));
794 /*******************************************************************************
796 * FUNCTION: OpcFindName
798 * PARAMETERS: List - Array of char strings to be searched
799 * Name - Char string to string for
800 * Index - Index value to set if found
802 * RETURN: TRUE if any names matched, FALSE otherwise
804 * DESCRIPTION: Match PLD name to value in lookup table. Sets Value to
805 * equivalent parameter value.
807 ******************************************************************************/
815 const char *NameString
;
821 for (i
= 0, NameString
= List
[0];
823 i
++, NameString
= List
[i
])
825 if (!(strncmp (NameString
, Name
, strlen (Name
))))