You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (65 commits) ACPI: suppress power button event on S3 resume ACPI: resolve merge conflict between sem2mutex and processor_perflib.c ACPI: use for_each_possible_cpu() instead of for_each_cpu() ACPI: delete newly added debugging macros in processor_perflib.c ACPI: UP build fix for bugzilla-5737 Enable P-state software coordination via _PDC P-state software coordination for speedstep-centrino P-state software coordination for acpi-cpufreq P-state software coordination for ACPI core ACPI: create acpi_thermal_resume() ACPI: create acpi_fan_suspend()/acpi_fan_resume() ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend() ACPI: create acpi_device_suspend()/acpi_device_resume() ACPI: replace spin_lock_irq with mutex for ec poll mode ACPI: Allow a WAN module enable/disable on a Thinkpad X60. sem2mutex: acpi, acpi_link_lock ACPI: delete unused acpi_bus_drivers_lock sem2mutex: drivers/acpi/processor_perflib.c ACPI add ia64 exports to build acpi_memhotplug as a module ACPI: asus_acpi_init(): propagate correct return value ... Manual resolve of conflicts in: arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c include/acpi/processor.h
This commit is contained in:
+5
-13
@@ -63,7 +63,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20060127
|
||||
#define ACPI_CA_VERSION 0x20060608
|
||||
|
||||
/*
|
||||
* OS name, used for the _OS object. The _OS object is essentially obsolete,
|
||||
@@ -81,6 +81,7 @@
|
||||
#define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */
|
||||
#define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */
|
||||
#define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */
|
||||
#define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */
|
||||
|
||||
/*
|
||||
* Should the subsystem abort the loading of an ACPI table if the
|
||||
@@ -102,9 +103,9 @@
|
||||
|
||||
#define ACPI_MAX_SEMAPHORE_COUNT 256
|
||||
|
||||
/* Max reference count (for debug only) */
|
||||
/* Maximum object reference count (detects object deletion issues) */
|
||||
|
||||
#define ACPI_MAX_REFERENCE_COUNT 0x400
|
||||
#define ACPI_MAX_REFERENCE_COUNT 0x800
|
||||
|
||||
/* Size of cached memory mapping for system memory operation region */
|
||||
|
||||
@@ -171,12 +172,7 @@
|
||||
|
||||
/* Array sizes. Used for range checking also */
|
||||
|
||||
#define ACPI_NUM_ACCESS_TYPES 6
|
||||
#define ACPI_NUM_UPDATE_RULES 3
|
||||
#define ACPI_NUM_LOCK_RULES 2
|
||||
#define ACPI_NUM_MATCH_OPS 6
|
||||
#define ACPI_NUM_OPCODES 256
|
||||
#define ACPI_NUM_FIELD_NAMES 2
|
||||
#define ACPI_MAX_MATCH_OPCODE 5
|
||||
|
||||
/* RSDP checksums */
|
||||
|
||||
@@ -187,10 +183,6 @@
|
||||
|
||||
#define ACPI_SMBUS_BUFFER_SIZE 34
|
||||
|
||||
/* Number of strings associated with the _OSI reserved method */
|
||||
|
||||
#define ACPI_NUM_OSI_STRINGS 10
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* ACPI AML Debugger
|
||||
|
||||
+165
-8
@@ -50,26 +50,72 @@
|
||||
#define BLOCK_PAREN 1
|
||||
#define BLOCK_BRACE 2
|
||||
#define BLOCK_COMMA_LIST 4
|
||||
#define ACPI_DEFAULT_RESNAME *(u32 *) "__RD"
|
||||
|
||||
struct acpi_external_list {
|
||||
char *path;
|
||||
char *internal_path;
|
||||
struct acpi_external_list *next;
|
||||
u32 value;
|
||||
u16 length;
|
||||
u8 type;
|
||||
};
|
||||
|
||||
extern struct acpi_external_list *acpi_gbl_external_list;
|
||||
|
||||
/* Strings used for decoding flags to ASL keywords */
|
||||
typedef const struct acpi_dmtable_info {
|
||||
u8 opcode;
|
||||
u8 offset;
|
||||
char *name;
|
||||
|
||||
extern const char *acpi_gbl_word_decode[4];
|
||||
extern const char *acpi_gbl_irq_decode[2];
|
||||
extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES];
|
||||
extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES];
|
||||
extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES];
|
||||
extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS];
|
||||
} acpi_dmtable_info;
|
||||
|
||||
/*
|
||||
* Values for Opcode above.
|
||||
* Note: 0-7 must not change, used as a flag shift value
|
||||
*/
|
||||
#define ACPI_DMT_FLAG0 0
|
||||
#define ACPI_DMT_FLAG1 1
|
||||
#define ACPI_DMT_FLAG2 2
|
||||
#define ACPI_DMT_FLAG3 3
|
||||
#define ACPI_DMT_FLAG4 4
|
||||
#define ACPI_DMT_FLAG5 5
|
||||
#define ACPI_DMT_FLAG6 6
|
||||
#define ACPI_DMT_FLAG7 7
|
||||
#define ACPI_DMT_FLAGS0 8
|
||||
#define ACPI_DMT_FLAGS2 9
|
||||
#define ACPI_DMT_UINT8 10
|
||||
#define ACPI_DMT_UINT16 11
|
||||
#define ACPI_DMT_UINT24 12
|
||||
#define ACPI_DMT_UINT32 13
|
||||
#define ACPI_DMT_UINT56 14
|
||||
#define ACPI_DMT_UINT64 15
|
||||
#define ACPI_DMT_STRING 16
|
||||
#define ACPI_DMT_NAME4 17
|
||||
#define ACPI_DMT_NAME6 18
|
||||
#define ACPI_DMT_NAME8 19
|
||||
#define ACPI_DMT_CHKSUM 20
|
||||
#define ACPI_DMT_SPACEID 21
|
||||
#define ACPI_DMT_GAS 22
|
||||
#define ACPI_DMT_MADT 23
|
||||
#define ACPI_DMT_SRAT 24
|
||||
#define ACPI_DMT_EXIT 25
|
||||
|
||||
typedef
|
||||
void (*ACPI_TABLE_HANDLER) (struct acpi_table_header * table);
|
||||
|
||||
struct acpi_dmtable_data {
|
||||
char *signature;
|
||||
struct acpi_dmtable_info *table_info;
|
||||
ACPI_TABLE_HANDLER table_handler;
|
||||
};
|
||||
|
||||
struct acpi_op_walk_info {
|
||||
u32 level;
|
||||
u32 last_level;
|
||||
u32 count;
|
||||
u32 bit_offset;
|
||||
u32 flags;
|
||||
struct acpi_walk_state *walk_state;
|
||||
};
|
||||
|
||||
@@ -77,6 +123,100 @@ typedef
|
||||
acpi_status(*asl_walk_callback) (union acpi_parse_object * op,
|
||||
u32 level, void *context);
|
||||
|
||||
struct acpi_resource_tag {
|
||||
u32 bit_index;
|
||||
char *tag;
|
||||
};
|
||||
|
||||
/* Strings used for decoding flags to ASL keywords */
|
||||
|
||||
extern const char *acpi_gbl_word_decode[];
|
||||
extern const char *acpi_gbl_irq_decode[];
|
||||
extern const char *acpi_gbl_lock_rule[];
|
||||
extern const char *acpi_gbl_access_types[];
|
||||
extern const char *acpi_gbl_update_rules[];
|
||||
extern const char *acpi_gbl_match_ops[];
|
||||
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_asf0[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_asf1[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_asf2[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_asf3[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_asf4[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_asf_hdr[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_boot[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_cpep[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_cpep0[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_dbgp[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_facs[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_fadt1[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_fadt2[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_gas[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_header[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_hpet[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt0[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt1[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt2[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt3[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt4[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt5[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_rsdp1[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_rsdp2[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_sbst[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_slit[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_srat0[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_srat1[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
|
||||
extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
|
||||
|
||||
/*
|
||||
* dmtable
|
||||
*/
|
||||
void acpi_dm_dump_data_table(struct acpi_table_header *table);
|
||||
|
||||
void
|
||||
acpi_dm_dump_table(u32 table_length,
|
||||
u32 table_offset,
|
||||
void *table,
|
||||
u32 sub_table_length, struct acpi_dmtable_info *info);
|
||||
|
||||
void acpi_dm_line_header(u32 offset, u32 byte_length, char *name);
|
||||
|
||||
void acpi_dm_line_header2(u32 offset, u32 byte_length, char *name, u32 value);
|
||||
|
||||
/*
|
||||
* dmtbdump
|
||||
*/
|
||||
void acpi_dm_dump_asf(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_cpep(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_fadt(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_srat(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_mcfg(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_madt(struct acpi_table_header *table);
|
||||
|
||||
u32 acpi_dm_dump_rsdp(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_rsdt(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_slit(struct acpi_table_header *table);
|
||||
|
||||
void acpi_dm_dump_xsdt(struct acpi_table_header *table);
|
||||
|
||||
/*
|
||||
* dmwalk
|
||||
*/
|
||||
@@ -84,6 +224,11 @@ void
|
||||
acpi_dm_disassemble(struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *origin, u32 num_opcodes);
|
||||
|
||||
void
|
||||
acpi_dm_walk_parse_tree(union acpi_parse_object *op,
|
||||
asl_walk_callback descending_callback,
|
||||
asl_walk_callback ascending_callback, void *context);
|
||||
|
||||
/*
|
||||
* dmopcode
|
||||
*/
|
||||
@@ -166,6 +311,7 @@ void acpi_dm_dump_integer64(u64 value, char *name);
|
||||
|
||||
void
|
||||
acpi_dm_resource_template(struct acpi_op_walk_info *info,
|
||||
union acpi_parse_object *op,
|
||||
u8 * byte_data, u32 byte_count);
|
||||
|
||||
u8 acpi_dm_is_resource_template(union acpi_parse_object *op);
|
||||
@@ -176,6 +322,8 @@ void acpi_dm_bit_list(u16 mask);
|
||||
|
||||
void acpi_dm_decode_attribute(u8 attribute);
|
||||
|
||||
void acpi_dm_descriptor_name(void);
|
||||
|
||||
/*
|
||||
* dmresrcl
|
||||
*/
|
||||
@@ -248,6 +396,15 @@ acpi_dm_vendor_small_descriptor(union aml_resource *resource,
|
||||
/*
|
||||
* dmutils
|
||||
*/
|
||||
void acpi_dm_add_to_external_list(char *path);
|
||||
void acpi_dm_add_to_external_list(char *path, u8 type, u32 value);
|
||||
|
||||
/*
|
||||
* dmrestag
|
||||
*/
|
||||
void acpi_dm_find_resources(union acpi_parse_object *root);
|
||||
|
||||
void
|
||||
acpi_dm_check_resource_reference(union acpi_parse_object *op,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
#endif /* __ACDISASM_H__ */
|
||||
|
||||
@@ -194,7 +194,9 @@ acpi_status
|
||||
acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
|
||||
union acpi_operand_object *return_desc);
|
||||
|
||||
void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state);
|
||||
void
|
||||
acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
|
||||
struct acpi_walk_state *walk_state);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
|
||||
@@ -302,7 +304,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
|
||||
struct acpi_namespace_node *method_node,
|
||||
u8 * aml_start,
|
||||
u32 aml_length,
|
||||
struct acpi_parameter_info *info, u8 pass_number);
|
||||
struct acpi_evaluate_info *info, u8 pass_number);
|
||||
|
||||
acpi_status
|
||||
acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
|
||||
|
||||
@@ -93,7 +93,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
|
||||
*/
|
||||
u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback);
|
||||
acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
@@ -138,7 +138,7 @@ acpi_status
|
||||
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
||||
u32 function,
|
||||
acpi_physical_address address,
|
||||
u32 bit_width, void *value);
|
||||
u32 bit_width, acpi_integer * value);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_attach_region(union acpi_operand_object *handler_obj,
|
||||
|
||||
@@ -160,8 +160,9 @@
|
||||
#define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001F | AE_CODE_AML)
|
||||
#define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML)
|
||||
#define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x0021 | AE_CODE_AML)
|
||||
#define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0022 | AE_CODE_AML)
|
||||
|
||||
#define AE_CODE_AML_MAX 0x0021
|
||||
#define AE_CODE_AML_MAX 0x0022
|
||||
|
||||
/*
|
||||
* Internal exceptions used for control
|
||||
@@ -275,7 +276,8 @@ char const *acpi_gbl_exception_names_aml[] = {
|
||||
"AE_AML_NO_RESOURCE_END_TAG",
|
||||
"AE_AML_BAD_RESOURCE_VALUE",
|
||||
"AE_AML_CIRCULAR_REFERENCE",
|
||||
"AE_AML_BAD_RESOURCE_LENGTH"
|
||||
"AE_AML_BAD_RESOURCE_LENGTH",
|
||||
"AE_AML_ILLEGAL_ADDRESS"
|
||||
};
|
||||
|
||||
char const *acpi_gbl_exception_names_ctrl[] = {
|
||||
|
||||
+13
-16
@@ -107,6 +107,7 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;
|
||||
* 3) Allow access to uninitialized locals/args (auto-init to integer 0)
|
||||
* 4) Allow ANY object type to be a source operand for the Store() operator
|
||||
* 5) Allow unresolved references (invalid target name) in package objects
|
||||
* 6) Enable warning messages for behavior that is not ACPI spec compliant
|
||||
*/
|
||||
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
|
||||
|
||||
@@ -114,7 +115,7 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
|
||||
* Automatically serialize ALL control methods? Default is FALSE, meaning
|
||||
* to use the Serialized/not_serialized method flags on a per method basis.
|
||||
* Only change this if the ASL code is poorly written and cannot handle
|
||||
* reentrancy even though methods are marked "not_serialized".
|
||||
* reentrancy even though methods are marked "NotSerialized".
|
||||
*/
|
||||
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE);
|
||||
|
||||
@@ -149,10 +150,10 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);
|
||||
ACPI_EXTERN u32 acpi_gbl_table_flags;
|
||||
ACPI_EXTERN u32 acpi_gbl_rsdt_table_count;
|
||||
ACPI_EXTERN struct rsdp_descriptor *acpi_gbl_RSDP;
|
||||
ACPI_EXTERN XSDT_DESCRIPTOR *acpi_gbl_XSDT;
|
||||
ACPI_EXTERN FADT_DESCRIPTOR *acpi_gbl_FADT;
|
||||
ACPI_EXTERN struct xsdt_descriptor *acpi_gbl_XSDT;
|
||||
ACPI_EXTERN struct fadt_descriptor *acpi_gbl_FADT;
|
||||
ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
|
||||
ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS;
|
||||
ACPI_EXTERN struct facs_descriptor *acpi_gbl_FACS;
|
||||
ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
|
||||
/*
|
||||
* Since there may be multiple SSDTs and PSDTs, a single pointer is not
|
||||
@@ -177,15 +178,15 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
|
||||
/*
|
||||
* ACPI Table info arrays
|
||||
*/
|
||||
extern struct acpi_table_list acpi_gbl_table_lists[NUM_ACPI_TABLE_TYPES];
|
||||
extern struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES];
|
||||
extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1];
|
||||
extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1];
|
||||
|
||||
/*
|
||||
* Predefined mutex objects. This array contains the
|
||||
* actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
|
||||
* (The table maps local handles to the real OS handles)
|
||||
*/
|
||||
ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[NUM_MUTEX];
|
||||
ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX];
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -203,6 +204,7 @@ ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
|
||||
|
||||
/* Object caches */
|
||||
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache;
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache;
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache;
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache;
|
||||
@@ -244,7 +246,6 @@ extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
|
||||
extern const char *acpi_gbl_highest_dstate_names[4];
|
||||
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
|
||||
extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
|
||||
extern const char *acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS];
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -289,14 +290,6 @@ ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_cm_single_step;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Parser globals
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Hardware globals
|
||||
@@ -321,7 +314,11 @@ ACPI_EXTERN struct acpi_fixed_event_handler
|
||||
ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
|
||||
ACPI_EXTERN struct acpi_gpe_block_info
|
||||
*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
|
||||
|
||||
/* Spinlocks */
|
||||
|
||||
ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
|
||||
ACPI_EXTERN acpi_handle acpi_gbl_hardware_lock;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
||||
+150
-130
@@ -44,7 +44,10 @@
|
||||
#ifndef __ACLOCAL_H__
|
||||
#define __ACLOCAL_H__
|
||||
|
||||
/* acpisrc:struct_defs -- for acpisrc conversion */
|
||||
|
||||
#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
|
||||
#define ACPI_INFINITE_CONCURRENCY 0xFF
|
||||
|
||||
typedef void *acpi_mutex;
|
||||
typedef u32 acpi_mutex_handle;
|
||||
@@ -69,52 +72,55 @@ union acpi_parse_object;
|
||||
* Predefined handles for the mutex objects used within the subsystem
|
||||
* All mutex objects are automatically created by acpi_ut_mutex_initialize.
|
||||
*
|
||||
* The acquire/release ordering protocol is implied via this list. Mutexes
|
||||
* The acquire/release ordering protocol is implied via this list. Mutexes
|
||||
* with a lower value must be acquired before mutexes with a higher value.
|
||||
*
|
||||
* NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also!
|
||||
* NOTE: any changes here must be reflected in the acpi_gbl_mutex_names
|
||||
* table below also!
|
||||
*/
|
||||
#define ACPI_MTX_EXECUTE 0
|
||||
#define ACPI_MTX_INTERPRETER 1
|
||||
#define ACPI_MTX_PARSER 2
|
||||
#define ACPI_MTX_DISPATCHER 3
|
||||
#define ACPI_MTX_TABLES 4
|
||||
#define ACPI_MTX_OP_REGIONS 5
|
||||
#define ACPI_MTX_NAMESPACE 6
|
||||
#define ACPI_MTX_EVENTS 7
|
||||
#define ACPI_MTX_HARDWARE 8
|
||||
#define ACPI_MTX_CACHES 9
|
||||
#define ACPI_MTX_MEMORY 10
|
||||
#define ACPI_MTX_DEBUG_CMD_COMPLETE 11
|
||||
#define ACPI_MTX_DEBUG_CMD_READY 12
|
||||
#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */
|
||||
#define ACPI_MTX_CONTROL_METHOD 1 /* Control method termination [TBD: may no longer be necessary] */
|
||||
#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */
|
||||
#define ACPI_MTX_NAMESPACE 3 /* ACPI Namespace */
|
||||
#define ACPI_MTX_EVENTS 4 /* Data for ACPI events */
|
||||
#define ACPI_MTX_CACHES 5 /* Internal caches, general purposes */
|
||||
#define ACPI_MTX_MEMORY 6 /* Debug memory tracking lists */
|
||||
#define ACPI_MTX_DEBUG_CMD_COMPLETE 7 /* AML debugger */
|
||||
#define ACPI_MTX_DEBUG_CMD_READY 8 /* AML debugger */
|
||||
|
||||
#define MAX_MUTEX 12
|
||||
#define NUM_MUTEX MAX_MUTEX+1
|
||||
#define ACPI_MAX_MUTEX 8
|
||||
#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
#ifdef DEFINE_ACPI_GLOBALS
|
||||
|
||||
/* Names for the mutexes used in the subsystem */
|
||||
/* Debug names for the mutexes above */
|
||||
|
||||
static char *acpi_gbl_mutex_names[] = {
|
||||
"ACPI_MTX_Execute",
|
||||
static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
|
||||
"ACPI_MTX_Interpreter",
|
||||
"ACPI_MTX_Parser",
|
||||
"ACPI_MTX_Dispatcher",
|
||||
"ACPI_MTX_Method",
|
||||
"ACPI_MTX_Tables",
|
||||
"ACPI_MTX_op_regions",
|
||||
"ACPI_MTX_Namespace",
|
||||
"ACPI_MTX_Events",
|
||||
"ACPI_MTX_Hardware",
|
||||
"ACPI_MTX_Caches",
|
||||
"ACPI_MTX_Memory",
|
||||
"ACPI_MTX_debug_cmd_complete",
|
||||
"ACPI_MTX_debug_cmd_ready",
|
||||
"ACPI_MTX_DebugCmdComplete",
|
||||
"ACPI_MTX_DebugCmdReady"
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Predefined handles for spinlocks used within the subsystem.
|
||||
* These spinlocks are created by acpi_ut_mutex_initialize
|
||||
*/
|
||||
#define ACPI_LOCK_GPES 0
|
||||
#define ACPI_LOCK_HARDWARE 1
|
||||
|
||||
#define ACPI_MAX_LOCK 1
|
||||
#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1
|
||||
|
||||
/* Owner IDs are used to track namespace nodes for selective deletion */
|
||||
|
||||
typedef u8 acpi_owner_id;
|
||||
@@ -129,7 +135,7 @@ typedef u8 acpi_owner_id;
|
||||
struct acpi_mutex_info {
|
||||
acpi_mutex mutex;
|
||||
u32 use_count;
|
||||
u32 thread_id;
|
||||
acpi_thread_id thread_id;
|
||||
};
|
||||
|
||||
/* Lock flag parameter for various interfaces */
|
||||
@@ -144,6 +150,8 @@ struct acpi_mutex_info {
|
||||
#define ACPI_FIELD_DWORD_GRANULARITY 4
|
||||
#define ACPI_FIELD_QWORD_GRANULARITY 8
|
||||
|
||||
#define ACPI_ENTRY_NOT_FOUND NULL
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Namespace typedefs and structs
|
||||
@@ -158,49 +166,55 @@ typedef enum {
|
||||
ACPI_IMODE_EXECUTE = 0x0E
|
||||
} acpi_interpreter_mode;
|
||||
|
||||
/*
|
||||
* The Node describes a named object that appears in the AML
|
||||
* An acpi_node is used to store Nodes.
|
||||
*
|
||||
* data_type is used to differentiate between internal descriptors, and MUST
|
||||
* be the first byte in this structure.
|
||||
*/
|
||||
union acpi_name_union {
|
||||
u32 integer;
|
||||
char ascii[4];
|
||||
};
|
||||
|
||||
/*
|
||||
* The Namespace Node describes a named object that appears in the AML.
|
||||
* descriptor_type is used to differentiate between internal descriptors.
|
||||
*
|
||||
* The node is optimized for both 32-bit and 64-bit platforms:
|
||||
* 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
|
||||
*
|
||||
* Note: The descriptor_type and Type fields must appear in the identical
|
||||
* position in both the struct acpi_namespace_node and union acpi_operand_object
|
||||
* structures.
|
||||
*/
|
||||
struct acpi_namespace_node {
|
||||
u8 descriptor; /* Used to differentiate object descriptor types */
|
||||
u8 type; /* Type associated with this name */
|
||||
u16 reference_count; /* Current count of references and children */
|
||||
union acpi_operand_object *object; /* Interpreter object */
|
||||
u8 descriptor_type; /* Differentiate object descriptor types */
|
||||
u8 type; /* ACPI Type associated with this name */
|
||||
u8 flags; /* Miscellaneous flags */
|
||||
acpi_owner_id owner_id; /* Node creator */
|
||||
union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
|
||||
union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */
|
||||
struct acpi_namespace_node *child; /* First child */
|
||||
struct acpi_namespace_node *peer; /* Next peer */
|
||||
u8 owner_id; /* Who created this node */
|
||||
u8 flags;
|
||||
struct acpi_namespace_node *peer; /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */
|
||||
|
||||
/* Fields used by the ASL compiler only */
|
||||
|
||||
#ifdef ACPI_ASL_COMPILER
|
||||
u32 value;
|
||||
/*
|
||||
* The following fields are used by the ASL compiler and disassembler only
|
||||
*/
|
||||
#ifdef ACPI_LARGE_NAMESPACE_NODE
|
||||
union acpi_parse_object *op;
|
||||
u32 value;
|
||||
u32 length;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define ACPI_ENTRY_NOT_FOUND NULL
|
||||
/* Namespace Node flags */
|
||||
|
||||
/* Node flags */
|
||||
#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */
|
||||
#define ANOBJ_DATA_WIDTH_32 0x02 /* Parent table uses 32-bit math */
|
||||
#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
|
||||
#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
|
||||
#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
|
||||
|
||||
#define ANOBJ_RESERVED 0x01
|
||||
#define ANOBJ_END_OF_PEER_LIST 0x02
|
||||
#define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */
|
||||
#define ANOBJ_METHOD_ARG 0x08
|
||||
#define ANOBJ_METHOD_LOCAL 0x10
|
||||
#define ANOBJ_METHOD_NO_RETVAL 0x20
|
||||
#define ANOBJ_METHOD_SOME_NO_RETVAL 0x40
|
||||
#define ANOBJ_IS_BIT_OFFSET 0x80
|
||||
#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */
|
||||
#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */
|
||||
#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has at least one return value */
|
||||
#define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit offset */
|
||||
#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was referenced */
|
||||
|
||||
/*
|
||||
* ACPI Table Descriptor. One per ACPI table
|
||||
@@ -212,8 +226,8 @@ struct acpi_table_desc {
|
||||
struct acpi_table_header *pointer;
|
||||
u8 *aml_start;
|
||||
u64 physical_address;
|
||||
u32 aml_length;
|
||||
acpi_size length;
|
||||
u32 aml_length;
|
||||
acpi_owner_id owner_id;
|
||||
u8 type;
|
||||
u8 allocation;
|
||||
@@ -276,6 +290,9 @@ struct acpi_create_field_info {
|
||||
u8 field_type;
|
||||
};
|
||||
|
||||
typedef
|
||||
acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
|
||||
|
||||
/*
|
||||
* Bitmapped ACPI types. Used internally only
|
||||
*/
|
||||
@@ -377,7 +394,7 @@ struct acpi_gpe_walk_info {
|
||||
struct acpi_gpe_block_info *gpe_block;
|
||||
};
|
||||
|
||||
typedef acpi_status(*ACPI_GPE_CALLBACK) (struct acpi_gpe_xrupt_info *
|
||||
typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
|
||||
gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *
|
||||
gpe_block);
|
||||
@@ -416,13 +433,14 @@ struct acpi_field_info {
|
||||
#define ACPI_CONTROL_PREDICATE_FALSE 0xC3
|
||||
#define ACPI_CONTROL_PREDICATE_TRUE 0xC4
|
||||
|
||||
#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
|
||||
u8 data_type; /* To differentiate various internal objs */\
|
||||
u8 flags; \
|
||||
u16 value; \
|
||||
u16 state; \
|
||||
u16 reserved; \
|
||||
void *next;
|
||||
#define ACPI_STATE_COMMON \
|
||||
void *next; \
|
||||
u8 descriptor_type; /* To differentiate various internal objs */\
|
||||
u8 flags; \
|
||||
u16 value; \
|
||||
u16 state;
|
||||
|
||||
/* There are 2 bytes available here until the next natural alignment boundary */
|
||||
|
||||
struct acpi_common_state {
|
||||
ACPI_STATE_COMMON};
|
||||
@@ -438,12 +456,12 @@ struct acpi_update_state {
|
||||
* Pkg state - used to traverse nested package structures
|
||||
*/
|
||||
struct acpi_pkg_state {
|
||||
ACPI_STATE_COMMON union acpi_operand_object *source_object;
|
||||
ACPI_STATE_COMMON u16 index;
|
||||
union acpi_operand_object *source_object;
|
||||
union acpi_operand_object *dest_object;
|
||||
struct acpi_walk_state *walk_state;
|
||||
void *this_target_obj;
|
||||
u32 num_packages;
|
||||
u16 index;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -451,10 +469,10 @@ struct acpi_pkg_state {
|
||||
* Allows nesting of these constructs
|
||||
*/
|
||||
struct acpi_control_state {
|
||||
ACPI_STATE_COMMON union acpi_parse_object *predicate_op;
|
||||
ACPI_STATE_COMMON u16 opcode;
|
||||
union acpi_parse_object *predicate_op;
|
||||
u8 *aml_predicate_start; /* Start of if/while predicate */
|
||||
u8 *package_end; /* End of if/while block */
|
||||
u16 opcode;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -465,11 +483,11 @@ struct acpi_scope_state {
|
||||
};
|
||||
|
||||
struct acpi_pscope_state {
|
||||
ACPI_STATE_COMMON union acpi_parse_object *op; /* Current op being parsed */
|
||||
ACPI_STATE_COMMON u32 arg_count; /* Number of fixed arguments */
|
||||
union acpi_parse_object *op; /* Current op being parsed */
|
||||
u8 *arg_end; /* Current argument end */
|
||||
u8 *pkg_end; /* Current package end */
|
||||
u32 arg_list; /* Next argument to parse */
|
||||
u32 arg_count; /* Number of fixed arguments */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -477,10 +495,10 @@ struct acpi_pscope_state {
|
||||
* states are created when there are nested control methods executing.
|
||||
*/
|
||||
struct acpi_thread_state {
|
||||
ACPI_STATE_COMMON struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
|
||||
ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync (nested acquire) level */
|
||||
struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
|
||||
union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
|
||||
u32 thread_id; /* Running thread ID */
|
||||
u8 current_sync_level; /* Mutex Sync (nested acquire) level */
|
||||
acpi_thread_id thread_id; /* Running thread ID */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -488,10 +506,9 @@ struct acpi_thread_state {
|
||||
* AML arguments
|
||||
*/
|
||||
struct acpi_result_values {
|
||||
ACPI_STATE_COMMON
|
||||
union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS];
|
||||
u8 num_results;
|
||||
ACPI_STATE_COMMON u8 num_results;
|
||||
u8 last_insert;
|
||||
union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS];
|
||||
};
|
||||
|
||||
typedef
|
||||
@@ -546,7 +563,7 @@ struct acpi_opcode_info {
|
||||
#endif
|
||||
u32 parse_args; /* Grammar/Parse time arguments */
|
||||
u32 runtime_args; /* Interpret time arguments */
|
||||
u32 flags; /* Misc flags */
|
||||
u16 flags; /* Misc flags */
|
||||
u8 object_type; /* Corresponding internal object type */
|
||||
u8 class; /* Opcode class */
|
||||
u8 type; /* Opcode type */
|
||||
@@ -563,29 +580,31 @@ union acpi_parse_value {
|
||||
};
|
||||
|
||||
#define ACPI_PARSE_COMMON \
|
||||
u8 data_type; /* To differentiate various internal objs */\
|
||||
u8 flags; /* Type of Op */\
|
||||
u16 aml_opcode; /* AML opcode */\
|
||||
u32 aml_offset; /* Offset of declaration in AML */\
|
||||
union acpi_parse_object *parent; /* Parent op */\
|
||||
union acpi_parse_object *next; /* Next op */\
|
||||
union acpi_parse_object *parent; /* Parent op */\
|
||||
u8 descriptor_type; /* To differentiate various internal objs */\
|
||||
u8 flags; /* Type of Op */\
|
||||
u16 aml_opcode; /* AML opcode */\
|
||||
u32 aml_offset; /* Offset of declaration in AML */\
|
||||
union acpi_parse_object *next; /* Next op */\
|
||||
struct acpi_namespace_node *node; /* For use by interpreter */\
|
||||
union acpi_parse_value value; /* Value or args associated with the opcode */\
|
||||
ACPI_DISASM_ONLY_MEMBERS (\
|
||||
u8 disasm_flags; /* Used during AML disassembly */\
|
||||
u8 disasm_opcode; /* Subtype used for disassembly */\
|
||||
char aml_op_name[16]) /* Op name (debug only) */\
|
||||
/* NON-DEBUG members below: */\
|
||||
struct acpi_namespace_node *node; /* For use by interpreter */\
|
||||
union acpi_parse_value value; /* Value or args associated with the opcode */
|
||||
u8 disasm_flags; /* Used during AML disassembly */\
|
||||
u8 disasm_opcode; /* Subtype used for disassembly */\
|
||||
char aml_op_name[16]) /* Op name (debug only) */
|
||||
|
||||
#define ACPI_DASM_BUFFER 0x00
|
||||
#define ACPI_DASM_RESOURCE 0x01
|
||||
#define ACPI_DASM_STRING 0x02
|
||||
#define ACPI_DASM_UNICODE 0x03
|
||||
#define ACPI_DASM_EISAID 0x04
|
||||
#define ACPI_DASM_MATCHOP 0x05
|
||||
#define ACPI_DASM_BUFFER 0x00
|
||||
#define ACPI_DASM_RESOURCE 0x01
|
||||
#define ACPI_DASM_STRING 0x02
|
||||
#define ACPI_DASM_UNICODE 0x03
|
||||
#define ACPI_DASM_EISAID 0x04
|
||||
#define ACPI_DASM_MATCHOP 0x05
|
||||
#define ACPI_DASM_LNOT_PREFIX 0x06
|
||||
#define ACPI_DASM_LNOT_SUFFIX 0x07
|
||||
#define ACPI_DASM_IGNORE 0x08
|
||||
|
||||
/*
|
||||
* generic operation (for example: If, While, Store)
|
||||
* Generic operation (for example: If, While, Store)
|
||||
*/
|
||||
struct acpi_parse_obj_common {
|
||||
ACPI_PARSE_COMMON};
|
||||
@@ -601,7 +620,7 @@ struct acpi_parse_obj_named {
|
||||
u32 name; /* 4-byte name or zero if no name */
|
||||
};
|
||||
|
||||
/* The parse node is the fundamental element of the parse tree */
|
||||
/* This version is used by the i_aSL compiler only */
|
||||
|
||||
#define ACPI_MAX_PARSEOP_NAME 20
|
||||
|
||||
@@ -643,7 +662,6 @@ union acpi_parse_object {
|
||||
* method.
|
||||
*/
|
||||
struct acpi_parse_state {
|
||||
u32 aml_size;
|
||||
u8 *aml_start; /* First AML byte */
|
||||
u8 *aml; /* Next AML byte */
|
||||
u8 *aml_end; /* (last + 1) AML byte */
|
||||
@@ -653,22 +671,23 @@ struct acpi_parse_state {
|
||||
struct acpi_namespace_node *start_node;
|
||||
union acpi_generic_state *scope; /* Current scope */
|
||||
union acpi_parse_object *start_scope;
|
||||
u32 aml_size;
|
||||
};
|
||||
|
||||
/* Parse object flags */
|
||||
|
||||
#define ACPI_PARSEOP_GENERIC 0x01
|
||||
#define ACPI_PARSEOP_NAMED 0x02
|
||||
#define ACPI_PARSEOP_DEFERRED 0x04
|
||||
#define ACPI_PARSEOP_BYTELIST 0x08
|
||||
#define ACPI_PARSEOP_IN_CACHE 0x80
|
||||
#define ACPI_PARSEOP_GENERIC 0x01
|
||||
#define ACPI_PARSEOP_NAMED 0x02
|
||||
#define ACPI_PARSEOP_DEFERRED 0x04
|
||||
#define ACPI_PARSEOP_BYTELIST 0x08
|
||||
#define ACPI_PARSEOP_IN_CACHE 0x80
|
||||
|
||||
/* Parse object disasm_flags */
|
||||
|
||||
#define ACPI_PARSEOP_IGNORE 0x01
|
||||
#define ACPI_PARSEOP_PARAMLIST 0x02
|
||||
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
|
||||
#define ACPI_PARSEOP_SPECIAL 0x10
|
||||
#define ACPI_PARSEOP_IGNORE 0x01
|
||||
#define ACPI_PARSEOP_PARAMLIST 0x02
|
||||
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
|
||||
#define ACPI_PARSEOP_SPECIAL 0x10
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -676,8 +695,8 @@ struct acpi_parse_state {
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define PCI_ROOT_HID_STRING "PNP0A03"
|
||||
#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08"
|
||||
#define PCI_ROOT_HID_STRING "PNP0A03"
|
||||
#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08"
|
||||
|
||||
struct acpi_bit_register_info {
|
||||
u8 parent_register;
|
||||
@@ -710,13 +729,14 @@ struct acpi_bit_register_info {
|
||||
#define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */
|
||||
#define ACPI_BITMASK_WAKE_STATUS 0x8000
|
||||
|
||||
#define ACPI_BITMASK_ALL_FIXED_STATUS (ACPI_BITMASK_TIMER_STATUS | \
|
||||
ACPI_BITMASK_BUS_MASTER_STATUS | \
|
||||
ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
|
||||
ACPI_BITMASK_POWER_BUTTON_STATUS | \
|
||||
ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
|
||||
ACPI_BITMASK_RT_CLOCK_STATUS | \
|
||||
ACPI_BITMASK_WAKE_STATUS)
|
||||
#define ACPI_BITMASK_ALL_FIXED_STATUS (\
|
||||
ACPI_BITMASK_TIMER_STATUS | \
|
||||
ACPI_BITMASK_BUS_MASTER_STATUS | \
|
||||
ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
|
||||
ACPI_BITMASK_POWER_BUTTON_STATUS | \
|
||||
ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
|
||||
ACPI_BITMASK_RT_CLOCK_STATUS | \
|
||||
ACPI_BITMASK_WAKE_STATUS)
|
||||
|
||||
#define ACPI_BITMASK_TIMER_ENABLE 0x0001
|
||||
#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020
|
||||
@@ -820,7 +840,7 @@ struct acpi_bit_register_info {
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define ACPI_ASCII_ZERO 0x30
|
||||
#define ACPI_ASCII_ZERO 0x30
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -842,9 +862,9 @@ struct acpi_integrity_info {
|
||||
u32 objects;
|
||||
};
|
||||
|
||||
#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
|
||||
#define ACPI_DB_CONSOLE_OUTPUT 0x02
|
||||
#define ACPI_DB_DUPLICATE_OUTPUT 0x03
|
||||
#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
|
||||
#define ACPI_DB_CONSOLE_OUTPUT 0x02
|
||||
#define ACPI_DB_DUPLICATE_OUTPUT 0x03
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -854,18 +874,18 @@ struct acpi_integrity_info {
|
||||
|
||||
/* Entry for a memory allocation (debug only) */
|
||||
|
||||
#define ACPI_MEM_MALLOC 0
|
||||
#define ACPI_MEM_CALLOC 1
|
||||
#define ACPI_MAX_MODULE_NAME 16
|
||||
#define ACPI_MEM_MALLOC 0
|
||||
#define ACPI_MEM_CALLOC 1
|
||||
#define ACPI_MAX_MODULE_NAME 16
|
||||
|
||||
#define ACPI_COMMON_DEBUG_MEM_HEADER \
|
||||
struct acpi_debug_mem_block *previous; \
|
||||
struct acpi_debug_mem_block *next; \
|
||||
u32 size; \
|
||||
u32 component; \
|
||||
u32 line; \
|
||||
char module[ACPI_MAX_MODULE_NAME]; \
|
||||
u8 alloc_type;
|
||||
struct acpi_debug_mem_block *previous; \
|
||||
struct acpi_debug_mem_block *next; \
|
||||
u32 size; \
|
||||
u32 component; \
|
||||
u32 line; \
|
||||
char module[ACPI_MAX_MODULE_NAME]; \
|
||||
u8 alloc_type;
|
||||
|
||||
struct acpi_debug_mem_header {
|
||||
ACPI_COMMON_DEBUG_MEM_HEADER};
|
||||
|
||||
+47
-34
@@ -56,6 +56,10 @@
|
||||
#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))
|
||||
#define ACPI_MIN(a,b) (((a)<(b))?(a):(b))
|
||||
|
||||
/* Size calculation */
|
||||
|
||||
#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
|
||||
/*
|
||||
@@ -99,7 +103,7 @@
|
||||
* printf() format helpers
|
||||
*/
|
||||
|
||||
/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
|
||||
/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */
|
||||
|
||||
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i)
|
||||
|
||||
@@ -130,7 +134,6 @@
|
||||
#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i)
|
||||
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
|
||||
#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
|
||||
#define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f)
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 16
|
||||
#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s)
|
||||
@@ -141,6 +144,12 @@
|
||||
#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
|
||||
#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b)))
|
||||
#else
|
||||
#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macros for moving data around to/from buffers that are possibly unaligned.
|
||||
* If the hardware supports the transfer of unaligned data, just do the store.
|
||||
@@ -341,29 +350,33 @@
|
||||
/*
|
||||
* Rounding macros (Power of two boundaries only)
|
||||
*/
|
||||
#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \
|
||||
#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \
|
||||
(~(((acpi_native_uint) boundary)-1)))
|
||||
|
||||
#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \
|
||||
#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \
|
||||
(((acpi_native_uint) boundary)-1)) & \
|
||||
(~(((acpi_native_uint) boundary)-1)))
|
||||
|
||||
#define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4)
|
||||
#define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8)
|
||||
#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,ALIGNED_ADDRESS_BOUNDARY)
|
||||
/* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */
|
||||
|
||||
#define ACPI_ROUND_UP_to_32_bITS(a) ACPI_ROUND_UP(a,4)
|
||||
#define ACPI_ROUND_UP_to_64_bITS(a) ACPI_ROUND_UP(a,8)
|
||||
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY)
|
||||
#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4)
|
||||
#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8)
|
||||
#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint))
|
||||
|
||||
#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
|
||||
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
|
||||
#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4)
|
||||
#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8)
|
||||
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_native_uint))
|
||||
|
||||
#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10)
|
||||
#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
|
||||
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
|
||||
|
||||
#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10)
|
||||
|
||||
/* Generic (non-power-of-two) rounding */
|
||||
|
||||
#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary))
|
||||
#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary))
|
||||
|
||||
#define ACPI_IS_MISALIGNED(value) (((acpi_native_uint)value) & (sizeof(acpi_native_uint)-1))
|
||||
|
||||
/*
|
||||
* Bitmask creation
|
||||
@@ -371,10 +384,10 @@
|
||||
* MASK_BITS_ABOVE creates a mask starting AT the position and above
|
||||
* MASK_BITS_BELOW creates a mask starting one bit BELOW the position
|
||||
*/
|
||||
#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position))))
|
||||
#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position)))
|
||||
#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position))))
|
||||
#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position)))
|
||||
|
||||
#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
|
||||
#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
|
||||
|
||||
/* Bitfields within ACPI registers */
|
||||
|
||||
@@ -396,8 +409,8 @@
|
||||
*
|
||||
* The "Descriptor" field is the first field in both structures.
|
||||
*/
|
||||
#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->descriptor_id)
|
||||
#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->descriptor_id = t)
|
||||
#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
|
||||
#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)
|
||||
|
||||
/* Macro to test the object type */
|
||||
|
||||
@@ -486,7 +499,6 @@
|
||||
#define ACPI_ERROR(plist)
|
||||
#define ACPI_ERROR_NAMESPACE(s,e)
|
||||
#define ACPI_ERROR_METHOD(s,n,p,e)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -514,12 +526,12 @@
|
||||
#define ACPI_GET_FUNCTION_NAME _acpi_function_name
|
||||
/*
|
||||
* The Name parameter should be the procedure name as a quoted string.
|
||||
* This is declared as a local string ("my_function_name") so that it can
|
||||
* This is declared as a local string ("MyFunctionName") so that it can
|
||||
* be also used by the function exit macros below.
|
||||
* Note: (const char) is used to be compatible with the debug interfaces
|
||||
* and macros such as __FUNCTION__.
|
||||
*/
|
||||
#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = name;
|
||||
#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = #name;
|
||||
|
||||
#else
|
||||
/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
|
||||
@@ -528,13 +540,13 @@
|
||||
#endif
|
||||
|
||||
#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
|
||||
acpi_ut_trace(ACPI_DEBUG_PARAMETERS)
|
||||
acpi_ut_trace(ACPI_DEBUG_PARAMETERS)
|
||||
#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \
|
||||
acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b)
|
||||
acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b)
|
||||
#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \
|
||||
acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS,(u32)b)
|
||||
acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS,(u32)b)
|
||||
#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \
|
||||
acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS,(char *)b)
|
||||
acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS,(char *)b)
|
||||
|
||||
#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr()
|
||||
|
||||
@@ -543,7 +555,7 @@
|
||||
* WARNING: These macros include a return statement. This is usually considered
|
||||
* bad form, but having a separate exit macro is very ugly and difficult to maintain.
|
||||
* One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
|
||||
* so that "_acpi_function_name" is defined.
|
||||
* so that "_AcpiFunctionName" is defined.
|
||||
*
|
||||
* Note: the DO_WHILE0 macro is used to prevent some compilers from complaining
|
||||
* about these constructs.
|
||||
@@ -654,6 +666,7 @@
|
||||
#define ACPI_DUMP_STACK_ENTRY(a)
|
||||
#define ACPI_DUMP_OPERANDS(a,b,c,d,e)
|
||||
#define ACPI_DUMP_ENTRY(a,b)
|
||||
#define ACPI_DUMP_TABLES(a,b)
|
||||
#define ACPI_DUMP_PATHNAME(a,b,c,d)
|
||||
#define ACPI_DUMP_RESOURCE_LIST(a)
|
||||
#define ACPI_DUMP_BUFFER(a,b)
|
||||
@@ -709,19 +722,19 @@
|
||||
|
||||
/* Memory allocation */
|
||||
|
||||
#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_MEM_FREE(a) acpi_os_free(a)
|
||||
#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_FREE(a) acpi_os_free(a)
|
||||
#define ACPI_MEM_TRACKING(a)
|
||||
|
||||
#else
|
||||
|
||||
/* Memory allocation */
|
||||
|
||||
#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_MEM_TRACKING(a) a
|
||||
#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__)
|
||||
#define ACPI_MEM_TRACKING(a) a
|
||||
|
||||
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
|
||||
|
||||
|
||||
+14
-14
@@ -63,6 +63,8 @@
|
||||
#define ACPI_NS_DONT_OPEN_SCOPE 0x02
|
||||
#define ACPI_NS_NO_PEER_SEARCH 0x04
|
||||
#define ACPI_NS_ERROR_IF_FOUND 0x08
|
||||
#define ACPI_NS_PREFIX_IS_SCOPE 0x10
|
||||
#define ACPI_NS_EXTERNAL 0x20
|
||||
|
||||
#define ACPI_NS_WALK_UNLOCK TRUE
|
||||
#define ACPI_NS_WALK_NO_UNLOCK FALSE
|
||||
@@ -171,19 +173,17 @@ acpi_ns_dump_objects(acpi_object_type type,
|
||||
/*
|
||||
* nseval - Namespace evaluation functions
|
||||
*/
|
||||
acpi_status acpi_ns_evaluate_by_handle(struct acpi_parameter_info *info);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info);
|
||||
acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
|
||||
|
||||
/*
|
||||
* nsnames - Name and Scope manipulation
|
||||
*/
|
||||
u32 acpi_ns_opens_scope(acpi_object_type type);
|
||||
|
||||
void
|
||||
acpi_ns_build_external_path(struct acpi_namespace_node *node,
|
||||
acpi_size size, char *name_buffer);
|
||||
|
||||
char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
|
||||
|
||||
char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
|
||||
@@ -196,9 +196,9 @@ u8
|
||||
acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_get_node_by_path(char *external_pathname,
|
||||
struct acpi_namespace_node *in_prefix_node,
|
||||
u32 flags, struct acpi_namespace_node **out_node);
|
||||
acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
|
||||
char *external_pathname,
|
||||
u32 flags, struct acpi_namespace_node **out_node);
|
||||
|
||||
acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
|
||||
|
||||
@@ -241,10 +241,10 @@ acpi_ns_search_and_enter(u32 entry_name,
|
||||
u32 flags, struct acpi_namespace_node **ret_node);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_search_node(u32 entry_name,
|
||||
struct acpi_namespace_node *node,
|
||||
acpi_object_type type,
|
||||
struct acpi_namespace_node **ret_node);
|
||||
acpi_ns_search_one_scope(u32 entry_name,
|
||||
struct acpi_namespace_node *node,
|
||||
acpi_object_type type,
|
||||
struct acpi_namespace_node **ret_node);
|
||||
|
||||
void
|
||||
acpi_ns_install_node(struct acpi_walk_state *walk_state,
|
||||
|
||||
+97
-89
@@ -1,7 +1,7 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
|
||||
* Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -45,10 +45,12 @@
|
||||
#ifndef _ACOBJECT_H
|
||||
#define _ACOBJECT_H
|
||||
|
||||
/* acpisrc:struct_defs -- for acpisrc conversion */
|
||||
|
||||
/*
|
||||
* The union acpi_operand_object is used to pass AML operands from the dispatcher
|
||||
* The union acpi_operand_object is used to pass AML operands from the dispatcher
|
||||
* to the interpreter, and to keep track of the various handlers such as
|
||||
* address space handlers and notify handlers. The object is a constant
|
||||
* address space handlers and notify handlers. The object is a constant
|
||||
* size in order to allow it to be cached and reused.
|
||||
*/
|
||||
|
||||
@@ -61,17 +63,25 @@
|
||||
/*
|
||||
* Common area for all objects.
|
||||
*
|
||||
* data_type is used to differentiate between internal descriptors, and MUST
|
||||
* be the first byte in this structure.
|
||||
* descriptor_type is used to differentiate between internal descriptors, and
|
||||
* must be in the same place across all descriptors
|
||||
*
|
||||
* Note: The descriptor_type and Type fields must appear in the identical
|
||||
* position in both the struct acpi_namespace_node and union acpi_operand_object
|
||||
* structures.
|
||||
*/
|
||||
#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
|
||||
u8 descriptor; /* To differentiate various internal objs */\
|
||||
u8 type; /* acpi_object_type */\
|
||||
u16 reference_count; /* For object deletion management */\
|
||||
union acpi_operand_object *next_object; /* Objects linked to parent NS node */\
|
||||
u8 flags;
|
||||
#define ACPI_OBJECT_COMMON_HEADER \
|
||||
union acpi_operand_object *next_object; /* Objects linked to parent NS node */\
|
||||
u8 descriptor_type; /* To differentiate various internal objs */\
|
||||
u8 type; /* acpi_object_type */\
|
||||
u16 reference_count; /* For object deletion management */\
|
||||
u8 flags;
|
||||
/*
|
||||
* Note: There are 3 bytes available here before the
|
||||
* next natural alignment boundary (for both 32/64 cases)
|
||||
*/
|
||||
|
||||
/* Values for flag byte above */
|
||||
/* Values for Flag byte above */
|
||||
|
||||
#define AOPOBJ_AML_CONSTANT 0x01
|
||||
#define AOPOBJ_STATIC_POINTER 0x02
|
||||
@@ -79,36 +89,7 @@
|
||||
#define AOPOBJ_OBJECT_INITIALIZED 0x08
|
||||
#define AOPOBJ_SETUP_COMPLETE 0x10
|
||||
#define AOPOBJ_SINGLE_DATUM 0x20
|
||||
|
||||
/*
|
||||
* Common bitfield for the field objects
|
||||
* "Field Datum" -- a datum from the actual field object
|
||||
* "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
|
||||
*/
|
||||
#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
|
||||
u8 field_flags; /* Access, update, and lock bits */\
|
||||
u8 attribute; /* From access_as keyword */\
|
||||
u8 access_byte_width; /* Read/Write size in bytes */\
|
||||
u32 bit_length; /* Length of field in bits */\
|
||||
u32 base_byte_offset; /* Byte offset within containing object */\
|
||||
u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
|
||||
u8 access_bit_width; /* Read/Write size in bits (8-64) */\
|
||||
u32 value; /* Value to store into the Bank or Index register */\
|
||||
struct acpi_namespace_node *node; /* Link back to parent node */
|
||||
|
||||
/*
|
||||
* Fields common to both Strings and Buffers
|
||||
*/
|
||||
#define ACPI_COMMON_BUFFER_INFO \
|
||||
u32 length;
|
||||
|
||||
/*
|
||||
* Common fields for objects that support ASL notifications
|
||||
*/
|
||||
#define ACPI_COMMON_NOTIFY_INFO \
|
||||
union acpi_operand_object *system_notify; /* Handler for system notifies */\
|
||||
union acpi_operand_object *device_notify; /* Handler for driver notifies */\
|
||||
union acpi_operand_object *handler; /* Handler for Address space */
|
||||
#define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an op_region address */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
@@ -125,25 +106,31 @@ struct acpi_object_integer {
|
||||
|
||||
/*
|
||||
* Note: The String and Buffer object must be identical through the Pointer
|
||||
* element. There is code that depends on this.
|
||||
* and length elements. There is code that depends on this.
|
||||
*
|
||||
* Fields common to both Strings and Buffers
|
||||
*/
|
||||
#define ACPI_COMMON_BUFFER_INFO(_type) \
|
||||
_type *pointer; \
|
||||
u32 length;
|
||||
|
||||
struct acpi_object_string { /* Null terminated, ASCII characters only */
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO char *pointer; /* String in AML stream or allocated string */
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */
|
||||
};
|
||||
|
||||
struct acpi_object_buffer {
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO u8 * pointer; /* Buffer in AML stream or allocated buffer */
|
||||
struct acpi_namespace_node *node; /* Link back to parent node */
|
||||
u8 *aml_start;
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8) /* Buffer in AML stream or allocated buffer */
|
||||
u32 aml_length;
|
||||
u8 *aml_start;
|
||||
struct acpi_namespace_node *node; /* Link back to parent node */
|
||||
};
|
||||
|
||||
struct acpi_object_package {
|
||||
ACPI_OBJECT_COMMON_HEADER u32 count; /* # of elements in package */
|
||||
u32 aml_length;
|
||||
u8 *aml_start;
|
||||
struct acpi_namespace_node *node; /* Link back to parent node */
|
||||
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Link back to parent node */
|
||||
union acpi_operand_object **elements; /* Array of pointers to acpi_objects */
|
||||
u8 *aml_start;
|
||||
u32 aml_length;
|
||||
u32 count; /* # of elements in package */
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
@@ -156,23 +143,6 @@ struct acpi_object_event {
|
||||
ACPI_OBJECT_COMMON_HEADER void *semaphore;
|
||||
};
|
||||
|
||||
#define ACPI_INFINITE_CONCURRENCY 0xFF
|
||||
|
||||
typedef
|
||||
acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
|
||||
|
||||
struct acpi_object_method {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 method_flags;
|
||||
u8 param_count;
|
||||
u32 aml_length;
|
||||
void *semaphore;
|
||||
u8 *aml_start;
|
||||
ACPI_INTERNAL_METHOD implementation;
|
||||
u8 concurrency;
|
||||
u8 thread_count;
|
||||
acpi_owner_id owner_id;
|
||||
};
|
||||
|
||||
struct acpi_object_mutex {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */
|
||||
u16 acquisition_depth; /* Allow multiple Acquires, same thread */
|
||||
@@ -186,11 +156,23 @@ struct acpi_object_mutex {
|
||||
|
||||
struct acpi_object_region {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 space_id;
|
||||
union acpi_operand_object *handler; /* Handler for region access */
|
||||
struct acpi_namespace_node *node; /* Containing namespace node */
|
||||
union acpi_operand_object *handler; /* Handler for region access */
|
||||
union acpi_operand_object *next;
|
||||
u32 length;
|
||||
acpi_physical_address address;
|
||||
u32 length;
|
||||
};
|
||||
|
||||
struct acpi_object_method {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 method_flags;
|
||||
u8 param_count;
|
||||
u8 concurrency;
|
||||
void *semaphore;
|
||||
u8 *aml_start;
|
||||
ACPI_INTERNAL_METHOD implementation;
|
||||
u32 aml_length;
|
||||
u8 thread_count;
|
||||
acpi_owner_id owner_id;
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
@@ -199,6 +181,14 @@ struct acpi_object_region {
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Common fields for objects that support ASL notifications
|
||||
*/
|
||||
#define ACPI_COMMON_NOTIFY_INFO \
|
||||
union acpi_operand_object *system_notify; /* Handler for system notifies */\
|
||||
union acpi_operand_object *device_notify; /* Handler for driver notifies */\
|
||||
union acpi_operand_object *handler; /* Handler for Address space */
|
||||
|
||||
struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
|
||||
|
||||
@@ -213,9 +203,9 @@ struct acpi_object_power_resource {
|
||||
};
|
||||
|
||||
struct acpi_object_processor {
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 proc_id;
|
||||
u32 length;
|
||||
acpi_io_address address;
|
||||
ACPI_OBJECT_COMMON_HEADER u8 proc_id;
|
||||
u8 length;
|
||||
ACPI_COMMON_NOTIFY_INFO acpi_io_address address;
|
||||
};
|
||||
|
||||
struct acpi_object_thermal_zone {
|
||||
@@ -227,9 +217,24 @@ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Common bitfield for the field objects
|
||||
* "Field Datum" -- a datum from the actual field object
|
||||
* "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
|
||||
*/
|
||||
#define ACPI_COMMON_FIELD_INFO \
|
||||
u8 field_flags; /* Access, update, and lock bits */\
|
||||
u8 attribute; /* From access_as keyword */\
|
||||
u8 access_byte_width; /* Read/Write size in bytes */\
|
||||
struct acpi_namespace_node *node; /* Link back to parent node */\
|
||||
u32 bit_length; /* Length of field in bits */\
|
||||
u32 base_byte_offset; /* Byte offset within containing object */\
|
||||
u32 value; /* Value to store into the Bank or Index register */\
|
||||
u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
|
||||
u8 access_bit_width; /* Read/Write size in bits (8-64) */
|
||||
|
||||
struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing Operation Region object */
|
||||
/* (REGION/BANK fields only) */
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */
|
||||
};
|
||||
|
||||
struct acpi_object_region_field {
|
||||
@@ -244,7 +249,7 @@ struct acpi_object_bank_field {
|
||||
struct acpi_object_index_field {
|
||||
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO
|
||||
/*
|
||||
* No "region_obj" pointer needed since the Index and Data registers
|
||||
* No "RegionObj" pointer needed since the Index and Data registers
|
||||
* are each field definitions unto themselves.
|
||||
*/
|
||||
union acpi_operand_object *index_obj; /* Index register */
|
||||
@@ -269,13 +274,9 @@ struct acpi_object_notify_handler {
|
||||
void *context;
|
||||
};
|
||||
|
||||
/* Flags for address handler */
|
||||
|
||||
#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1
|
||||
|
||||
struct acpi_object_addr_handler {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 space_id;
|
||||
u16 hflags;
|
||||
u8 handler_flags;
|
||||
acpi_adr_space_handler handler;
|
||||
struct acpi_namespace_node *node; /* Parent device */
|
||||
void *context;
|
||||
@@ -284,6 +285,10 @@ struct acpi_object_addr_handler {
|
||||
union acpi_operand_object *next;
|
||||
};
|
||||
|
||||
/* Flags for address handler (handler_flags) */
|
||||
|
||||
#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Special internal objects
|
||||
@@ -297,10 +302,10 @@ struct acpi_object_addr_handler {
|
||||
struct acpi_object_reference {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 target_type; /* Used for index_op */
|
||||
u16 opcode;
|
||||
u32 offset; /* Used for arg_op, local_op, and index_op */
|
||||
void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
|
||||
void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
|
||||
struct acpi_namespace_node *node;
|
||||
union acpi_operand_object **where;
|
||||
u32 offset; /* Used for arg_op, local_op, and index_op */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -311,12 +316,10 @@ struct acpi_object_reference {
|
||||
* Currently: Region and field_unit types
|
||||
*/
|
||||
struct acpi_object_extra {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 byte_fill1;
|
||||
u16 word_fill1;
|
||||
u32 aml_length;
|
||||
u8 *aml_start;
|
||||
struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
|
||||
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
|
||||
void *region_context; /* Region-specific data */
|
||||
u8 *aml_start;
|
||||
u32 aml_length;
|
||||
};
|
||||
|
||||
/* Additional data that can be attached to namespace nodes */
|
||||
@@ -391,8 +394,13 @@ union acpi_operand_object {
|
||||
#define ACPI_DESC_TYPE_NAMED 0x0F
|
||||
#define ACPI_DESC_TYPE_MAX 0x0F
|
||||
|
||||
struct acpi_common_descriptor {
|
||||
void *common_pointer;
|
||||
u8 descriptor_type; /* To differentiate various internal objs */
|
||||
};
|
||||
|
||||
union acpi_descriptor {
|
||||
u8 descriptor_id; /* To differentiate various internal objs */
|
||||
struct acpi_common_descriptor common;
|
||||
union acpi_operand_object object;
|
||||
struct acpi_namespace_node node;
|
||||
union acpi_parse_object op;
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
|
||||
#define ARGP_CONTINUE_OP ARG_NONE
|
||||
#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME)
|
||||
#define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME)
|
||||
#define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_CREATE_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
#define ARGP_CREATE_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
* component basis and a per-exception-type basis.
|
||||
*/
|
||||
|
||||
/* Component IDs are used in the global "debug_layer" */
|
||||
/* Component IDs are used in the global "DebugLayer" */
|
||||
|
||||
#define ACPI_UTILITIES 0x00000001
|
||||
#define ACPI_HARDWARE 0x00000002
|
||||
@@ -121,7 +121,7 @@
|
||||
#define ACPI_LV_INTERRUPTS 0x08000000
|
||||
#define ACPI_LV_VERBOSITY3 0x0F000000 | ACPI_LV_VERBOSITY2
|
||||
|
||||
/* Exceptionally verbose output -- also used in the global "debug_level" */
|
||||
/* Exceptionally verbose output -- also used in the global "DebugLevel" */
|
||||
|
||||
#define ACPI_LV_AML_DISASSEMBLE 0x10000000
|
||||
#define ACPI_LV_VERBOSE_INFO 0x20000000
|
||||
@@ -135,7 +135,7 @@
|
||||
*/
|
||||
#define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS
|
||||
|
||||
/* Exception level -- used in the global "debug_level" */
|
||||
/* Exception level -- used in the global "DebugLevel" */
|
||||
|
||||
#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
|
||||
#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
|
||||
@@ -144,13 +144,13 @@
|
||||
|
||||
/*
|
||||
* These two levels are essentially obsolete, all instances in the
|
||||
* ACPICA core code have been replaced by REPORT_ERROR and REPORT_WARNING
|
||||
* ACPICA core code have been replaced by ACPI_ERROR and ACPI_WARNING
|
||||
* (Kept here because some drivers may still use them)
|
||||
*/
|
||||
#define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR)
|
||||
#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
|
||||
|
||||
/* Trace level -- also used in the global "debug_level" */
|
||||
/* Trace level -- also used in the global "DebugLevel" */
|
||||
|
||||
#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
|
||||
#define ACPI_DB_THREADS ACPI_DEBUG_LEVEL (ACPI_LV_THREADS)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
#define OP_HAS_RETURN_VALUE 1
|
||||
|
||||
/* variable # arguments */
|
||||
/* Variable number of arguments. This field must be 32 bits */
|
||||
|
||||
#define ACPI_VAR_ARGS ACPI_UINT32_MAX
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
/*
|
||||
* psxface - Parser external interfaces
|
||||
*/
|
||||
acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info);
|
||||
acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info);
|
||||
|
||||
/*
|
||||
* psargs - Parse AML opcode arguments
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef __ACPI_BUS_H__
|
||||
#define __ACPI_BUS_H__
|
||||
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
#include <acpi/acpi.h>
|
||||
|
||||
@@ -59,7 +59,7 @@ acpi_evaluate_reference(acpi_handle handle,
|
||||
|
||||
#define ACPI_BUS_FILE_ROOT "acpi"
|
||||
extern struct proc_dir_entry *acpi_root_dir;
|
||||
extern FADT_DESCRIPTOR acpi_fadt;
|
||||
extern struct fadt_descriptor acpi_fadt;
|
||||
|
||||
enum acpi_bus_removal_type {
|
||||
ACPI_BUS_REMOVAL_NORMAL = 0,
|
||||
@@ -169,7 +169,8 @@ struct acpi_device_flags {
|
||||
u32 power_manageable:1;
|
||||
u32 performance_manageable:1;
|
||||
u32 wake_capable:1; /* Wakeup(_PRW) supported? */
|
||||
u32 reserved:20;
|
||||
u32 force_power_state:1;
|
||||
u32 reserved:19;
|
||||
};
|
||||
|
||||
/* File System */
|
||||
@@ -296,6 +297,7 @@ struct acpi_device {
|
||||
struct acpi_driver *driver;
|
||||
void *driver_data;
|
||||
struct kobject kobj;
|
||||
struct device dev;
|
||||
};
|
||||
|
||||
#define acpi_driver_data(d) ((d)->driver_data)
|
||||
@@ -327,7 +329,7 @@ int acpi_bus_set_power(acpi_handle handle, int state);
|
||||
int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data);
|
||||
int acpi_bus_receive_event(struct acpi_bus_event *event);
|
||||
int acpi_bus_register_driver(struct acpi_driver *driver);
|
||||
int acpi_bus_unregister_driver(struct acpi_driver *driver);
|
||||
void acpi_bus_unregister_driver(struct acpi_driver *driver);
|
||||
int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
|
||||
acpi_handle handle, int type);
|
||||
int acpi_bus_trim(struct acpi_device *start, int rmdevice);
|
||||
|
||||
+18
-17
@@ -50,12 +50,16 @@
|
||||
#include "platform/acenv.h"
|
||||
#include "actypes.h"
|
||||
|
||||
/* Priorities for acpi_os_queue_for_execution */
|
||||
/* Types for acpi_os_execute */
|
||||
|
||||
#define OSD_PRIORITY_GPE 1
|
||||
#define OSD_PRIORITY_HIGH 2
|
||||
#define OSD_PRIORITY_MED 3
|
||||
#define OSD_PRIORITY_LO 4
|
||||
typedef enum {
|
||||
OSL_GLOBAL_LOCK_HANDLER,
|
||||
OSL_NOTIFY_HANDLER,
|
||||
OSL_GPE_HANDLER,
|
||||
OSL_DEBUGGER_THREAD,
|
||||
OSL_EC_POLL_HANDLER,
|
||||
OSL_EC_BURST_HANDLER
|
||||
} acpi_execute_type;
|
||||
|
||||
#define ACPI_NO_UNIT_LIMIT ((u32) -1)
|
||||
#define ACPI_MUTEX_SEM 1
|
||||
@@ -161,13 +165,11 @@ acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
|
||||
/*
|
||||
* Threads and Scheduling
|
||||
*/
|
||||
u32 acpi_os_get_thread_id(void);
|
||||
acpi_thread_id acpi_os_get_thread_id(void);
|
||||
|
||||
acpi_status
|
||||
acpi_os_queue_for_execution(u32 priority,
|
||||
acpi_osd_exec_callback function, void *context);
|
||||
|
||||
void acpi_os_wait_events_complete(void *context);
|
||||
acpi_os_execute(acpi_execute_type type,
|
||||
acpi_osd_exec_callback function, void *context);
|
||||
|
||||
void acpi_os_wait_events_complete(void *context);
|
||||
|
||||
@@ -214,6 +216,12 @@ acpi_os_derive_pci_id(acpi_handle rhandle,
|
||||
/*
|
||||
* Miscellaneous
|
||||
*/
|
||||
acpi_status acpi_os_validate_interface(char *interface);
|
||||
|
||||
acpi_status
|
||||
acpi_os_validate_address(u8 space_id,
|
||||
acpi_physical_address address, acpi_size length);
|
||||
|
||||
u8 acpi_os_readable(void *pointer, acpi_size length);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
@@ -255,11 +263,4 @@ char *acpi_os_get_next_filename(void *dir_handle);
|
||||
|
||||
void acpi_os_close_directory(void *dir_handle);
|
||||
|
||||
/*
|
||||
* Debug
|
||||
*/
|
||||
void
|
||||
acpi_os_dbg_assert(void *failed_assertion,
|
||||
void *file_name, u32 line_number, char *message);
|
||||
|
||||
#endif /* __ACPIOSXF_H__ */
|
||||
|
||||
@@ -268,7 +268,7 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device);
|
||||
* Resource interfaces
|
||||
*/
|
||||
typedef
|
||||
acpi_status(*ACPI_WALK_RESOURCE_CALLBACK) (struct acpi_resource * resource,
|
||||
acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
@@ -290,7 +290,7 @@ acpi_get_possible_resources(acpi_handle device_handle,
|
||||
acpi_status
|
||||
acpi_walk_resources(acpi_handle device_handle,
|
||||
char *name,
|
||||
ACPI_WALK_RESOURCE_CALLBACK user_function, void *context);
|
||||
acpi_walk_resource_callback user_function, void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_set_current_resources(acpi_handle device_handle,
|
||||
|
||||
+13
-9
@@ -164,23 +164,26 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
|
||||
/*
|
||||
* rsutils
|
||||
*/
|
||||
acpi_status
|
||||
acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer);
|
||||
acpi_rs_get_prt_method_data(struct acpi_namespace_node *node,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer);
|
||||
#endif /* ACPI_FUTURE_USAGE */
|
||||
acpi_rs_get_crs_method_data(struct acpi_namespace_node *node,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_rs_get_prs_method_data(struct acpi_namespace_node *node,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_rs_get_method_data(acpi_handle handle,
|
||||
char *path, struct acpi_buffer *ret_buffer);
|
||||
|
||||
acpi_status
|
||||
acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer);
|
||||
acpi_rs_set_srs_method_data(struct acpi_namespace_node *node,
|
||||
struct acpi_buffer *ret_buffer);
|
||||
|
||||
/*
|
||||
* rscalc
|
||||
@@ -198,8 +201,9 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
|
||||
acpi_size * buffer_size_needed);
|
||||
|
||||
acpi_status
|
||||
acpi_rs_convert_aml_to_resources(u8 * aml_buffer,
|
||||
u32 aml_buffer_length, u8 * output_buffer);
|
||||
acpi_rs_convert_aml_to_resources(u8 * aml,
|
||||
u32 length,
|
||||
u32 offset, u8 resource_index, void **context);
|
||||
|
||||
acpi_status
|
||||
acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
|
||||
|
||||
+71
-50
@@ -44,6 +44,8 @@
|
||||
#ifndef __ACSTRUCT_H__
|
||||
#define __ACSTRUCT_H__
|
||||
|
||||
/* acpisrc:struct_defs -- for acpisrc conversion */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Tree walking typedefs and structs
|
||||
@@ -51,67 +53,76 @@
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Walk state - current state of a parse tree walk. Used for both a leisurely stroll through
|
||||
* the tree (for whatever reason), and for control method execution.
|
||||
* Walk state - current state of a parse tree walk. Used for both a leisurely
|
||||
* stroll through the tree (for whatever reason), and for control method
|
||||
* execution.
|
||||
*/
|
||||
#define ACPI_NEXT_OP_DOWNWARD 1
|
||||
#define ACPI_NEXT_OP_UPWARD 2
|
||||
|
||||
/*
|
||||
* Groups of definitions for walk_type used for different implementations of
|
||||
* walkers (never simultaneously) - flags for interpreter:
|
||||
*/
|
||||
#define ACPI_WALK_NON_METHOD 0
|
||||
#define ACPI_WALK_METHOD 1
|
||||
#define ACPI_WALK_METHOD_RESTART 2
|
||||
#define ACPI_WALK_CONST_REQUIRED 3
|
||||
#define ACPI_WALK_CONST_OPTIONAL 4
|
||||
#define ACPI_WALK_METHOD 0x01
|
||||
#define ACPI_WALK_METHOD_RESTART 0x02
|
||||
|
||||
/* Flags for i_aSL compiler only */
|
||||
|
||||
#define ACPI_WALK_CONST_REQUIRED 0x10
|
||||
#define ACPI_WALK_CONST_OPTIONAL 0x20
|
||||
|
||||
struct acpi_walk_state {
|
||||
u8 data_type; /* To differentiate various internal objs MUST BE FIRST! */
|
||||
struct acpi_walk_state *next; /* Next walk_state in list */
|
||||
u8 descriptor_type; /* To differentiate various internal objs */
|
||||
u8 walk_type;
|
||||
acpi_owner_id owner_id; /* Owner of objects created during the walk */
|
||||
u8 last_predicate; /* Result of last predicate */
|
||||
u8 current_result; /* */
|
||||
u16 opcode; /* Current AML opcode */
|
||||
u8 next_op_info; /* Info about next_op */
|
||||
u8 num_operands; /* Stack pointer for Operands[] array */
|
||||
acpi_owner_id owner_id; /* Owner of objects created during the walk */
|
||||
u8 last_predicate; /* Result of last predicate */
|
||||
u8 current_result;
|
||||
u8 return_used;
|
||||
u16 opcode; /* Current AML opcode */
|
||||
u8 scope_depth;
|
||||
u8 pass_number; /* Parse pass during table load */
|
||||
u32 arg_count; /* push for fixed or var args */
|
||||
u32 aml_offset;
|
||||
u32 arg_types;
|
||||
u32 method_breakpoint; /* For single stepping */
|
||||
u32 user_breakpoint; /* User AML breakpoint */
|
||||
u32 parse_flags;
|
||||
|
||||
struct acpi_parse_state parser_state; /* Current state of parser */
|
||||
u32 prev_arg_types;
|
||||
u32 arg_count; /* push for fixed or var args */
|
||||
|
||||
struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
|
||||
struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
|
||||
union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
|
||||
union acpi_operand_object **params;
|
||||
|
||||
u8 *aml_last_while;
|
||||
struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
|
||||
union acpi_operand_object **caller_return_desc;
|
||||
union acpi_generic_state *control_state; /* List of control states (nested IFs) */
|
||||
struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */
|
||||
struct acpi_gpe_event_info *gpe_event_info; /* Info for GPE (_Lxx/_Exx methods only */
|
||||
union acpi_operand_object *implicit_return_obj;
|
||||
struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
|
||||
struct acpi_namespace_node *method_call_node; /* Called method Node */
|
||||
union acpi_parse_object *method_call_op; /* method_call Op if running a method */
|
||||
union acpi_operand_object *method_desc; /* Method descriptor if running a method */
|
||||
struct acpi_namespace_node *method_node; /* Method node if running a method. */
|
||||
union acpi_parse_object *op; /* Current parser op */
|
||||
union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
|
||||
const struct acpi_opcode_info *op_info; /* Info on current opcode */
|
||||
union acpi_parse_object *origin; /* Start of walk [Obsolete] */
|
||||
union acpi_operand_object **params;
|
||||
struct acpi_parse_state parser_state; /* Current state of parser */
|
||||
union acpi_operand_object *result_obj;
|
||||
union acpi_generic_state *results; /* Stack of accumulated results */
|
||||
union acpi_operand_object *return_desc; /* Return object, if any */
|
||||
union acpi_generic_state *scope_info; /* Stack of nested scopes */
|
||||
|
||||
union acpi_parse_object *prev_op; /* Last op that was processed */
|
||||
union acpi_parse_object *next_op; /* next op to be processed */
|
||||
struct acpi_thread_state *thread;
|
||||
acpi_parse_downwards descending_callback;
|
||||
acpi_parse_upwards ascending_callback;
|
||||
struct acpi_thread_state *thread;
|
||||
struct acpi_walk_state *next; /* Next walk_state in list */
|
||||
};
|
||||
|
||||
/* Info used by acpi_ps_init_objects */
|
||||
@@ -131,32 +142,6 @@ struct acpi_init_walk_info {
|
||||
struct acpi_table_desc *table_desc;
|
||||
};
|
||||
|
||||
/* Info used by acpi_ns_initialize_devices */
|
||||
|
||||
struct acpi_device_walk_info {
|
||||
u16 device_count;
|
||||
u16 num_STA;
|
||||
u16 num_INI;
|
||||
struct acpi_table_desc *table_desc;
|
||||
};
|
||||
|
||||
/* TBD: [Restructure] Merge with struct above */
|
||||
|
||||
struct acpi_walk_info {
|
||||
u32 debug_level;
|
||||
u32 count;
|
||||
acpi_owner_id owner_id;
|
||||
u8 display_type;
|
||||
};
|
||||
|
||||
/* Display Types */
|
||||
|
||||
#define ACPI_DISPLAY_SUMMARY (u8) 0
|
||||
#define ACPI_DISPLAY_OBJECTS (u8) 1
|
||||
#define ACPI_DISPLAY_MASK (u8) 1
|
||||
|
||||
#define ACPI_DISPLAY_SHORT (u8) 2
|
||||
|
||||
struct acpi_get_devices_info {
|
||||
acpi_walk_callback user_function;
|
||||
void *context;
|
||||
@@ -189,16 +174,21 @@ union acpi_aml_operands {
|
||||
} mid;
|
||||
};
|
||||
|
||||
/* Internal method parameter list */
|
||||
|
||||
struct acpi_parameter_info {
|
||||
struct acpi_namespace_node *node;
|
||||
/*
|
||||
* Structure used to pass object evaluation parameters.
|
||||
* Purpose is to reduce CPU stack use.
|
||||
*/
|
||||
struct acpi_evaluate_info {
|
||||
struct acpi_namespace_node *prefix_node;
|
||||
char *pathname;
|
||||
union acpi_operand_object *obj_desc;
|
||||
union acpi_operand_object **parameters;
|
||||
struct acpi_namespace_node *resolved_node;
|
||||
union acpi_operand_object *return_object;
|
||||
u8 pass_number;
|
||||
u8 parameter_type;
|
||||
u8 return_object_type;
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
/* Types for parameter_type above */
|
||||
@@ -206,4 +196,35 @@ struct acpi_parameter_info {
|
||||
#define ACPI_PARAM_ARGS 0
|
||||
#define ACPI_PARAM_GPE 1
|
||||
|
||||
/* Values for Flags above */
|
||||
|
||||
#define ACPI_IGNORE_RETURN_VALUE 1
|
||||
|
||||
/* Info used by acpi_ns_initialize_devices */
|
||||
|
||||
struct acpi_device_walk_info {
|
||||
u16 device_count;
|
||||
u16 num_STA;
|
||||
u16 num_INI;
|
||||
struct acpi_table_desc *table_desc;
|
||||
struct acpi_evaluate_info *evaluate_info;
|
||||
};
|
||||
|
||||
/* TBD: [Restructure] Merge with struct above */
|
||||
|
||||
struct acpi_walk_info {
|
||||
u32 debug_level;
|
||||
u32 count;
|
||||
acpi_owner_id owner_id;
|
||||
u8 display_type;
|
||||
};
|
||||
|
||||
/* Display Types */
|
||||
|
||||
#define ACPI_DISPLAY_SUMMARY (u8) 0
|
||||
#define ACPI_DISPLAY_OBJECTS (u8) 1
|
||||
#define ACPI_DISPLAY_MASK (u8) 1
|
||||
|
||||
#define ACPI_DISPLAY_SHORT (u8) 2
|
||||
|
||||
#endif
|
||||
|
||||
@@ -136,7 +136,11 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc);
|
||||
acpi_status
|
||||
acpi_tb_verify_table_checksum(struct acpi_table_header *table_header);
|
||||
|
||||
u8 acpi_tb_generate_checksum(void *buffer, u32 length);
|
||||
u8 acpi_tb_sum_table(void *buffer, u32 length);
|
||||
|
||||
u8 acpi_tb_generate_checksum(struct acpi_table_header *table);
|
||||
|
||||
void acpi_tb_set_checksum(struct acpi_table_header *table);
|
||||
|
||||
acpi_status
|
||||
acpi_tb_validate_table_header(struct acpi_table_header *table_header);
|
||||
|
||||
+238
-184
@@ -1,6 +1,6 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl.h - Table data structures defined in ACPI specification
|
||||
* Name: actbl.h - Basic ACPI Table Definitions
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -45,66 +45,45 @@
|
||||
#define __ACTBL_H__
|
||||
|
||||
/*
|
||||
* Values for description table header signatures. Useful because they make
|
||||
* it more difficult to inadvertently type in the wrong signature.
|
||||
*/
|
||||
#define DSDT_SIG "DSDT" /* Differentiated System Description Table */
|
||||
#define FADT_SIG "FACP" /* Fixed ACPI Description Table */
|
||||
#define FACS_SIG "FACS" /* Firmware ACPI Control Structure */
|
||||
#define PSDT_SIG "PSDT" /* Persistent System Description Table */
|
||||
#define RSDP_SIG "RSD PTR " /* Root System Description Pointer */
|
||||
#define RSDT_SIG "RSDT" /* Root System Description Table */
|
||||
#define XSDT_SIG "XSDT" /* Extended System Description Table */
|
||||
#define SSDT_SIG "SSDT" /* Secondary System Description Table */
|
||||
#define RSDP_NAME "RSDP"
|
||||
|
||||
/*
|
||||
* All tables and structures must be byte-packed to match the ACPI
|
||||
* specification, since the tables are provided by the system BIOS
|
||||
*/
|
||||
#pragma pack(1)
|
||||
|
||||
/*
|
||||
* These are the ACPI tables that are directly consumed by the subsystem.
|
||||
*
|
||||
* The RSDP and FACS do not use the common ACPI table header. All other ACPI
|
||||
* tables use the header.
|
||||
*
|
||||
* Note about bitfields: The u8 type is used for bitfields in ACPI tables.
|
||||
* This is the only type that is even remotely portable. Anything else is not
|
||||
* portable, so do not use any other bitfield types.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Values for description table header signatures
|
||||
*/
|
||||
#define RSDP_NAME "RSDP"
|
||||
#define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */
|
||||
#define APIC_SIG "APIC" /* Multiple APIC Description Table */
|
||||
#define DSDT_SIG "DSDT" /* Differentiated System Description Table */
|
||||
#define FADT_SIG "FACP" /* Fixed ACPI Description Table */
|
||||
#define FACS_SIG "FACS" /* Firmware ACPI Control Structure */
|
||||
#define PSDT_SIG "PSDT" /* Persistent System Description Table */
|
||||
#define RSDT_SIG "RSDT" /* Root System Description Table */
|
||||
#define XSDT_SIG "XSDT" /* Extended System Description Table */
|
||||
#define SSDT_SIG "SSDT" /* Secondary System Description Table */
|
||||
#define SBST_SIG "SBST" /* Smart Battery Specification Table */
|
||||
#define SPIC_SIG "SPIC" /* IOSAPIC table */
|
||||
#define BOOT_SIG "BOOT" /* Boot table */
|
||||
|
||||
#define GL_OWNED 0x02 /* Ownership of global lock is bit 1 */
|
||||
|
||||
/*
|
||||
* Common table types. The base code can remain
|
||||
* constant if the underlying tables are changed
|
||||
*/
|
||||
#define RSDT_DESCRIPTOR struct rsdt_descriptor_rev2
|
||||
#define XSDT_DESCRIPTOR struct xsdt_descriptor_rev2
|
||||
#define FACS_DESCRIPTOR struct facs_descriptor_rev2
|
||||
#define FADT_DESCRIPTOR struct fadt_descriptor_rev2
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
/*
|
||||
* ACPI Version-independent tables
|
||||
/*******************************************************************************
|
||||
*
|
||||
* NOTE: The tables that are specific to ACPI versions (1.0, 2.0, etc.)
|
||||
* are in separate files.
|
||||
*/
|
||||
struct rsdp_descriptor { /* Root System Descriptor Pointer */
|
||||
char signature[8]; /* ACPI signature, contains "RSD PTR " */
|
||||
u8 checksum; /* ACPI 1.0 checksum */
|
||||
char oem_id[6]; /* OEM identification */
|
||||
u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */
|
||||
u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */
|
||||
u32 length; /* XSDT Length in bytes, including header */
|
||||
u64 xsdt_physical_address; /* 64-bit physical address of the XSDT */
|
||||
u8 extended_checksum; /* Checksum of entire table (ACPI 2.0) */
|
||||
char reserved[3]; /* Reserved, must be zero */
|
||||
};
|
||||
* ACPI Table Header. This common header is used by all tables except the
|
||||
* RSDP and FACS. The define is used for direct inclusion of header into
|
||||
* other ACPI tables
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct acpi_common_facs { /* Common FACS for internal use */
|
||||
u32 *global_lock;
|
||||
u64 *firmware_waking_vector;
|
||||
u8 vector_width;
|
||||
};
|
||||
|
||||
#define ACPI_TABLE_HEADER_DEF /* ACPI common table header */ \
|
||||
#define ACPI_TABLE_HEADER_DEF \
|
||||
char signature[4]; /* ASCII table signature */\
|
||||
u32 length; /* Length of table in bytes, including this header */\
|
||||
u8 revision; /* ACPI Specification minor version # */\
|
||||
@@ -112,153 +91,238 @@ struct acpi_common_facs { /* Common FACS for internal use */
|
||||
char oem_id[6]; /* ASCII OEM identification */\
|
||||
char oem_table_id[8]; /* ASCII OEM table identification */\
|
||||
u32 oem_revision; /* OEM revision number */\
|
||||
char asl_compiler_id [4]; /* ASCII ASL compiler vendor ID */\
|
||||
char asl_compiler_id[4]; /* ASCII ASL compiler vendor ID */\
|
||||
u32 asl_compiler_revision; /* ASL compiler version */
|
||||
|
||||
struct acpi_table_header { /* ACPI common table header */
|
||||
struct acpi_table_header {
|
||||
ACPI_TABLE_HEADER_DEF};
|
||||
|
||||
/*
|
||||
* MADT values and structures
|
||||
* GAS - Generic Address Structure (ACPI 2.0+)
|
||||
*/
|
||||
struct acpi_generic_address {
|
||||
u8 address_space_id; /* Address space where struct or register exists */
|
||||
u8 register_bit_width; /* Size in bits of given register */
|
||||
u8 register_bit_offset; /* Bit offset within the register */
|
||||
u8 access_width; /* Minimum Access size (ACPI 3.0) */
|
||||
u64 address; /* 64-bit address of struct or register */
|
||||
};
|
||||
|
||||
/* Values for MADT PCATCompat */
|
||||
/*******************************************************************************
|
||||
*
|
||||
* RSDP - Root System Description Pointer (Signature is "RSD PTR ")
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#define DUAL_PIC 0
|
||||
#define MULTIPLE_APIC 1
|
||||
struct rsdp_descriptor {
|
||||
char signature[8]; /* ACPI signature, contains "RSD PTR " */
|
||||
u8 checksum; /* ACPI 1.0 checksum */
|
||||
char oem_id[6]; /* OEM identification */
|
||||
u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */
|
||||
u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */
|
||||
u32 length; /* Table length in bytes, including header (ACPI 2.0+) */
|
||||
u64 xsdt_physical_address; /* 64-bit physical address of the XSDT (ACPI 2.0+) */
|
||||
u8 extended_checksum; /* Checksum of entire table (ACPI 2.0+) */
|
||||
u8 reserved[3]; /* Reserved, must be zero */
|
||||
};
|
||||
|
||||
/* Master MADT */
|
||||
#define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */
|
||||
|
||||
struct multiple_apic_table {
|
||||
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
|
||||
u32 local_apic_address; /* Physical address of local APIC */
|
||||
/*******************************************************************************
|
||||
*
|
||||
* RSDT/XSDT - Root System Description Tables
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct rsdt_descriptor {
|
||||
ACPI_TABLE_HEADER_DEF u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */
|
||||
};
|
||||
|
||||
struct xsdt_descriptor {
|
||||
ACPI_TABLE_HEADER_DEF u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FACS - Firmware ACPI Control Structure (FACS)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct facs_descriptor {
|
||||
char signature[4]; /* ASCII table signature */
|
||||
u32 length; /* Length of structure, in bytes */
|
||||
u32 hardware_signature; /* Hardware configuration signature */
|
||||
u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector */
|
||||
u32 global_lock; /* Global Lock for shared hardware resources */
|
||||
|
||||
/* Flags (32 bits) */
|
||||
|
||||
u8 PCATcompat:1; /* 00: System also has dual 8259s */
|
||||
u8 S4bios_f:1; /* 00: S4BIOS support is present */
|
||||
u8:7; /* 01-07: Reserved, must be zero */
|
||||
u8 reserved1[3]; /* 08-31: Reserved, must be zero */
|
||||
|
||||
u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */
|
||||
u8 version; /* Version of this table (ACPI 2.0+) */
|
||||
u8 reserved[31]; /* Reserved, must be zero */
|
||||
};
|
||||
|
||||
/* Values for Type in APIC_HEADER_DEF */
|
||||
|
||||
#define APIC_PROCESSOR 0
|
||||
#define APIC_IO 1
|
||||
#define APIC_XRUPT_OVERRIDE 2
|
||||
#define APIC_NMI 3
|
||||
#define APIC_LOCAL_NMI 4
|
||||
#define APIC_ADDRESS_OVERRIDE 5
|
||||
#define APIC_IO_SAPIC 6
|
||||
#define APIC_LOCAL_SAPIC 7
|
||||
#define APIC_XRUPT_SOURCE 8
|
||||
#define APIC_RESERVED 9 /* 9 and greater are reserved */
|
||||
#define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */
|
||||
#define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */
|
||||
|
||||
/*
|
||||
* MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE)
|
||||
* Common FACS - This is a version-independent FACS structure used for internal use only
|
||||
*/
|
||||
#define APIC_HEADER_DEF /* Common APIC sub-structure header */\
|
||||
u8 type; \
|
||||
u8 length;
|
||||
|
||||
struct apic_header {
|
||||
APIC_HEADER_DEF};
|
||||
|
||||
/* Values for MPS INTI flags */
|
||||
|
||||
#define POLARITY_CONFORMS 0
|
||||
#define POLARITY_ACTIVE_HIGH 1
|
||||
#define POLARITY_RESERVED 2
|
||||
#define POLARITY_ACTIVE_LOW 3
|
||||
|
||||
#define TRIGGER_CONFORMS 0
|
||||
#define TRIGGER_EDGE 1
|
||||
#define TRIGGER_RESERVED 2
|
||||
#define TRIGGER_LEVEL 3
|
||||
|
||||
/* Common flag definitions (16 bits each) */
|
||||
|
||||
#define MPS_INTI_FLAGS \
|
||||
u8 polarity : 2; /* 00-01: Polarity of APIC I/O input signals */\
|
||||
u8 trigger_mode : 2; /* 02-03: Trigger mode of APIC input signals */\
|
||||
u8 : 4; /* 04-07: Reserved, must be zero */\
|
||||
u8 reserved1; /* 08-15: Reserved, must be zero */
|
||||
|
||||
#define LOCAL_APIC_FLAGS \
|
||||
u8 processor_enabled: 1; /* 00: Processor is usable if set */\
|
||||
u8 : 7; /* 01-07: Reserved, must be zero */\
|
||||
u8 reserved2; /* 08-15: Reserved, must be zero */
|
||||
|
||||
/* Sub-structures for MADT */
|
||||
|
||||
struct madt_processor_apic {
|
||||
APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */
|
||||
u8 local_apic_id; /* Processor's local APIC id */
|
||||
LOCAL_APIC_FLAGS};
|
||||
|
||||
struct madt_io_apic {
|
||||
APIC_HEADER_DEF u8 io_apic_id; /* I/O APIC ID */
|
||||
u8 reserved; /* Reserved - must be zero */
|
||||
u32 address; /* APIC physical address */
|
||||
u32 interrupt; /* Global system interrupt where INTI
|
||||
* lines start */
|
||||
struct acpi_common_facs {
|
||||
u32 *global_lock;
|
||||
u64 *firmware_waking_vector;
|
||||
u8 vector_width;
|
||||
};
|
||||
|
||||
struct madt_interrupt_override {
|
||||
APIC_HEADER_DEF u8 bus; /* 0 - ISA */
|
||||
u8 source; /* Interrupt source (IRQ) */
|
||||
u32 interrupt; /* Global system interrupt */
|
||||
MPS_INTI_FLAGS};
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FADT - Fixed ACPI Description Table (Signature "FACP")
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct madt_nmi_source {
|
||||
APIC_HEADER_DEF MPS_INTI_FLAGS u32 interrupt; /* Global system interrupt */
|
||||
};
|
||||
/* Fields common to all versions of the FADT */
|
||||
|
||||
struct madt_local_apic_nmi {
|
||||
APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */
|
||||
MPS_INTI_FLAGS u8 lint; /* LINTn to which NMI is connected */
|
||||
};
|
||||
#define ACPI_FADT_COMMON \
|
||||
ACPI_TABLE_HEADER_DEF \
|
||||
u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \
|
||||
u32 V1_dsdt; /* 32-bit physical address of DSDT */ \
|
||||
u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \
|
||||
u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */ \
|
||||
u16 sci_int; /* System vector of SCI interrupt */ \
|
||||
u32 smi_cmd; /* Port address of SMI command port */ \
|
||||
u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ \
|
||||
u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ \
|
||||
u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ \
|
||||
u8 pstate_cnt; /* Processor performance state control*/ \
|
||||
u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a Event Reg Blk */ \
|
||||
u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b Event Reg Blk */ \
|
||||
u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ \
|
||||
u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ \
|
||||
u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ \
|
||||
u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \
|
||||
u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \
|
||||
u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \
|
||||
u8 pm1_evt_len; /* Byte Length of ports at pm1_x_evt_blk */ \
|
||||
u8 pm1_cnt_len; /* Byte Length of ports at pm1_x_cnt_blk */ \
|
||||
u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \
|
||||
u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \
|
||||
u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \
|
||||
u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ \
|
||||
u8 gpe1_base; /* Offset in gpe model where gpe1 events start */ \
|
||||
u8 cst_cnt; /* Support for the _CST object and C States change notification.*/ \
|
||||
u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */ \
|
||||
u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */ \
|
||||
u16 flush_size; /* Processor's memory cache line width, in bytes */ \
|
||||
u16 flush_stride; /* Number of flush strides that need to be read */ \
|
||||
u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/ \
|
||||
u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/ \
|
||||
u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */ \
|
||||
u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \
|
||||
u8 century; /* Index to century in RTC CMOS RAM */ \
|
||||
u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ \
|
||||
u8 reserved2; /* Reserved, must be zero */
|
||||
|
||||
struct madt_address_override {
|
||||
APIC_HEADER_DEF u16 reserved; /* Reserved, must be zero */
|
||||
u64 address; /* APIC physical address */
|
||||
};
|
||||
/*
|
||||
* ACPI 2.0+ FADT
|
||||
*/
|
||||
struct fadt_descriptor {
|
||||
ACPI_FADT_COMMON
|
||||
/* Flags (32 bits) */
|
||||
u8 wb_invd:1; /* 00: The wbinvd instruction works properly */
|
||||
u8 wb_invd_flush:1; /* 01: The wbinvd flushes but does not invalidate */
|
||||
u8 proc_c1:1; /* 02: All processors support C1 state */
|
||||
u8 plvl2_up:1; /* 03: C2 state works on MP system */
|
||||
u8 pwr_button:1; /* 04: Power button is handled as a generic feature */
|
||||
u8 sleep_button:1; /* 05: Sleep button is handled as a generic feature, or not present */
|
||||
u8 fixed_rTC:1; /* 06: RTC wakeup stat not in fixed register space */
|
||||
u8 rtcs4:1; /* 07: RTC wakeup stat not possible from S4 */
|
||||
u8 tmr_val_ext:1; /* 08: tmr_val is 32 bits 0=24-bits */
|
||||
u8 dock_cap:1; /* 09: Docking supported */
|
||||
u8 reset_reg_sup:1; /* 10: System reset via the FADT RESET_REG supported */
|
||||
u8 sealed_case:1; /* 11: No internal expansion capabilities and case is sealed */
|
||||
u8 headless:1; /* 12: No local video capabilities or local input devices */
|
||||
u8 cpu_sw_sleep:1; /* 13: Must execute native instruction after writing SLP_TYPx register */
|
||||
|
||||
struct madt_io_sapic {
|
||||
APIC_HEADER_DEF u8 io_sapic_id; /* I/O SAPIC ID */
|
||||
u8 reserved; /* Reserved, must be zero */
|
||||
u32 interrupt_base; /* Glocal interrupt for SAPIC start */
|
||||
u64 address; /* SAPIC physical address */
|
||||
};
|
||||
u8 pci_exp_wak:1; /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */
|
||||
u8 use_platform_clock:1; /* 15: OSPM should use platform-provided timer (ACPI 3.0) */
|
||||
u8 S4rtc_sts_valid:1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */
|
||||
u8 remote_power_on_capable:1; /* 17: System is compatible with remote power on (ACPI 3.0) */
|
||||
u8 force_apic_cluster_model:1; /* 18: All local APICs must use cluster model (ACPI 3.0) */
|
||||
u8 force_apic_physical_destination_mode:1; /* 19: All local x_aPICs must use physical dest mode (ACPI 3.0) */
|
||||
u8:4; /* 20-23: Reserved, must be zero */
|
||||
u8 reserved3; /* 24-31: Reserved, must be zero */
|
||||
|
||||
struct madt_local_sapic {
|
||||
APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */
|
||||
u8 local_sapic_id; /* SAPIC ID */
|
||||
u8 local_sapic_eid; /* SAPIC EID */
|
||||
u8 reserved[3]; /* Reserved, must be zero */
|
||||
LOCAL_APIC_FLAGS u32 processor_uID; /* Numeric UID - ACPI 3.0 */
|
||||
char processor_uIDstring[1]; /* String UID - ACPI 3.0 */
|
||||
};
|
||||
|
||||
struct madt_interrupt_source {
|
||||
APIC_HEADER_DEF MPS_INTI_FLAGS u8 interrupt_type; /* 1=PMI, 2=INIT, 3=corrected */
|
||||
u8 processor_id; /* Processor ID */
|
||||
u8 processor_eid; /* Processor EID */
|
||||
u8 io_sapic_vector; /* Vector value for PMI interrupts */
|
||||
u32 interrupt; /* Global system interrupt */
|
||||
u32 flags; /* Interrupt Source Flags */
|
||||
struct acpi_generic_address reset_register; /* Reset register address in GAS format */
|
||||
u8 reset_value; /* Value to write to the reset_register port to reset the system */
|
||||
u8 reserved4[3]; /* These three bytes must be zero */
|
||||
u64 xfirmware_ctrl; /* 64-bit physical address of FACS */
|
||||
u64 Xdsdt; /* 64-bit physical address of DSDT */
|
||||
struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */
|
||||
struct acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */
|
||||
struct acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */
|
||||
struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */
|
||||
struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */
|
||||
struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */
|
||||
struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */
|
||||
struct acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */
|
||||
};
|
||||
|
||||
/*
|
||||
* Smart Battery
|
||||
* "Down-revved" ACPI 2.0 FADT descriptor
|
||||
* Defined here to allow compiler to generate the length of the struct
|
||||
*/
|
||||
struct smart_battery_table {
|
||||
ACPI_TABLE_HEADER_DEF u32 warning_level;
|
||||
u32 low_level;
|
||||
u32 critical_level;
|
||||
struct fadt_descriptor_rev2_minus {
|
||||
ACPI_FADT_COMMON u32 flags;
|
||||
struct acpi_generic_address reset_register; /* Reset register address in GAS format */
|
||||
u8 reset_value; /* Value to write to the reset_register port to reset the system. */
|
||||
u8 reserved7[3]; /* Reserved, must be zero */
|
||||
};
|
||||
|
||||
/*
|
||||
* ACPI 1.0 FADT
|
||||
* Defined here to allow compiler to generate the length of the struct
|
||||
*/
|
||||
struct fadt_descriptor_rev1 {
|
||||
ACPI_FADT_COMMON u32 flags;
|
||||
};
|
||||
|
||||
/* FADT: Prefered Power Management Profiles */
|
||||
|
||||
#define PM_UNSPECIFIED 0
|
||||
#define PM_DESKTOP 1
|
||||
#define PM_MOBILE 2
|
||||
#define PM_WORKSTATION 3
|
||||
#define PM_ENTERPRISE_SERVER 4
|
||||
#define PM_SOHO_SERVER 5
|
||||
#define PM_APPLIANCE_PC 6
|
||||
|
||||
/* FADT: Boot Arch Flags */
|
||||
|
||||
#define BAF_LEGACY_DEVICES 0x0001
|
||||
#define BAF_8042_KEYBOARD_CONTROLLER 0x0002
|
||||
|
||||
#define FADT2_REVISION_ID 3
|
||||
#define FADT2_MINUS_REVISION_ID 2
|
||||
|
||||
/* Reset to default packing */
|
||||
|
||||
#pragma pack()
|
||||
|
||||
/*
|
||||
* This macro is temporary until the table bitfield flag definitions
|
||||
* are removed and replaced by a Flags field.
|
||||
*/
|
||||
#define ACPI_FLAG_OFFSET(d,f,o) (u8) (ACPI_OFFSET (d,f) + \
|
||||
sizeof(((d *)0)->f) + o)
|
||||
/*
|
||||
* Get the remaining ACPI tables
|
||||
*/
|
||||
#include "actbl1.h"
|
||||
|
||||
/*
|
||||
* ACPI Table information. We save the table address, length,
|
||||
* and type of memory allocation (mapped or allocated) for each
|
||||
@@ -290,27 +354,17 @@ struct acpi_table_support {
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the ACPI version-specific tables
|
||||
*/
|
||||
#include "actbl1.h" /* Acpi 1.0 table definitions */
|
||||
#include "actbl2.h" /* Acpi 2.0 table definitions */
|
||||
|
||||
extern u8 acpi_fadt_is_v1; /* is set to 1 if FADT is revision 1,
|
||||
* needed for certain workarounds */
|
||||
/* Macros used to generate offsets to specific table fields */
|
||||
|
||||
#pragma pack(1)
|
||||
/*
|
||||
* High performance timer
|
||||
*/
|
||||
struct hpet_table {
|
||||
ACPI_TABLE_HEADER_DEF u32 hardware_id;
|
||||
struct acpi_generic_address base_address;
|
||||
u8 hpet_number;
|
||||
u16 clock_tick;
|
||||
u8 attributes;
|
||||
};
|
||||
#define ACPI_FACS_OFFSET(f) (u8) ACPI_OFFSET (struct facs_descriptor,f)
|
||||
#define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct fadt_descriptor, f)
|
||||
#define ACPI_GAS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_generic_address,f)
|
||||
#define ACPI_HDR_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_header,f)
|
||||
#define ACPI_RSDP_OFFSET(f) (u8) ACPI_OFFSET (struct rsdp_descriptor,f)
|
||||
|
||||
#pragma pack()
|
||||
#define ACPI_FADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct fadt_descriptor,f,o)
|
||||
#define ACPI_FACS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct facs_descriptor,f,o)
|
||||
|
||||
#endif /* __ACTBL_H__ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user