PatchworkOS
Loading...
Searching...
No Matches
exception.h File Reference
#include <kernel/acpi/aml/state.h>
#include <errno.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define AML_EXCEPTION_RAISE(state, code)   aml_exception_raise(state, code, __func__)
 Macro to raise an AML exception with the current function name.
 

Typedefs

typedef void(* aml_exception_handler_t) (aml_state_t *state, aml_exception_t code)
 AML exception handler function type.
 

Enumerations

enum  aml_exception_t {
  AML_ERROR = 0x3001 ,
  AML_PARSE = 0x3002 ,
  AML_BAD_OPCODE = 0x3003 ,
  AML_NO_OPERAND = 0x3004 ,
  AML_OPERAND_TYPE = 0x3005 ,
  AML_OPERAND_VALUE = 0x3006 ,
  AML_UNINITIALIZED_LOCAL = 0x3007 ,
  AML_UNINITIALIZED_ARG = 0x3008 ,
  AML_UNINITIALIZED_ELEMENT = 0x3009 ,
  AML_NUMERIC_OVERFLOW = 0x300A ,
  AML_REGION_LIMIT = 0x300B ,
  AML_BUFFER_LIMIT = 0x300C ,
  AML_PACKAGE_LIMIT = 0x300D ,
  AML_DIVIDE_BY_ZERO = 0x300E ,
  AML_BAD_NAME = 0x300F ,
  AML_NAME_NOT_FOUND = 0x3010 ,
  AML_INTERNAL = 0x3011 ,
  AML_INVALID_SPACE_ID = 0x3012 ,
  AML_STRING_LIMIT = 0x3013 ,
  AML_NO_RETURN_VALUE = 0x3014 ,
  AML_METHOD_LIMIT = 0x3015 ,
  AML_NOT_OWNER = 0x3016 ,
  AML_MUTEX_ORDER = 0x3017 ,
  AML_MUTEX_NOT_ACQUIRED = 0x3018 ,
  AML_INVALID_RESOURCE_TYPE = 0x3019 ,
  AML_INVALID_INDEX = 0x301A ,
  AML_REGISTER_LIMIT = 0x301B ,
  AML_NO_WHILE = 0x301C ,
  AML_ALIGNMENT = 0x301D ,
  AML_NO_RESOURCE_END_TAG = 0x301E ,
  AML_BAD_RESOURCE_VALUE = 0x301F ,
  AML_CIRCULAR_REFERENCE = 0x3020
}
 AML exception codes. More...
 

Functions

const char * aml_exception_to_string (aml_exception_t code)
 Converts an AML exception code to a string.
 
uint64_t aml_exception_register (aml_exception_handler_t handler)
 Registers an AML exception handler.
 
void aml_exception_unregister (aml_exception_handler_t handler)
 Unregisters an AML exception handler.
 
void aml_exception_raise (aml_state_t *state, aml_exception_t code, const char *function)
 Raises an AML exception.