acexcep.h revision 67754
169408Sache/******************************************************************************
269408Sache *
369408Sache * Name: acexcep.h - Exception codes returned by the ACPI subsystem
469408Sache *       $Revision: 36 $
569408Sache *
669408Sache *****************************************************************************/
769408Sache
869408Sache/******************************************************************************
969408Sache *
1069408Sache * 1. Copyright Notice
11145479Smp *
12167465Smp * Some or all of this work - Copyright (c) 1999, Intel Corp.  All rights
13145479Smp * reserved.
14145479Smp *
15167465Smp * 2. License
1669408Sache *
1769408Sache * 2.1. This is your license from Intel Corp. under its intellectual property
1869408Sache * rights.  You may have additional license terms from the party that provided
1969408Sache * you this software, covering your right to use that party's intellectual
2069408Sache * property rights.
2169408Sache *
2269408Sache * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
2369408Sache * copy of the source code appearing in this file ("Covered Code") an
2469408Sache * irrevocable, perpetual, worldwide license under Intel's copyrights in the
2569408Sache * base code distributed originally by Intel ("Original Intel Code") to copy,
2669408Sache * make derivatives, distribute, use and display any portion of the Covered
2769408Sache * Code in any form, with the right to sublicense such rights; and
2869408Sache *
2969408Sache * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
3069408Sache * license (with the right to sublicense), under only those claims of Intel
3169408Sache * patents that are infringed by the Original Intel Code, to make, use, sell,
3269408Sache * offer to sell, and import the Covered Code and derivative works thereof
3369408Sache * solely to the minimum extent necessary to exercise the above copyright
3469408Sache * license, and in no event shall the patent license extend to any additions
3569408Sache * to or modifications of the Original Intel Code.  No other license or right
3669408Sache * is granted directly or by implication, estoppel or otherwise;
3769408Sache *
3869408Sache * The above copyright and patent license is granted only if the following
3969408Sache * conditions are met:
4069408Sache *
4169408Sache * 3. Conditions
4269408Sache *
4369408Sache * 3.1. Redistribution of Source with Rights to Further Distribute Source.
4469408Sache * Redistribution of source code of any substantial portion of the Covered
4569408Sache * Code or modification with rights to further distribute source must include
4669408Sache * the above Copyright Notice, the above License, this list of Conditions,
4769408Sache * and the following Disclaimer and Export Compliance provision.  In addition,
4869408Sache * Licensee must cause all Covered Code to which Licensee contributes to
4969408Sache * contain a file documenting the changes Licensee made to create that Covered
5069408Sache * Code and the date of any change.  Licensee must include in that file the
5169408Sache * documentation of any changes made by any predecessor Licensee.  Licensee
5269408Sache * must include a prominent statement that the modification is derived,
5369408Sache * directly or indirectly, from Original Intel Code.
5469408Sache *
5569408Sache * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
5669408Sache * Redistribution of source code of any substantial portion of the Covered
5769408Sache * Code or modification without rights to further distribute source must
5869408Sache * include the following Disclaimer and Export Compliance provision in the
5969408Sache * documentation and/or other materials provided with distribution.  In
6083098Smp * addition, Licensee may not authorize further sublicense of source of any
6169408Sache * portion of the Covered Code, and must include terms to the effect that the
6269408Sache * license from Licensee to its licensee is limited to the intellectual
6369408Sache * property embodied in the software Licensee provides to its licensee, and
6469408Sache * not to intellectual property embodied in modifications its licensee may
6569408Sache * make.
6669408Sache *
6769408Sache * 3.3. Redistribution of Executable. Redistribution in executable form of any
6869408Sache * substantial portion of the Covered Code or modification must reproduce the
6969408Sache * above Copyright Notice, and the following Disclaimer and Export Compliance
7069408Sache * provision in the documentation and/or other materials provided with the
7169408Sache * distribution.
7269408Sache *
7369408Sache * 3.4. Intel retains all right, title, and interest in and to the Original
7469408Sache * Intel Code.
7569408Sache *
7669408Sache * 3.5. Neither the name Intel nor any other trademark owned or controlled by
7769408Sache * Intel shall be used in advertising or otherwise to promote the sale, use or
7869408Sache * other dealings in products derived from or relating to the Covered Code
7969408Sache * without prior written authorization from Intel.
8069408Sache *
8169408Sache * 4. Disclaimer and Export Compliance
82145479Smp *
8369408Sache * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
8469408Sache * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
8569408Sache * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
8669408Sache * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
8769408Sache * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
8869408Sache * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
8969408Sache * PARTICULAR PURPOSE.
9069408Sache *
9169408Sache * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
9269408Sache * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
9369408Sache * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
9469408Sache * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
9569408Sache * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
9669408Sache * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
9769408Sache * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
9869408Sache * LIMITED REMEDY.
9969408Sache *
10069408Sache * 4.3. Licensee shall not export, either directly or indirectly, any of this
10169408Sache * software or system incorporating such software without first obtaining any
10269408Sache * required license or other approval from the U. S. Department of Commerce or
10369408Sache * any other agency or department of the United States Government.  In the
10469408Sache * event Licensee exports any such software from the United States or
10569408Sache * re-exports any such software from a foreign destination, Licensee shall
10669408Sache * ensure that the distribution and export/re-export of the software is in
10769408Sache * compliance with all laws, regulations, orders, or other restrictions of the
10869408Sache * U.S. Export Administration Regulations. Licensee agrees that neither it nor
10969408Sache * any of its subsidiaries will export/re-export any technical data, process,
11069408Sache * software, or service, directly or indirectly, to any country for which the
11169408Sache * United States government or any agency thereof requires an export license,
11269408Sache * other governmental approval, or letter of assurance, without first obtaining
11369408Sache * such license, approval or letter.
11469408Sache *
11569408Sache *****************************************************************************/
11669408Sache
11769408Sache#ifndef __ACEXCEP_H__
11869408Sache#define __ACEXCEP_H__
119100616Smp
120100616Smp
121100616Smp/*
122100616Smp * Exceptions returned by external ACPI interfaces
123100616Smp */
124167465Smp
125167465Smp#define AE_CODE_ENVIRONMENTAL           0x0000
126167465Smp#define AE_CODE_PROGRAMMER              0x1000
127167465Smp#define AE_CODE_ACPI_TABLES             0x2000
128167465Smp#define AE_CODE_AML                     0x3000
12969408Sache#define AE_CODE_CONTROL                 0x4000
13069408Sache#define AE_CODE_MASK                    0xF000
13169408Sache
13269408Sache
13369408Sache#define ACPI_SUCCESS(a)                 (!(a))
13469408Sache#define ACPI_FAILURE(a)                 (a)
13569408Sache
13669408Sache
13769408Sache#define AE_OK                           (ACPI_STATUS) 0x0000
13869408Sache
13969408Sache/*
14069408Sache * Environmental exceptions
14169408Sache */
14269408Sache#define AE_ERROR                        (ACPI_STATUS) (0x0001 | AE_CODE_ENVIRONMENTAL)
14369408Sache#define AE_NO_ACPI_TABLES               (ACPI_STATUS) (0x0002 | AE_CODE_ENVIRONMENTAL)
14469408Sache#define AE_NO_NAMESPACE                 (ACPI_STATUS) (0x0003 | AE_CODE_ENVIRONMENTAL)
14569408Sache#define AE_NO_MEMORY                    (ACPI_STATUS) (0x0004 | AE_CODE_ENVIRONMENTAL)
14669408Sache#define AE_NOT_FOUND                    (ACPI_STATUS) (0x0005 | AE_CODE_ENVIRONMENTAL)
14769408Sache#define AE_NOT_EXIST                    (ACPI_STATUS) (0x0006 | AE_CODE_ENVIRONMENTAL)
14869408Sache#define AE_EXIST                        (ACPI_STATUS) (0x0007 | AE_CODE_ENVIRONMENTAL)
14969408Sache#define AE_TYPE                         (ACPI_STATUS) (0x0008 | AE_CODE_ENVIRONMENTAL)
15069408Sache#define AE_NULL_OBJECT                  (ACPI_STATUS) (0x0009 | AE_CODE_ENVIRONMENTAL)
15169408Sache#define AE_NULL_ENTRY                   (ACPI_STATUS) (0x000A | AE_CODE_ENVIRONMENTAL)
15269408Sache#define AE_BUFFER_OVERFLOW              (ACPI_STATUS) (0x000B | AE_CODE_ENVIRONMENTAL)
15369408Sache#define AE_STACK_OVERFLOW               (ACPI_STATUS) (0x000C | AE_CODE_ENVIRONMENTAL)
15469408Sache#define AE_STACK_UNDERFLOW              (ACPI_STATUS) (0x000D | AE_CODE_ENVIRONMENTAL)
15569408Sache#define AE_NOT_IMPLEMENTED              (ACPI_STATUS) (0x000E | AE_CODE_ENVIRONMENTAL)
15669408Sache#define AE_VERSION_MISMATCH             (ACPI_STATUS) (0x000F | AE_CODE_ENVIRONMENTAL)
15769408Sache#define AE_SUPPORT                      (ACPI_STATUS) (0x0010 | AE_CODE_ENVIRONMENTAL)
15869408Sache#define AE_SHARE                        (ACPI_STATUS) (0x0011 | AE_CODE_ENVIRONMENTAL)
159167465Smp#define AE_LIMIT                        (ACPI_STATUS) (0x0012 | AE_CODE_ENVIRONMENTAL)
16069408Sache#define AE_TIME                         (ACPI_STATUS) (0x0013 | AE_CODE_ENVIRONMENTAL)
16169408Sache#define AE_UNKNOWN_STATUS               (ACPI_STATUS) (0x0014 | AE_CODE_ENVIRONMENTAL)
162167465Smp
16369408Sache#define AE_CODE_ENV_MAX                 0x0014
16469408Sache
165167465Smp/*
16669408Sache * Programmer exceptions
16769408Sache */
168167465Smp#define AE_BAD_PARAMETER                (ACPI_STATUS) (0x0001 | AE_CODE_PROGRAMMER)
16969408Sache#define AE_BAD_CHARACTER                (ACPI_STATUS) (0x0002 | AE_CODE_PROGRAMMER)
17069408Sache#define AE_BAD_PATHNAME                 (ACPI_STATUS) (0x0003 | AE_CODE_PROGRAMMER)
17169408Sache#define AE_BAD_DATA                     (ACPI_STATUS) (0x0004 | AE_CODE_PROGRAMMER)
17269408Sache#define AE_BAD_ADDRESS                  (ACPI_STATUS) (0x0005 | AE_CODE_PROGRAMMER)
17369408Sache
17469408Sache#define AE_CODE_PGM_MAX                 0x0005
17569408Sache
17669408Sache
17769408Sache/*
17869408Sache * Acpi table exceptions
17969408Sache */
18069408Sache#define AE_BAD_SIGNATURE                (ACPI_STATUS) (0x0001 | AE_CODE_ACPI_TABLES)
18169408Sache#define AE_BAD_HEADER                   (ACPI_STATUS) (0x0002 | AE_CODE_ACPI_TABLES)
18269408Sache#define AE_BAD_CHECKSUM                 (ACPI_STATUS) (0x0003 | AE_CODE_ACPI_TABLES)
18369408Sache#define AE_BAD_VALUE                    (ACPI_STATUS) (0x0004 | AE_CODE_ACPI_TABLES)
18469408Sache
18569408Sache#define AE_CODE_TBL_MAX                 0x0003
18669408Sache
18769408Sache
18869408Sache/*
18969408Sache * AML exceptions.  These are caused by problems with
19069408Sache * the actual AML byte stream
19169408Sache */
19269408Sache#define AE_AML_ERROR                    (ACPI_STATUS) (0x0001 | AE_CODE_AML)
19369408Sache#define AE_AML_PARSE                    (ACPI_STATUS) (0x0002 | AE_CODE_AML)
19469408Sache#define AE_AML_BAD_OPCODE               (ACPI_STATUS) (0x0003 | AE_CODE_AML)
19569408Sache#define AE_AML_NO_OPERAND               (ACPI_STATUS) (0x0004 | AE_CODE_AML)
19669408Sache#define AE_AML_OPERAND_TYPE             (ACPI_STATUS) (0x0005 | AE_CODE_AML)
19769408Sache#define AE_AML_OPERAND_VALUE            (ACPI_STATUS) (0x0006 | AE_CODE_AML)
19869408Sache#define AE_AML_UNINITIALIZED_LOCAL      (ACPI_STATUS) (0x0007 | AE_CODE_AML)
19969408Sache#define AE_AML_UNINITIALIZED_ARG        (ACPI_STATUS) (0x0008 | AE_CODE_AML)
20069408Sache#define AE_AML_UNINITIALIZED_ELEMENT    (ACPI_STATUS) (0x0009 | AE_CODE_AML)
20169408Sache#define AE_AML_NUMERIC_OVERFLOW         (ACPI_STATUS) (0x000A | AE_CODE_AML)
20269408Sache#define AE_AML_REGION_LIMIT             (ACPI_STATUS) (0x000B | AE_CODE_AML)
20369408Sache#define AE_AML_BUFFER_LIMIT             (ACPI_STATUS) (0x000C | AE_CODE_AML)
20469408Sache#define AE_AML_PACKAGE_LIMIT            (ACPI_STATUS) (0x000D | AE_CODE_AML)
20569408Sache#define AE_AML_DIVIDE_BY_ZERO           (ACPI_STATUS) (0x000E | AE_CODE_AML)
20669408Sache#define AE_AML_BAD_NAME                 (ACPI_STATUS) (0x000F | AE_CODE_AML)
207145479Smp#define AE_AML_NAME_NOT_FOUND           (ACPI_STATUS) (0x0010 | AE_CODE_AML)
20869408Sache#define AE_AML_INTERNAL                 (ACPI_STATUS) (0x0011 | AE_CODE_AML)
20969408Sache
21069408Sache#define AE_CODE_AML_MAX                 0x0011
21169408Sache
21269408Sache/*
21369408Sache * Internal exceptions used for control
21469408Sache */
21569408Sache#define AE_CTRL_RETURN_VALUE            (ACPI_STATUS) (0x0001 | AE_CODE_CONTROL)
21669408Sache#define AE_CTRL_PENDING                 (ACPI_STATUS) (0x0002 | AE_CODE_CONTROL)
21769408Sache#define AE_CTRL_TERMINATE               (ACPI_STATUS) (0x0003 | AE_CODE_CONTROL)
21869408Sache#define AE_CTRL_TRUE                    (ACPI_STATUS) (0x0004 | AE_CODE_CONTROL)
21969408Sache#define AE_CTRL_FALSE                   (ACPI_STATUS) (0x0005 | AE_CODE_CONTROL)
22069408Sache#define AE_CTRL_DEPTH                   (ACPI_STATUS) (0x0006 | AE_CODE_CONTROL)
221145479Smp#define AE_CTRL_END                     (ACPI_STATUS) (0x0007 | AE_CODE_CONTROL)
22269408Sache#define AE_CTRL_TRANSFER                (ACPI_STATUS) (0x0008 | AE_CODE_CONTROL)
22369408Sache
22469408Sache#define AE_CODE_CTRL_MAX                0x0008
22569408Sache
22669408Sache
22769408Sache#ifdef DEFINE_ACPI_GLOBALS
22869408Sache
22969408Sache/*
23069408Sache * String versions of the exception codes above
23183098Smp * These strings must match the corresponding defines exactly
23283098Smp */
23383098Smpstatic NATIVE_CHAR          *AcpiGbl_ExceptionNames_Env[] =
23483098Smp{
23583098Smp    "AE_OK",
23669408Sache    "AE_ERROR",
23769408Sache    "AE_NO_ACPI_TABLES",
23869408Sache    "AE_NO_NAMESPACE",
239145479Smp    "AE_NO_MEMORY",
240145479Smp    "AE_NOT_FOUND",
24169408Sache    "AE_NOT_EXIST",
24269408Sache    "AE_EXIST",
24369408Sache    "AE_TYPE",
24469408Sache    "AE_NULL_OBJECT",
24569408Sache    "AE_NULL_ENTRY",
24669408Sache    "AE_BUFFER_OVERFLOW",
24769408Sache    "AE_STACK_OVERFLOW",
248145479Smp    "AE_STACK_UNDERFLOW",
249145479Smp    "AE_NOT_IMPLEMENTED",
250145479Smp    "AE_VERSION_MISMATCH",
251145479Smp    "AE_SUPPORT",
25269408Sache    "AE_SHARE",
253145479Smp    "AE_LIMIT",
25469408Sache    "AE_TIME",
25569408Sache    "AE_UNKNOWN_STATUS",
25669408Sache};
25769408Sache
258145479Smpstatic NATIVE_CHAR          *AcpiGbl_ExceptionNames_Pgm[] =
25969408Sache{
26069408Sache    "AE_BAD_PARAMETER",
26169408Sache    "AE_BAD_CHARACTER",
26269408Sache    "AE_BAD_PATHNAME",
263145479Smp    "AE_BAD_DATA",
26469408Sache    "AE_BAD_ADDRESS",
265145479Smp};
266145479Smp
26769408Sachestatic NATIVE_CHAR          *AcpiGbl_ExceptionNames_Tbl[] =
26869408Sache{
269167465Smp    "AE_BAD_SIGNATURE",
27069408Sache    "AE_BAD_HEADER",
271145479Smp    "AE_BAD_CHECKSUM",
272167465Smp    "AE_BAD_VALUE",
273145479Smp};
274145479Smp
275145479Smpstatic NATIVE_CHAR          *AcpiGbl_ExceptionNames_Aml[] =
276145479Smp{
277145479Smp    "AE_AML_ERROR",
278145479Smp    "AE_AML_PARSE",
279145479Smp    "AE_AML_BAD_OPCODE",
280145479Smp    "AE_AML_NO_OPERAND",
281145479Smp    "AE_AML_OPERAND_TYPE",
282145479Smp    "AE_AML_OPERAND_VALUE",
283145479Smp    "AE_AML_UNINITIALIZED_LOCAL",
284145479Smp    "AE_AML_UNINITIALIZED_ARG",
285145479Smp    "AE_AML_UNINITIALIZED_ELEMENT",
286145479Smp    "AE_AML_NUMERIC_OVERFLOW",
287145479Smp    "AE_AML_REGION_LIMIT",
288145479Smp    "AE_AML_BUFFER_LIMIT",
289167465Smp    "AE_AML_PACKAGE_LIMIT",
290167465Smp    "AE_AML_DIVIDE_BY_ZERO",
291167465Smp    "AE_AML_BAD_NAME",
292167465Smp    "AE_AML_NAME_NOT_FOUND",
293167465Smp    "AE_AML_INTERNAL",
294167465Smp};
295167465Smp
296167465Smpstatic NATIVE_CHAR          *AcpiGbl_ExceptionNames_Ctrl[] =
297167465Smp{
298145479Smp    "AE_CTRL_RETURN_VALUE",
299145479Smp    "AE_CTRL_PENDING",
300145479Smp    "AE_CTRL_TERMINATE",
301145479Smp    "AE_CTRL_TRUE",
302145479Smp    "AE_CTRL_FALSE",
303145479Smp    "AE_CTRL_DEPTH",
304145479Smp    "AE_CTRL_END",
305145479Smp    "AE_CTRL_TRANSFER",
306145479Smp};
307145479Smp
308145479Smp
309145479Smp#endif /* DEFINE_ACPI_GLOBALS */
310145479Smp
311145479Smp
312145479Smp#endif /* __ACEXCEP_H__ */
313145479Smp