Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    1) /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    2) /******************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    4)  * Name: aclocal.h - Internal data types used across the ACPI subsystem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    6)  * Copyright (C) 2000 - 2020, Intel Corp.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    7)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    8)  *****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   10) #ifndef __ACLOCAL_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   11) #define __ACLOCAL_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   13) /* acpisrc:struct_defs -- for acpisrc conversion */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   15) #define ACPI_SERIALIZED                 0xFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   17) typedef u32 acpi_mutex_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   18) #define ACPI_GLOBAL_LOCK                (acpi_semaphore) (-1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   20) /* Total number of aml opcodes defined */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   22) #define AML_NUM_OPCODES                 0x83
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   24) /* Forward declarations */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   26) struct acpi_walk_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   27) struct acpi_obj_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   28) union acpi_parse_object;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   30) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   31)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   32)  * Mutex typedefs and structs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   33)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   34)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   36) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   37)  * Predefined handles for the mutex objects used within the subsystem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   38)  * All mutex objects are automatically created by acpi_ut_mutex_initialize.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   39)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   40)  * The acquire/release ordering protocol is implied via this list. Mutexes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   41)  * with a lower value must be acquired before mutexes with a higher value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   42)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   43)  * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   44)  * table below also!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   45)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   46) #define ACPI_MTX_INTERPRETER            0	/* AML Interpreter, main lock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   47) #define ACPI_MTX_NAMESPACE              1	/* ACPI Namespace */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   48) #define ACPI_MTX_TABLES                 2	/* Data for ACPI tables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   49) #define ACPI_MTX_EVENTS                 3	/* Data for ACPI events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   50) #define ACPI_MTX_CACHES                 4	/* Internal caches, general purposes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   51) #define ACPI_MTX_MEMORY                 5	/* Debug memory tracking lists */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   53) #define ACPI_MAX_MUTEX                  5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   54) #define ACPI_NUM_MUTEX                  (ACPI_MAX_MUTEX+1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   56) /* Lock structure for reader/writer interfaces */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   58) struct acpi_rw_lock {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   59) 	acpi_mutex writer_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   60) 	acpi_mutex reader_mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   61) 	u32 num_readers;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   62) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   64) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   65)  * Predefined handles for spinlocks used within the subsystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   66)  * These spinlocks are created by acpi_ut_mutex_initialize
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   67)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   68) #define ACPI_LOCK_GPES                  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   69) #define ACPI_LOCK_HARDWARE              1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   71) #define ACPI_MAX_LOCK                   1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   72) #define ACPI_NUM_LOCK                   (ACPI_MAX_LOCK+1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   74) /* This Thread ID means that the mutex is not in use (unlocked) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   76) #define ACPI_MUTEX_NOT_ACQUIRED         ((acpi_thread_id) 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   78) /* This Thread ID means an invalid thread ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   80) #ifdef ACPI_OS_INVALID_THREAD_ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   81) #define ACPI_INVALID_THREAD_ID          ACPI_OS_INVALID_THREAD_ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   82) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   83) #define ACPI_INVALID_THREAD_ID          ((acpi_thread_id) 0xFFFFFFFF)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   84) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   86) /* Table for the global mutexes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   88) struct acpi_mutex_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   89) 	acpi_mutex mutex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   90) 	u32 use_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   91) 	acpi_thread_id thread_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   92) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   94) /* Lock flag parameter for various interfaces */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   96) #define ACPI_MTX_DO_NOT_LOCK            0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   97) #define ACPI_MTX_LOCK                   1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   99) /* Field access granularities */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  101) #define ACPI_FIELD_BYTE_GRANULARITY     1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  102) #define ACPI_FIELD_WORD_GRANULARITY     2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  103) #define ACPI_FIELD_DWORD_GRANULARITY    4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  104) #define ACPI_FIELD_QWORD_GRANULARITY    8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  106) #define ACPI_ENTRY_NOT_FOUND            NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  108) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  109)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  110)  * Namespace typedefs and structs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  111)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  112)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  114) /* Operational modes of the AML interpreter/scanner */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  116) typedef enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  117) 	ACPI_IMODE_LOAD_PASS1 = 0x01,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  118) 	ACPI_IMODE_LOAD_PASS2 = 0x02,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  119) 	ACPI_IMODE_EXECUTE = 0x03
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  120) } acpi_interpreter_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  122) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  123)  * The Namespace Node describes a named object that appears in the AML.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  124)  * descriptor_type is used to differentiate between internal descriptors.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  125)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  126)  * The node is optimized for both 32-bit and 64-bit platforms:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  127)  * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  128)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  129)  * Note: The descriptor_type and Type fields must appear in the identical
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  130)  * position in both the struct acpi_namespace_node and union acpi_operand_object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  131)  * structures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  132)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  133) struct acpi_namespace_node {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  134) 	union acpi_operand_object *object;	/* Interpreter object */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  135) 	u8 descriptor_type;	/* Differentiate object descriptor types */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  136) 	u8 type;		/* ACPI Type associated with this name */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  137) 	u16 flags;		/* Miscellaneous flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  138) 	union acpi_name_union name;	/* ACPI Name, always 4 chars per ACPI spec */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  139) 	struct acpi_namespace_node *parent;	/* Parent node */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  140) 	struct acpi_namespace_node *child;	/* First child */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  141) 	struct acpi_namespace_node *peer;	/* First peer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  142) 	acpi_owner_id owner_id;	/* Node creator */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  144) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  145) 	 * The following fields are used by the ASL compiler and disassembler only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  146) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  147) #ifdef ACPI_LARGE_NAMESPACE_NODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  148) 	union acpi_parse_object *op;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  149) 	void *method_locals;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  150) 	void *method_args;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  151) 	u32 value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  152) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  153) 	u8 arg_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  155) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  156) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  158) /* Namespace Node flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  160) #define ANOBJ_RESERVED                  0x01	/* Available for use */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  161) #define ANOBJ_TEMPORARY                 0x02	/* Node is create by a method and is temporary */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  162) #define ANOBJ_METHOD_ARG                0x04	/* Node is a method argument */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  163) #define ANOBJ_METHOD_LOCAL              0x08	/* Node is a method local */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  164) #define ANOBJ_SUBTREE_HAS_INI           0x10	/* Used to optimize device initialization */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  165) #define ANOBJ_EVALUATED                 0x20	/* Set on first evaluation of node */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  166) #define ANOBJ_ALLOCATED_BUFFER          0x40	/* Method AML buffer is dynamic (install_method) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  167) #define ANOBJ_NODE_EARLY_INIT           0x80	/* acpi_exec only: Node was create via init file (-fi) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  169) #define ANOBJ_IS_EXTERNAL               0x08	/* iASL only: This object created via External() */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  170) #define ANOBJ_METHOD_NO_RETVAL          0x10	/* iASL only: Method has no return value */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  171) #define ANOBJ_METHOD_SOME_NO_RETVAL     0x20	/* iASL only: Method has at least one return value */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  172) #define ANOBJ_IS_REFERENCED             0x80	/* iASL only: Object was referenced */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  173) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  174) /* Internal ACPI table management - master table list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  176) struct acpi_table_list {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  177) 	struct acpi_table_desc *tables;	/* Table descriptor array */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  178) 	u32 current_table_count;	/* Tables currently in the array */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  179) 	u32 max_table_count;	/* Max tables array will hold */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  180) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  181) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  183) /* Flags for above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  184) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  185) #define ACPI_ROOT_ORIGIN_UNKNOWN        (0)	/* ~ORIGIN_ALLOCATED */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  186) #define ACPI_ROOT_ORIGIN_ALLOCATED      (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  187) #define ACPI_ROOT_ALLOW_RESIZE          (2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  189) /* List to manage incoming ACPI tables */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  191) struct acpi_new_table_desc {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  192) 	struct acpi_table_header *table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  193) 	struct acpi_new_table_desc *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  194) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  196) /* Predefined table indexes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  198) #define ACPI_INVALID_TABLE_INDEX        (0xFFFFFFFF)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  200) struct acpi_find_context {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  201) 	char *search_for;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  202) 	acpi_handle *list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  203) 	u32 *count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  204) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  206) struct acpi_ns_search_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  207) 	struct acpi_namespace_node *node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  208) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  210) /* Object types used during package copies */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  211) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  212) #define ACPI_COPY_TYPE_SIMPLE           0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  213) #define ACPI_COPY_TYPE_PACKAGE          1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  215) /* Info structure used to convert external<->internal namestrings */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  217) struct acpi_namestring_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  218) 	const char *external_name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  219) 	const char *next_external_char;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  220) 	char *internal_name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  221) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  222) 	u32 num_segments;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  223) 	u32 num_carats;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  224) 	u8 fully_qualified;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  225) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  227) /* Field creation info */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  229) struct acpi_create_field_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  230) 	struct acpi_namespace_node *region_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  231) 	struct acpi_namespace_node *field_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  232) 	struct acpi_namespace_node *register_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  233) 	struct acpi_namespace_node *data_register_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  234) 	struct acpi_namespace_node *connection_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  235) 	u8 *resource_buffer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  236) 	u32 bank_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  237) 	u32 field_bit_position;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  238) 	u32 field_bit_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  239) 	u16 resource_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  240) 	u16 pin_number_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  241) 	u8 field_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  242) 	u8 attribute;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  243) 	u8 field_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  244) 	u8 access_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  245) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  246) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  247) typedef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  248) acpi_status (*acpi_internal_method) (struct acpi_walk_state * walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  250) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  251)  * Bitmapped ACPI types. Used internally only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  252)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  253) #define ACPI_BTYPE_ANY                  0x00000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  254) #define ACPI_BTYPE_INTEGER              0x00000001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  255) #define ACPI_BTYPE_STRING               0x00000002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  256) #define ACPI_BTYPE_BUFFER               0x00000004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  257) #define ACPI_BTYPE_PACKAGE              0x00000008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  258) #define ACPI_BTYPE_FIELD_UNIT           0x00000010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  259) #define ACPI_BTYPE_DEVICE               0x00000020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  260) #define ACPI_BTYPE_EVENT                0x00000040
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  261) #define ACPI_BTYPE_METHOD               0x00000080
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  262) #define ACPI_BTYPE_MUTEX                0x00000100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  263) #define ACPI_BTYPE_REGION               0x00000200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  264) #define ACPI_BTYPE_POWER                0x00000400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  265) #define ACPI_BTYPE_PROCESSOR            0x00000800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  266) #define ACPI_BTYPE_THERMAL              0x00001000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  267) #define ACPI_BTYPE_BUFFER_FIELD         0x00002000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  268) #define ACPI_BTYPE_DDB_HANDLE           0x00004000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  269) #define ACPI_BTYPE_DEBUG_OBJECT         0x00008000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  270) #define ACPI_BTYPE_REFERENCE_OBJECT     0x00010000	/* From Index(), ref_of(), etc (type6_opcodes) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  271) #define ACPI_BTYPE_RESOURCE             0x00020000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  272) #define ACPI_BTYPE_NAMED_REFERENCE      0x00040000	/* Generic unresolved Name or Namepath */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  273) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  274) #define ACPI_BTYPE_COMPUTE_DATA         (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  276) #define ACPI_BTYPE_DATA                 (ACPI_BTYPE_COMPUTE_DATA  | ACPI_BTYPE_PACKAGE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  277) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  278) 	/* Used by Copy, de_ref_of, Store, Printf, Fprintf */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  280) #define ACPI_BTYPE_DATA_REFERENCE       (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE_OBJECT | ACPI_BTYPE_DDB_HANDLE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  281) #define ACPI_BTYPE_DEVICE_OBJECTS       (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  282) #define ACPI_BTYPE_OBJECTS_AND_REFS     0x0001FFFF	/* ARG or LOCAL */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  283) #define ACPI_BTYPE_ALL_OBJECTS          0x0000FFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  284) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  285) #pragma pack(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  286) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  287) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  288)  * Information structure for ACPI predefined names.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  289)  * Each entry in the table contains the following items:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  290)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  291)  * name                 - The ACPI reserved name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  292)  * param_count          - Number of arguments to the method
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  293)  * expected_return_btypes - Allowed type(s) for the return value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  294)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  295) struct acpi_name_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  296) 	char name[ACPI_NAMESEG_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  297) 	u16 argument_list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  298) 	u8 expected_btypes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  299) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  300) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  301) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  302)  * Secondary information structures for ACPI predefined objects that return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  303)  * package objects. This structure appears as the next entry in the table
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  304)  * after the NAME_INFO structure above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  305)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  306)  * The reason for this is to minimize the size of the predefined name table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  307)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  308) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  309) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  310)  * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  311)  * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  312)  * ACPI_PTYPE2_FIX_VAR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  313)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  314) struct acpi_package_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  315) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  316) 	u8 object_type1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  317) 	u8 count1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  318) 	u8 object_type2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  319) 	u8 count2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  320) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  321) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  323) /* Used for ACPI_PTYPE2_FIXED */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  324) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  325) struct acpi_package_info2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  326) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  327) 	u8 count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  328) 	u8 object_type[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  329) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  330) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  331) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  332) /* Used for ACPI_PTYPE1_OPTION */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  334) struct acpi_package_info3 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  335) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  336) 	u8 count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  337) 	u8 object_type[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  338) 	u8 tail_object_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  339) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  340) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  341) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  342) struct acpi_package_info4 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  343) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  344) 	u8 object_type1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  345) 	u8 count1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  346) 	u8 sub_object_types;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  347) 	u8 pkg_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  348) 	u16 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  349) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  350) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  351) union acpi_predefined_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  352) 	struct acpi_name_info info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  353) 	struct acpi_package_info ret_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  354) 	struct acpi_package_info2 ret_info2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  355) 	struct acpi_package_info3 ret_info3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  356) 	struct acpi_package_info4 ret_info4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  357) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  358) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  359) /* Reset to default packing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  360) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  361) #pragma pack()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  362) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  363) /* Return object auto-repair info */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  364) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  365) typedef acpi_status (*acpi_object_converter) (struct acpi_namespace_node *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  366) 					      scope,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  367) 					      union acpi_operand_object *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  368) 					      original_object,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  369) 					      union acpi_operand_object **
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  370) 					      converted_object);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  371) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  372) struct acpi_simple_repair_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  373) 	char name[ACPI_NAMESEG_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  374) 	u32 unexpected_btypes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  375) 	u32 package_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  376) 	acpi_object_converter object_converter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  377) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  378) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  379) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  380)  * Bitmapped return value types
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  381)  * Note: the actual data types must be contiguous, a loop in nspredef.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  382)  * depends on this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  383)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  384) #define ACPI_RTYPE_ANY                  0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  385) #define ACPI_RTYPE_NONE                 0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  386) #define ACPI_RTYPE_INTEGER              0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  387) #define ACPI_RTYPE_STRING               0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  388) #define ACPI_RTYPE_BUFFER               0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  389) #define ACPI_RTYPE_PACKAGE              0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  390) #define ACPI_RTYPE_REFERENCE            0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  391) #define ACPI_RTYPE_ALL                  0x3F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  392) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  393) #define ACPI_NUM_RTYPES                 5	/* Number of actual object types */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  394) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  395) /* Info for running the _REG methods */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  396) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  397) struct acpi_reg_walk_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  398) 	u32 function;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  399) 	u32 reg_run_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  400) 	acpi_adr_space_type space_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  401) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  402) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  403) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  404)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  405)  * Event typedefs and structs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  406)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  407)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  408) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  409) /* Dispatch info for each host-installed SCI handler */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  410) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  411) struct acpi_sci_handler_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  412) 	struct acpi_sci_handler_info *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  413) 	acpi_sci_handler address;	/* Address of handler */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  414) 	void *context;		/* Context to be passed to handler */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  415) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  416) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  417) /* Dispatch info for each GPE -- either a method or handler, cannot be both */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  418) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  419) struct acpi_gpe_handler_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  420) 	acpi_gpe_handler address;	/* Address of handler, if any */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  421) 	void *context;		/* Context to be passed to handler */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  422) 	struct acpi_namespace_node *method_node;	/* Method node for this GPE level (saved) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  423) 	u8 original_flags;	/* Original (pre-handler) GPE info */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  424) 	u8 originally_enabled;	/* True if GPE was originally enabled */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  425) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  426) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  427) /* Notify info for implicit notify, multiple device objects */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  428) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  429) struct acpi_gpe_notify_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  430) 	struct acpi_namespace_node *device_node;	/* Device to be notified */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  431) 	struct acpi_gpe_notify_info *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  432) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  433) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  434) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  435)  * GPE dispatch info. At any time, the GPE can have at most one type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  436)  * of dispatch - Method, Handler, or Implicit Notify.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  437)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  438) union acpi_gpe_dispatch_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  439) 	struct acpi_namespace_node *method_node;	/* Method node for this GPE level */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  440) 	struct acpi_gpe_handler_info *handler;  /* Installed GPE handler */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  441) 	struct acpi_gpe_notify_info *notify_list;	/* List of _PRW devices for implicit notifies */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  442) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  443) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  444) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  445)  * Information about a GPE, one per each GPE in an array.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  446)  * NOTE: Important to keep this struct as small as possible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  447)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  448) struct acpi_gpe_event_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  449) 	union acpi_gpe_dispatch_info dispatch;	/* Either Method, Handler, or notify_list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  450) 	struct acpi_gpe_register_info *register_info;	/* Backpointer to register info */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  451) 	u8 flags;		/* Misc info about this GPE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  452) 	u8 gpe_number;		/* This GPE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  453) 	u8 runtime_count;	/* References to a run GPE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  454) 	u8 disable_for_dispatch;	/* Masked during dispatching */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  455) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  456) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  457) /* GPE register address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  458) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  459) struct acpi_gpe_address {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  460) 	u8 space_id;	/* Address space where the register exists */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  461) 	u64 address;	/* 64-bit address of the register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  462) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  463) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  464) /* Information about a GPE register pair, one per each status/enable pair in an array */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  465) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  466) struct acpi_gpe_register_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  467) 	struct acpi_gpe_address status_address;	/* Address of status reg */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  468) 	struct acpi_gpe_address enable_address;	/* Address of enable reg */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  469) 	u16 base_gpe_number;	/* Base GPE number for this register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  470) 	u8 enable_for_wake;	/* GPEs to keep enabled when sleeping */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  471) 	u8 enable_for_run;	/* GPEs to keep enabled when running */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  472) 	u8 mask_for_run;	/* GPEs to keep masked when running */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  473) 	u8 enable_mask;		/* Current mask of enabled GPEs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  474) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  475) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  476) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  477)  * Information about a GPE register block, one per each installed block --
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  478)  * GPE0, GPE1, and one per each installed GPE Block Device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  479)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  480) struct acpi_gpe_block_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  481) 	struct acpi_namespace_node *node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  482) 	struct acpi_gpe_block_info *previous;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  483) 	struct acpi_gpe_block_info *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  484) 	struct acpi_gpe_xrupt_info *xrupt_block;	/* Backpointer to interrupt block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  485) 	struct acpi_gpe_register_info *register_info;	/* One per GPE register pair */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  486) 	struct acpi_gpe_event_info *event_info;	/* One for each GPE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  487) 	u64 address;		/* Base address of the block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  488) 	u32 register_count;	/* Number of register pairs in block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  489) 	u16 gpe_count;		/* Number of individual GPEs in block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  490) 	u16 block_base_number;	/* Base GPE number for this block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  491) 	u8 space_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  492) 	u8 initialized;		/* TRUE if this block is initialized */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  493) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  494) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  495) /* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  496) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  497) struct acpi_gpe_xrupt_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  498) 	struct acpi_gpe_xrupt_info *previous;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  499) 	struct acpi_gpe_xrupt_info *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  500) 	struct acpi_gpe_block_info *gpe_block_list_head;	/* List of GPE blocks for this xrupt */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  501) 	u32 interrupt_number;	/* System interrupt number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  502) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  503) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  504) struct acpi_gpe_walk_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  505) 	struct acpi_namespace_node *gpe_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  506) 	struct acpi_gpe_block_info *gpe_block;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  507) 	u16 count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  508) 	acpi_owner_id owner_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  509) 	u8 execute_by_owner_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  510) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  511) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  512) struct acpi_gpe_device_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  513) 	u32 index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  514) 	u32 next_block_base_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  515) 	acpi_status status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  516) 	struct acpi_namespace_node *gpe_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  517) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  518) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  519) typedef acpi_status (*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  520) 					  gpe_xrupt_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  521) 					  struct acpi_gpe_block_info *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  522) 					  gpe_block, void *context);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  523) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  524) /* Information about each particular fixed event */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  525) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  526) struct acpi_fixed_event_handler {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  527) 	acpi_event_handler handler;	/* Address of handler. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  528) 	void *context;		/* Context to be passed to handler */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  529) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  530) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  531) struct acpi_fixed_event_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  532) 	u8 status_register_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  533) 	u8 enable_register_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  534) 	u16 status_bit_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  535) 	u16 enable_bit_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  536) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  537) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  538) /* Information used during field processing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  539) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  540) struct acpi_field_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  541) 	u8 skip_field;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  542) 	u8 field_flag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  543) 	u32 pkg_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  544) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  545) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  546) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  547)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  548)  * Generic "state" object for stacks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  549)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  550)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  551) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  552) #define ACPI_CONTROL_NORMAL                  0xC0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  553) #define ACPI_CONTROL_CONDITIONAL_EXECUTING   0xC1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  554) #define ACPI_CONTROL_PREDICATE_EXECUTING     0xC2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  555) #define ACPI_CONTROL_PREDICATE_FALSE         0xC3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  556) #define ACPI_CONTROL_PREDICATE_TRUE          0xC4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  557) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  558) #define ACPI_STATE_COMMON \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  559) 	void                            *next; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  560) 	u8                              descriptor_type; /* To differentiate various internal objs */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  561) 	u8                              flags; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  562) 	u16                             value; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  563) 	u16                             state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  564) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  565) 	/* There are 2 bytes available here until the next natural alignment boundary */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  566) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  567) struct acpi_common_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  568) ACPI_STATE_COMMON};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  569) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  570) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  571)  * Update state - used to traverse complex objects such as packages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  572)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  573) struct acpi_update_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  574) 	ACPI_STATE_COMMON union acpi_operand_object *object;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  575) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  576) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  577) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  578)  * Pkg state - used to traverse nested package structures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  579)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  580) struct acpi_pkg_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  581) 	ACPI_STATE_COMMON u32 index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  582) 	union acpi_operand_object *source_object;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  583) 	union acpi_operand_object *dest_object;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  584) 	struct acpi_walk_state *walk_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  585) 	void *this_target_obj;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  586) 	u32 num_packages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  587) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  588) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  589) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  590)  * Control state - one per if/else and while constructs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  591)  * Allows nesting of these constructs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  592)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  593) struct acpi_control_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  594) 	ACPI_STATE_COMMON u16 opcode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  595) 	union acpi_parse_object *predicate_op;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  596) 	u8 *aml_predicate_start;	/* Start of if/while predicate */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  597) 	u8 *package_end;	/* End of if/while block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  598) 	u64 loop_timeout;	/* While() loop timeout */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  599) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  600) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  601) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  602)  * Scope state - current scope during namespace lookups
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  603)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  604) struct acpi_scope_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  605) 	ACPI_STATE_COMMON struct acpi_namespace_node *node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  606) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  607) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  608) struct acpi_pscope_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  609) 	ACPI_STATE_COMMON u32 arg_count;	/* Number of fixed arguments */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  610) 	union acpi_parse_object *op;	/* Current op being parsed */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  611) 	u8 *arg_end;		/* Current argument end */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  612) 	u8 *pkg_end;		/* Current package end */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  613) 	u32 arg_list;		/* Next argument to parse */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  614) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  615) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  616) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  617)  * Thread state - one per thread across multiple walk states. Multiple walk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  618)  * states are created when there are nested control methods executing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  619)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  620) struct acpi_thread_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  621) 	ACPI_STATE_COMMON u8 current_sync_level;	/* Mutex Sync (nested acquire) level */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  622) 	struct acpi_walk_state *walk_state_list;	/* Head of list of walk_states for this thread */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  623) 	union acpi_operand_object *acquired_mutex_list;	/* List of all currently acquired mutexes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  624) 	acpi_thread_id thread_id;	/* Running thread ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  625) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  626) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  627) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  628)  * Result values - used to accumulate the results of nested
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  629)  * AML arguments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  630)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  631) struct acpi_result_values {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  632) 	ACPI_STATE_COMMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  633) 	    union acpi_operand_object *obj_desc[ACPI_RESULTS_FRAME_OBJ_NUM];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  634) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  635) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  636) typedef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  637) acpi_status (*acpi_parse_downwards) (struct acpi_walk_state * walk_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  638) 				     union acpi_parse_object ** out_op);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  639) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  640) typedef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  641) acpi_status (*acpi_parse_upwards) (struct acpi_walk_state * walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  642) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  643) /* Global handlers for AML Notifies */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  644) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  645) struct acpi_global_notify_handler {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  646) 	acpi_notify_handler handler;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  647) 	void *context;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  648) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  649) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  650) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  651)  * Notify info - used to pass info to the deferred notify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  652)  * handler/dispatcher.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  653)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  654) struct acpi_notify_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  655) 	ACPI_STATE_COMMON u8 handler_list_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  656) 	struct acpi_namespace_node *node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  657) 	union acpi_operand_object *handler_list_head;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  658) 	struct acpi_global_notify_handler *global;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  659) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  660) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  661) /* Generic state is union of structs above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  662) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  663) union acpi_generic_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  664) 	struct acpi_common_state common;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  665) 	struct acpi_control_state control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  666) 	struct acpi_update_state update;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  667) 	struct acpi_scope_state scope;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  668) 	struct acpi_pscope_state parse_scope;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  669) 	struct acpi_pkg_state pkg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  670) 	struct acpi_thread_state thread;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  671) 	struct acpi_result_values results;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  672) 	struct acpi_notify_info notify;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  673) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  674) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  675) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  676)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  677)  * Interpreter typedefs and structs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  678)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  679)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  680) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  681) typedef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  682) acpi_status (*acpi_execute_op) (struct acpi_walk_state * walk_state);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  683) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  684) /* Address Range info block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  685) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  686) struct acpi_address_range {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  687) 	struct acpi_address_range *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  688) 	struct acpi_namespace_node *region_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  689) 	acpi_physical_address start_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  690) 	acpi_physical_address end_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  691) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  692) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  693) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  694)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  695)  * Parser typedefs and structs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  696)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  697)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  698) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  699) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  700)  * AML opcode, name, and argument layout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  701)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  702) struct acpi_opcode_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  703) #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  704) 	char *name;		/* Opcode name (disassembler/debug only) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  705) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  706) 	u32 parse_args;		/* Grammar/Parse time arguments */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  707) 	u32 runtime_args;	/* Interpret time arguments */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  708) 	u16 flags;		/* Misc flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  709) 	u8 object_type;		/* Corresponding internal object type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  710) 	u8 class;		/* Opcode class */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  711) 	u8 type;		/* Opcode type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  712) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  713) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  714) /* Value associated with the parse object */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  715) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  716) union acpi_parse_value {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  717) 	u64 integer;		/* Integer constant (Up to 64 bits) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  718) 	u32 size;		/* bytelist or field size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  719) 	char *string;		/* NULL terminated string */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  720) 	u8 *buffer;		/* buffer or string */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  721) 	char *name;		/* NULL terminated string */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  722) 	union acpi_parse_object *arg;	/* arguments and contained ops */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  723) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  724) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  725) #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  726) #define ACPI_DISASM_ONLY_MEMBERS(a)     a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  727) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  728) #define ACPI_DISASM_ONLY_MEMBERS(a)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  729) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  730) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  731) #if defined(ACPI_ASL_COMPILER)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  732) #define ACPI_CONVERTER_ONLY_MEMBERS(a)  a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  733) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  734) #define ACPI_CONVERTER_ONLY_MEMBERS(a)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  735) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  736) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  737) #define ACPI_PARSE_COMMON \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  738) 	union acpi_parse_object         *parent;            /* Parent op */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  739) 	u8                              descriptor_type;    /* To differentiate various internal objs */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  740) 	u8                              flags;              /* Type of Op */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  741) 	u16                             aml_opcode;         /* AML opcode */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  742) 	u8                              *aml;               /* Address of declaration in AML */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  743) 	union acpi_parse_object         *next;              /* Next op */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  744) 	struct acpi_namespace_node      *node;              /* For use by interpreter */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  745) 	union acpi_parse_value          value;              /* Value or args associated with the opcode */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  746) 	u8                              arg_list_length;    /* Number of elements in the arg list */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  747) 	 ACPI_DISASM_ONLY_MEMBERS (\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  748) 	u16                             disasm_flags;       /* Used during AML disassembly */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  749) 	u8                              disasm_opcode;      /* Subtype used for disassembly */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  750) 	char                            *operator_symbol;   /* Used for C-style operator name strings */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  751) 	char                            aml_op_name[16])    /* Op name (debug only) */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  752) 	 ACPI_CONVERTER_ONLY_MEMBERS (\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  753) 	char                            *inline_comment;    /* Inline comment */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  754) 	char                            *end_node_comment;  /* End of node comment */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  755) 	char                            *name_comment;      /* Comment associated with the first parameter of the name node */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  756) 	char                            *close_brace_comment; /* Comments that come after } on the same as } */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  757) 	struct acpi_comment_node        *comment_list;      /* comments that appears before this node */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  758) 	struct acpi_comment_node        *end_blk_comment;   /* comments that at the end of a block but before ) or } */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  759) 	char                            *cv_filename;       /* Filename associated with this node. Used for ASL/ASL+ converter */\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  760) 	char                            *cv_parent_filename)	/* Parent filename associated with this node. Used for ASL/ASL+ converter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  761) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  762) /* categories of comments */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  763) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  764) typedef enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  765) 	STANDARD_COMMENT = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  766) 	INLINE_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  767) 	ENDNODE_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  768) 	OPENBRACE_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  769) 	CLOSE_BRACE_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  770) 	STD_DEFBLK_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  771) 	END_DEFBLK_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  772) 	FILENAME_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  773) 	PARENTFILENAME_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  774) 	ENDBLK_COMMENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  775) 	INCLUDE_COMMENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  776) } asl_comment_types;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  777) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  778) /* Internal opcodes for disasm_opcode field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  779) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  780) #define ACPI_DASM_BUFFER                0x00	/* Buffer is a simple data buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  781) #define ACPI_DASM_RESOURCE              0x01	/* Buffer is a Resource Descriptor */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  782) #define ACPI_DASM_STRING                0x02	/* Buffer is a ASCII string */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  783) #define ACPI_DASM_UNICODE               0x03	/* Buffer is a Unicode string */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  784) #define ACPI_DASM_PLD_METHOD            0x04	/* Buffer is a _PLD method bit-packed buffer */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  785) #define ACPI_DASM_UUID                  0x05	/* Buffer is a UUID/GUID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  786) #define ACPI_DASM_EISAID                0x06	/* Integer is an EISAID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  787) #define ACPI_DASM_MATCHOP               0x07	/* Parent opcode is a Match() operator */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  788) #define ACPI_DASM_LNOT_PREFIX           0x08	/* Start of a Lnot_equal (etc.) pair of opcodes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  789) #define ACPI_DASM_LNOT_SUFFIX           0x09	/* End  of a Lnot_equal (etc.) pair of opcodes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  790) #define ACPI_DASM_HID_STRING            0x0A	/* String is a _HID or _CID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  791) #define ACPI_DASM_IGNORE_SINGLE         0x0B	/* Ignore the opcode but not it's children */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  792) #define ACPI_DASM_SWITCH                0x0C	/* While is a Switch */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  793) #define ACPI_DASM_SWITCH_PREDICATE      0x0D	/* Object is a predicate for a Switch or Case block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  794) #define ACPI_DASM_CASE                  0x0E	/* If/Else is a Case in a Switch/Case block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  795) #define ACPI_DASM_DEFAULT               0x0F	/* Else is a Default in a Switch/Case block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  796) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  797) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  798)  * List struct used in the -ca option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  799)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  800) struct acpi_comment_node {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  801) 	char *comment;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  802) 	struct acpi_comment_node *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  803) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  804) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  805) struct acpi_comment_addr_node {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  806) 	u8 *addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  807) 	struct acpi_comment_addr_node *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  808) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  809) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  810) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  811)  * File node - used for "Include" operator file stack and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  812)  * dependency tree for the -ca option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  813)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  814) struct acpi_file_node {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  815) 	void *file;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  816) 	char *filename;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  817) 	char *file_start;	/* Points to AML and indicates when the AML for this particular file starts. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  818) 	char *file_end;		/* Points to AML and indicates when the AML for this particular file ends. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  819) 	struct acpi_file_node *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  820) 	struct acpi_file_node *parent;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  821) 	u8 include_written;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  822) 	struct acpi_comment_node *include_comment;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  823) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  824) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  825) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  826)  * Generic operation (for example:  If, While, Store)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  827)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  828) struct acpi_parse_obj_common {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  829) ACPI_PARSE_COMMON};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  830) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  831) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  832)  * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  833)  * and bytelists.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  834)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  835) struct acpi_parse_obj_named {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  836) 	ACPI_PARSE_COMMON char *path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  837) 	u8 *data;		/* AML body or bytelist data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  838) 	u32 length;		/* AML length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  839) 	u32 name;		/* 4-byte name or zero if no name */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  840) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  841) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  842) /* This version is used by the iASL compiler only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  843) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  844) #define ACPI_MAX_PARSEOP_NAME       20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  845) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  846) struct acpi_parse_obj_asl {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  847) 	ACPI_PARSE_COMMON union acpi_parse_object *child;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  848) 	union acpi_parse_object *parent_method;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  849) 	char *filename;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  850) 	u8 file_changed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  851) 	char *parent_filename;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  852) 	char *external_name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  853) 	char *namepath;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  854) 	char name_seg[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  855) 	u32 extra_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  856) 	u32 column;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  857) 	u32 line_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  858) 	u32 logical_line_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  859) 	u32 logical_byte_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  860) 	u32 end_line;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  861) 	u32 end_logical_line;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  862) 	u32 acpi_btype;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  863) 	u32 aml_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  864) 	u32 aml_subtree_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  865) 	u32 final_aml_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  866) 	u32 final_aml_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  867) 	u32 compile_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  868) 	u16 parse_opcode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  869) 	u8 aml_opcode_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  870) 	u8 aml_pkg_len_bytes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  871) 	u8 extra;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  872) 	char parse_op_name[ACPI_MAX_PARSEOP_NAME];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  873) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  874) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  875) union acpi_parse_object {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  876) 	struct acpi_parse_obj_common common;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  877) 	struct acpi_parse_obj_named named;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  878) 	struct acpi_parse_obj_asl asl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  879) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  880) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  881) struct asl_comment_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  882) 	u8 comment_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  883) 	u32 spaces_before;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  884) 	union acpi_parse_object *latest_parse_op;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  885) 	union acpi_parse_object *parsing_paren_brace_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  886) 	u8 capture_comments;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  887) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  888) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  889) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  890)  * Parse state - one state per parser invocation and each control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  891)  * method.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  892)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  893) struct acpi_parse_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  894) 	u8 *aml_start;		/* First AML byte */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  895) 	u8 *aml;		/* Next AML byte */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  896) 	u8 *aml_end;		/* (last + 1) AML byte */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  897) 	u8 *pkg_start;		/* Current package begin */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  898) 	u8 *pkg_end;		/* Current package end */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  899) 	union acpi_parse_object *start_op;	/* Root of parse tree */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  900) 	struct acpi_namespace_node *start_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  901) 	union acpi_generic_state *scope;	/* Current scope */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  902) 	union acpi_parse_object *start_scope;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  903) 	u32 aml_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  904) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  905) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  906) /* Parse object flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  907) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  908) #define ACPI_PARSEOP_GENERIC                0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  909) #define ACPI_PARSEOP_NAMED_OBJECT           0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  910) #define ACPI_PARSEOP_DEFERRED               0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  911) #define ACPI_PARSEOP_BYTELIST               0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  912) #define ACPI_PARSEOP_IN_STACK               0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  913) #define ACPI_PARSEOP_TARGET                 0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  914) #define ACPI_PARSEOP_IN_CACHE               0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  915) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  916) /* Parse object disasm_flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  917) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  918) #define ACPI_PARSEOP_IGNORE                 0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  919) #define ACPI_PARSEOP_PARAMETER_LIST         0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  920) #define ACPI_PARSEOP_EMPTY_TERMLIST         0x0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  921) #define ACPI_PARSEOP_PREDEFINED_CHECKED     0x0008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  922) #define ACPI_PARSEOP_CLOSING_PAREN          0x0010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  923) #define ACPI_PARSEOP_COMPOUND_ASSIGNMENT    0x0020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  924) #define ACPI_PARSEOP_ASSIGNMENT             0x0040
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  925) #define ACPI_PARSEOP_ELSEIF                 0x0080
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  926) #define ACPI_PARSEOP_LEGACY_ASL_ONLY        0x0100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  927) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  928) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  929)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  930)  * Hardware (ACPI registers) and PNP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  931)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  932)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  933) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  934) struct acpi_bit_register_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  935) 	u8 parent_register;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  936) 	u8 bit_position;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  937) 	u16 access_bit_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  938) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  939) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  940) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  941)  * Some ACPI registers have bits that must be ignored -- meaning that they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  942)  * must be preserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  943)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  944) #define ACPI_PM1_STATUS_PRESERVED_BITS          0x0800	/* Bit 11 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  945) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  946) /* Write-only bits must be zeroed by software */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  947) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  948) #define ACPI_PM1_CONTROL_WRITEONLY_BITS         0x2004	/* Bits 13, 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  949) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  950) /* For control registers, both ignored and reserved bits must be preserved */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  951) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  952) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  953)  * For PM1 control, the SCI enable bit (bit 0, SCI_EN) is defined by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  954)  * ACPI specification to be a "preserved" bit - "OSPM always preserves this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  955)  * bit position", section 4.7.3.2.1. However, on some machines the OS must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  956)  * write a one to this bit after resume for the machine to work properly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  957)  * To enable this, we no longer attempt to preserve this bit. No machines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  958)  * are known to fail if the bit is not preserved. (May 2009)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  959)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  960) #define ACPI_PM1_CONTROL_IGNORED_BITS           0x0200	/* Bit 9 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  961) #define ACPI_PM1_CONTROL_RESERVED_BITS          0xC1F8	/* Bits 14-15, 3-8 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  962) #define ACPI_PM1_CONTROL_PRESERVED_BITS \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  963) 	       (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  964) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  965) #define ACPI_PM2_CONTROL_PRESERVED_BITS         0xFFFFFFFE	/* All except bit 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  966) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  967) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  968)  * Register IDs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  969)  * These are the full ACPI registers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  970)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  971) #define ACPI_REGISTER_PM1_STATUS                0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  972) #define ACPI_REGISTER_PM1_ENABLE                0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  973) #define ACPI_REGISTER_PM1_CONTROL               0x03
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  974) #define ACPI_REGISTER_PM2_CONTROL               0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  975) #define ACPI_REGISTER_PM_TIMER                  0x05
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  976) #define ACPI_REGISTER_PROCESSOR_BLOCK           0x06
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  977) #define ACPI_REGISTER_SMI_COMMAND_BLOCK         0x07
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  978) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  979) /* Masks used to access the bit_registers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  980) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  981) #define ACPI_BITMASK_TIMER_STATUS               0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  982) #define ACPI_BITMASK_BUS_MASTER_STATUS          0x0010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  983) #define ACPI_BITMASK_GLOBAL_LOCK_STATUS         0x0020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  984) #define ACPI_BITMASK_POWER_BUTTON_STATUS        0x0100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  985) #define ACPI_BITMASK_SLEEP_BUTTON_STATUS        0x0200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  986) #define ACPI_BITMASK_RT_CLOCK_STATUS            0x0400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  987) #define ACPI_BITMASK_PCIEXP_WAKE_STATUS         0x4000	/* ACPI 3.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  988) #define ACPI_BITMASK_WAKE_STATUS                0x8000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  989) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  990) #define ACPI_BITMASK_ALL_FIXED_STATUS           (\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  991) 	ACPI_BITMASK_TIMER_STATUS          | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  992) 	ACPI_BITMASK_BUS_MASTER_STATUS     | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  993) 	ACPI_BITMASK_GLOBAL_LOCK_STATUS    | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  994) 	ACPI_BITMASK_POWER_BUTTON_STATUS   | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  995) 	ACPI_BITMASK_SLEEP_BUTTON_STATUS   | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  996) 	ACPI_BITMASK_RT_CLOCK_STATUS       | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  997) 	ACPI_BITMASK_PCIEXP_WAKE_STATUS    | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  998) 	ACPI_BITMASK_WAKE_STATUS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  999) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1000) #define ACPI_BITMASK_TIMER_ENABLE               0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1001) #define ACPI_BITMASK_GLOBAL_LOCK_ENABLE         0x0020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1002) #define ACPI_BITMASK_POWER_BUTTON_ENABLE        0x0100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1003) #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE        0x0200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1004) #define ACPI_BITMASK_RT_CLOCK_ENABLE            0x0400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1005) #define ACPI_BITMASK_PCIEXP_WAKE_DISABLE        0x4000	/* ACPI 3.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1006) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1007) #define ACPI_BITMASK_SCI_ENABLE                 0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1008) #define ACPI_BITMASK_BUS_MASTER_RLD             0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1009) #define ACPI_BITMASK_GLOBAL_LOCK_RELEASE        0x0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1010) #define ACPI_BITMASK_SLEEP_TYPE                 0x1C00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1011) #define ACPI_BITMASK_SLEEP_ENABLE               0x2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1012) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1013) #define ACPI_BITMASK_ARB_DISABLE                0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1014) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1015) /* Raw bit position of each bit_register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1016) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1017) #define ACPI_BITPOSITION_TIMER_STATUS           0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1018) #define ACPI_BITPOSITION_BUS_MASTER_STATUS      0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1019) #define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS     0x05
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1020) #define ACPI_BITPOSITION_POWER_BUTTON_STATUS    0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1021) #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS    0x09
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1022) #define ACPI_BITPOSITION_RT_CLOCK_STATUS        0x0A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1023) #define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS     0x0E	/* ACPI 3.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1024) #define ACPI_BITPOSITION_WAKE_STATUS            0x0F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1025) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1026) #define ACPI_BITPOSITION_TIMER_ENABLE           0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1027) #define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE     0x05
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1028) #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE    0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1029) #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE    0x09
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1030) #define ACPI_BITPOSITION_RT_CLOCK_ENABLE        0x0A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1031) #define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE    0x0E	/* ACPI 3.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1032) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1033) #define ACPI_BITPOSITION_SCI_ENABLE             0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1034) #define ACPI_BITPOSITION_BUS_MASTER_RLD         0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1035) #define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE    0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1036) #define ACPI_BITPOSITION_SLEEP_TYPE             0x0A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1037) #define ACPI_BITPOSITION_SLEEP_ENABLE           0x0D
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1038) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1039) #define ACPI_BITPOSITION_ARB_DISABLE            0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1040) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1041) /* Structs and definitions for _OSI support and I/O port validation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1042) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1043) #define ACPI_ALWAYS_ILLEGAL             0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1044) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1045) struct acpi_interface_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1046) 	char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1047) 	struct acpi_interface_info *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1048) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1049) 	u8 value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1050) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1051) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1052) #define ACPI_OSI_INVALID                0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1053) #define ACPI_OSI_DYNAMIC                0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1054) #define ACPI_OSI_FEATURE                0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1055) #define ACPI_OSI_DEFAULT_INVALID        0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1056) #define ACPI_OSI_OPTIONAL_FEATURE       (ACPI_OSI_FEATURE | ACPI_OSI_DEFAULT_INVALID | ACPI_OSI_INVALID)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1057) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1058) struct acpi_port_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1059) 	char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1060) 	u16 start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1061) 	u16 end;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1062) 	u8 osi_dependency;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1063) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1064) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1065) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1066)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1067)  * Resource descriptors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1068)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1069)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1070) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1071) /* resource_type values */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1072) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1073) #define ACPI_ADDRESS_TYPE_MEMORY_RANGE          0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1074) #define ACPI_ADDRESS_TYPE_IO_RANGE              1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1075) #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE      2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1076) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1077) /* Resource descriptor types and masks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1078) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1079) #define ACPI_RESOURCE_NAME_LARGE                0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1080) #define ACPI_RESOURCE_NAME_SMALL                0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1081) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1082) #define ACPI_RESOURCE_NAME_SMALL_MASK           0x78	/* Bits 6:3 contain the type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1083) #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK    0x07	/* Bits 2:0 contain the length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1084) #define ACPI_RESOURCE_NAME_LARGE_MASK           0x7F	/* Bits 6:0 contain the type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1085) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1086) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1087)  * Small resource descriptor "names" as defined by the ACPI specification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1088)  * Note: Bits 2:0 are used for the descriptor length
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1089)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1090) #define ACPI_RESOURCE_NAME_IRQ                  0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1091) #define ACPI_RESOURCE_NAME_DMA                  0x28
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1092) #define ACPI_RESOURCE_NAME_START_DEPENDENT      0x30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1093) #define ACPI_RESOURCE_NAME_END_DEPENDENT        0x38
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1094) #define ACPI_RESOURCE_NAME_IO                   0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1095) #define ACPI_RESOURCE_NAME_FIXED_IO             0x48
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1096) #define ACPI_RESOURCE_NAME_FIXED_DMA            0x50
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1097) #define ACPI_RESOURCE_NAME_RESERVED_S2          0x58
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1098) #define ACPI_RESOURCE_NAME_RESERVED_S3          0x60
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1099) #define ACPI_RESOURCE_NAME_RESERVED_S4          0x68
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1100) #define ACPI_RESOURCE_NAME_VENDOR_SMALL         0x70
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1101) #define ACPI_RESOURCE_NAME_END_TAG              0x78
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1103) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1104)  * Large resource descriptor "names" as defined by the ACPI specification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1105)  * Note: includes the Large Descriptor bit in bit[7]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1106)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1107) #define ACPI_RESOURCE_NAME_MEMORY24             0x81
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1108) #define ACPI_RESOURCE_NAME_GENERIC_REGISTER     0x82
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1109) #define ACPI_RESOURCE_NAME_RESERVED_L1          0x83
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1110) #define ACPI_RESOURCE_NAME_VENDOR_LARGE         0x84
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1111) #define ACPI_RESOURCE_NAME_MEMORY32             0x85
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1112) #define ACPI_RESOURCE_NAME_FIXED_MEMORY32       0x86
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1113) #define ACPI_RESOURCE_NAME_ADDRESS32            0x87
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1114) #define ACPI_RESOURCE_NAME_ADDRESS16            0x88
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1115) #define ACPI_RESOURCE_NAME_EXTENDED_IRQ         0x89
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1116) #define ACPI_RESOURCE_NAME_ADDRESS64            0x8A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1117) #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64   0x8B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1118) #define ACPI_RESOURCE_NAME_GPIO                 0x8C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1119) #define ACPI_RESOURCE_NAME_PIN_FUNCTION         0x8D
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1120) #define ACPI_RESOURCE_NAME_SERIAL_BUS           0x8E
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1121) #define ACPI_RESOURCE_NAME_PIN_CONFIG           0x8F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1122) #define ACPI_RESOURCE_NAME_PIN_GROUP            0x90
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1123) #define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION   0x91
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1124) #define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG     0x92
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1125) #define ACPI_RESOURCE_NAME_LARGE_MAX            0x92
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1127) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1128)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1129)  * Miscellaneous
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1130)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1131)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1133) #define ACPI_ASCII_ZERO                 0x30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1135) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1136)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1137)  * Disassembler
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1138)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1139)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1141) struct acpi_external_list {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1142) 	char *path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1143) 	char *internal_path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1144) 	struct acpi_external_list *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1145) 	u32 value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1146) 	u16 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1147) 	u16 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1148) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1149) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1151) /* Values for Flags field above */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1153) #define ACPI_EXT_RESOLVED_REFERENCE         0x01	/* Object was resolved during cross ref */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1154) #define ACPI_EXT_ORIGIN_FROM_FILE           0x02	/* External came from a file */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1155) #define ACPI_EXT_INTERNAL_PATH_ALLOCATED    0x04	/* Deallocate internal path on completion */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1156) #define ACPI_EXT_EXTERNAL_EMITTED           0x08	/* External() statement has been emitted */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1157) #define ACPI_EXT_ORIGIN_FROM_OPCODE         0x10	/* External came from a External() opcode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1158) #define ACPI_EXT_CONFLICTING_DECLARATION    0x20	/* External has a conflicting declaration within AML */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1160) struct acpi_external_file {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1161) 	char *path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1162) 	struct acpi_external_file *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1163) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1165) struct acpi_parse_object_list {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1166) 	union acpi_parse_object *op;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1167) 	struct acpi_parse_object_list *next;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1168) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1170) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1171)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1172)  * Debugger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1173)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1174)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1176) struct acpi_db_method_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1177) 	acpi_handle method;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1178) 	acpi_handle main_thread_gate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1179) 	acpi_handle thread_complete_gate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1180) 	acpi_handle info_gate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1181) 	acpi_thread_id *threads;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1182) 	u32 num_threads;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1183) 	u32 num_created;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1184) 	u32 num_completed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1186) 	char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1187) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1188) 	u32 num_loops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1189) 	char pathname[ACPI_DB_LINE_BUFFER_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1190) 	char **args;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1191) 	acpi_object_type *types;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1193) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1194) 	 * Arguments to be passed to method for the commands Threads and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1195) 	 * Background. Note, ACPI specifies a maximum of 7 arguments (0 - 6).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1196) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1197) 	 * For the Threads command, the Number of threads, ID of current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1198) 	 * thread and Index of current thread inside all them created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1199) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1200) 	char init_args;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1201) #ifdef ACPI_DEBUGGER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1202) 	acpi_object_type arg_types[ACPI_METHOD_NUM_ARGS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1203) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1204) 	char *arguments[ACPI_METHOD_NUM_ARGS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1205) 	char num_threads_str[11];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1206) 	char id_of_thread_str[11];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1207) 	char index_of_thread_str[11];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1208) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1210) struct acpi_integrity_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1211) 	u32 nodes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1212) 	u32 objects;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1213) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1215) #define ACPI_DB_DISABLE_OUTPUT          0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1216) #define ACPI_DB_REDIRECTABLE_OUTPUT     0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1217) #define ACPI_DB_CONSOLE_OUTPUT          0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1218) #define ACPI_DB_DUPLICATE_OUTPUT        0x03
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1220) struct acpi_object_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1221) 	u32 types[ACPI_TOTAL_TYPES];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1222) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1224) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1225)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1226)  * Debug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1227)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1228)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1230) /* Entry for a memory allocation (debug only) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1232) #define ACPI_MEM_MALLOC                 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1233) #define ACPI_MEM_CALLOC                 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1234) #define ACPI_MAX_MODULE_NAME            16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1236) #define ACPI_COMMON_DEBUG_MEM_HEADER \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1237) 	struct acpi_debug_mem_block     *previous; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1238) 	struct acpi_debug_mem_block     *next; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1239) 	u32                             size; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1240) 	u32                             component; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1241) 	u32                             line; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1242) 	char                            module[ACPI_MAX_MODULE_NAME]; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1243) 	u8                              alloc_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1245) struct acpi_debug_mem_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1246) ACPI_COMMON_DEBUG_MEM_HEADER};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1248) struct acpi_debug_mem_block {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1249) 	ACPI_COMMON_DEBUG_MEM_HEADER u64 user_space;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1250) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1251) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1252) #define ACPI_MEM_LIST_GLOBAL            0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1253) #define ACPI_MEM_LIST_NSNODE            1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1254) #define ACPI_MEM_LIST_MAX               1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1255) #define ACPI_NUM_MEM_LISTS              2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1256) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1257) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1258)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1259)  * Info/help support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1260)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1261)  ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1262) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1263) struct ah_predefined_name {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1264) 	char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1265) 	char *description;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1266) #ifndef ACPI_ASL_COMPILER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1267) 	char *action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1268) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1269) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1270) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1271) struct ah_device_id {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1272) 	char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1273) 	char *description;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1274) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1276) struct ah_uuid {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1277) 	char *description;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1278) 	char *string;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1279) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1280) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1281) struct ah_table {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1282) 	char *signature;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1283) 	char *description;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1284) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1285) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1286) #endif				/* __ACLOCAL_H__ */