hwacpi.c revision 77424
1213239Sgonzo
2213239Sgonzo/******************************************************************************
3213239Sgonzo *
4213239Sgonzo * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
5213239Sgonzo *              $Revision: 40 $
6213239Sgonzo *
7213239Sgonzo *****************************************************************************/
8213239Sgonzo
9213239Sgonzo/******************************************************************************
10213239Sgonzo *
11213239Sgonzo * 1. Copyright Notice
12213239Sgonzo *
13213239Sgonzo * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
14213239Sgonzo * All rights reserved.
15213239Sgonzo *
16213239Sgonzo * 2. License
17213239Sgonzo *
18213239Sgonzo * 2.1. This is your license from Intel Corp. under its intellectual property
19213239Sgonzo * rights.  You may have additional license terms from the party that provided
20213239Sgonzo * you this software, covering your right to use that party's intellectual
21213239Sgonzo * property rights.
22213239Sgonzo *
23213239Sgonzo * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
24213239Sgonzo * copy of the source code appearing in this file ("Covered Code") an
25213239Sgonzo * irrevocable, perpetual, worldwide license under Intel's copyrights in the
26213239Sgonzo * base code distributed originally by Intel ("Original Intel Code") to copy,
27213239Sgonzo * make derivatives, distribute, use and display any portion of the Covered
28213239Sgonzo * Code in any form, with the right to sublicense such rights; and
29213239Sgonzo *
30213239Sgonzo * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
31213239Sgonzo * license (with the right to sublicense), under only those claims of Intel
32213239Sgonzo * patents that are infringed by the Original Intel Code, to make, use, sell,
33213239Sgonzo * offer to sell, and import the Covered Code and derivative works thereof
34213239Sgonzo * solely to the minimum extent necessary to exercise the above copyright
35213239Sgonzo * license, and in no event shall the patent license extend to any additions
36213239Sgonzo * to or modifications of the Original Intel Code.  No other license or right
37213239Sgonzo * is granted directly or by implication, estoppel or otherwise;
38213239Sgonzo *
39213239Sgonzo * The above copyright and patent license is granted only if the following
40213239Sgonzo * conditions are met:
41213239Sgonzo *
42213239Sgonzo * 3. Conditions
43213239Sgonzo *
44213239Sgonzo * 3.1. Redistribution of Source with Rights to Further Distribute Source.
45213239Sgonzo * Redistribution of source code of any substantial portion of the Covered
46213239Sgonzo * Code or modification with rights to further distribute source must include
47213239Sgonzo * the above Copyright Notice, the above License, this list of Conditions,
48213239Sgonzo * and the following Disclaimer and Export Compliance provision.  In addition,
49213239Sgonzo * Licensee must cause all Covered Code to which Licensee contributes to
50221518Sadrian * contain a file documenting the changes Licensee made to create that Covered
51213239Sgonzo * Code and the date of any change.  Licensee must include in that file the
52213239Sgonzo * documentation of any changes made by any predecessor Licensee.  Licensee
53213239Sgonzo * must include a prominent statement that the modification is derived,
54213239Sgonzo * directly or indirectly, from Original Intel Code.
55213239Sgonzo *
56213239Sgonzo * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
57213239Sgonzo * Redistribution of source code of any substantial portion of the Covered
58213239Sgonzo * Code or modification without rights to further distribute source must
59213239Sgonzo * include the following Disclaimer and Export Compliance provision in the
60213239Sgonzo * documentation and/or other materials provided with distribution.  In
61213239Sgonzo * addition, Licensee may not authorize further sublicense of source of any
62213239Sgonzo * portion of the Covered Code, and must include terms to the effect that the
63213239Sgonzo * license from Licensee to its licensee is limited to the intellectual
64213239Sgonzo * property embodied in the software Licensee provides to its licensee, and
65213239Sgonzo * not to intellectual property embodied in modifications its licensee may
66213239Sgonzo * make.
67213239Sgonzo *
68213239Sgonzo * 3.3. Redistribution of Executable. Redistribution in executable form of any
69213239Sgonzo * substantial portion of the Covered Code or modification must reproduce the
70213239Sgonzo * above Copyright Notice, and the following Disclaimer and Export Compliance
71213239Sgonzo * provision in the documentation and/or other materials provided with the
72213239Sgonzo * distribution.
73213239Sgonzo *
74213239Sgonzo * 3.4. Intel retains all right, title, and interest in and to the Original
75213239Sgonzo * Intel Code.
76213239Sgonzo *
77213239Sgonzo * 3.5. Neither the name Intel nor any other trademark owned or controlled by
78213239Sgonzo * Intel shall be used in advertising or otherwise to promote the sale, use or
79213239Sgonzo * other dealings in products derived from or relating to the Covered Code
80213239Sgonzo * without prior written authorization from Intel.
81213239Sgonzo *
82213239Sgonzo * 4. Disclaimer and Export Compliance
83213239Sgonzo *
84213239Sgonzo * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
85213239Sgonzo * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
86213239Sgonzo * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
87213239Sgonzo * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
88213239Sgonzo * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
89213239Sgonzo * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90213239Sgonzo * PARTICULAR PURPOSE.
91213239Sgonzo *
92213239Sgonzo * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
93213239Sgonzo * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
94213239Sgonzo * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
95213239Sgonzo * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
96213239Sgonzo * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
97213239Sgonzo * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
98213239Sgonzo * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99213239Sgonzo * LIMITED REMEDY.
100213239Sgonzo *
101213239Sgonzo * 4.3. Licensee shall not export, either directly or indirectly, any of this
102213239Sgonzo * software or system incorporating such software without first obtaining any
103213239Sgonzo * required license or other approval from the U. S. Department of Commerce or
104213239Sgonzo * any other agency or department of the United States Government.  In the
105213239Sgonzo * event Licensee exports any such software from the United States or
106213239Sgonzo * re-exports any such software from a foreign destination, Licensee shall
107213239Sgonzo * ensure that the distribution and export/re-export of the software is in
108213239Sgonzo * compliance with all laws, regulations, orders, or other restrictions of the
109213239Sgonzo * U.S. Export Administration Regulations. Licensee agrees that neither it nor
110213239Sgonzo * any of its subsidiaries will export/re-export any technical data, process,
111213239Sgonzo * software, or service, directly or indirectly, to any country for which the
112213239Sgonzo * United States government or any agency thereof requires an export license,
113213239Sgonzo * other governmental approval, or letter of assurance, without first obtaining
114213239Sgonzo * such license, approval or letter.
115213239Sgonzo *
116213239Sgonzo *****************************************************************************/
117213239Sgonzo
118213239Sgonzo#define __HWACPI_C__
119213239Sgonzo
120213239Sgonzo#include "acpi.h"
121213239Sgonzo#include "achware.h"
122213239Sgonzo
123213239Sgonzo
124213239Sgonzo#define _COMPONENT          ACPI_HARDWARE
125213239Sgonzo        MODULE_NAME         ("hwacpi")
126213239Sgonzo
127213239Sgonzo
128213239Sgonzo/******************************************************************************
129213239Sgonzo *
130213239Sgonzo * FUNCTION:    AcpiHwInitialize
131213239Sgonzo *
132213239Sgonzo * PARAMETERS:  None
133213239Sgonzo *
134213239Sgonzo * RETURN:      Status
135213239Sgonzo *
136221518Sadrian * DESCRIPTION: Initialize and validate various ACPI registers
137221518Sadrian *
138221518Sadrian ******************************************************************************/
139221518Sadrian
140221518SadrianACPI_STATUS
141221518SadrianAcpiHwInitialize (
142221518Sadrian    void)
143221518Sadrian{
144221518Sadrian    ACPI_STATUS             Status = AE_OK;
145221518Sadrian    UINT32                  Index;
146221518Sadrian
147221518Sadrian
148221518Sadrian    FUNCTION_TRACE ("HwInitialize");
149213239Sgonzo
150213239Sgonzo
151213239Sgonzo    /* We must have the ACPI tables by the time we get here */
152213239Sgonzo
153213239Sgonzo    if (!AcpiGbl_FADT)
154213239Sgonzo    {
155213239Sgonzo        AcpiGbl_RestoreAcpiChipset = FALSE;
156213239Sgonzo
157213239Sgonzo        DEBUG_PRINTP (ACPI_ERROR, ("No FADT!\n"));
158213239Sgonzo
159213239Sgonzo        return_ACPI_STATUS (AE_NO_ACPI_TABLES);
160213239Sgonzo    }
161213239Sgonzo
162213239Sgonzo    /* Must support *some* mode! */
163213239Sgonzo/*
164213239Sgonzo    if (!(SystemFlags & SYS_MODES_MASK))
165213239Sgonzo    {
166213239Sgonzo        RestoreAcpiChipset = FALSE;
167213239Sgonzo
168213239Sgonzo        DEBUG_PRINTP (ACPI_ERROR,
169213239Sgonzo            ("Supported modes uninitialized!\n"));
170213239Sgonzo        return_ACPI_STATUS (AE_ERROR);
171213239Sgonzo    }
172213239Sgonzo
173213239Sgonzo*/
174213239Sgonzo
175213239Sgonzo
176213239Sgonzo    switch (AcpiGbl_SystemFlags & SYS_MODES_MASK)
177213239Sgonzo    {
178213239Sgonzo        /* Identify current ACPI/legacy mode   */
179213239Sgonzo
180213239Sgonzo    case (SYS_MODE_ACPI):
181213239Sgonzo
182213239Sgonzo        AcpiGbl_OriginalMode = SYS_MODE_ACPI;
183213239Sgonzo        DEBUG_PRINTP (ACPI_INFO, ("System supports ACPI mode only.\n"));
184213239Sgonzo        break;
185213239Sgonzo
186213239Sgonzo
187213239Sgonzo    case (SYS_MODE_LEGACY):
188213239Sgonzo
189213239Sgonzo        AcpiGbl_OriginalMode = SYS_MODE_LEGACY;
190213239Sgonzo        DEBUG_PRINTP (ACPI_INFO,
191213239Sgonzo            ("Tables loaded from buffer, hardware assumed to support LEGACY mode only.\n"));
192213239Sgonzo        break;
193213239Sgonzo
194213239Sgonzo
195213239Sgonzo    case (SYS_MODE_ACPI | SYS_MODE_LEGACY):
196213239Sgonzo
197213239Sgonzo        if (AcpiHwGetMode () == SYS_MODE_ACPI)
198213239Sgonzo        {
199213239Sgonzo            AcpiGbl_OriginalMode = SYS_MODE_ACPI;
200213239Sgonzo        }
201213239Sgonzo        else
202213239Sgonzo        {
203213239Sgonzo            AcpiGbl_OriginalMode = SYS_MODE_LEGACY;
204213239Sgonzo        }
205213239Sgonzo
206213239Sgonzo        DEBUG_PRINTP (ACPI_INFO,
207213239Sgonzo            ("System supports both ACPI and LEGACY modes.\n"));
208213239Sgonzo
209213239Sgonzo        DEBUG_PRINTP (ACPI_INFO,
210213239Sgonzo            ("System is currently in %s mode.\n",
211213239Sgonzo            (AcpiGbl_OriginalMode == SYS_MODE_ACPI) ? "ACPI" : "LEGACY"));
212213239Sgonzo        break;
213213239Sgonzo    }
214213239Sgonzo
215213239Sgonzo
216213239Sgonzo    if (AcpiGbl_SystemFlags & SYS_MODE_ACPI)
217213239Sgonzo    {
218213239Sgonzo        /* Target system supports ACPI mode */
219213239Sgonzo
220213239Sgonzo        /*
221213239Sgonzo         * The purpose of this code is to save the initial state
222213239Sgonzo         * of the ACPI event enable registers. An exit function will be
223213239Sgonzo         * registered which will restore this state when the application
224213239Sgonzo         * exits. The exit function will also clear all of the ACPI event
225213239Sgonzo         * status bits prior to restoring the original mode.
226213239Sgonzo         *
227213239Sgonzo         * The location of the PM1aEvtBlk enable registers is defined as the
228213239Sgonzo         * base of PM1aEvtBlk + DIV_2(PM1aEvtBlkLength). Since the spec further
229213239Sgonzo         * fully defines the PM1aEvtBlk to be a total of 4 bytes, the offset
230213239Sgonzo         * for the enable registers is always 2 from the base. It is hard
231213239Sgonzo         * coded here. If this changes in the spec, this code will need to
232213239Sgonzo         * be modified. The PM1bEvtBlk behaves as expected.
233213239Sgonzo         */
234213239Sgonzo
235213239Sgonzo        AcpiGbl_Pm1EnableRegisterSave = (UINT16) AcpiHwRegisterRead (ACPI_MTX_LOCK, PM1_EN);
236213239Sgonzo
237213239Sgonzo
238213239Sgonzo        /*
239213239Sgonzo         * The GPEs behave similarly, except that the length of the register
240213239Sgonzo         * block is not fixed, so the buffer must be allocated with malloc
241213239Sgonzo         */
242213239Sgonzo
243213239Sgonzo        if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
244213239Sgonzo            AcpiGbl_FADT->Gpe0BlkLen)
245213239Sgonzo        {
246213239Sgonzo            /* GPE0 specified in FADT  */
247213239Sgonzo
248213239Sgonzo            AcpiGbl_Gpe0EnableRegisterSave =
249213239Sgonzo                AcpiUtAllocate (DIV_2 (AcpiGbl_FADT->Gpe0BlkLen));
250213239Sgonzo            if (!AcpiGbl_Gpe0EnableRegisterSave)
251213239Sgonzo            {
252213239Sgonzo                return_ACPI_STATUS (AE_NO_MEMORY);
253213239Sgonzo            }
254213239Sgonzo
255213239Sgonzo            /* Save state of GPE0 enable bits */
256213239Sgonzo
257213239Sgonzo            for (Index = 0; Index < DIV_2 (AcpiGbl_FADT->Gpe0BlkLen); Index++)
258213239Sgonzo            {
259213239Sgonzo                AcpiGbl_Gpe0EnableRegisterSave[Index] =
260213239Sgonzo                    (UINT8) AcpiHwRegisterRead (ACPI_MTX_LOCK, GPE0_EN_BLOCK | Index);
261213239Sgonzo            }
262213239Sgonzo        }
263213239Sgonzo
264213239Sgonzo        else
265213239Sgonzo        {
266213239Sgonzo            AcpiGbl_Gpe0EnableRegisterSave = NULL;
267213239Sgonzo        }
268213239Sgonzo
269213239Sgonzo        if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
270213239Sgonzo            AcpiGbl_FADT->Gpe1BlkLen)
271213239Sgonzo        {
272213239Sgonzo            /* GPE1 defined */
273213239Sgonzo
274213239Sgonzo            AcpiGbl_Gpe1EnableRegisterSave =
275213239Sgonzo                AcpiUtAllocate (DIV_2 (AcpiGbl_FADT->Gpe1BlkLen));
276213239Sgonzo            if (!AcpiGbl_Gpe1EnableRegisterSave)
277213239Sgonzo            {
278213239Sgonzo                return_ACPI_STATUS (AE_NO_MEMORY);
279213239Sgonzo            }
280213239Sgonzo
281213239Sgonzo            /* save state of GPE1 enable bits */
282213239Sgonzo
283213239Sgonzo            for (Index = 0; Index < DIV_2 (AcpiGbl_FADT->Gpe1BlkLen); Index++)
284213239Sgonzo            {
285213239Sgonzo                AcpiGbl_Gpe1EnableRegisterSave[Index] =
286213239Sgonzo                    (UINT8) AcpiHwRegisterRead (ACPI_MTX_LOCK, GPE1_EN_BLOCK | Index);
287213239Sgonzo            }
288213239Sgonzo        }
289213239Sgonzo
290213239Sgonzo        else
291213239Sgonzo        {
292213239Sgonzo            AcpiGbl_Gpe1EnableRegisterSave = NULL;
293213239Sgonzo        }
294213239Sgonzo    }
295213239Sgonzo
296213239Sgonzo    return_ACPI_STATUS (Status);
297213239Sgonzo}
298213239Sgonzo
299213239Sgonzo
300213239Sgonzo/******************************************************************************
301213239Sgonzo *
302213239Sgonzo * FUNCTION:    AcpiHwSetMode
303213239Sgonzo *
304213239Sgonzo * PARAMETERS:  Mode            - SYS_MODE_ACPI or SYS_MODE_LEGACY
305213239Sgonzo *
306213239Sgonzo * RETURN:      Status
307213239Sgonzo *
308213239Sgonzo * DESCRIPTION: Transitions the system into the requested mode or does nothing
309213239Sgonzo *              if the system is already in that mode.
310213239Sgonzo *
311213239Sgonzo ******************************************************************************/
312213239Sgonzo
313213239SgonzoACPI_STATUS
314213239SgonzoAcpiHwSetMode (
315213239Sgonzo    UINT32                  Mode)
316213239Sgonzo{
317213239Sgonzo
318213239Sgonzo    ACPI_STATUS             Status = AE_NO_HARDWARE_RESPONSE;
319213239Sgonzo
320213239Sgonzo    FUNCTION_TRACE ("HwSetMode");
321213239Sgonzo
322213239Sgonzo
323213239Sgonzo    if (Mode == SYS_MODE_ACPI)
324213239Sgonzo    {
325213239Sgonzo        /* BIOS should have disabled ALL fixed and GP events */
326213239Sgonzo
327213239Sgonzo        AcpiOsOut8 (AcpiGbl_FADT->SmiCmd, AcpiGbl_FADT->AcpiEnable);
328213239Sgonzo        DEBUG_PRINTP (ACPI_INFO, ("Attempting to enable ACPI mode\n"));
329213239Sgonzo    }
330213239Sgonzo
331213239Sgonzo    else if (Mode == SYS_MODE_LEGACY)
332213239Sgonzo    {
333213239Sgonzo        /*
334213239Sgonzo         * BIOS should clear all fixed status bits and restore fixed event
335213239Sgonzo         * enable bits to default
336213239Sgonzo         */
337213239Sgonzo
338213239Sgonzo        AcpiOsOut8 (AcpiGbl_FADT->SmiCmd, AcpiGbl_FADT->AcpiDisable);
339213239Sgonzo        DEBUG_PRINTP (ACPI_INFO,
340213239Sgonzo                    ("Attempting to enable Legacy (non-ACPI) mode\n"));
341213239Sgonzo    }
342213239Sgonzo
343213239Sgonzo    if (AcpiHwGetMode () == Mode)
344228518Sadrian    {
345228518Sadrian        DEBUG_PRINTP (ACPI_INFO, ("Mode %X successfully enabled\n", Mode));
346228518Sadrian        Status = AE_OK;
347213239Sgonzo    }
348213239Sgonzo
349213239Sgonzo    return_ACPI_STATUS (Status);
350213239Sgonzo}
351213239Sgonzo
352213239Sgonzo
353213239Sgonzo/******************************************************************************
354213239Sgonzo *
355213239Sgonzo * FUNCTION:    AcpiHwGetMode
356213239Sgonzo *
357213239Sgonzo * PARAMETERS:  none
358213239Sgonzo *
359213239Sgonzo * RETURN:      SYS_MODE_ACPI or SYS_MODE_LEGACY
360213239Sgonzo *
361213239Sgonzo * DESCRIPTION: Return current operating state of system.  Determined by
362213239Sgonzo *              querying the SCI_EN bit.
363213239Sgonzo *
364213239Sgonzo ******************************************************************************/
365213239Sgonzo
366213239SgonzoUINT32
367213239SgonzoAcpiHwGetMode (void)
368213239Sgonzo{
369213239Sgonzo
370213239Sgonzo    FUNCTION_TRACE ("HwGetMode");
371213239Sgonzo
372213239Sgonzo
373213239Sgonzo    if (AcpiHwRegisterBitAccess (ACPI_READ, ACPI_MTX_LOCK, SCI_EN))
374213239Sgonzo    {
375213239Sgonzo        return_VALUE (SYS_MODE_ACPI);
376213239Sgonzo    }
377213239Sgonzo    else
378213239Sgonzo    {
379213239Sgonzo        return_VALUE (SYS_MODE_LEGACY);
380228518Sadrian    }
381228518Sadrian}
382228518Sadrian
383228518Sadrian/******************************************************************************
384228518Sadrian *
385228518Sadrian * FUNCTION:    AcpiHwGetModeCapabilities
386228518Sadrian *
387228518Sadrian * PARAMETERS:  none
388228518Sadrian *
389228518Sadrian * RETURN:      logical OR of SYS_MODE_ACPI and SYS_MODE_LEGACY determined at initial
390228518Sadrian *              system state.
391228518Sadrian *
392228518Sadrian * DESCRIPTION: Returns capablities of system
393228518Sadrian *
394228518Sadrian ******************************************************************************/
395228518Sadrian
396228518SadrianUINT32
397228518SadrianAcpiHwGetModeCapabilities (void)
398228518Sadrian{
399228518Sadrian
400228518Sadrian    FUNCTION_TRACE ("HwGetModeCapabilities");
401213239Sgonzo
402213239Sgonzo
403213239Sgonzo    if (!(AcpiGbl_SystemFlags & SYS_MODES_MASK))
404228518Sadrian    {
405228518Sadrian        if (AcpiHwGetMode () == SYS_MODE_LEGACY)
406228518Sadrian        {
407228518Sadrian            /*
408228518Sadrian             * Assume that if this call is being made, AcpiInit has been called
409228518Sadrian             * and ACPI support has been established by the presence of the
410228518Sadrian             * tables.  Therefore since we're in SYS_MODE_LEGACY, the system
411228518Sadrian             * must support both modes
412228518Sadrian             */
413228518Sadrian
414228518Sadrian            AcpiGbl_SystemFlags |= (SYS_MODE_ACPI | SYS_MODE_LEGACY);
415228518Sadrian        }
416228518Sadrian
417213239Sgonzo        else
418213239Sgonzo        {
419228518Sadrian            /* TBD: [Investigate] !!! this may be unsafe... */
420213239Sgonzo            /*
421213239Sgonzo             * system is is ACPI mode, so try to switch back to LEGACY to see if
422213239Sgonzo             * it is supported
423213239Sgonzo             */
424213239Sgonzo            AcpiHwSetMode (SYS_MODE_LEGACY);
425213239Sgonzo
426213239Sgonzo            if (AcpiHwGetMode () == SYS_MODE_LEGACY)
427213239Sgonzo            {
428213239Sgonzo                /* Now in SYS_MODE_LEGACY, so both are supported */
429213239Sgonzo
430213239Sgonzo                AcpiGbl_SystemFlags |= (SYS_MODE_ACPI | SYS_MODE_LEGACY);
431213239Sgonzo                AcpiHwSetMode (SYS_MODE_ACPI);
432213239Sgonzo            }
433213239Sgonzo
434213239Sgonzo            else
435213286Sgonzo            {
436213286Sgonzo                /* Still in SYS_MODE_ACPI so this must be an ACPI only system */
437213239Sgonzo
438213239Sgonzo                AcpiGbl_SystemFlags |= SYS_MODE_ACPI;
439213239Sgonzo            }
440213239Sgonzo        }
441213239Sgonzo    }
442213239Sgonzo
443213239Sgonzo    return_VALUE (AcpiGbl_SystemFlags & SYS_MODES_MASK);
444213239Sgonzo}
445213239Sgonzo
446213239Sgonzo
447213239Sgonzo