drivers/acpi/acpica/acparser.h

Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/acparser.h

File Facts

System
Linux kernel
Corpus path
drivers/acpi/acpica/acparser.h
Extension
.h
Size
6473 bytes
Lines
228
Domain
Driver Families
Bucket
drivers/acpi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __ACPARSER_H__
#define __ACPARSER_H__

#define OP_HAS_RETURN_VALUE             1

/* Variable number of arguments. This field must be 32 bits */

#define ACPI_VAR_ARGS                   ACPI_UINT32_MAX

#define ACPI_PARSE_DELETE_TREE          0x0001
#define ACPI_PARSE_NO_TREE_DELETE       0x0000
#define ACPI_PARSE_TREE_MASK            0x0001

#define ACPI_PARSE_LOAD_PASS1           0x0010
#define ACPI_PARSE_LOAD_PASS2           0x0020
#define ACPI_PARSE_EXECUTE              0x0030
#define ACPI_PARSE_MODE_MASK            0x0030

#define ACPI_PARSE_DEFERRED_OP          0x0100
#define ACPI_PARSE_DISASSEMBLE          0x0200

#define ACPI_PARSE_MODULE_LEVEL         0x0400

/******************************************************************************
 *
 * Parser interfaces
 *
 *****************************************************************************/

extern const u8 acpi_gbl_short_op_index[];
extern const u8 acpi_gbl_long_op_index[];

/*
 * psxface - Parser external interfaces
 */
acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info);

acpi_status acpi_ps_execute_table(struct acpi_evaluate_info *info);

/*
 * psargs - Parse AML opcode arguments
 */
u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state);

char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state);

void
acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
			    u32 arg_type, union acpi_parse_object *arg);

acpi_status
acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
			  struct acpi_parse_state *parser_state,
			  union acpi_parse_object *arg,
			  u8 possible_method_call);

/* Values for u8 above */

#define ACPI_NOT_METHOD_CALL            FALSE
#define ACPI_POSSIBLE_METHOD_CALL       TRUE

acpi_status
acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
		     struct acpi_parse_state *parser_state,
		     u32 arg_type, union acpi_parse_object **return_arg);

/*
 * psfind
 */
union acpi_parse_object *acpi_ps_find_name(union acpi_parse_object *scope,
					   u32 name, u32 opcode);

union acpi_parse_object *acpi_ps_get_parent(union acpi_parse_object *op);

/*
 * psobject - support for parse object processing
 */
acpi_status
acpi_ps_build_named_op(struct acpi_walk_state *walk_state,
		       u8 *aml_op_start,
		       union acpi_parse_object *unnamed_op,
		       union acpi_parse_object **op);

acpi_status
acpi_ps_create_op(struct acpi_walk_state *walk_state,
		  u8 *aml_op_start, union acpi_parse_object **new_op);

acpi_status
acpi_ps_complete_op(struct acpi_walk_state *walk_state,
		    union acpi_parse_object **op, acpi_status status);

Annotation

Implementation Notes