Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:02

0001 /******************************************************************************
0002  *
0003  * Module Name: exutils - interpreter/scanner utilities
0004  *
0005  *****************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2024, 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  * Alternatively, you may choose to be licensed under the terms of the
0117  * following license:
0118  *
0119  * Redistribution and use in source and binary forms, with or without
0120  * modification, are permitted provided that the following conditions
0121  * are met:
0122  * 1. Redistributions of source code must retain the above copyright
0123  *    notice, this list of conditions, and the following disclaimer,
0124  *    without modification.
0125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
0126  *    substantially similar to the "NO WARRANTY" disclaimer below
0127  *    ("Disclaimer") and any redistribution must be conditioned upon
0128  *    including a substantially similar Disclaimer requirement for further
0129  *    binary redistribution.
0130  * 3. Neither the names of the above-listed copyright holders nor the names
0131  *    of any contributors may be used to endorse or promote products derived
0132  *    from this software without specific prior written permission.
0133  *
0134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0145  *
0146  * Alternatively, you may choose to be licensed under the terms of the
0147  * GNU General Public License ("GPL") version 2 as published by the Free
0148  * Software Foundation.
0149  *
0150  *****************************************************************************/
0151 
0152 /*
0153  * DEFINE_AML_GLOBALS is tested in amlcode.h
0154  * to determine whether certain global names should be "defined" or only
0155  * "declared" in the current compilation. This enhances maintainability
0156  * by enabling a single header file to embody all knowledge of the names
0157  * in question.
0158  *
0159  * Exactly one module of any executable should #define DEFINE_GLOBALS
0160  * before #including the header files which use this convention. The
0161  * names in question will be defined and initialized in that module,
0162  * and declared as extern in all other modules which #include those
0163  * header files.
0164  */
0165 
0166 #define DEFINE_AML_GLOBALS
0167 
0168 #include "acpi.h"
0169 #include "accommon.h"
0170 #include "acinterp.h"
0171 #include "amlcode.h"
0172 
0173 #define _COMPONENT          ACPI_EXECUTER
0174         ACPI_MODULE_NAME    ("exutils")
0175 
0176 /* Local prototypes */
0177 
0178 static UINT32
0179 AcpiExDigitsNeeded (
0180     UINT64                  Value,
0181     UINT32                  Base);
0182 
0183 
0184 /*******************************************************************************
0185  *
0186  * FUNCTION:    AcpiExEnterInterpreter
0187  *
0188  * PARAMETERS:  None
0189  *
0190  * RETURN:      None
0191  *
0192  * DESCRIPTION: Enter the interpreter execution region. Failure to enter
0193  *              the interpreter region is a fatal system error. Used in
0194  *              conjunction with ExitInterpreter.
0195  *
0196  ******************************************************************************/
0197 
0198 void
0199 AcpiExEnterInterpreter (
0200     void)
0201 {
0202     ACPI_STATUS             Status;
0203 
0204 
0205     ACPI_FUNCTION_TRACE (ExEnterInterpreter);
0206 
0207 
0208     Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER);
0209     if (ACPI_FAILURE (Status))
0210     {
0211         ACPI_ERROR ((AE_INFO, "Could not acquire AML Interpreter mutex"));
0212     }
0213     Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
0214     if (ACPI_FAILURE (Status))
0215     {
0216         ACPI_ERROR ((AE_INFO, "Could not acquire AML Namespace mutex"));
0217     }
0218 
0219     return_VOID;
0220 }
0221 
0222 
0223 /*******************************************************************************
0224  *
0225  * FUNCTION:    AcpiExExitInterpreter
0226  *
0227  * PARAMETERS:  None
0228  *
0229  * RETURN:      None
0230  *
0231  * DESCRIPTION: Exit the interpreter execution region. This is the top level
0232  *              routine used to exit the interpreter when all processing has
0233  *              been completed, or when the method blocks.
0234  *
0235  * Cases where the interpreter is unlocked internally:
0236  *      1) Method will be blocked on a Sleep() AML opcode
0237  *      2) Method will be blocked on an Acquire() AML opcode
0238  *      3) Method will be blocked on a Wait() AML opcode
0239  *      4) Method will be blocked to acquire the global lock
0240  *      5) Method will be blocked waiting to execute a serialized control
0241  *          method that is currently executing
0242  *      6) About to invoke a user-installed opregion handler
0243  *
0244  ******************************************************************************/
0245 
0246 void
0247 AcpiExExitInterpreter (
0248     void)
0249 {
0250     ACPI_STATUS             Status;
0251 
0252 
0253     ACPI_FUNCTION_TRACE (ExExitInterpreter);
0254 
0255 
0256     Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
0257     if (ACPI_FAILURE (Status))
0258     {
0259         ACPI_ERROR ((AE_INFO, "Could not release AML Namespace mutex"));
0260     }
0261     Status = AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER);
0262     if (ACPI_FAILURE (Status))
0263     {
0264         ACPI_ERROR ((AE_INFO, "Could not release AML Interpreter mutex"));
0265     }
0266 
0267     return_VOID;
0268 }
0269 
0270 
0271 /*******************************************************************************
0272  *
0273  * FUNCTION:    AcpiExTruncateFor32bitTable
0274  *
0275  * PARAMETERS:  ObjDesc         - Object to be truncated
0276  *
0277  * RETURN:      TRUE if a truncation was performed, FALSE otherwise.
0278  *
0279  * DESCRIPTION: Truncate an ACPI Integer to 32 bits if the execution mode is
0280  *              32-bit, as determined by the revision of the DSDT.
0281  *
0282  ******************************************************************************/
0283 
0284 BOOLEAN
0285 AcpiExTruncateFor32bitTable (
0286     ACPI_OPERAND_OBJECT     *ObjDesc)
0287 {
0288 
0289     ACPI_FUNCTION_ENTRY ();
0290 
0291 
0292     /*
0293      * Object must be a valid number and we must be executing
0294      * a control method. Object could be NS node for AML_INT_NAMEPATH_OP.
0295      */
0296     if ((!ObjDesc) ||
0297         (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) ||
0298         (ObjDesc->Common.Type != ACPI_TYPE_INTEGER))
0299     {
0300         return (FALSE);
0301     }
0302 
0303     if ((AcpiGbl_IntegerByteWidth == 4) &&
0304         (ObjDesc->Integer.Value > (UINT64) ACPI_UINT32_MAX))
0305     {
0306         /*
0307          * We are executing in a 32-bit ACPI table. Truncate
0308          * the value to 32 bits by zeroing out the upper 32-bit field
0309          */
0310         ObjDesc->Integer.Value &= (UINT64) ACPI_UINT32_MAX;
0311         return (TRUE);
0312     }
0313 
0314     return (FALSE);
0315 }
0316 
0317 
0318 /*******************************************************************************
0319  *
0320  * FUNCTION:    AcpiExAcquireGlobalLock
0321  *
0322  * PARAMETERS:  FieldFlags            - Flags with Lock rule:
0323  *                                      AlwaysLock or NeverLock
0324  *
0325  * RETURN:      None
0326  *
0327  * DESCRIPTION: Obtain the ACPI hardware Global Lock, only if the field
0328  *              flags specify that it is to be obtained before field access.
0329  *
0330  ******************************************************************************/
0331 
0332 void
0333 AcpiExAcquireGlobalLock (
0334     UINT32                  FieldFlags)
0335 {
0336     ACPI_STATUS             Status;
0337 
0338 
0339     ACPI_FUNCTION_TRACE (ExAcquireGlobalLock);
0340 
0341 
0342     /* Only use the lock if the AlwaysLock bit is set */
0343 
0344     if (!(FieldFlags & AML_FIELD_LOCK_RULE_MASK))
0345     {
0346         return_VOID;
0347     }
0348 
0349     /* Attempt to get the global lock, wait forever */
0350 
0351     Status = AcpiExAcquireMutexObject (ACPI_WAIT_FOREVER,
0352         AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
0353 
0354     if (ACPI_FAILURE (Status))
0355     {
0356         ACPI_EXCEPTION ((AE_INFO, Status,
0357             "Could not acquire Global Lock"));
0358     }
0359 
0360     return_VOID;
0361 }
0362 
0363 
0364 /*******************************************************************************
0365  *
0366  * FUNCTION:    AcpiExReleaseGlobalLock
0367  *
0368  * PARAMETERS:  FieldFlags            - Flags with Lock rule:
0369  *                                      AlwaysLock or NeverLock
0370  *
0371  * RETURN:      None
0372  *
0373  * DESCRIPTION: Release the ACPI hardware Global Lock
0374  *
0375  ******************************************************************************/
0376 
0377 void
0378 AcpiExReleaseGlobalLock (
0379     UINT32                  FieldFlags)
0380 {
0381     ACPI_STATUS             Status;
0382 
0383 
0384     ACPI_FUNCTION_TRACE (ExReleaseGlobalLock);
0385 
0386 
0387     /* Only use the lock if the AlwaysLock bit is set */
0388 
0389     if (!(FieldFlags & AML_FIELD_LOCK_RULE_MASK))
0390     {
0391         return_VOID;
0392     }
0393 
0394     /* Release the global lock */
0395 
0396     Status = AcpiExReleaseMutexObject (AcpiGbl_GlobalLockMutex);
0397     if (ACPI_FAILURE (Status))
0398     {
0399         /* Report the error, but there isn't much else we can do */
0400 
0401         ACPI_EXCEPTION ((AE_INFO, Status,
0402             "Could not release Global Lock"));
0403     }
0404 
0405     return_VOID;
0406 }
0407 
0408 
0409 /*******************************************************************************
0410  *
0411  * FUNCTION:    AcpiExDigitsNeeded
0412  *
0413  * PARAMETERS:  Value           - Value to be represented
0414  *              Base            - Base of representation
0415  *
0416  * RETURN:      The number of digits.
0417  *
0418  * DESCRIPTION: Calculate the number of digits needed to represent the Value
0419  *              in the given Base (Radix)
0420  *
0421  ******************************************************************************/
0422 
0423 static UINT32
0424 AcpiExDigitsNeeded (
0425     UINT64                  Value,
0426     UINT32                  Base)
0427 {
0428     UINT32                  NumDigits;
0429     UINT64                  CurrentValue;
0430 
0431 
0432     ACPI_FUNCTION_TRACE (ExDigitsNeeded);
0433 
0434 
0435     /* UINT64 is unsigned, so we don't worry about a '-' prefix */
0436 
0437     if (Value == 0)
0438     {
0439         return_UINT32 (1);
0440     }
0441 
0442     CurrentValue = Value;
0443     NumDigits = 0;
0444 
0445     /* Count the digits in the requested base */
0446 
0447     while (CurrentValue)
0448     {
0449         (void) AcpiUtShortDivide (CurrentValue, Base, &CurrentValue, NULL);
0450         NumDigits++;
0451     }
0452 
0453     return_UINT32 (NumDigits);
0454 }
0455 
0456 
0457 /*******************************************************************************
0458  *
0459  * FUNCTION:    AcpiExEisaIdToString
0460  *
0461  * PARAMETERS:  OutString       - Where to put the converted string (8 bytes)
0462  *              CompressedId    - EISAID to be converted
0463  *
0464  * RETURN:      None
0465  *
0466  * DESCRIPTION: Convert a numeric EISAID to string representation. Return
0467  *              buffer must be large enough to hold the string. The string
0468  *              returned is always exactly of length ACPI_EISAID_STRING_SIZE
0469  *              (includes null terminator). The EISAID is always 32 bits.
0470  *
0471  ******************************************************************************/
0472 
0473 void
0474 AcpiExEisaIdToString (
0475     char                    *OutString,
0476     UINT64                  CompressedId)
0477 {
0478     UINT32                  SwappedId;
0479 
0480 
0481     ACPI_FUNCTION_ENTRY ();
0482 
0483 
0484     /* The EISAID should be a 32-bit integer */
0485 
0486     if (CompressedId > ACPI_UINT32_MAX)
0487     {
0488         ACPI_WARNING ((AE_INFO,
0489             "Expected EISAID is larger than 32 bits: "
0490             "0x%8.8X%8.8X, truncating",
0491             ACPI_FORMAT_UINT64 (CompressedId)));
0492     }
0493 
0494     /* Swap ID to big-endian to get contiguous bits */
0495 
0496     SwappedId = AcpiUtDwordByteSwap ((UINT32) CompressedId);
0497 
0498     /* First 3 bytes are uppercase letters. Next 4 bytes are hexadecimal */
0499 
0500     OutString[0] = (char) (0x40 + (((unsigned long) SwappedId >> 26) & 0x1F));
0501     OutString[1] = (char) (0x40 + ((SwappedId >> 21) & 0x1F));
0502     OutString[2] = (char) (0x40 + ((SwappedId >> 16) & 0x1F));
0503     OutString[3] = AcpiUtHexToAsciiChar ((UINT64) SwappedId, 12);
0504     OutString[4] = AcpiUtHexToAsciiChar ((UINT64) SwappedId, 8);
0505     OutString[5] = AcpiUtHexToAsciiChar ((UINT64) SwappedId, 4);
0506     OutString[6] = AcpiUtHexToAsciiChar ((UINT64) SwappedId, 0);
0507     OutString[7] = 0;
0508 }
0509 
0510 
0511 /*******************************************************************************
0512  *
0513  * FUNCTION:    AcpiExIntegerToString
0514  *
0515  * PARAMETERS:  OutString       - Where to put the converted string. At least
0516  *                                21 bytes are needed to hold the largest
0517  *                                possible 64-bit integer.
0518  *              Value           - Value to be converted
0519  *
0520  * RETURN:      Converted string in OutString
0521  *
0522  * DESCRIPTION: Convert a 64-bit integer to decimal string representation.
0523  *              Assumes string buffer is large enough to hold the string. The
0524  *              largest string is (ACPI_MAX64_DECIMAL_DIGITS + 1).
0525  *
0526  ******************************************************************************/
0527 
0528 void
0529 AcpiExIntegerToString (
0530     char                    *OutString,
0531     UINT64                  Value)
0532 {
0533     UINT32                  Count;
0534     UINT32                  DigitsNeeded;
0535     UINT32                  Remainder;
0536 
0537 
0538     ACPI_FUNCTION_ENTRY ();
0539 
0540 
0541     DigitsNeeded = AcpiExDigitsNeeded (Value, 10);
0542     OutString[DigitsNeeded] = 0;
0543 
0544     for (Count = DigitsNeeded; Count > 0; Count--)
0545     {
0546         (void) AcpiUtShortDivide (Value, 10, &Value, &Remainder);
0547         OutString[Count-1] = (char) ('0' + Remainder);\
0548     }
0549 }
0550 
0551 
0552 /*******************************************************************************
0553  *
0554  * FUNCTION:    AcpiExPciClsToString
0555  *
0556  * PARAMETERS:  OutString       - Where to put the converted string (7 bytes)
0557  *              ClassCode       - PCI class code to be converted (3 bytes)
0558  *
0559  * RETURN:      Converted string in OutString
0560  *
0561  * DESCRIPTION: Convert 3-bytes PCI class code to string representation.
0562  *              Return buffer must be large enough to hold the string. The
0563  *              string returned is always exactly of length
0564  *              ACPI_PCICLS_STRING_SIZE (includes null terminator).
0565  *
0566  ******************************************************************************/
0567 
0568 void
0569 AcpiExPciClsToString (
0570     char                    *OutString,
0571     UINT8                   ClassCode[3])
0572 {
0573 
0574     ACPI_FUNCTION_ENTRY ();
0575 
0576 
0577     /* All 3 bytes are hexadecimal */
0578 
0579     OutString[0] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[0], 4);
0580     OutString[1] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[0], 0);
0581     OutString[2] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[1], 4);
0582     OutString[3] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[1], 0);
0583     OutString[4] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[2], 4);
0584     OutString[5] = AcpiUtHexToAsciiChar ((UINT64) ClassCode[2], 0);
0585     OutString[6] = 0;
0586 }
0587 
0588 
0589 /*******************************************************************************
0590  *
0591  * FUNCTION:    AcpiIsValidSpaceId
0592  *
0593  * PARAMETERS:  SpaceId             - ID to be validated
0594  *
0595  * RETURN:      TRUE if SpaceId is a valid/supported ID.
0596  *
0597  * DESCRIPTION: Validate an operation region SpaceID.
0598  *
0599  ******************************************************************************/
0600 
0601 BOOLEAN
0602 AcpiIsValidSpaceId (
0603     UINT8                   SpaceId)
0604 {
0605 
0606     if ((SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) &&
0607         (SpaceId < ACPI_USER_REGION_BEGIN) &&
0608         (SpaceId != ACPI_ADR_SPACE_DATA_TABLE) &&
0609         (SpaceId != ACPI_ADR_SPACE_FIXED_HARDWARE))
0610     {
0611         return (FALSE);
0612     }
0613 
0614     return (TRUE);
0615 }