acexcep.h revision 7b1019a6d29ccb7999dc76cba3dde1c627e8e609
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ACEXCEP_H__
#define __ACEXCEP_H__
/* This module contains all possible exception codes for ACPI_STATUS */
/*
* Exception code classes
*/
#define AE_CODE_MAX 0x4000
#define AE_CODE_MASK 0xF000
/*
* Macros to insert the exception code classes
*/
/*
* Exception info table. The "Description" field is used only by the
* ACPICA help application (acpihelp).
*/
typedef struct acpi_exception_info
{
char *Name;
#ifdef ACPI_HELP_APP
char *Description;
#endif
#ifdef ACPI_HELP_APP
#else
#endif
/*
* Success is always zero, failure is non-zero
*/
#define ACPI_SUCCESS(a) (!(a))
#define ACPI_FAILURE(a) (a)
/*
* Environmental exceptions
*/
#define AE_CODE_ENV_MAX 0x001E
/*
* Programmer exceptions
*/
#define AE_CODE_PGM_MAX 0x0009
/*
* Acpi table exceptions
*/
#define AE_CODE_TBL_MAX 0x0005
/*
* AML exceptions. These are caused by problems with
* the actual AML byte stream
*/
#define AE_CODE_AML_MAX 0x0023
/*
* Internal exceptions used for control
*/
#define AE_CODE_CTRL_MAX 0x000D
/* Exception strings for AcpiFormatException */
#ifdef ACPI_DEFINE_EXCEPTION_TABLE
/*
* String versions of the exception codes above
* These strings must match the corresponding defines exactly
*/
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Env[] =
{
EXCEP_TXT ("AE_ACQUIRE_DEADLOCK", "Internal error, attempt was made to acquire a mutex in improper order"),
EXCEP_TXT ("AE_RELEASE_DEADLOCK", "Internal error, attempt was made to release a mutex in improper order"),
EXCEP_TXT ("AE_NOT_ACQUIRED", "An attempt to release a mutex or Global Lock without a previous acquire"),
EXCEP_TXT ("AE_SAME_HANDLER", "Attempt was made to install the same handler that is already installed"),
EXCEP_TXT ("AE_OWNER_ID_LIMIT", "There are no more Owner IDs available for ACPI tables or control methods"),
EXCEP_TXT ("AE_NOT_CONFIGURED", "The interface is not part of the current subsystem configuration"),
};
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Pgm[] =
{
};
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Tbl[] =
{
};
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] =
{
EXCEP_TXT ("AE_AML_MUTEX_NOT_ACQUIRED", "Attempt to release a mutex that was not previously acquired"),
EXCEP_TXT ("AE_AML_ALIGNMENT", "Non-aligned memory transfer on platform that does not support this"),
EXCEP_TXT ("AE_AML_BAD_RESOURCE_LENGTH", "The length of a Resource Descriptor in the AML is incorrect"),
};
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Ctrl[] =
{
};
#endif /* EXCEPTION_TABLE */
#endif /* __ACEXCEP_H__ */