dbconvert.c revision 1.1.1.6 1 1.1 christos /*******************************************************************************
2 1.1 christos *
3 1.1 christos * Module Name: dbconvert - debugger miscellaneous conversion routines
4 1.1 christos *
5 1.1 christos ******************************************************************************/
6 1.1 christos
7 1.1 christos /*
8 1.1.1.5 christos * Copyright (C) 2000 - 2016, Intel Corp.
9 1.1 christos * All rights reserved.
10 1.1 christos *
11 1.1 christos * Redistribution and use in source and binary forms, with or without
12 1.1 christos * modification, are permitted provided that the following conditions
13 1.1 christos * are met:
14 1.1 christos * 1. Redistributions of source code must retain the above copyright
15 1.1 christos * notice, this list of conditions, and the following disclaimer,
16 1.1 christos * without modification.
17 1.1 christos * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1 christos * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1 christos * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1 christos * including a substantially similar Disclaimer requirement for further
21 1.1 christos * binary redistribution.
22 1.1 christos * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1 christos * of any contributors may be used to endorse or promote products derived
24 1.1 christos * from this software without specific prior written permission.
25 1.1 christos *
26 1.1 christos * Alternatively, this software may be distributed under the terms of the
27 1.1 christos * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1 christos * Software Foundation.
29 1.1 christos *
30 1.1 christos * NO WARRANTY
31 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1 christos * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1 christos * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1 christos * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1 christos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1 christos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1 christos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1 christos * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1 christos * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1 christos * POSSIBILITY OF SUCH DAMAGES.
42 1.1 christos */
43 1.1 christos
44 1.1 christos #include "acpi.h"
45 1.1 christos #include "accommon.h"
46 1.1 christos #include "acdebug.h"
47 1.1 christos
48 1.1 christos
49 1.1 christos #define _COMPONENT ACPI_CA_DEBUGGER
50 1.1 christos ACPI_MODULE_NAME ("dbconvert")
51 1.1 christos
52 1.1 christos
53 1.1 christos #define DB_DEFAULT_PKG_ELEMENTS 33
54 1.1 christos
55 1.1 christos
56 1.1 christos /*******************************************************************************
57 1.1 christos *
58 1.1 christos * FUNCTION: AcpiDbHexCharToValue
59 1.1 christos *
60 1.1 christos * PARAMETERS: HexChar - Ascii Hex digit, 0-9|a-f|A-F
61 1.1 christos * ReturnValue - Where the converted value is returned
62 1.1 christos *
63 1.1 christos * RETURN: Status
64 1.1 christos *
65 1.1 christos * DESCRIPTION: Convert a single hex character to a 4-bit number (0-16).
66 1.1 christos *
67 1.1 christos ******************************************************************************/
68 1.1 christos
69 1.1 christos ACPI_STATUS
70 1.1 christos AcpiDbHexCharToValue (
71 1.1 christos int HexChar,
72 1.1 christos UINT8 *ReturnValue)
73 1.1 christos {
74 1.1 christos UINT8 Value;
75 1.1 christos
76 1.1 christos
77 1.1 christos /* Digit must be ascii [0-9a-fA-F] */
78 1.1 christos
79 1.1.1.4 christos if (!isxdigit (HexChar))
80 1.1 christos {
81 1.1 christos return (AE_BAD_HEX_CONSTANT);
82 1.1 christos }
83 1.1 christos
84 1.1 christos if (HexChar <= 0x39)
85 1.1 christos {
86 1.1 christos Value = (UINT8) (HexChar - 0x30);
87 1.1 christos }
88 1.1 christos else
89 1.1 christos {
90 1.1.1.4 christos Value = (UINT8) (toupper (HexChar) - 0x37);
91 1.1 christos }
92 1.1 christos
93 1.1 christos *ReturnValue = Value;
94 1.1 christos return (AE_OK);
95 1.1 christos }
96 1.1 christos
97 1.1 christos
98 1.1 christos /*******************************************************************************
99 1.1 christos *
100 1.1 christos * FUNCTION: AcpiDbHexByteToBinary
101 1.1 christos *
102 1.1 christos * PARAMETERS: HexByte - Double hex digit (0x00 - 0xFF) in format:
103 1.1 christos * HiByte then LoByte.
104 1.1 christos * ReturnValue - Where the converted value is returned
105 1.1 christos *
106 1.1 christos * RETURN: Status
107 1.1 christos *
108 1.1 christos * DESCRIPTION: Convert two hex characters to an 8 bit number (0 - 255).
109 1.1 christos *
110 1.1 christos ******************************************************************************/
111 1.1 christos
112 1.1 christos static ACPI_STATUS
113 1.1 christos AcpiDbHexByteToBinary (
114 1.1 christos char *HexByte,
115 1.1 christos UINT8 *ReturnValue)
116 1.1 christos {
117 1.1 christos UINT8 Local0;
118 1.1 christos UINT8 Local1;
119 1.1 christos ACPI_STATUS Status;
120 1.1 christos
121 1.1 christos
122 1.1 christos /* High byte */
123 1.1 christos
124 1.1 christos Status = AcpiDbHexCharToValue (HexByte[0], &Local0);
125 1.1 christos if (ACPI_FAILURE (Status))
126 1.1 christos {
127 1.1 christos return (Status);
128 1.1 christos }
129 1.1 christos
130 1.1 christos /* Low byte */
131 1.1 christos
132 1.1 christos Status = AcpiDbHexCharToValue (HexByte[1], &Local1);
133 1.1 christos if (ACPI_FAILURE (Status))
134 1.1 christos {
135 1.1 christos return (Status);
136 1.1 christos }
137 1.1 christos
138 1.1 christos *ReturnValue = (UINT8) ((Local0 << 4) | Local1);
139 1.1 christos return (AE_OK);
140 1.1 christos }
141 1.1 christos
142 1.1 christos
143 1.1 christos /*******************************************************************************
144 1.1 christos *
145 1.1 christos * FUNCTION: AcpiDbConvertToBuffer
146 1.1 christos *
147 1.1 christos * PARAMETERS: String - Input string to be converted
148 1.1 christos * Object - Where the buffer object is returned
149 1.1 christos *
150 1.1 christos * RETURN: Status
151 1.1 christos *
152 1.1 christos * DESCRIPTION: Convert a string to a buffer object. String is treated a list
153 1.1 christos * of buffer elements, each separated by a space or comma.
154 1.1 christos *
155 1.1 christos ******************************************************************************/
156 1.1 christos
157 1.1 christos static ACPI_STATUS
158 1.1 christos AcpiDbConvertToBuffer (
159 1.1 christos char *String,
160 1.1 christos ACPI_OBJECT *Object)
161 1.1 christos {
162 1.1 christos UINT32 i;
163 1.1 christos UINT32 j;
164 1.1 christos UINT32 Length;
165 1.1 christos UINT8 *Buffer;
166 1.1 christos ACPI_STATUS Status;
167 1.1 christos
168 1.1 christos
169 1.1 christos /* Generate the final buffer length */
170 1.1 christos
171 1.1 christos for (i = 0, Length = 0; String[i];)
172 1.1 christos {
173 1.1 christos i+=2;
174 1.1 christos Length++;
175 1.1 christos
176 1.1 christos while (String[i] &&
177 1.1 christos ((String[i] == ',') || (String[i] == ' ')))
178 1.1 christos {
179 1.1 christos i++;
180 1.1 christos }
181 1.1 christos }
182 1.1 christos
183 1.1 christos Buffer = ACPI_ALLOCATE (Length);
184 1.1 christos if (!Buffer)
185 1.1 christos {
186 1.1 christos return (AE_NO_MEMORY);
187 1.1 christos }
188 1.1 christos
189 1.1 christos /* Convert the command line bytes to the buffer */
190 1.1 christos
191 1.1 christos for (i = 0, j = 0; String[i];)
192 1.1 christos {
193 1.1 christos Status = AcpiDbHexByteToBinary (&String[i], &Buffer[j]);
194 1.1 christos if (ACPI_FAILURE (Status))
195 1.1 christos {
196 1.1 christos ACPI_FREE (Buffer);
197 1.1 christos return (Status);
198 1.1 christos }
199 1.1 christos
200 1.1 christos j++;
201 1.1.1.5 christos i += 2;
202 1.1 christos while (String[i] &&
203 1.1 christos ((String[i] == ',') || (String[i] == ' ')))
204 1.1 christos {
205 1.1 christos i++;
206 1.1 christos }
207 1.1 christos }
208 1.1 christos
209 1.1 christos Object->Type = ACPI_TYPE_BUFFER;
210 1.1 christos Object->Buffer.Pointer = Buffer;
211 1.1 christos Object->Buffer.Length = Length;
212 1.1 christos return (AE_OK);
213 1.1 christos }
214 1.1 christos
215 1.1 christos
216 1.1 christos /*******************************************************************************
217 1.1 christos *
218 1.1 christos * FUNCTION: AcpiDbConvertToPackage
219 1.1 christos *
220 1.1 christos * PARAMETERS: String - Input string to be converted
221 1.1 christos * Object - Where the package object is returned
222 1.1 christos *
223 1.1 christos * RETURN: Status
224 1.1 christos *
225 1.1 christos * DESCRIPTION: Convert a string to a package object. Handles nested packages
226 1.1 christos * via recursion with AcpiDbConvertToObject.
227 1.1 christos *
228 1.1 christos ******************************************************************************/
229 1.1 christos
230 1.1 christos ACPI_STATUS
231 1.1 christos AcpiDbConvertToPackage (
232 1.1 christos char *String,
233 1.1 christos ACPI_OBJECT *Object)
234 1.1 christos {
235 1.1 christos char *This;
236 1.1 christos char *Next;
237 1.1 christos UINT32 i;
238 1.1 christos ACPI_OBJECT_TYPE Type;
239 1.1 christos ACPI_OBJECT *Elements;
240 1.1 christos ACPI_STATUS Status;
241 1.1 christos
242 1.1 christos
243 1.1 christos Elements = ACPI_ALLOCATE_ZEROED (
244 1.1 christos DB_DEFAULT_PKG_ELEMENTS * sizeof (ACPI_OBJECT));
245 1.1 christos
246 1.1 christos This = String;
247 1.1 christos for (i = 0; i < (DB_DEFAULT_PKG_ELEMENTS - 1); i++)
248 1.1 christos {
249 1.1 christos This = AcpiDbGetNextToken (This, &Next, &Type);
250 1.1 christos if (!This)
251 1.1 christos {
252 1.1 christos break;
253 1.1 christos }
254 1.1 christos
255 1.1 christos /* Recursive call to convert each package element */
256 1.1 christos
257 1.1 christos Status = AcpiDbConvertToObject (Type, This, &Elements[i]);
258 1.1 christos if (ACPI_FAILURE (Status))
259 1.1 christos {
260 1.1 christos AcpiDbDeleteObjects (i + 1, Elements);
261 1.1 christos ACPI_FREE (Elements);
262 1.1 christos return (Status);
263 1.1 christos }
264 1.1 christos
265 1.1 christos This = Next;
266 1.1 christos }
267 1.1 christos
268 1.1 christos Object->Type = ACPI_TYPE_PACKAGE;
269 1.1 christos Object->Package.Count = i;
270 1.1 christos Object->Package.Elements = Elements;
271 1.1 christos return (AE_OK);
272 1.1 christos }
273 1.1 christos
274 1.1 christos
275 1.1 christos /*******************************************************************************
276 1.1 christos *
277 1.1 christos * FUNCTION: AcpiDbConvertToObject
278 1.1 christos *
279 1.1 christos * PARAMETERS: Type - Object type as determined by parser
280 1.1 christos * String - Input string to be converted
281 1.1 christos * Object - Where the new object is returned
282 1.1 christos *
283 1.1 christos * RETURN: Status
284 1.1 christos *
285 1.1 christos * DESCRIPTION: Convert a typed and tokenized string to an ACPI_OBJECT. Typing:
286 1.1 christos * 1) String objects were surrounded by quotes.
287 1.1 christos * 2) Buffer objects were surrounded by parentheses.
288 1.1 christos * 3) Package objects were surrounded by brackets "[]".
289 1.1 christos * 4) All standalone tokens are treated as integers.
290 1.1 christos *
291 1.1 christos ******************************************************************************/
292 1.1 christos
293 1.1 christos ACPI_STATUS
294 1.1 christos AcpiDbConvertToObject (
295 1.1 christos ACPI_OBJECT_TYPE Type,
296 1.1 christos char *String,
297 1.1 christos ACPI_OBJECT *Object)
298 1.1 christos {
299 1.1 christos ACPI_STATUS Status = AE_OK;
300 1.1 christos
301 1.1 christos
302 1.1 christos switch (Type)
303 1.1 christos {
304 1.1 christos case ACPI_TYPE_STRING:
305 1.1 christos
306 1.1 christos Object->Type = ACPI_TYPE_STRING;
307 1.1 christos Object->String.Pointer = String;
308 1.1.1.4 christos Object->String.Length = (UINT32) strlen (String);
309 1.1 christos break;
310 1.1 christos
311 1.1 christos case ACPI_TYPE_BUFFER:
312 1.1 christos
313 1.1 christos Status = AcpiDbConvertToBuffer (String, Object);
314 1.1 christos break;
315 1.1 christos
316 1.1 christos case ACPI_TYPE_PACKAGE:
317 1.1 christos
318 1.1 christos Status = AcpiDbConvertToPackage (String, Object);
319 1.1 christos break;
320 1.1 christos
321 1.1 christos default:
322 1.1 christos
323 1.1 christos Object->Type = ACPI_TYPE_INTEGER;
324 1.1.1.6 christos Status = AcpiUtStrtoul64 (String, 16, AcpiGbl_IntegerByteWidth,
325 1.1.1.6 christos &Object->Integer.Value);
326 1.1 christos break;
327 1.1 christos }
328 1.1 christos
329 1.1 christos return (Status);
330 1.1 christos }
331 1.1 christos
332 1.1 christos
333 1.1 christos /*******************************************************************************
334 1.1 christos *
335 1.1 christos * FUNCTION: AcpiDbEncodePldBuffer
336 1.1 christos *
337 1.1 christos * PARAMETERS: PldInfo - _PLD buffer struct (Using local struct)
338 1.1 christos *
339 1.1 christos * RETURN: Encode _PLD buffer suitable for return value from _PLD
340 1.1 christos *
341 1.1 christos * DESCRIPTION: Bit-packs a _PLD buffer struct. Used to test the _PLD macros
342 1.1 christos *
343 1.1 christos ******************************************************************************/
344 1.1 christos
345 1.1 christos UINT8 *
346 1.1 christos AcpiDbEncodePldBuffer (
347 1.1 christos ACPI_PLD_INFO *PldInfo)
348 1.1 christos {
349 1.1 christos UINT32 *Buffer;
350 1.1 christos UINT32 Dword;
351 1.1 christos
352 1.1 christos
353 1.1 christos Buffer = ACPI_ALLOCATE_ZEROED (ACPI_PLD_BUFFER_SIZE);
354 1.1 christos if (!Buffer)
355 1.1 christos {
356 1.1 christos return (NULL);
357 1.1 christos }
358 1.1 christos
359 1.1 christos /* First 32 bits */
360 1.1 christos
361 1.1 christos Dword = 0;
362 1.1 christos ACPI_PLD_SET_REVISION (&Dword, PldInfo->Revision);
363 1.1 christos ACPI_PLD_SET_IGNORE_COLOR (&Dword, PldInfo->IgnoreColor);
364 1.1.1.3 christos ACPI_PLD_SET_RED (&Dword, PldInfo->Red);
365 1.1.1.3 christos ACPI_PLD_SET_GREEN (&Dword, PldInfo->Green);
366 1.1.1.3 christos ACPI_PLD_SET_BLUE (&Dword, PldInfo->Blue);
367 1.1 christos ACPI_MOVE_32_TO_32 (&Buffer[0], &Dword);
368 1.1 christos
369 1.1 christos /* Second 32 bits */
370 1.1 christos
371 1.1 christos Dword = 0;
372 1.1 christos ACPI_PLD_SET_WIDTH (&Dword, PldInfo->Width);
373 1.1 christos ACPI_PLD_SET_HEIGHT (&Dword, PldInfo->Height);
374 1.1 christos ACPI_MOVE_32_TO_32 (&Buffer[1], &Dword);
375 1.1 christos
376 1.1 christos /* Third 32 bits */
377 1.1 christos
378 1.1 christos Dword = 0;
379 1.1 christos ACPI_PLD_SET_USER_VISIBLE (&Dword, PldInfo->UserVisible);
380 1.1 christos ACPI_PLD_SET_DOCK (&Dword, PldInfo->Dock);
381 1.1 christos ACPI_PLD_SET_LID (&Dword, PldInfo->Lid);
382 1.1 christos ACPI_PLD_SET_PANEL (&Dword, PldInfo->Panel);
383 1.1 christos ACPI_PLD_SET_VERTICAL (&Dword, PldInfo->VerticalPosition);
384 1.1 christos ACPI_PLD_SET_HORIZONTAL (&Dword, PldInfo->HorizontalPosition);
385 1.1 christos ACPI_PLD_SET_SHAPE (&Dword, PldInfo->Shape);
386 1.1 christos ACPI_PLD_SET_ORIENTATION (&Dword, PldInfo->GroupOrientation);
387 1.1 christos ACPI_PLD_SET_TOKEN (&Dword, PldInfo->GroupToken);
388 1.1 christos ACPI_PLD_SET_POSITION (&Dword, PldInfo->GroupPosition);
389 1.1 christos ACPI_PLD_SET_BAY (&Dword, PldInfo->Bay);
390 1.1 christos ACPI_MOVE_32_TO_32 (&Buffer[2], &Dword);
391 1.1 christos
392 1.1 christos /* Fourth 32 bits */
393 1.1 christos
394 1.1 christos Dword = 0;
395 1.1 christos ACPI_PLD_SET_EJECTABLE (&Dword, PldInfo->Ejectable);
396 1.1 christos ACPI_PLD_SET_OSPM_EJECT (&Dword, PldInfo->OspmEjectRequired);
397 1.1 christos ACPI_PLD_SET_CABINET (&Dword, PldInfo->CabinetNumber);
398 1.1 christos ACPI_PLD_SET_CARD_CAGE (&Dword, PldInfo->CardCageNumber);
399 1.1 christos ACPI_PLD_SET_REFERENCE (&Dword, PldInfo->Reference);
400 1.1 christos ACPI_PLD_SET_ROTATION (&Dword, PldInfo->Rotation);
401 1.1 christos ACPI_PLD_SET_ORDER (&Dword, PldInfo->Order);
402 1.1 christos ACPI_MOVE_32_TO_32 (&Buffer[3], &Dword);
403 1.1 christos
404 1.1 christos if (PldInfo->Revision >= 2)
405 1.1 christos {
406 1.1 christos /* Fifth 32 bits */
407 1.1 christos
408 1.1 christos Dword = 0;
409 1.1 christos ACPI_PLD_SET_VERT_OFFSET (&Dword, PldInfo->VerticalOffset);
410 1.1 christos ACPI_PLD_SET_HORIZ_OFFSET (&Dword, PldInfo->HorizontalOffset);
411 1.1 christos ACPI_MOVE_32_TO_32 (&Buffer[4], &Dword);
412 1.1 christos }
413 1.1 christos
414 1.1 christos return (ACPI_CAST_PTR (UINT8, Buffer));
415 1.1 christos }
416 1.1 christos
417 1.1 christos
418 1.1 christos /*******************************************************************************
419 1.1 christos *
420 1.1 christos * FUNCTION: AcpiDbDumpPldBuffer
421 1.1 christos *
422 1.1 christos * PARAMETERS: ObjDesc - Object returned from _PLD method
423 1.1 christos *
424 1.1 christos * RETURN: None.
425 1.1 christos *
426 1.1 christos * DESCRIPTION: Dumps formatted contents of a _PLD return buffer.
427 1.1 christos *
428 1.1 christos ******************************************************************************/
429 1.1 christos
430 1.1 christos #define ACPI_PLD_OUTPUT "%20s : %-6X\n"
431 1.1 christos
432 1.1 christos void
433 1.1 christos AcpiDbDumpPldBuffer (
434 1.1 christos ACPI_OBJECT *ObjDesc)
435 1.1 christos {
436 1.1 christos ACPI_OBJECT *BufferDesc;
437 1.1 christos ACPI_PLD_INFO *PldInfo;
438 1.1 christos UINT8 *NewBuffer;
439 1.1 christos ACPI_STATUS Status;
440 1.1 christos
441 1.1 christos
442 1.1 christos /* Object must be of type Package with at least one Buffer element */
443 1.1 christos
444 1.1 christos if (ObjDesc->Type != ACPI_TYPE_PACKAGE)
445 1.1 christos {
446 1.1 christos return;
447 1.1 christos }
448 1.1 christos
449 1.1 christos BufferDesc = &ObjDesc->Package.Elements[0];
450 1.1 christos if (BufferDesc->Type != ACPI_TYPE_BUFFER)
451 1.1 christos {
452 1.1 christos return;
453 1.1 christos }
454 1.1 christos
455 1.1 christos /* Convert _PLD buffer to local _PLD struct */
456 1.1 christos
457 1.1 christos Status = AcpiDecodePldBuffer (BufferDesc->Buffer.Pointer,
458 1.1 christos BufferDesc->Buffer.Length, &PldInfo);
459 1.1 christos if (ACPI_FAILURE (Status))
460 1.1 christos {
461 1.1 christos return;
462 1.1 christos }
463 1.1 christos
464 1.1 christos /* Encode local _PLD struct back to a _PLD buffer */
465 1.1 christos
466 1.1 christos NewBuffer = AcpiDbEncodePldBuffer (PldInfo);
467 1.1 christos if (!NewBuffer)
468 1.1 christos {
469 1.1.1.6 christos goto Exit;
470 1.1 christos }
471 1.1 christos
472 1.1 christos /* The two bit-packed buffers should match */
473 1.1 christos
474 1.1.1.4 christos if (memcmp (NewBuffer, BufferDesc->Buffer.Pointer,
475 1.1 christos BufferDesc->Buffer.Length))
476 1.1 christos {
477 1.1 christos AcpiOsPrintf ("Converted _PLD buffer does not compare. New:\n");
478 1.1 christos
479 1.1 christos AcpiUtDumpBuffer (NewBuffer,
480 1.1 christos BufferDesc->Buffer.Length, DB_BYTE_DISPLAY, 0);
481 1.1 christos }
482 1.1 christos
483 1.1 christos /* First 32-bit dword */
484 1.1 christos
485 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Revision", PldInfo->Revision);
486 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_IgnoreColor", PldInfo->IgnoreColor);
487 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Red", PldInfo->Red);
488 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Green", PldInfo->Green);
489 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Blue", PldInfo->Blue);
490 1.1 christos
491 1.1 christos /* Second 32-bit dword */
492 1.1 christos
493 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Width", PldInfo->Width);
494 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Height", PldInfo->Height);
495 1.1 christos
496 1.1 christos /* Third 32-bit dword */
497 1.1 christos
498 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_UserVisible", PldInfo->UserVisible);
499 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Dock", PldInfo->Dock);
500 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Lid", PldInfo->Lid);
501 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Panel", PldInfo->Panel);
502 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_VerticalPosition", PldInfo->VerticalPosition);
503 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_HorizontalPosition", PldInfo->HorizontalPosition);
504 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Shape", PldInfo->Shape);
505 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_GroupOrientation", PldInfo->GroupOrientation);
506 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_GroupToken", PldInfo->GroupToken);
507 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_GroupPosition", PldInfo->GroupPosition);
508 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Bay", PldInfo->Bay);
509 1.1 christos
510 1.1 christos /* Fourth 32-bit dword */
511 1.1 christos
512 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Ejectable", PldInfo->Ejectable);
513 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_EjectRequired", PldInfo->OspmEjectRequired);
514 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_CabinetNumber", PldInfo->CabinetNumber);
515 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_CardCageNumber", PldInfo->CardCageNumber);
516 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Reference", PldInfo->Reference);
517 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Rotation", PldInfo->Rotation);
518 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Order", PldInfo->Order);
519 1.1 christos
520 1.1 christos /* Fifth 32-bit dword */
521 1.1 christos
522 1.1 christos if (BufferDesc->Buffer.Length > 16)
523 1.1 christos {
524 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_VerticalOffset", PldInfo->VerticalOffset);
525 1.1.1.3 christos AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_HorizontalOffset", PldInfo->HorizontalOffset);
526 1.1 christos }
527 1.1 christos
528 1.1 christos ACPI_FREE (NewBuffer);
529 1.1.1.6 christos Exit:
530 1.1.1.6 christos ACPI_FREE (PldInfo);
531 1.1 christos }
532