ReactOS 0.4.15-dev-7674-gc0b4db1
utexcep.c File Reference
#include "acpi.h"
#include "accommon.h"
Include dependency graph for utexcep.c:

Go to the source code of this file.

Macros

#define EXPORT_ACPI_INTERFACES
 
#define ACPI_DEFINE_EXCEPTION_TABLE
 
#define _COMPONENT   ACPI_UTILITIES
 

Functions

const charAcpiFormatException (ACPI_STATUS Status)
 
const ACPI_EXCEPTION_INFOAcpiUtValidateException (ACPI_STATUS Status)
 

Macro Definition Documentation

◆ _COMPONENT

#define _COMPONENT   ACPI_UTILITIES

Definition at line 51 of file utexcep.c.

◆ ACPI_DEFINE_EXCEPTION_TABLE

#define ACPI_DEFINE_EXCEPTION_TABLE

Definition at line 46 of file utexcep.c.

◆ EXPORT_ACPI_INTERFACES

#define EXPORT_ACPI_INTERFACES

Definition at line 44 of file utexcep.c.

Function Documentation

◆ AcpiFormatException()

const char * AcpiFormatException ( ACPI_STATUS  Status)

Definition at line 70 of file utexcep.c.

72{
73 const ACPI_EXCEPTION_INFO *Exception;
74
75
77
78
79 Exception = AcpiUtValidateException (Status);
80 if (!Exception)
81 {
82 /* Exception code was not recognized */
83
85 "Unknown exception code: 0x%8.8X", Status));
86
87 return ("UNKNOWN_STATUS_CODE");
88 }
89
90 return (Exception->Name);
91}
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define AE_INFO
Definition: acoutput.h:230
Status
Definition: gdiplustypes.h:25
const ACPI_EXCEPTION_INFO * AcpiUtValidateException(ACPI_STATUS Status)
Definition: utexcep.c:111

Referenced by acpi_util_eval_error(), AcpiBiosException(), AcpiEvaluateObject(), AcpiException(), AcpiExSystemWaitMutex(), AcpiExSystemWaitSemaphore(), AcpiNsGetNodeUnlocked(), AcpiPsParseAml(), AcpiRsCreateAmlResources(), AcpiUtExecutePowerMethods(), AcpiUtMethodError(), and AcpiUtPrefixedNamespaceError().

◆ AcpiUtValidateException()

const ACPI_EXCEPTION_INFO * AcpiUtValidateException ( ACPI_STATUS  Status)

Definition at line 111 of file utexcep.c.

113{
115 const ACPI_EXCEPTION_INFO *Exception = NULL;
116
117
119
120
121 /*
122 * Status is composed of two parts, a "type" and an actual code
123 */
124 SubStatus = (Status & ~AE_CODE_MASK);
125
126 switch (Status & AE_CODE_MASK)
127 {
129
131 {
132 Exception = &AcpiGbl_ExceptionNames_Env [SubStatus];
133 }
134 break;
135
137
139 {
140 Exception = &AcpiGbl_ExceptionNames_Pgm [SubStatus];
141 }
142 break;
143
145
147 {
148 Exception = &AcpiGbl_ExceptionNames_Tbl [SubStatus];
149 }
150 break;
151
152 case AE_CODE_AML:
153
155 {
156 Exception = &AcpiGbl_ExceptionNames_Aml [SubStatus];
157 }
158 break;
159
160 case AE_CODE_CONTROL:
161
163 {
164 Exception = &AcpiGbl_ExceptionNames_Ctrl [SubStatus];
165 }
166 break;
167
168 default:
169
170 break;
171 }
172
173 if (!Exception || !Exception->Name)
174 {
175 return (NULL);
176 }
177
178 return (Exception);
179}
unsigned int UINT32
#define AE_CODE_ENV_MAX
Definition: acexcep.h:145
#define AE_CODE_TBL_MAX
Definition: acexcep.h:173
#define AE_CODE_AML_MAX
Definition: acexcep.h:218
#define AE_CODE_ACPI_TABLES
Definition: acexcep.h:55
#define AE_CODE_PROGRAMMER
Definition: acexcep.h:54
#define AE_CODE_AML
Definition: acexcep.h:56
#define AE_CODE_CONTROL
Definition: acexcep.h:57
#define AE_CODE_CTRL_MAX
Definition: acexcep.h:237
#define AE_CODE_ENVIRONMENTAL
Definition: acexcep.h:53
#define AE_CODE_MASK
Definition: acexcep.h:60
#define AE_CODE_PGM_MAX
Definition: acexcep.h:161
#define NULL
Definition: types.h:112
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID _Out_ PHANDLE _Out_ PQUOTA_LIMITS _Out_ PNTSTATUS SubStatus

Referenced by AcpiFormatException().