]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/acpica/lib-acpi/src/acpica/tools/acpiexec/aeexec.c
Inital import
[l4.git] / l4 / pkg / acpica / lib-acpi / src / acpica / tools / acpiexec / aeexec.c
1 /******************************************************************************
2  *
3  * Module Name: aeexec - Support routines for AcpiExec utility
4  *
5  *****************************************************************************/
6
7 /******************************************************************************
8  *
9  * 1. Copyright Notice
10  *
11  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
12  * All rights reserved.
13  *
14  * 2. License
15  *
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
19  * property rights.
20  *
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
27  *
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;
36  *
37  * The above copyright and patent license is granted only if the following
38  * conditions are met:
39  *
40  * 3. Conditions
41  *
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.
53  *
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
64  * make.
65  *
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
70  * distribution.
71  *
72  * 3.4. Intel retains all right, title, and interest in and to the Original
73  * Intel Code.
74  *
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.
79  *
80  * 4. Disclaimer and Export Compliance
81  *
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
88  * PARTICULAR PURPOSE.
89  *
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
97  * LIMITED REMEDY.
98  *
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.
113  *
114  *****************************************************************************/
115
116 #include "aecommon.h"
117
118 #define _COMPONENT          ACPI_TOOLS
119         ACPI_MODULE_NAME    ("aeexec")
120
121 /* Local prototypes */
122
123 ACPI_STATUS
124 AeSetupConfiguration (
125     void                    *RegionAddr);
126
127 void
128 AfInstallGpeBlock (
129     void);
130
131 void
132 AeTestBufferArgument (
133     void);
134
135 void
136 AeTestPackageArgument (
137     void);
138
139 ACPI_STATUS
140 AeGetDevices (
141     ACPI_HANDLE             ObjHandle,
142     UINT32                  NestingLevel,
143     void                    *Context,
144     void                    **ReturnValue);
145
146 ACPI_STATUS
147 ExecuteOSI (
148     char                    *OsiString,
149     UINT32                  ExpectedResult);
150
151 void
152 AeHardwareInterfaces (
153     void);
154
155 void
156 AeGenericRegisters (
157     void);
158
159 extern unsigned char Ssdt3Code[];
160
161
162 /******************************************************************************
163  *
164  * FUNCTION:    AeSetupConfiguration
165  *
166  * PARAMETERS:  RegionAddr          - Address for an ACPI table to be loaded
167  *                                    dynamically. Test purposes only.
168  *
169  * RETURN:      Status
170  *
171  * DESCRIPTION: Call AML _CFG configuration control method
172  *
173  *****************************************************************************/
174
175 ACPI_STATUS
176 AeSetupConfiguration (
177     void                    *RegionAddr)
178 {
179     ACPI_STATUS             Status;
180     ACPI_OBJECT_LIST        ArgList;
181     ACPI_OBJECT             Arg[3];
182
183
184     /*
185      * Invoke _CFG method if present
186      */
187     ArgList.Count = 1;
188     ArgList.Pointer = Arg;
189
190     Arg[0].Type = ACPI_TYPE_INTEGER;
191     Arg[0].Integer.Value = ACPI_TO_INTEGER (RegionAddr);
192
193     Status = AcpiEvaluateObject (NULL, "\\_CFG", &ArgList, NULL);
194
195     return (AE_OK);
196 }
197
198
199 /******************************************************************************
200  *
201  * FUNCTION:    AfInstallGpeBlock
202  *
203  * PARAMETERS:  None
204  *
205  * RETURN:      None
206  *
207  * DESCRIPTION: Various GPE initialization
208  *
209  *****************************************************************************/
210
211 void
212 AfInstallGpeBlock (
213     void)
214 {
215     ACPI_STATUS                 Status;
216     ACPI_HANDLE                 Handle;
217     ACPI_HANDLE                 Handle2 = NULL;
218     ACPI_HANDLE                 Handle3 = NULL;
219     ACPI_GENERIC_ADDRESS        BlockAddress;
220     ACPI_HANDLE                 GpeDevice;
221
222
223     Status = AcpiGetHandle (NULL, "\\_GPE", &Handle);
224     if (ACPI_FAILURE (Status))
225     {
226         return;
227     }
228
229     BlockAddress.SpaceId = 0;
230     BlockAddress.Address = 0x76540000;
231
232 #ifdef _OBSOLETE
233     Status = AcpiInstallGpeBlock (Handle, &BlockAddress, 4, 8);
234 #endif
235
236     /* Above should fail, ignore */
237
238     Status = AcpiGetHandle (NULL, "\\GPE2", &Handle2);
239     if (ACPI_SUCCESS (Status))
240     {
241         Status = AcpiInstallGpeBlock (Handle2, &BlockAddress, 8, 8);
242
243         AcpiInstallGpeHandler (Handle2, 8, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
244         AcpiSetGpeType (Handle2, 8, ACPI_GPE_TYPE_WAKE);
245         AcpiEnableGpe (Handle2, 8, 0);
246
247         Status = AcpiGetGpeDevice (0x30, &GpeDevice);
248         Status = AcpiGetGpeDevice (0x42, &GpeDevice);
249         Status = AcpiGetGpeDevice (AcpiCurrentGpeCount-1, &GpeDevice);
250         Status = AcpiGetGpeDevice (AcpiCurrentGpeCount, &GpeDevice);
251
252         AcpiRemoveGpeHandler (Handle2, 8, AeGpeHandler);
253
254         Status = AcpiRemoveGpeBlock (Handle2);
255     }
256
257     Status = AcpiGetHandle (NULL, "\\GPE3", &Handle3);
258     if (ACPI_SUCCESS (Status))
259     {
260         Status = AcpiInstallGpeBlock (Handle3, &BlockAddress, 8, 11);
261     }
262
263 #ifdef _OBSOLETE
264     Status = AcpiRemoveGpeBlock (Handle);
265     Status = AcpiRemoveGpeBlock (Handle2);
266     Status = AcpiRemoveGpeBlock (Handle3);
267 #endif
268 }
269
270
271 /* Test using a Buffer object as a method argument */
272
273 void
274 AeTestBufferArgument (
275     void)
276 {
277     ACPI_STATUS             Status;
278     ACPI_OBJECT_LIST        Params;
279     ACPI_OBJECT             BufArg;
280     UINT8                   Buffer[] = {
281         0,0,0,0,
282         4,0,0,0,
283         1,2,3,4};
284
285
286     BufArg.Type = ACPI_TYPE_BUFFER;
287     BufArg.Buffer.Length = 12;
288     BufArg.Buffer.Pointer = Buffer;
289
290     Params.Count = 1;
291     Params.Pointer = &BufArg;
292
293
294     Status = AcpiEvaluateObject (NULL, "\\BUF", &Params, NULL);
295 }
296
297
298 ACPI_OBJECT                 PkgArg;
299 ACPI_OBJECT                 PkgElements[5];
300 ACPI_OBJECT                 Pkg2Elements[5];
301 ACPI_OBJECT_LIST            Params;
302
303
304 /*
305  * Test using a Package object as an method argument
306  */
307 void
308 AeTestPackageArgument (
309     void)
310 {
311     ACPI_STATUS             Status;
312
313
314     /* Main package */
315
316     PkgArg.Type = ACPI_TYPE_PACKAGE;
317     PkgArg.Package.Count = 4;
318     PkgArg.Package.Elements = PkgElements;
319
320     /* Main package elements */
321
322     PkgElements[0].Type = ACPI_TYPE_INTEGER;
323     PkgElements[0].Integer.Value = 0x22228888;
324
325     PkgElements[1].Type = ACPI_TYPE_STRING;
326     PkgElements[1].String.Length = sizeof ("Top-level package");
327     PkgElements[1].String.Pointer = "Top-level package";
328
329     PkgElements[2].Type = ACPI_TYPE_BUFFER;
330     PkgElements[2].Buffer.Length = sizeof ("XXXX");
331     PkgElements[2].Buffer.Pointer = (UINT8 *) "XXXX";
332
333     PkgElements[3].Type = ACPI_TYPE_PACKAGE;
334     PkgElements[3].Package.Count = 2;
335     PkgElements[3].Package.Elements = Pkg2Elements;
336
337     /* Sub-package elements */
338
339     Pkg2Elements[0].Type = ACPI_TYPE_INTEGER;
340     Pkg2Elements[0].Integer.Value = 0xAAAABBBB;
341
342     Pkg2Elements[1].Type = ACPI_TYPE_STRING;
343     Pkg2Elements[1].String.Length = sizeof ("Nested Package");
344     Pkg2Elements[1].String.Pointer = "Nested Package";
345
346     /* Parameter object */
347
348     Params.Count = 1;
349     Params.Pointer = &PkgArg;
350
351     Status = AcpiEvaluateObject (NULL, "\\_PKG", &Params, NULL);
352 }
353
354
355 ACPI_STATUS
356 AeGetDevices (
357     ACPI_HANDLE                     ObjHandle,
358     UINT32                          NestingLevel,
359     void                            *Context,
360     void                            **ReturnValue)
361 {
362
363     return (AE_OK);
364 }
365
366
367 /******************************************************************************
368  *
369  * FUNCTION:    ExecuteOSI
370  *
371  * PARAMETERS:  OsiString           - String passed to _OSI method
372  *              ExpectedResult      - 0 (FALSE) or 0xFFFFFFFF (TRUE)
373  *
374  * RETURN:      Status
375  *
376  * DESCRIPTION: Execute the internally implemented (in ACPICA) _OSI method.
377  *
378  *****************************************************************************/
379
380 ACPI_STATUS
381 ExecuteOSI (
382     char                    *OsiString,
383     UINT32                  ExpectedResult)
384 {
385     ACPI_STATUS             Status;
386     ACPI_OBJECT_LIST        ArgList;
387     ACPI_OBJECT             Arg[1];
388     ACPI_BUFFER             ReturnValue;
389     ACPI_OBJECT             *Obj;
390
391
392     /* Setup input argument */
393
394     ArgList.Count = 1;
395     ArgList.Pointer = Arg;
396
397     Arg[0].Type = ACPI_TYPE_STRING;
398     Arg[0].String.Pointer = OsiString;
399     Arg[0].String.Length = strlen (Arg[0].String.Pointer);
400
401     /* Ask ACPICA to allocate space for the return object */
402
403     ReturnValue.Length = ACPI_ALLOCATE_BUFFER;
404
405     Status = AcpiEvaluateObject (NULL, "\\_OSI", &ArgList, &ReturnValue);
406
407     if (ACPI_FAILURE (Status))
408     {
409         AcpiOsPrintf ("Could not execute _OSI method, %s\n",
410             AcpiFormatException (Status));
411         return (Status);
412     }
413
414     if (ReturnValue.Length < sizeof (ACPI_OBJECT))
415     {
416         AcpiOsPrintf ("Return value from _OSI method too small, %.8X\n",
417             ReturnValue.Length);
418         return (AE_ERROR);
419     }
420
421     Obj = ReturnValue.Pointer;
422     if (Obj->Type != ACPI_TYPE_INTEGER)
423     {
424         AcpiOsPrintf ("Invalid return type from _OSI method, %.2X\n", Obj->Type);
425         return (AE_ERROR);
426     }
427
428     if (Obj->Integer.Value != ExpectedResult)
429     {
430         AcpiOsPrintf ("Invalid return value from _OSI, expected %.8X found %.8X\n",
431             ExpectedResult, (UINT32) Obj->Integer.Value);
432         return (AE_ERROR);
433     }
434
435     /* Reset the OSI data */
436
437     AcpiGbl_OsiData = 0;
438     return (AE_OK);
439 }
440
441
442 /******************************************************************************
443  *
444  * FUNCTION:    AeGenericRegisters
445  *
446  * DESCRIPTION: Call the AcpiRead/Write interfaces.
447  *
448  *****************************************************************************/
449
450 ACPI_GENERIC_ADDRESS       GenericRegister;
451
452 void
453 AeGenericRegisters (
454     void)
455 {
456     ACPI_STATUS             Status;
457     UINT64                  Value;
458
459
460     GenericRegister.Address = 0x1234;
461     GenericRegister.BitWidth = 64;
462     GenericRegister.BitOffset = 0;
463     GenericRegister.SpaceId = ACPI_ADR_SPACE_SYSTEM_IO;
464
465     Status = AcpiRead (&Value, &GenericRegister);
466     Status = AcpiWrite (Value, &GenericRegister);
467
468     GenericRegister.Address = 0x12345678;
469     GenericRegister.BitOffset = 0;
470     GenericRegister.SpaceId = ACPI_ADR_SPACE_SYSTEM_MEMORY;
471
472     Status = AcpiRead (&Value, &GenericRegister);
473     Status = AcpiWrite (Value, &GenericRegister);
474 }
475
476
477 /******************************************************************************
478  *
479  * FUNCTION:    AeHardwareInterfaces
480  *
481  * DESCRIPTION: Call various hardware support interfaces
482  *
483  *****************************************************************************/
484
485 void
486 AeHardwareInterfaces (
487     void)
488 {
489     ACPI_STATUS             Status;
490     UINT32                  Value;
491
492
493     Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, 1);
494     Status = AcpiWriteBitRegister (ACPI_BITREG_GLOBAL_LOCK_ENABLE, 1);
495     Status = AcpiWriteBitRegister (ACPI_BITREG_SLEEP_ENABLE, 1);
496     Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 1);
497
498     Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &Value);
499     Status = AcpiReadBitRegister (ACPI_BITREG_GLOBAL_LOCK_ENABLE, &Value);
500     Status = AcpiReadBitRegister (ACPI_BITREG_SLEEP_ENABLE, &Value);
501     Status = AcpiReadBitRegister (ACPI_BITREG_ARB_DISABLE, &Value);
502 }
503
504
505 /******************************************************************************
506  *
507  * FUNCTION:    AeMiscellaneousTests
508  *
509  * DESCRIPTION: Various ACPICA validation tests.
510  *
511  *****************************************************************************/
512
513 void
514 AeMiscellaneousTests (
515     void)
516 {
517     ACPI_HANDLE             Handle;
518     ACPI_BUFFER             ReturnBuf;
519     char                    Buffer[32];
520     ACPI_VENDOR_UUID        Uuid = {0, {ACPI_INIT_UUID (0,0,0,0,0,0,0,0,0,0,0)}};
521     ACPI_STATUS             Status;
522     UINT32                  LockHandle1;
523     UINT32                  LockHandle2;
524     ACPI_STATISTICS         Stats;
525
526
527     AeHardwareInterfaces ();
528     AeGenericRegisters ();
529     AeSetupConfiguration (Ssdt3Code);
530
531     AeTestBufferArgument();
532     AeTestPackageArgument ();
533     ExecuteOSI ("Windows 2001", 0xFFFFFFFF);
534     ExecuteOSI ("MichiganTerminalSystem", 0);
535
536
537     ReturnBuf.Length = 32;
538     ReturnBuf.Pointer = Buffer;
539
540     AcpiGetName (AcpiGbl_RootNode, ACPI_FULL_PATHNAME, &ReturnBuf);
541     AcpiEnableEvent (ACPI_EVENT_GLOBAL, 0);
542
543     AcpiInstallGpeHandler (NULL, 0, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
544     AcpiSetGpeType (NULL, 0, ACPI_GPE_TYPE_WAKE_RUN);
545     AcpiEnableGpe (NULL, 0, ACPI_NOT_ISR);
546     AcpiRemoveGpeHandler (NULL, 0, AeGpeHandler);
547
548     AcpiInstallGpeHandler (NULL, 0, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
549     AcpiSetGpeType (NULL, 0, ACPI_GPE_TYPE_WAKE_RUN);
550     AcpiEnableGpe (NULL, 0, ACPI_NOT_ISR);
551
552     AcpiInstallGpeHandler (NULL, 1, ACPI_GPE_EDGE_TRIGGERED, AeGpeHandler, NULL);
553     AcpiSetGpeType (NULL, 1, ACPI_GPE_TYPE_RUNTIME);
554     AcpiEnableGpe (NULL, 1, ACPI_NOT_ISR);
555
556     AcpiInstallGpeHandler (NULL, 2, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
557     AcpiSetGpeType (NULL, 2, ACPI_GPE_TYPE_WAKE);
558     AcpiEnableGpe (NULL, 2, ACPI_NOT_ISR);
559
560     AcpiInstallGpeHandler (NULL, 3, ACPI_GPE_EDGE_TRIGGERED, AeGpeHandler, NULL);
561     AcpiSetGpeType (NULL, 3, ACPI_GPE_TYPE_WAKE_RUN);
562
563     AcpiInstallGpeHandler (NULL, 4, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
564     AcpiSetGpeType (NULL, 4, ACPI_GPE_TYPE_RUNTIME);
565
566     AcpiInstallGpeHandler (NULL, 5, ACPI_GPE_EDGE_TRIGGERED, AeGpeHandler, NULL);
567     AcpiSetGpeType (NULL, 5, ACPI_GPE_TYPE_WAKE);
568
569     AcpiInstallGpeHandler (NULL, 0x19, ACPI_GPE_LEVEL_TRIGGERED, AeGpeHandler, NULL);
570     AcpiSetGpeType (NULL, 0x19, ACPI_GPE_TYPE_WAKE_RUN);
571     AcpiEnableGpe (NULL, 0x19, ACPI_NOT_ISR);
572
573     AfInstallGpeBlock ();
574
575
576     Status = AcpiGetHandle (NULL, "RSRC", &Handle);
577     if (ACPI_SUCCESS (Status))
578     {
579         ReturnBuf.Length = ACPI_ALLOCATE_BUFFER;
580
581         Status = AcpiGetVendorResource (Handle, "_CRS", &Uuid, &ReturnBuf);
582         if (ACPI_SUCCESS (Status))
583         {
584             AcpiOsFree (ReturnBuf.Pointer);
585         }
586     }
587
588     /* Test global lock */
589
590     Status = AcpiAcquireGlobalLock (0xFFFF, &LockHandle1);
591     if (ACPI_FAILURE (Status))
592     {
593         AcpiOsPrintf ("Could not get GlobalLock, %X\n", Status);
594     }
595
596     Status = AcpiAcquireGlobalLock (0x5, &LockHandle2);
597     if (ACPI_FAILURE (Status))
598     {
599         AcpiOsPrintf ("Could not get GlobalLock, %X\n", Status);
600     }
601
602     Status = AcpiReleaseGlobalLock (LockHandle1);
603     if (ACPI_FAILURE (Status))
604     {
605         AcpiOsPrintf ("Could not release GlobalLock, %X\n", Status);
606     }
607
608     Status = AcpiReleaseGlobalLock (LockHandle2);
609     if (ACPI_FAILURE (Status))
610     {
611         AcpiOsPrintf ("Could not release GlobalLock, %X\n", Status);
612     }
613
614     /* Get Devices */
615
616     Status = AcpiGetDevices (NULL, AeGetDevices, NULL, NULL);
617     if (ACPI_FAILURE (Status))
618     {
619         AcpiOsPrintf ("Could not AcpiGetDevices, %X\n", Status);
620     }
621
622     Status = AcpiGetStatistics (&Stats);
623     if (ACPI_FAILURE (Status))
624     {
625         AcpiOsPrintf ("Could not AcpiGetStatistics, %X\n", Status);
626     }
627 }
628