[IA64] Manual merge fix for 3 files

arch/ia64/Kconfig
	arch/ia64/kernel/acpi.c
	include/asm-ia64/irq.h

Signed-off-by: Tony Luck <tony.luck@intel.com>
此提交包含在:
Tony Luck
2005-09-08 14:27:13 -07:00
當前提交 344a076110
共有 1136 個檔案被更改,包括 65812 行新增55205 行删除

查看文件

@@ -44,7 +44,6 @@
#ifndef _ACCONFIG_H
#define _ACCONFIG_H
/******************************************************************************
*
* Configuration options
@@ -64,7 +63,7 @@
/* Version string */
#define ACPI_CA_VERSION 0x20050408
#define ACPI_CA_VERSION 0x20050902
/*
* OS name, used for the _OS object. The _OS object is essentially obsolete,
@@ -78,11 +77,10 @@
/* Maximum objects in the various object caches */
#define ACPI_MAX_STATE_CACHE_DEPTH 64 /* State objects */
#define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */
#define ACPI_MAX_EXTPARSE_CACHE_DEPTH 64 /* Parse tree objects */
#define ACPI_MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */
#define ACPI_MAX_WALK_CACHE_DEPTH 4 /* Objects for parse tree walks */
#define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */
#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 */
/*
* Should the subystem abort the loading of an ACPI table if the
@@ -90,7 +88,6 @@
*/
#define ACPI_CHECKSUM_ABORT FALSE
/******************************************************************************
*
* Subsystem Constants
@@ -104,7 +101,7 @@
/* String size constants */
#define ACPI_MAX_STRING_LENGTH 512
#define ACPI_PATHNAME_MAX 256 /* A full namespace pathname */
#define ACPI_PATHNAME_MAX 256 /* A full namespace pathname */
/* Maximum count for a semaphore object */
@@ -118,7 +115,6 @@
#define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096
/******************************************************************************
*
* ACPI Specification constants (Do not change unless the specification changes)
@@ -156,15 +152,15 @@
/* Names within the namespace are 4 bytes long */
#define ACPI_NAME_SIZE 4
#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
#define ACPI_PATH_SEPARATOR '.'
/* Constants used in searching for the RSDP in low memory */
#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
#define ACPI_EBDA_PTR_LENGTH 2
#define ACPI_EBDA_WINDOW_SIZE 1024
#define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */
#define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */
#define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000
#define ACPI_RSDP_SCAN_STEP 16
@@ -199,18 +195,15 @@
#define ACPI_NUM_OSI_STRINGS 10
/******************************************************************************
*
* ACPI AML Debugger
*
*****************************************************************************/
#define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */
#define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */
#define ACPI_DEBUGGER_COMMAND_PROMPT '-'
#define ACPI_DEBUGGER_EXECUTE_PROMPT '%'
#endif /* _ACCONFIG_H */
#endif /* _ACCONFIG_H */

查看文件

@@ -44,22 +44,17 @@
#ifndef __ACDEBUG_H__
#define __ACDEBUG_H__
#define ACPI_DEBUG_BUFFER_SIZE 4196
struct command_info
{
char *name; /* Command Name */
u8 min_args; /* Minimum arguments required */
struct command_info {
char *name; /* Command Name */
u8 min_args; /* Minimum arguments required */
};
struct argument_info
{
char *name; /* Argument Name */
struct argument_info {
char *name; /* Argument Name */
};
#define PARAM_LIST(pl) pl
#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
@@ -68,275 +63,155 @@ struct argument_info
#define EX_NO_SINGLE_STEP 1
#define EX_SINGLE_STEP 2
/*
* dbxface - external debugger interfaces
*/
acpi_status
acpi_db_initialize (
void);
acpi_status acpi_db_initialize(void);
void
acpi_db_terminate (
void);
void acpi_db_terminate(void);
acpi_status
acpi_db_single_step (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 op_type);
acpi_db_single_step(struct acpi_walk_state *walk_state,
union acpi_parse_object *op, u32 op_type);
/*
* dbcmds - debug commands and output routines
*/
acpi_status
acpi_db_disassemble_method (
char *name);
acpi_status acpi_db_disassemble_method(char *name);
void acpi_db_display_table_info(char *table_arg);
void acpi_db_unload_acpi_table(char *table_arg, char *instance_arg);
void
acpi_db_display_table_info (
char *table_arg);
acpi_db_set_method_breakpoint(char *location,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
void
acpi_db_unload_acpi_table (
char *table_arg,
char *instance_arg);
void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op);
void
acpi_db_set_method_breakpoint (
char *location,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
void acpi_db_get_bus_info(void);
void
acpi_db_set_method_call_breakpoint (
union acpi_parse_object *op);
void acpi_db_disassemble_aml(char *statements, union acpi_parse_object *op);
void
acpi_db_disassemble_aml (
char *statements,
union acpi_parse_object *op);
void acpi_db_dump_namespace(char *start_arg, char *depth_arg);
void
acpi_db_dump_namespace (
char *start_arg,
char *depth_arg);
void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg);
void
acpi_db_dump_namespace_by_owner (
char *owner_arg,
char *depth_arg);
void acpi_db_send_notify(char *name, u32 value);
void
acpi_db_send_notify (
char *name,
u32 value);
void
acpi_db_set_method_data (
char *type_arg,
char *index_arg,
char *value_arg);
void acpi_db_set_method_data(char *type_arg, char *index_arg, char *value_arg);
acpi_status
acpi_db_display_objects (
char *obj_type_arg,
char *display_count_arg);
acpi_db_display_objects(char *obj_type_arg, char *display_count_arg);
acpi_status
acpi_db_find_name_in_namespace (
char *name_arg);
acpi_status acpi_db_find_name_in_namespace(char *name_arg);
void
acpi_db_set_scope (
char *name);
void acpi_db_set_scope(char *name);
acpi_status
acpi_db_sleep (
char *object_arg);
acpi_status acpi_db_sleep(char *object_arg);
void
acpi_db_find_references (
char *object_arg);
void acpi_db_find_references(char *object_arg);
void
acpi_db_display_locks (
void);
void acpi_db_display_locks(void);
void
acpi_db_display_resources (
char *object_arg);
void acpi_db_display_resources(char *object_arg);
void
acpi_db_display_gpes (
void);
void acpi_db_display_gpes(void);
void
acpi_db_check_integrity (
void);
void
acpi_db_generate_gpe (
char *gpe_arg,
char *block_arg);
void acpi_db_check_integrity(void);
void acpi_db_generate_gpe(char *gpe_arg, char *block_arg);
/*
* dbdisply - debug display commands
*/
void
acpi_db_display_method_info (
union acpi_parse_object *op);
void acpi_db_display_method_info(union acpi_parse_object *op);
void acpi_db_decode_and_display_object(char *target, char *output_type);
void
acpi_db_decode_and_display_object (
char *target,
char *output_type);
acpi_db_display_result_object(union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
acpi_status acpi_db_display_all_methods(char *display_count_arg);
void acpi_db_display_arguments(void);
void acpi_db_display_locals(void);
void acpi_db_display_results(void);
void acpi_db_display_calling_tree(void);
void acpi_db_display_object_type(char *object_arg);
void
acpi_db_display_result_object (
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
acpi_status
acpi_db_display_all_methods (
char *display_count_arg);
void
acpi_db_display_arguments (
void);
void
acpi_db_display_locals (
void);
void
acpi_db_display_results (
void);
void
acpi_db_display_calling_tree (
void);
void
acpi_db_display_object_type (
char *object_arg);
void
acpi_db_display_argument_object (
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
acpi_db_display_argument_object(union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
/*
* dbexec - debugger control method execution
*/
void
acpi_db_execute (
char *name,
char **args,
u32 flags);
void acpi_db_execute(char *name, char **args, u32 flags);
void
acpi_db_create_execution_threads (
char *num_threads_arg,
char *num_loops_arg,
char *method_name_arg);
acpi_db_create_execution_threads(char *num_threads_arg,
char *num_loops_arg, char *method_name_arg);
/*
* dbfileio - Debugger file I/O commands
*/
acpi_object_type
acpi_db_match_argument (
char *user_argument,
struct argument_info *arguments);
acpi_db_match_argument(char *user_argument, struct argument_info *arguments);
void
acpi_db_close_debug_file (
void);
void acpi_db_close_debug_file(void);
void
acpi_db_open_debug_file (
char *name);
void acpi_db_open_debug_file(char *name);
acpi_status acpi_db_load_acpi_table(char *filename);
acpi_status
acpi_db_load_acpi_table (
char *filename);
acpi_db_get_table_from_file(char *filename, struct acpi_table_header **table);
acpi_status
acpi_db_get_table_from_file (
char *filename,
struct acpi_table_header **table);
acpi_status
acpi_db_read_table_from_file (
char *filename,
struct acpi_table_header **table);
acpi_db_read_table_from_file(char *filename, struct acpi_table_header **table);
/*
* dbhistry - debugger HISTORY command
*/
void
acpi_db_add_to_history (
char *command_line);
void acpi_db_add_to_history(char *command_line);
void
acpi_db_display_history (
void);
char *
acpi_db_get_from_history (
char *command_num_arg);
void acpi_db_display_history(void);
char *acpi_db_get_from_history(char *command_num_arg);
/*
* dbinput - user front-end to the AML debugger
*/
acpi_status
acpi_db_command_dispatch (
char *input_buffer,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
void ACPI_SYSTEM_XFACE
acpi_db_execute_thread (
void *context);
acpi_db_command_dispatch(char *input_buffer,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context);
/*
* dbstats - Generation and display of ACPI table statistics
*/
void
acpi_db_generate_statistics (
union acpi_parse_object *root,
u8 is_method);
acpi_status
acpi_db_display_statistics (
char *type_arg);
void acpi_db_generate_statistics(union acpi_parse_object *root, u8 is_method);
acpi_status acpi_db_display_statistics(char *type_arg);
/*
* dbutils - AML debugger utilities
*/
void
acpi_db_set_output_destination (
u32 where);
void acpi_db_set_output_destination(u32 where);
void
acpi_db_dump_object (
union acpi_object *obj_desc,
u32 level);
void acpi_db_dump_external_object(union acpi_object *obj_desc, u32 level);
void
acpi_db_prep_namestring (
char *name);
void acpi_db_prep_namestring(char *name);
struct acpi_namespace_node *
acpi_db_local_ns_lookup (
char *name);
struct acpi_namespace_node *acpi_db_local_ns_lookup(char *name);
#endif /* __ACDEBUG_H__ */
#endif /* __ACDEBUG_H__ */

查看文件

@@ -46,327 +46,219 @@
#include "amlresrc.h"
#define BLOCK_NONE 0
#define BLOCK_PAREN 1
#define BLOCK_BRACE 2
#define BLOCK_COMMA_LIST 4
struct acpi_external_list
{
char *path;
struct acpi_external_list *next;
struct acpi_external_list {
char *path;
struct acpi_external_list *next;
};
extern struct acpi_external_list *acpi_gbl_external_list;
extern const char *acpi_gbl_io_decode[2];
extern const char *acpi_gbl_word_decode[4];
extern const char *acpi_gbl_consume_decode[2];
extern const char *acpi_gbl_min_decode[2];
extern const char *acpi_gbl_max_decode[2];
extern const char *acpi_gbl_DECdecode[2];
extern const char *acpi_gbl_RNGdecode[4];
extern const char *acpi_gbl_MEMdecode[4];
extern const char *acpi_gbl_RWdecode[2];
extern const char *acpi_gbl_irq_decode[2];
extern const char *acpi_gbl_HEdecode[2];
extern const char *acpi_gbl_LLdecode[2];
extern const char *acpi_gbl_SHRdecode[2];
extern const char *acpi_gbl_TYPdecode[4];
extern const char *acpi_gbl_BMdecode[2];
extern const char *acpi_gbl_SIZdecode[4];
extern const char *acpi_gbl_TTPdecode[2];
extern const char *acpi_gbl_MTPdecode[4];
extern const char *acpi_gbl_TRSdecode[2];
extern struct acpi_external_list *acpi_gbl_external_list;
extern const char *acpi_gbl_io_decode[2];
extern const char *acpi_gbl_word_decode[4];
extern const char *acpi_gbl_consume_decode[2];
extern const char *acpi_gbl_min_decode[2];
extern const char *acpi_gbl_max_decode[2];
extern const char *acpi_gbl_DECdecode[2];
extern const char *acpi_gbl_RNGdecode[4];
extern const char *acpi_gbl_MEMdecode[4];
extern const char *acpi_gbl_RWdecode[2];
extern const char *acpi_gbl_irq_decode[2];
extern const char *acpi_gbl_HEdecode[2];
extern const char *acpi_gbl_LLdecode[2];
extern const char *acpi_gbl_SHRdecode[2];
extern const char *acpi_gbl_TYPdecode[4];
extern const char *acpi_gbl_BMdecode[2];
extern const char *acpi_gbl_SIZdecode[4];
extern const char *acpi_gbl_TTPdecode[2];
extern const char *acpi_gbl_MTPdecode[4];
extern const char *acpi_gbl_TRSdecode[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];
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];
struct acpi_op_walk_info
{
u32 level;
u32 bit_offset;
struct acpi_op_walk_info {
u32 level;
u32 bit_offset;
struct acpi_walk_state *walk_state;
};
typedef
acpi_status (*asl_walk_callback) (
union acpi_parse_object *op,
u32 level,
void *context);
acpi_status(*asl_walk_callback) (union acpi_parse_object * op,
u32 level, void *context);
/*
* dmwalk
*/
void
acpi_dm_disassemble (
struct acpi_walk_state *walk_state,
union acpi_parse_object *origin,
u32 num_opcodes);
acpi_dm_disassemble(struct acpi_walk_state *walk_state,
union acpi_parse_object *origin, u32 num_opcodes);
/*
* dmopcode
*/
void
acpi_dm_disassemble_one_op (
struct acpi_walk_state *walk_state,
struct acpi_op_walk_info *info,
union acpi_parse_object *op);
acpi_dm_disassemble_one_op(struct acpi_walk_state *walk_state,
struct acpi_op_walk_info *info,
union acpi_parse_object *op);
void
acpi_dm_decode_internal_object (
union acpi_operand_object *obj_desc);
void acpi_dm_decode_internal_object(union acpi_operand_object *obj_desc);
u32
acpi_dm_list_type (
union acpi_parse_object *op);
u32 acpi_dm_list_type(union acpi_parse_object *op);
void
acpi_dm_method_flags (
union acpi_parse_object *op);
void acpi_dm_method_flags(union acpi_parse_object *op);
void
acpi_dm_field_flags (
union acpi_parse_object *op);
void acpi_dm_field_flags(union acpi_parse_object *op);
void
acpi_dm_address_space (
u8 space_id);
void acpi_dm_address_space(u8 space_id);
void
acpi_dm_region_flags (
union acpi_parse_object *op);
void acpi_dm_region_flags(union acpi_parse_object *op);
void
acpi_dm_match_op (
union acpi_parse_object *op);
void acpi_dm_match_op(union acpi_parse_object *op);
u8
acpi_dm_comma_if_list_member (
union acpi_parse_object *op);
void
acpi_dm_comma_if_field_member (
union acpi_parse_object *op);
u8 acpi_dm_comma_if_list_member(union acpi_parse_object *op);
void acpi_dm_comma_if_field_member(union acpi_parse_object *op);
/*
* dmnames
*/
u32
acpi_dm_dump_name (
char *name);
u32 acpi_dm_dump_name(char *name);
acpi_status
acpi_ps_display_object_pathname (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
void
acpi_dm_namestring (
char *name);
acpi_ps_display_object_pathname(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
void acpi_dm_namestring(char *name);
/*
* dmobject
*/
void
acpi_dm_display_internal_object (
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
acpi_dm_display_internal_object(union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
void acpi_dm_display_arguments(struct acpi_walk_state *walk_state);
void acpi_dm_display_locals(struct acpi_walk_state *walk_state);
void
acpi_dm_display_arguments (
struct acpi_walk_state *walk_state);
void
acpi_dm_display_locals (
struct acpi_walk_state *walk_state);
void
acpi_dm_dump_method_info (
acpi_status status,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_dm_dump_method_info(acpi_status status,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
/*
* dmbuffer
*/
void
acpi_dm_disasm_byte_list (
u32 level,
u8 *byte_data,
u32 byte_count);
void acpi_dm_disasm_byte_list(u32 level, u8 * byte_data, u32 byte_count);
void
acpi_dm_byte_list (
struct acpi_op_walk_info *info,
union acpi_parse_object *op);
acpi_dm_byte_list(struct acpi_op_walk_info *info, union acpi_parse_object *op);
void
acpi_is_eisa_id (
union acpi_parse_object *op);
void acpi_dm_is_eisa_id(union acpi_parse_object *op);
void
acpi_dm_eisa_id (
u32 encoded_id);
void acpi_dm_eisa_id(u32 encoded_id);
u8
acpi_dm_is_unicode_buffer (
union acpi_parse_object *op);
u8
acpi_dm_is_string_buffer (
union acpi_parse_object *op);
u8 acpi_dm_is_unicode_buffer(union acpi_parse_object *op);
u8 acpi_dm_is_string_buffer(union acpi_parse_object *op);
/*
* dmresrc
*/
void
acpi_dm_resource_descriptor (
struct acpi_op_walk_info *info,
u8 *byte_data,
u32 byte_count);
acpi_dm_resource_descriptor(struct acpi_op_walk_info *info,
u8 * byte_data, u32 byte_count);
u8
acpi_dm_is_resource_descriptor (
union acpi_parse_object *op);
u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op);
void
acpi_dm_indent (
u32 level);
void acpi_dm_indent(u32 level);
void
acpi_dm_bit_list (
u16 mask);
void
acpi_dm_decode_attribute (
u8 attribute);
void acpi_dm_bit_list(u16 mask);
void acpi_dm_decode_attribute(u8 attribute);
/*
* dmresrcl
*/
void
acpi_dm_word_descriptor (
struct asl_word_address_desc *resource,
u32 length,
u32 level);
acpi_dm_word_descriptor(struct asl_word_address_desc *resource,
u32 length, u32 level);
void
acpi_dm_dword_descriptor (
struct asl_dword_address_desc *resource,
u32 length,
u32 level);
acpi_dm_dword_descriptor(struct asl_dword_address_desc *resource,
u32 length, u32 level);
void
acpi_dm_extended_descriptor (
struct asl_extended_address_desc *resource,
u32 length,
u32 level);
acpi_dm_extended_descriptor(struct asl_extended_address_desc *resource,
u32 length, u32 level);
void
acpi_dm_qword_descriptor (
struct asl_qword_address_desc *resource,
u32 length,
u32 level);
acpi_dm_qword_descriptor(struct asl_qword_address_desc *resource,
u32 length, u32 level);
void
acpi_dm_memory24_descriptor (
struct asl_memory_24_desc *resource,
u32 length,
u32 level);
acpi_dm_memory24_descriptor(struct asl_memory_24_desc *resource,
u32 length, u32 level);
void
acpi_dm_memory32_descriptor (
struct asl_memory_32_desc *resource,
u32 length,
u32 level);
acpi_dm_memory32_descriptor(struct asl_memory_32_desc *resource,
u32 length, u32 level);
void
acpi_dm_fixed_mem32_descriptor (
struct asl_fixed_memory_32_desc *resource,
u32 length,
u32 level);
acpi_dm_fixed_mem32_descriptor(struct asl_fixed_memory_32_desc *resource,
u32 length, u32 level);
void
acpi_dm_generic_register_descriptor (
struct asl_general_register_desc *resource,
u32 length,
u32 level);
acpi_dm_generic_register_descriptor(struct asl_general_register_desc *resource,
u32 length, u32 level);
void
acpi_dm_interrupt_descriptor (
struct asl_extended_xrupt_desc *resource,
u32 length,
u32 level);
acpi_dm_interrupt_descriptor(struct asl_extended_xrupt_desc *resource,
u32 length, u32 level);
void
acpi_dm_vendor_large_descriptor (
struct asl_large_vendor_desc *resource,
u32 length,
u32 level);
acpi_dm_vendor_large_descriptor(struct asl_large_vendor_desc *resource,
u32 length, u32 level);
/*
* dmresrcs
*/
void
acpi_dm_irq_descriptor (
struct asl_irq_format_desc *resource,
u32 length,
u32 level);
acpi_dm_irq_descriptor(struct asl_irq_format_desc *resource,
u32 length, u32 level);
void
acpi_dm_dma_descriptor (
struct asl_dma_format_desc *resource,
u32 length,
u32 level);
acpi_dm_dma_descriptor(struct asl_dma_format_desc *resource,
u32 length, u32 level);
void
acpi_dm_io_descriptor (
struct asl_io_port_desc *resource,
u32 length,
u32 level);
acpi_dm_io_descriptor(struct asl_io_port_desc *resource, u32 length, u32 level);
void
acpi_dm_fixed_io_descriptor (
struct asl_fixed_io_port_desc *resource,
u32 length,
u32 level);
acpi_dm_fixed_io_descriptor(struct asl_fixed_io_port_desc *resource,
u32 length, u32 level);
void
acpi_dm_start_dependent_descriptor (
struct asl_start_dependent_desc *resource,
u32 length,
u32 level);
acpi_dm_start_dependent_descriptor(struct asl_start_dependent_desc *resource,
u32 length, u32 level);
void
acpi_dm_end_dependent_descriptor (
struct asl_start_dependent_desc *resource,
u32 length,
u32 level);
acpi_dm_end_dependent_descriptor(struct asl_start_dependent_desc *resource,
u32 length, u32 level);
void
acpi_dm_vendor_small_descriptor (
struct asl_small_vendor_desc *resource,
u32 length,
u32 level);
acpi_dm_vendor_small_descriptor(struct asl_small_vendor_desc *resource,
u32 length, u32 level);
/*
* dmutils
*/
void
acpi_dm_add_to_external_list (
char *path);
void acpi_dm_add_to_external_list(char *path);
#endif /* __ACDISASM_H__ */
#endif /* __ACDISASM_H__ */

查看文件

@@ -41,419 +41,304 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef _ACDISPAT_H_
#define _ACDISPAT_H_
#define NAMEOF_LOCAL_NTE "__L0"
#define NAMEOF_ARG_NTE "__A0"
/*
* dsopcode - support for late evaluation
*/
acpi_status
acpi_ds_get_buffer_field_arguments (
union acpi_operand_object *obj_desc);
acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc);
acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *rgn_desc);
acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc);
acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_get_region_arguments (
union acpi_operand_object *rgn_desc);
acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_status
acpi_ds_get_buffer_arguments (
union acpi_operand_object *obj_desc);
acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_status
acpi_ds_get_package_arguments (
union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_eval_buffer_field_operands (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_status
acpi_ds_eval_region_operands (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_status
acpi_ds_eval_data_object_operands (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_initialize_region (
acpi_handle obj_handle);
acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
union acpi_operand_object *obj_desc);
acpi_status acpi_ds_initialize_region(acpi_handle obj_handle);
/*
* dsctrl - Parser/Interpreter interface, control stack routines
*/
acpi_status
acpi_ds_exec_begin_control_op (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_status
acpi_ds_exec_end_control_op (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_ds_exec_end_control_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
/*
* dsexec - Parser/Interpreter interface, method execution callbacks
*/
acpi_status
acpi_ds_get_predicate_value (
struct acpi_walk_state *walk_state,
union acpi_operand_object *result_obj);
acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
union acpi_operand_object *result_obj);
acpi_status
acpi_ds_exec_begin_op (
struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);
acpi_status
acpi_ds_exec_end_op (
struct acpi_walk_state *state);
acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);
acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *state);
/*
* dsfield - Parser/Interpreter interface for AML fields
*/
acpi_status
acpi_ds_create_field (
union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state);
acpi_ds_create_field(union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_bank_field (
union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state);
acpi_ds_create_bank_field(union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_index_field (
union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state);
acpi_ds_create_index_field(union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_buffer_field (
union acpi_parse_object *op,
struct acpi_walk_state *walk_state);
acpi_ds_create_buffer_field(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_init_field_objects (
union acpi_parse_object *op,
struct acpi_walk_state *walk_state);
acpi_ds_init_field_objects(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);
/*
* dsload - Parser/Interpreter interface, namespace load callbacks
*/
acpi_status
acpi_ds_load1_begin_op (
struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);
acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);
acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_load1_end_op (
struct acpi_walk_state *walk_state);
acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);
acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_load2_begin_op (
struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op);
acpi_status
acpi_ds_load2_end_op (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_init_callbacks (
struct acpi_walk_state *walk_state,
u32 pass_number);
acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
/*
* dsmthdat - method data (locals/args)
*/
acpi_status
acpi_ds_store_object_to_local (
u16 opcode,
u32 index,
union acpi_operand_object *src_desc,
struct acpi_walk_state *walk_state);
acpi_ds_store_object_to_local(u16 opcode,
u32 index,
union acpi_operand_object *src_desc,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_entry (
u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
union acpi_operand_object ***node);
acpi_ds_method_data_get_entry(u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
union acpi_operand_object ***node);
void
acpi_ds_method_data_delete_all (
struct acpi_walk_state *walk_state);
void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state);
u8
acpi_ds_is_method_value (
union acpi_operand_object *obj_desc);
u8 acpi_ds_is_method_value(union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_method_data_get_value (
u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
union acpi_operand_object **dest_desc);
acpi_ds_method_data_get_value(u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
union acpi_operand_object **dest_desc);
acpi_status
acpi_ds_method_data_init_args (
union acpi_operand_object **params,
u32 max_param_count,
struct acpi_walk_state *walk_state);
acpi_ds_method_data_init_args(union acpi_operand_object **params,
u32 max_param_count,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_node (
u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
struct acpi_namespace_node **node);
void
acpi_ds_method_data_init (
struct acpi_walk_state *walk_state);
acpi_ds_method_data_get_node(u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
struct acpi_namespace_node **node);
void acpi_ds_method_data_init(struct acpi_walk_state *walk_state);
/*
* dsmethod - Parser/Interpreter interface - control method parsing
*/
acpi_status
acpi_ds_parse_method (
acpi_handle obj_handle);
acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node);
acpi_status
acpi_ds_call_control_method (
struct acpi_thread_state *thread,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_ds_call_control_method(struct acpi_thread_state *thread,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
acpi_status
acpi_ds_restart_control_method (
struct acpi_walk_state *walk_state,
union acpi_operand_object *return_desc);
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);
acpi_status
acpi_ds_terminate_control_method (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_begin_method_execution (
struct acpi_namespace_node *method_node,
union acpi_operand_object *obj_desc,
struct acpi_namespace_node *calling_method_node);
acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
union acpi_operand_object *obj_desc,
struct acpi_namespace_node *calling_method_node);
/*
* dsinit
*/
acpi_status
acpi_ds_initialize_objects (
struct acpi_table_desc *table_desc,
struct acpi_namespace_node *start_node);
acpi_ds_initialize_objects(struct acpi_table_desc *table_desc,
struct acpi_namespace_node *start_node);
/*
* dsobject - Parser/Interpreter interface - object initialization and conversion
*/
acpi_status
acpi_ds_build_internal_buffer_obj (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 buffer_length,
union acpi_operand_object **obj_desc_ptr);
acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 buffer_length,
union acpi_operand_object **obj_desc_ptr);
acpi_status
acpi_ds_build_internal_package_obj (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 package_length,
union acpi_operand_object **obj_desc);
acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 package_length,
union acpi_operand_object **obj_desc);
acpi_status
acpi_ds_init_object_from_op (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u16 opcode,
union acpi_operand_object **obj_desc);
acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u16 opcode, union acpi_operand_object **obj_desc);
acpi_status
acpi_ds_create_node (
struct acpi_walk_state *walk_state,
struct acpi_namespace_node *node,
union acpi_parse_object *op);
acpi_ds_create_node(struct acpi_walk_state *walk_state,
struct acpi_namespace_node *node,
union acpi_parse_object *op);
/*
* dsutils - Parser/Interpreter interface utility routines
*/
void
acpi_ds_clear_implicit_return (
struct acpi_walk_state *walk_state);
void acpi_ds_clear_implicit_return(struct acpi_walk_state *walk_state);
u8
acpi_ds_do_implicit_return (
union acpi_operand_object *return_desc,
struct acpi_walk_state *walk_state,
u8 add_reference);
acpi_ds_do_implicit_return(union acpi_operand_object *return_desc,
struct acpi_walk_state *walk_state,
u8 add_reference);
u8
acpi_ds_is_result_used (
union acpi_parse_object *op,
struct acpi_walk_state *walk_state);
acpi_ds_is_result_used(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);
void
acpi_ds_delete_result_if_not_used (
union acpi_parse_object *op,
union acpi_operand_object *result_obj,
struct acpi_walk_state *walk_state);
acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
union acpi_operand_object *result_obj,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_operand (
struct acpi_walk_state *walk_state,
union acpi_parse_object *arg,
u32 args_remaining);
acpi_ds_create_operand(struct acpi_walk_state *walk_state,
union acpi_parse_object *arg, u32 args_remaining);
acpi_status
acpi_ds_create_operands (
struct acpi_walk_state *walk_state,
union acpi_parse_object *first_arg);
acpi_ds_create_operands(struct acpi_walk_state *walk_state,
union acpi_parse_object *first_arg);
acpi_status
acpi_ds_resolve_operands (
struct acpi_walk_state *walk_state);
void
acpi_ds_clear_operands (
struct acpi_walk_state *walk_state);
acpi_status acpi_ds_resolve_operands(struct acpi_walk_state *walk_state);
void acpi_ds_clear_operands(struct acpi_walk_state *walk_state);
/*
* dswscope - Scope Stack manipulation
*/
acpi_status
acpi_ds_scope_stack_push (
struct acpi_namespace_node *node,
acpi_object_type type,
struct acpi_walk_state *walk_state);
acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
acpi_object_type type,
struct acpi_walk_state *walk_state);
acpi_status acpi_ds_scope_stack_pop(struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_scope_stack_pop (
struct acpi_walk_state *walk_state);
void
acpi_ds_scope_stack_clear (
struct acpi_walk_state *walk_state);
void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state);
/*
* dswstate - parser WALK_STATE management routines
*/
acpi_status
acpi_ds_obj_stack_push (
void *object,
struct acpi_walk_state *walk_state);
acpi_ds_obj_stack_push(void *object, struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop (
u32 pop_count,
struct acpi_walk_state *walk_state);
acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state);
struct acpi_walk_state *
acpi_ds_create_walk_state (
acpi_owner_id owner_id,
union acpi_parse_object *origin,
union acpi_operand_object *mth_desc,
struct acpi_thread_state *thread);
struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
union acpi_parse_object
*origin,
union acpi_operand_object
*mth_desc,
struct acpi_thread_state
*thread);
acpi_status
acpi_ds_init_aml_walk (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
struct acpi_namespace_node *method_node,
u8 *aml_start,
u32 aml_length,
struct acpi_parameter_info *info,
u32 pass_number);
acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
struct acpi_namespace_node *method_node,
u8 * aml_start,
u32 aml_length,
struct acpi_parameter_info *info, u8 pass_number);
acpi_status
acpi_ds_obj_stack_pop_and_delete (
u32 pop_count,
struct acpi_walk_state *walk_state);
acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
struct acpi_walk_state *walk_state);
void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state);
struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state
*thread);
void
acpi_ds_delete_walk_state (
struct acpi_walk_state *walk_state);
acpi_ds_push_walk_state(struct acpi_walk_state *walk_state,
struct acpi_thread_state *thread);
struct acpi_walk_state *
acpi_ds_pop_walk_state (
struct acpi_thread_state *thread);
acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state);
void
acpi_ds_push_walk_state (
struct acpi_walk_state *walk_state,
struct acpi_thread_state *thread);
acpi_status acpi_ds_result_stack_push(struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_stack_pop (
struct acpi_walk_state *walk_state);
acpi_status acpi_ds_result_stack_clear(struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_stack_push (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_stack_clear (
struct acpi_walk_state *walk_state);
struct acpi_walk_state *
acpi_ds_get_current_walk_state (
struct acpi_thread_state *thread);
struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state
*thread);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_ds_result_remove (
union acpi_operand_object **object,
u32 index,
struct acpi_walk_state *walk_state);
acpi_ds_result_remove(union acpi_operand_object **object,
u32 index, struct acpi_walk_state *walk_state);
#endif
acpi_status
acpi_ds_result_pop (
union acpi_operand_object **object,
struct acpi_walk_state *walk_state);
acpi_ds_result_pop(union acpi_operand_object **object,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_push (
union acpi_operand_object *object,
struct acpi_walk_state *walk_state);
acpi_ds_result_push(union acpi_operand_object *object,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_pop_from_bottom (
union acpi_operand_object **object,
struct acpi_walk_state *walk_state);
acpi_ds_result_pop_from_bottom(union acpi_operand_object **object,
struct acpi_walk_state *walk_state);
#ifdef ACPI_ENABLE_OBJECT_CACHE
void
acpi_ds_delete_walk_state_cache (
void);
#endif
#endif /* _ACDISPAT_H_ */
#endif /* _ACDISPAT_H_ */

查看文件

@@ -44,250 +44,167 @@
#ifndef __ACEVENTS_H__
#define __ACEVENTS_H__
/*
* evevent
*/
acpi_status
acpi_ev_initialize_events (
void);
acpi_status acpi_ev_initialize_events(void);
acpi_status
acpi_ev_install_xrupt_handlers (
void);
u32
acpi_ev_fixed_event_detect (
void);
acpi_status acpi_ev_install_xrupt_handlers(void);
u32 acpi_ev_fixed_event_detect(void);
/*
* evmisc
*/
u8
acpi_ev_is_notify_object (
struct acpi_namespace_node *node);
u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node);
acpi_status acpi_ev_acquire_global_lock(u16 timeout);
acpi_status acpi_ev_release_global_lock(void);
acpi_status acpi_ev_init_global_lock_handler(void);
u32 acpi_ev_get_gpe_number_index(u32 gpe_number);
acpi_status
acpi_ev_acquire_global_lock(
u16 timeout);
acpi_status
acpi_ev_release_global_lock(
void);
acpi_status
acpi_ev_init_global_lock_handler (
void);
u32
acpi_ev_get_gpe_number_index (
u32 gpe_number);
acpi_status
acpi_ev_queue_notify_request (
struct acpi_namespace_node *node,
u32 notify_value);
acpi_ev_queue_notify_request(struct acpi_namespace_node *node,
u32 notify_value);
/*
* evgpe - GPE handling and dispatch
*/
acpi_status
acpi_ev_update_gpe_enable_masks (
struct acpi_gpe_event_info *gpe_event_info,
u8 type);
acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
u8 type);
acpi_status
acpi_ev_enable_gpe (
struct acpi_gpe_event_info *gpe_event_info,
u8 write_to_hardware);
acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info,
u8 write_to_hardware);
acpi_status
acpi_ev_disable_gpe (
struct acpi_gpe_event_info *gpe_event_info);
struct acpi_gpe_event_info *
acpi_ev_get_gpe_event_info (
acpi_handle gpe_device,
u32 gpe_number);
acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info);
struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
u32 gpe_number);
/*
* evgpeblk
*/
u8
acpi_ev_valid_gpe_event (
struct acpi_gpe_event_info *gpe_event_info);
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,
u32 flags);
acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
acpi_status
acpi_ev_delete_gpe_handlers (
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
struct acpi_generic_address *gpe_block_address,
u32 register_count,
u8 gpe_block_base_number,
u32 interrupt_number,
struct acpi_gpe_block_info **return_gpe_block);
acpi_status
acpi_ev_create_gpe_block (
struct acpi_namespace_node *gpe_device,
struct acpi_generic_address *gpe_block_address,
u32 register_count,
u8 gpe_block_base_number,
u32 interrupt_level,
struct acpi_gpe_block_info **return_gpe_block);
acpi_status
acpi_ev_delete_gpe_block (
struct acpi_gpe_block_info *gpe_block);
acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block);
u32
acpi_ev_gpe_dispatch (
struct acpi_gpe_event_info *gpe_event_info,
u32 gpe_number);
acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info,
u32 gpe_number);
u32
acpi_ev_gpe_detect (
struct acpi_gpe_xrupt_info *gpe_xrupt_list);
u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list);
acpi_status
acpi_ev_set_gpe_type (
struct acpi_gpe_event_info *gpe_event_info,
u8 type);
acpi_ev_set_gpe_type(struct acpi_gpe_event_info *gpe_event_info, u8 type);
acpi_status
acpi_ev_check_for_wake_only_gpe (
struct acpi_gpe_event_info *gpe_event_info);
acpi_status
acpi_ev_gpe_initialize (
void);
acpi_ev_check_for_wake_only_gpe(struct acpi_gpe_event_info *gpe_event_info);
acpi_status acpi_ev_gpe_initialize(void);
/*
* evregion - Address Space handling
*/
acpi_status
acpi_ev_install_region_handlers (
void);
acpi_status acpi_ev_install_region_handlers(void);
acpi_status acpi_ev_initialize_op_regions(void);
acpi_status
acpi_ev_initialize_op_regions (
void);
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
u32 function,
acpi_physical_address address,
u32 bit_width, void *value);
acpi_status
acpi_ev_address_space_dispatch (
union acpi_operand_object *region_obj,
u32 function,
acpi_physical_address address,
u32 bit_width,
void *value);
acpi_status
acpi_ev_attach_region (
union acpi_operand_object *handler_obj,
union acpi_operand_object *region_obj,
u8 acpi_ns_is_locked);
acpi_ev_attach_region(union acpi_operand_object *handler_obj,
union acpi_operand_object *region_obj,
u8 acpi_ns_is_locked);
void
acpi_ev_detach_region (
union acpi_operand_object *region_obj,
u8 acpi_ns_is_locked);
acpi_ev_detach_region(union acpi_operand_object *region_obj,
u8 acpi_ns_is_locked);
acpi_status
acpi_ev_install_space_handler (
struct acpi_namespace_node *node,
acpi_adr_space_type space_id,
acpi_adr_space_handler handler,
acpi_adr_space_setup setup,
void *context);
acpi_ev_install_space_handler(struct acpi_namespace_node *node,
acpi_adr_space_type space_id,
acpi_adr_space_handler handler,
acpi_adr_space_setup setup, void *context);
acpi_status
acpi_ev_execute_reg_methods (
struct acpi_namespace_node *node,
acpi_adr_space_type space_id);
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
acpi_adr_space_type space_id);
acpi_status
acpi_ev_execute_reg_method (
union acpi_operand_object *region_obj,
u32 function);
acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function);
/*
* evregini - Region initialization and setup
*/
acpi_status
acpi_ev_system_memory_region_setup (
acpi_handle handle,
u32 function,
void *handler_context,
void **region_context);
acpi_ev_system_memory_region_setup(acpi_handle handle,
u32 function,
void *handler_context,
void **region_context);
acpi_status
acpi_ev_io_space_region_setup (
acpi_handle handle,
u32 function,
void *handler_context,
void **region_context);
acpi_ev_io_space_region_setup(acpi_handle handle,
u32 function,
void *handler_context, void **region_context);
acpi_status
acpi_ev_pci_config_region_setup (
acpi_handle handle,
u32 function,
void *handler_context,
void **region_context);
acpi_ev_pci_config_region_setup(acpi_handle handle,
u32 function,
void *handler_context, void **region_context);
acpi_status
acpi_ev_cmos_region_setup (
acpi_handle handle,
u32 function,
void *handler_context,
void **region_context);
acpi_ev_cmos_region_setup(acpi_handle handle,
u32 function,
void *handler_context, void **region_context);
acpi_status
acpi_ev_pci_bar_region_setup (
acpi_handle handle,
u32 function,
void *handler_context,
void **region_context);
acpi_ev_pci_bar_region_setup(acpi_handle handle,
u32 function,
void *handler_context, void **region_context);
acpi_status
acpi_ev_default_region_setup (
acpi_handle handle,
u32 function,
void *handler_context,
void **region_context);
acpi_ev_default_region_setup(acpi_handle handle,
u32 function,
void *handler_context, void **region_context);
acpi_status
acpi_ev_initialize_region (
union acpi_operand_object *region_obj,
u8 acpi_ns_locked);
acpi_ev_initialize_region(union acpi_operand_object *region_obj,
u8 acpi_ns_locked);
/*
* evsci - SCI (System Control Interrupt) handling/dispatch
*/
u32 ACPI_SYSTEM_XFACE
acpi_ev_gpe_xrupt_handler (
void *context);
u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context);
u32
acpi_ev_install_sci_handler (
void);
u32 acpi_ev_install_sci_handler(void);
acpi_status
acpi_ev_remove_sci_handler (
void);
acpi_status acpi_ev_remove_sci_handler(void);
u32
acpi_ev_initialize_sCI (
u32 program_sCI);
u32 acpi_ev_initialize_sCI(u32 program_sCI);
void
acpi_ev_terminate (
void);
void acpi_ev_terminate(void);
#endif /* __ACEVENTS_H__ */
#endif /* __ACEVENTS_H__ */

查看文件

@@ -44,7 +44,6 @@
#ifndef __ACEXCEP_H__
#define __ACEXCEP_H__
/*
* Exceptions returned by external ACPI interfaces
*/
@@ -55,11 +54,9 @@
#define AE_CODE_CONTROL 0x4000
#define AE_CODE_MASK 0xF000
#define ACPI_SUCCESS(a) (!(a))
#define ACPI_FAILURE(a) (a)
#define AE_OK (acpi_status) 0x0000
/*
@@ -95,9 +92,9 @@
#define AE_ABORT_METHOD (acpi_status) (0x001C | AE_CODE_ENVIRONMENTAL)
#define AE_SAME_HANDLER (acpi_status) (0x001D | AE_CODE_ENVIRONMENTAL)
#define AE_WAKE_ONLY_GPE (acpi_status) (0x001E | AE_CODE_ENVIRONMENTAL)
#define AE_OWNER_ID_LIMIT (acpi_status) (0x001F | AE_CODE_ENVIRONMENTAL)
#define AE_CODE_ENV_MAX 0x001E
#define AE_CODE_ENV_MAX 0x001F
/*
* Programmer exceptions
@@ -114,7 +111,6 @@
#define AE_CODE_PGM_MAX 0x0009
/*
* Acpi table exceptions
*/
@@ -127,7 +123,6 @@
#define AE_CODE_TBL_MAX 0x0006
/*
* AML exceptions. These are caused by problems with
* the actual AML byte stream
@@ -168,7 +163,6 @@
#define AE_CODE_AML_MAX 0x0021
/*
* Internal exceptions used for control
*/
@@ -186,16 +180,13 @@
#define AE_CODE_CTRL_MAX 0x000B
#ifdef DEFINE_ACPI_GLOBALS
/*
* String versions of the exception codes above
* These strings must match the corresponding defines exactly
*/
char const *acpi_gbl_exception_names_env[] =
{
char const *acpi_gbl_exception_names_env[] = {
"AE_OK",
"AE_ERROR",
"AE_NO_ACPI_TABLES",
@@ -226,11 +217,11 @@ char const *acpi_gbl_exception_names_env[] =
"AE_LOGICAL_ADDRESS",
"AE_ABORT_METHOD",
"AE_SAME_HANDLER",
"AE_WAKE_ONLY_GPE"
"AE_WAKE_ONLY_GPE",
"AE_OWNER_ID_LIMIT"
};
char const *acpi_gbl_exception_names_pgm[] =
{
char const *acpi_gbl_exception_names_pgm[] = {
"AE_BAD_PARAMETER",
"AE_BAD_CHARACTER",
"AE_BAD_PATHNAME",
@@ -242,8 +233,7 @@ char const *acpi_gbl_exception_names_pgm[] =
"AE_BAD_DECIMAL_CONSTANT"
};
char const *acpi_gbl_exception_names_tbl[] =
{
char const *acpi_gbl_exception_names_tbl[] = {
"AE_BAD_SIGNATURE",
"AE_BAD_HEADER",
"AE_BAD_CHECKSUM",
@@ -252,8 +242,7 @@ char const *acpi_gbl_exception_names_tbl[] =
"AE_INVALID_TABLE_LENGTH"
};
char const *acpi_gbl_exception_names_aml[] =
{
char const *acpi_gbl_exception_names_aml[] = {
"AE_AML_ERROR",
"AE_AML_PARSE",
"AE_AML_BAD_OPCODE",
@@ -289,8 +278,7 @@ char const *acpi_gbl_exception_names_aml[] =
"AE_AML_BAD_RESOURCE_LENGTH"
};
char const *acpi_gbl_exception_names_ctrl[] =
{
char const *acpi_gbl_exception_names_ctrl[] = {
"AE_CTRL_RETURN_VALUE",
"AE_CTRL_PENDING",
"AE_CTRL_TERMINATE",
@@ -304,6 +292,6 @@ char const *acpi_gbl_exception_names_ctrl[] =
"AE_CTRL_SKIP"
};
#endif /* ACPI GLOBALS */
#endif /* ACPI GLOBALS */
#endif /* __ACEXCEP_H__ */
#endif /* __ACEXCEP_H__ */

查看文件

@@ -44,7 +44,6 @@
#ifndef __ACGLOBAL_H__
#define __ACGLOBAL_H__
/*
* Ensure that the globals are actually defined and initialized only once.
*
@@ -63,9 +62,8 @@
* Keep local copies of these FADT-based registers. NOTE: These globals
* are first in this file for alignment reasons on 64-bit systems.
*/
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable;
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable;
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
/*****************************************************************************
*
@@ -75,13 +73,12 @@ ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
/* Runtime configuration of debug print levels */
extern u32 acpi_dbg_level;
extern u32 acpi_dbg_layer;
extern u32 acpi_dbg_level;
extern u32 acpi_dbg_layer;
/* Procedure nesting level for debug output */
extern u32 acpi_gbl_nesting_level;
extern u32 acpi_gbl_nesting_level;
/*****************************************************************************
*
@@ -98,7 +95,7 @@ extern u32 acpi_gbl_nesting_level;
* 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
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpreter_slack, FALSE);
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
/*
* Automatically serialize ALL control methods? Default is FALSE, meaning
@@ -106,22 +103,21 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_enable_interpreter_slack, FALSE)
* Only change this if the ASL code is poorly written and cannot handle
* reentrancy even though methods are marked "not_serialized".
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_all_methods_serialized, FALSE);
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE);
/*
* Create the predefined _OSI method in the namespace? Default is TRUE
* because ACPI CA is fully compatible with other ACPI implementations.
* Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_create_osi_method, TRUE);
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE);
/*
* Disable wakeup GPEs during runtime? Default is TRUE because WAKE and
* RUNTIME GPEs should never be shared, and WAKE GPEs should typically only
* be enabled just before going to sleep.
*/
ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_leave_wake_gpes_disabled, TRUE);
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);
/*****************************************************************************
*
@@ -137,42 +133,46 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL (acpi_gbl_leave_wake_gpes_disabled, TRUE);
* These tables are single-table only; meaning that there can be at most one
* of each in the system. Each global points to the actual table.
*/
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 acpi_table_header *acpi_gbl_DSDT;
ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS;
ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
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 acpi_table_header *acpi_gbl_DSDT;
ACPI_EXTERN 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
* sufficient; Therefore, there isn't one!
*/
/* The root table can be either an RSDT or an XSDT */
ACPI_EXTERN u8 acpi_gbl_root_table_type;
#define ACPI_TABLE_TYPE_RSDT 'R'
#define ACPI_TABLE_TYPE_XSDT 'X'
/*
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths:
* If we are executing a method that exists in a 32-bit ACPI table,
* use only the lower 32 bits of the (internal) 64-bit Integer.
*/
ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
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[NUM_ACPI_TABLE_TYPES];
extern struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES];
/*
* 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[NUM_MUTEX];
/*****************************************************************************
*
@@ -180,41 +180,56 @@ ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[NUM_MUTEX];
*
****************************************************************************/
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
ACPI_EXTERN struct acpi_memory_list acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify;
ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify;
ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
/* Lists for tracking memory allocations */
ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count;
ACPI_EXTERN u32 acpi_gbl_original_mode;
ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
ACPI_EXTERN u32 acpi_gbl_ps_find_count;
ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
ACPI_EXTERN u16 acpi_gbl_next_table_owner_id;
ACPI_EXTERN u16 acpi_gbl_next_method_owner_id;
ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
ACPI_EXTERN u8 acpi_gbl_global_lock_present;
ACPI_EXTERN u8 acpi_gbl_events_initialized;
ACPI_EXTERN u8 acpi_gbl_system_awake_and_running;
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
#endif
extern u8 acpi_gbl_shutdown;
extern u32 acpi_gbl_startup_flags;
extern const u8 acpi_gbl_decode_to8bit[8];
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];
/* Object caches */
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;
ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;
/* Global handlers */
ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify;
ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify;
ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
/* Misc */
ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count;
ACPI_EXTERN u32 acpi_gbl_original_mode;
ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
ACPI_EXTERN u32 acpi_gbl_ps_find_count;
ACPI_EXTERN u32 acpi_gbl_owner_id_mask;
ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
ACPI_EXTERN u8 acpi_gbl_global_lock_present;
ACPI_EXTERN u8 acpi_gbl_events_initialized;
ACPI_EXTERN u8 acpi_gbl_system_awake_and_running;
extern u8 acpi_gbl_shutdown;
extern u32 acpi_gbl_startup_flags;
extern const u8 acpi_gbl_decode_to8bit[8];
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];
/*****************************************************************************
*
@@ -230,36 +245,34 @@ extern const char *acpi_gbl_valid_osi_strings[ACPI_
#define NUM_PREDEFINED_NAMES 9
#endif
ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device;
ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device;
extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];
extern const struct acpi_predefined_names acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];
extern const struct acpi_predefined_names
acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES];
#ifdef ACPI_DEBUG_OUTPUT
ACPI_EXTERN u32 acpi_gbl_current_node_count;
ACPI_EXTERN u32 acpi_gbl_current_node_size;
ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer;
ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
ACPI_EXTERN u32 acpi_gbl_current_node_count;
ACPI_EXTERN u32 acpi_gbl_current_node_size;
ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer;
ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
#endif
/*****************************************************************************
*
* Interpreter globals
*
****************************************************************************/
ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
/* Control method single step flag */
ACPI_EXTERN u8 acpi_gbl_cm_single_step;
ACPI_EXTERN u8 acpi_gbl_cm_single_step;
/*****************************************************************************
*
@@ -267,8 +280,7 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step;
*
****************************************************************************/
ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
/*****************************************************************************
*
@@ -276,10 +288,10 @@ ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
*
****************************************************************************/
extern struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
extern struct acpi_bit_register_info
acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
/*****************************************************************************
*
@@ -287,12 +299,14 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
*
****************************************************************************/
extern struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
ACPI_EXTERN struct acpi_fixed_event_handler acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
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];
ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
extern struct acpi_fixed_event_info
acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
ACPI_EXTERN struct acpi_fixed_event_handler
acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
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];
ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
/*****************************************************************************
*
@@ -300,58 +314,55 @@ ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
*
****************************************************************************/
ACPI_EXTERN u8 acpi_gbl_db_output_flags;
ACPI_EXTERN u8 acpi_gbl_db_output_flags;
#ifdef ACPI_DISASSEMBLER
ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
#endif
#ifdef ACPI_DEBUGGER
extern u8 acpi_gbl_method_executing;
extern u8 acpi_gbl_abort_method;
extern u8 acpi_gbl_db_terminate_threads;
extern u8 acpi_gbl_method_executing;
extern u8 acpi_gbl_abort_method;
extern u8 acpi_gbl_db_terminate_threads;
ACPI_EXTERN int optind;
ACPI_EXTERN char *optarg;
ACPI_EXTERN int optind;
ACPI_EXTERN char *optarg;
ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
ACPI_EXTERN char acpi_gbl_db_line_buf[80];
ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
ACPI_EXTERN char *acpi_gbl_db_buffer;
ACPI_EXTERN char *acpi_gbl_db_filename;
ACPI_EXTERN u32 acpi_gbl_db_debug_level;
ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node;
ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
ACPI_EXTERN char acpi_gbl_db_line_buf[80];
ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
ACPI_EXTERN char *acpi_gbl_db_buffer;
ACPI_EXTERN char *acpi_gbl_db_filename;
ACPI_EXTERN u32 acpi_gbl_db_debug_level;
ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr;
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node;
/*
* Statistic globals
*/
ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
ACPI_EXTERN u32 acpi_gbl_num_nodes;
ACPI_EXTERN u32 acpi_gbl_num_objects;
ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1];
ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1];
ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
ACPI_EXTERN u32 acpi_gbl_num_nodes;
ACPI_EXTERN u32 acpi_gbl_num_objects;
ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
#endif /* ACPI_DEBUGGER */
#endif /* ACPI_DEBUGGER */
#endif /* __ACGLOBAL_H__ */
#endif /* __ACGLOBAL_H__ */

查看文件

@@ -44,7 +44,6 @@
#ifndef __ACHWARE_H__
#define __ACHWARE_H__
/* PM Timer ticks per second (HZ) */
#define PM_TIMER_FREQUENCY 3579545
@@ -57,126 +56,78 @@
#define ACPI_SST_SLEEPING 3
#define ACPI_SST_SLEEP_CONTEXT 4
/* Prototypes */
/*
* hwacpi - high level functions
*/
acpi_status
acpi_hw_initialize (
void);
acpi_status acpi_hw_initialize(void);
acpi_status
acpi_hw_set_mode (
u32 mode);
u32
acpi_hw_get_mode (
void);
acpi_status acpi_hw_set_mode(u32 mode);
u32 acpi_hw_get_mode(void);
/*
* hwregs - ACPI Register I/O
*/
struct acpi_bit_register_info *
acpi_hw_get_bit_register_info (
u32 register_id);
struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id);
acpi_status
acpi_hw_register_read (
u8 use_lock,
u32 register_id,
u32 *return_value);
acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value);
acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value);
acpi_status
acpi_hw_register_write (
u8 use_lock,
u32 register_id,
u32 value);
acpi_hw_low_level_read(u32 width,
u32 * value, struct acpi_generic_address *reg);
acpi_status
acpi_hw_low_level_read (
u32 width,
u32 *value,
struct acpi_generic_address *reg);
acpi_status
acpi_hw_low_level_write (
u32 width,
u32 value,
struct acpi_generic_address *reg);
acpi_status
acpi_hw_clear_acpi_status (
u32 flags);
acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address *reg);
acpi_status acpi_hw_clear_acpi_status(u32 flags);
/*
* hwgpe - GPE support
*/
acpi_status
acpi_hw_write_gpe_enable_reg (
struct acpi_gpe_event_info *gpe_event_info);
acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info);
acpi_status
acpi_hw_disable_gpe_block (
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info);
acpi_status
acpi_hw_clear_gpe (
struct acpi_gpe_event_info *gpe_event_info);
acpi_status
acpi_hw_clear_gpe_block (
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_hw_get_gpe_status (
struct acpi_gpe_event_info *gpe_event_info,
acpi_event_status *event_status);
#endif /* ACPI_FUTURE_USAGE */
acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,
acpi_event_status * event_status);
#endif /* ACPI_FUTURE_USAGE */
acpi_status acpi_hw_disable_all_gpes(void);
acpi_status acpi_hw_enable_all_runtime_gpes(void);
acpi_status acpi_hw_enable_all_wakeup_gpes(void);
acpi_status
acpi_hw_disable_all_gpes (
u32 flags);
acpi_status
acpi_hw_enable_all_runtime_gpes (
u32 flags);
acpi_status
acpi_hw_enable_all_wakeup_gpes (
u32 flags);
acpi_status
acpi_hw_enable_runtime_gpe_block (
struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_block_info *gpe_block);
#ifdef ACPI_FUTURE_USAGE
/*
* hwtimer - ACPI Timer prototypes
*/
acpi_status
acpi_get_timer_resolution (
u32 *resolution);
acpi_status acpi_get_timer_resolution(u32 * resolution);
acpi_status acpi_get_timer(u32 * ticks);
acpi_status
acpi_get_timer (
u32 *ticks);
acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed);
#endif /* ACPI_FUTURE_USAGE */
acpi_status
acpi_get_timer_duration (
u32 start_ticks,
u32 end_ticks,
u32 *time_elapsed);
#endif /* ACPI_FUTURE_USAGE */
#endif /* __ACHWARE_H__ */
#endif /* __ACHWARE_H__ */

查看文件

@@ -44,29 +44,22 @@
#ifndef __ACINTERP_H__
#define __ACINTERP_H__
#define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1]))
/*
* exconvrt - object conversion
*/
acpi_status
acpi_ex_convert_to_integer (
union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc,
u32 flags);
acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc, u32 flags);
acpi_status
acpi_ex_convert_to_buffer (
union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc);
acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc);
acpi_status
acpi_ex_convert_to_string (
union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc,
u32 type);
acpi_ex_convert_to_string(union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc, u32 type);
/* Types for ->String conversion */
@@ -76,587 +69,412 @@ acpi_ex_convert_to_string (
#define ACPI_EXPLICIT_CONVERT_DECIMAL 0x00000003
acpi_status
acpi_ex_convert_to_target_type (
acpi_object_type destination_type,
union acpi_operand_object *source_desc,
union acpi_operand_object **result_desc,
struct acpi_walk_state *walk_state);
acpi_ex_convert_to_target_type(acpi_object_type destination_type,
union acpi_operand_object *source_desc,
union acpi_operand_object **result_desc,
struct acpi_walk_state *walk_state);
/*
* exfield - ACPI AML (p-code) execution - field manipulation
*/
acpi_status
acpi_ex_common_buffer_setup (
union acpi_operand_object *obj_desc,
u32 buffer_length,
u32 *datum_count);
acpi_ex_common_buffer_setup(union acpi_operand_object *obj_desc,
u32 buffer_length, u32 * datum_count);
acpi_status
acpi_ex_write_with_update_rule (
union acpi_operand_object *obj_desc,
acpi_integer mask,
acpi_integer field_value,
u32 field_datum_byte_offset);
acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
acpi_integer mask,
acpi_integer field_value,
u32 field_datum_byte_offset);
void
acpi_ex_get_buffer_datum(
acpi_integer *datum,
void *buffer,
u32 buffer_length,
u32 byte_granularity,
u32 buffer_offset);
acpi_ex_get_buffer_datum(acpi_integer * datum,
void *buffer,
u32 buffer_length,
u32 byte_granularity, u32 buffer_offset);
void
acpi_ex_set_buffer_datum (
acpi_integer merged_datum,
void *buffer,
u32 buffer_length,
u32 byte_granularity,
u32 buffer_offset);
acpi_ex_set_buffer_datum(acpi_integer merged_datum,
void *buffer,
u32 buffer_length,
u32 byte_granularity, u32 buffer_offset);
acpi_status
acpi_ex_read_data_from_field (
struct acpi_walk_state *walk_state,
union acpi_operand_object *obj_desc,
union acpi_operand_object **ret_buffer_desc);
acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
union acpi_operand_object *obj_desc,
union acpi_operand_object **ret_buffer_desc);
acpi_status
acpi_ex_write_data_to_field (
union acpi_operand_object *source_desc,
union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc);
acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
union acpi_operand_object *obj_desc,
union acpi_operand_object **result_desc);
/*
* exfldio - low level field I/O
*/
acpi_status
acpi_ex_extract_from_field (
union acpi_operand_object *obj_desc,
void *buffer,
u32 buffer_length);
acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
void *buffer, u32 buffer_length);
acpi_status
acpi_ex_insert_into_field (
union acpi_operand_object *obj_desc,
void *buffer,
u32 buffer_length);
acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
void *buffer, u32 buffer_length);
acpi_status
acpi_ex_access_region (
union acpi_operand_object *obj_desc,
u32 field_datum_byte_offset,
acpi_integer *value,
u32 read_write);
acpi_ex_access_region(union acpi_operand_object *obj_desc,
u32 field_datum_byte_offset,
acpi_integer * value, u32 read_write);
/*
* exmisc - misc support routines
*/
acpi_status
acpi_ex_get_object_reference (
union acpi_operand_object *obj_desc,
union acpi_operand_object **return_desc,
struct acpi_walk_state *walk_state);
acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,
union acpi_operand_object **return_desc,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_concat_template (
union acpi_operand_object *obj_desc,
union acpi_operand_object *obj_desc2,
union acpi_operand_object **actual_return_desc,
struct acpi_walk_state *walk_state);
acpi_ex_concat_template(union acpi_operand_object *obj_desc,
union acpi_operand_object *obj_desc2,
union acpi_operand_object **actual_return_desc,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_do_concatenate (
union acpi_operand_object *obj_desc,
union acpi_operand_object *obj_desc2,
union acpi_operand_object **actual_return_desc,
struct acpi_walk_state *walk_state);
acpi_ex_do_concatenate(union acpi_operand_object *obj_desc,
union acpi_operand_object *obj_desc2,
union acpi_operand_object **actual_return_desc,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_do_logical_numeric_op (
u16 opcode,
acpi_integer integer0,
acpi_integer integer1,
u8 *logical_result);
acpi_ex_do_logical_numeric_op(u16 opcode,
acpi_integer integer0,
acpi_integer integer1, u8 * logical_result);
acpi_status
acpi_ex_do_logical_op (
u16 opcode,
union acpi_operand_object *operand0,
union acpi_operand_object *operand1,
u8 *logical_result);
acpi_ex_do_logical_op(u16 opcode,
union acpi_operand_object *operand0,
union acpi_operand_object *operand1, u8 * logical_result);
acpi_integer
acpi_ex_do_math_op (
u16 opcode,
acpi_integer operand0,
acpi_integer operand1);
acpi_ex_do_math_op(u16 opcode, acpi_integer operand0, acpi_integer operand1);
acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state);
acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state);
acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_mutex (
struct acpi_walk_state *walk_state);
acpi_ex_create_region(u8 * aml_start,
u32 aml_length,
u8 region_space, struct acpi_walk_state *walk_state);
acpi_status acpi_ex_create_table_region(struct acpi_walk_state *walk_state);
acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state);
acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_processor (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_power_resource (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_region (
u8 *aml_start,
u32 aml_length,
u8 region_space,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_table_region (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_event (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_alias (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_method (
u8 *aml_start,
u32 aml_length,
struct acpi_walk_state *walk_state);
acpi_ex_create_method(u8 * aml_start,
u32 aml_length, struct acpi_walk_state *walk_state);
/*
* exconfig - dynamic table load/unload
*/
acpi_status
acpi_ex_load_op (
union acpi_operand_object *obj_desc,
union acpi_operand_object *target,
struct acpi_walk_state *walk_state);
acpi_ex_load_op(union acpi_operand_object *obj_desc,
union acpi_operand_object *target,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_load_table_op (
struct acpi_walk_state *walk_state,
union acpi_operand_object **return_desc);
acpi_status
acpi_ex_unload_table (
union acpi_operand_object *ddb_handle);
acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
union acpi_operand_object **return_desc);
acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle);
/*
* exmutex - mutex support
*/
acpi_status
acpi_ex_acquire_mutex (
union acpi_operand_object *time_desc,
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_release_mutex (
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);
void
acpi_ex_release_all_mutexes (
struct acpi_thread_state *thread);
void
acpi_ex_unlink_mutex (
union acpi_operand_object *obj_desc);
void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread);
void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc);
/*
* exprep - ACPI AML execution - prep utilities
*/
acpi_status
acpi_ex_prep_common_field_object (
union acpi_operand_object *obj_desc,
u8 field_flags,
u8 field_attribute,
u32 field_bit_position,
u32 field_bit_length);
acpi_status
acpi_ex_prep_field_value (
struct acpi_create_field_info *info);
acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc,
u8 field_flags,
u8 field_attribute,
u32 field_bit_position, u32 field_bit_length);
acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info);
/*
* exsystem - Interface to OS services
*/
acpi_status
acpi_ex_system_do_notify_op (
union acpi_operand_object *value,
union acpi_operand_object *obj_desc);
acpi_ex_system_do_notify_op(union acpi_operand_object *value,
union acpi_operand_object *obj_desc);
acpi_status acpi_ex_system_do_suspend(acpi_integer time);
acpi_status acpi_ex_system_do_stall(u32 time);
acpi_status
acpi_ex_system_do_suspend(
acpi_integer time);
acpi_ex_system_acquire_mutex(union acpi_operand_object *time,
union acpi_operand_object *obj_desc);
acpi_status acpi_ex_system_release_mutex(union acpi_operand_object *obj_desc);
acpi_status acpi_ex_system_signal_event(union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_do_stall (
u32 time);
acpi_ex_system_wait_event(union acpi_operand_object *time,
union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_acquire_mutex(
union acpi_operand_object *time,
union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_release_mutex(
union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_signal_event(
union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_wait_event(
union acpi_operand_object *time,
union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_reset_event(
union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_wait_semaphore (
acpi_handle semaphore,
u16 timeout);
acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc);
acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout);
/*
* exoparg1 - ACPI AML execution, 1 operand
*/
acpi_status
acpi_ex_opcode_0A_0T_1R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_0T_0R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_0T_1R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_1T_1R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_1T_0R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state);
/*
* exoparg2 - ACPI AML execution, 2 operands
*/
acpi_status
acpi_ex_opcode_2A_0T_0R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_0T_1R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_1T_1R (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_2T_1R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state);
/*
* exoparg3 - ACPI AML execution, 3 operands
*/
acpi_status
acpi_ex_opcode_3A_0T_0R (
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_3A_1T_1R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state);
/*
* exoparg6 - ACPI AML execution, 6 operands
*/
acpi_status
acpi_ex_opcode_6A_0T_1R (
struct acpi_walk_state *walk_state);
acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state *walk_state);
/*
* exresolv - Object resolution and get value functions
*/
acpi_status
acpi_ex_resolve_to_value (
union acpi_operand_object **stack_ptr,
struct acpi_walk_state *walk_state);
acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_multiple (
struct acpi_walk_state *walk_state,
union acpi_operand_object *operand,
acpi_object_type *return_type,
union acpi_operand_object **return_desc);
acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
union acpi_operand_object *operand,
acpi_object_type * return_type,
union acpi_operand_object **return_desc);
/*
* exresnte - resolve namespace node
*/
acpi_status
acpi_ex_resolve_node_to_value (
struct acpi_namespace_node **stack_ptr,
struct acpi_walk_state *walk_state);
acpi_ex_resolve_node_to_value(struct acpi_namespace_node **stack_ptr,
struct acpi_walk_state *walk_state);
/*
* exresop - resolve operand to value
*/
acpi_status
acpi_ex_resolve_operands (
u16 opcode,
union acpi_operand_object **stack_ptr,
struct acpi_walk_state *walk_state);
acpi_ex_resolve_operands(u16 opcode,
union acpi_operand_object **stack_ptr,
struct acpi_walk_state *walk_state);
/*
* exdump - Interpreter debug output routines
*/
void
acpi_ex_dump_operand (
union acpi_operand_object *obj_desc,
u32 depth);
void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth);
void
acpi_ex_dump_operands (
union acpi_operand_object **operands,
acpi_interpreter_mode interpreter_mode,
char *ident,
u32 num_levels,
char *note,
char *module_name,
u32 line_number);
acpi_ex_dump_operands(union acpi_operand_object **operands,
acpi_interpreter_mode interpreter_mode,
char *ident,
u32 num_levels,
char *note, char *module_name, u32 line_number);
#ifdef ACPI_FUTURE_USAGE
void
acpi_ex_dump_object_descriptor (
union acpi_operand_object *object,
u32 flags);
void
acpi_ex_dump_node (
struct acpi_namespace_node *node,
u32 flags);
#endif /* ACPI_FUTURE_USAGE */
acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags);
void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags);
#endif /* ACPI_FUTURE_USAGE */
/*
* exnames - AML namestring support
*/
acpi_status
acpi_ex_get_name_string (
acpi_object_type data_type,
u8 *in_aml_address,
char **out_name_string,
u32 *out_name_length);
acpi_ex_get_name_string(acpi_object_type data_type,
u8 * in_aml_address,
char **out_name_string, u32 * out_name_length);
/*
* exstore - Object store support
*/
acpi_status
acpi_ex_store (
union acpi_operand_object *val_desc,
union acpi_operand_object *dest_desc,
struct acpi_walk_state *walk_state);
acpi_ex_store(union acpi_operand_object *val_desc,
union acpi_operand_object *dest_desc,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_node (
union acpi_operand_object *source_desc,
struct acpi_namespace_node *node,
struct acpi_walk_state *walk_state,
u8 implicit_conversion);
acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
struct acpi_namespace_node *node,
struct acpi_walk_state *walk_state,
u8 implicit_conversion);
#define ACPI_IMPLICIT_CONVERSION TRUE
#define ACPI_NO_IMPLICIT_CONVERSION FALSE
/*
* exstoren - resolve/store object
*/
acpi_status
acpi_ex_resolve_object (
union acpi_operand_object **source_desc_ptr,
acpi_object_type target_type,
struct acpi_walk_state *walk_state);
acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
acpi_object_type target_type,
struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_object (
union acpi_operand_object *source_desc,
union acpi_operand_object *dest_desc,
union acpi_operand_object **new_desc,
struct acpi_walk_state *walk_state);
acpi_ex_store_object_to_object(union acpi_operand_object *source_desc,
union acpi_operand_object *dest_desc,
union acpi_operand_object **new_desc,
struct acpi_walk_state *walk_state);
/*
* exstorob - store object - buffer/string
*/
acpi_status
acpi_ex_store_buffer_to_buffer (
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_status
acpi_ex_store_string_to_string (
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
/*
* excopy - object copy
*/
acpi_status
acpi_ex_copy_integer_to_index_field (
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_ex_copy_integer_to_index_field(union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_integer_to_bank_field (
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_ex_copy_integer_to_bank_field(union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_data_to_named_field (
union acpi_operand_object *source_desc,
struct acpi_namespace_node *node);
acpi_ex_copy_data_to_named_field(union acpi_operand_object *source_desc,
struct acpi_namespace_node *node);
acpi_status
acpi_ex_copy_integer_to_buffer_field (
union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
acpi_ex_copy_integer_to_buffer_field(union acpi_operand_object *source_desc,
union acpi_operand_object *target_desc);
/*
* exutils - interpreter/scanner utilities
*/
acpi_status
acpi_ex_enter_interpreter (
void);
acpi_status acpi_ex_enter_interpreter(void);
void
acpi_ex_exit_interpreter (
void);
void acpi_ex_exit_interpreter(void);
void
acpi_ex_truncate_for32bit_table (
union acpi_operand_object *obj_desc);
void acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc);
u8
acpi_ex_acquire_global_lock (
u32 rule);
u8 acpi_ex_acquire_global_lock(u32 rule);
void
acpi_ex_release_global_lock (
u8 locked);
void acpi_ex_release_global_lock(u8 locked);
void
acpi_ex_eisa_id_to_string (
u32 numeric_id,
char *out_string);
void
acpi_ex_unsigned_integer_to_string (
acpi_integer value,
char *out_string);
void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string);
void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string);
/*
* exregion - default op_region handlers
*/
acpi_status
acpi_ex_system_memory_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_system_memory_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context,
void *region_context);
acpi_status
acpi_ex_system_io_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_system_io_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context, void *region_context);
acpi_status
acpi_ex_pci_config_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_pci_config_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context, void *region_context);
acpi_status
acpi_ex_cmos_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_cmos_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context, void *region_context);
acpi_status
acpi_ex_pci_bar_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_pci_bar_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context, void *region_context);
acpi_status
acpi_ex_embedded_controller_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_embedded_controller_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context,
void *region_context);
acpi_status
acpi_ex_sm_bus_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_sm_bus_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context, void *region_context);
acpi_status
acpi_ex_data_table_space_handler (
u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer *value,
void *handler_context,
void *region_context);
acpi_ex_data_table_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
void *handler_context, void *region_context);
#endif /* __INTERP_H__ */
#endif /* __INTERP_H__ */

檔案差異因為檔案過大而無法顯示 載入差異

查看文件

@@ -44,7 +44,6 @@
#ifndef __ACMACROS_H__
#define __ACMACROS_H__
/*
* Data manipulation macros
*/
@@ -57,7 +56,6 @@
#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))
#define ACPI_MIN(a,b) (((a)<(b))?(a):(b))
#if ACPI_MACHINE_WIDTH == 16
/*
@@ -168,7 +166,7 @@
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\
(( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\
@@ -183,9 +181,9 @@
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\
(( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\
@@ -219,14 +217,14 @@
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
#else
@@ -238,14 +236,14 @@
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
#define ACPI_MOVE_32_TO_64(d,s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s)
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
#endif
@@ -266,7 +264,7 @@
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
(( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
@@ -277,8 +275,8 @@
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
(( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
(( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
@@ -305,7 +303,6 @@
#error unknown ACPI_MACHINE_WIDTH
#endif
/*
* Fast power-of-two math macros for non-optimized compilers
*/
@@ -329,7 +326,6 @@
#define ACPI_MUL_16(a) _ACPI_MUL(a,4)
#define ACPI_MOD_16(a) _ACPI_MOD(a,16)
/*
* Rounding macros (Power of two boundaries only)
*/
@@ -344,7 +340,6 @@
#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_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
@@ -365,7 +360,6 @@
#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
/* Bitfields within ACPI registers */
#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
@@ -381,7 +375,6 @@
#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)
/* Macro to test the object type */
#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type)
@@ -430,28 +423,28 @@
#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F))
#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
/*
* Reporting macros that are never compiled out
*/
#define ACPI_PARAM_LIST(pl) pl
/*
* Error reporting. These versions add callers module and line#. Since
* _THIS_MODULE gets compiled out when ACPI_DEBUG_OUTPUT isn't defined, only
* use it in debug mode.
* Error reporting. These versions add callers module and line#.
*
* Since _acpi_module_name gets compiled out when ACPI_DEBUG_OUTPUT
* isn't defined, only use it in debug mode.
*/
#ifdef ACPI_DEBUG_OUTPUT
#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_THIS_MODULE,__LINE__,_COMPONENT); \
#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_acpi_module_name,__LINE__,_COMPONENT); \
acpi_os_printf ACPI_PARAM_LIST(fp);}
#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error(_THIS_MODULE,__LINE__,_COMPONENT); \
#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error(_acpi_module_name,__LINE__,_COMPONENT); \
acpi_os_printf ACPI_PARAM_LIST(fp);}
#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning(_THIS_MODULE,__LINE__,_COMPONENT); \
#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning(_acpi_module_name,__LINE__,_COMPONENT); \
acpi_os_printf ACPI_PARAM_LIST(fp);}
#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error(_THIS_MODULE,__LINE__,_COMPONENT, s, e);
#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error(_acpi_module_name,__LINE__,_COMPONENT, s, e);
#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error(_THIS_MODULE,__LINE__,_COMPONENT, s, n, p, e);
#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error(_acpi_module_name,__LINE__,_COMPONENT, s, n, p, e);
#else
@@ -480,36 +473,58 @@
* Debug macros that are conditionally compiled
*/
#ifdef ACPI_DEBUG_OUTPUT
#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_THIS_MODULE = name;
#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name;
/*
* Function entry tracing.
* The first parameter should be the procedure name as a quoted string. This is declared
* as a local string ("_proc_name) so that it can be also used by the function exit macros below.
* Common parameters used for debug output functions:
* line number, function name, module(file) name, component ID
*/
#define ACPI_FUNCTION_NAME(a) struct acpi_debug_print_info _debug_info; \
_debug_info.component_id = _COMPONENT; \
_debug_info.proc_name = a; \
_debug_info.module_name = _THIS_MODULE;
#define ACPI_DEBUG_PARAMETERS __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
acpi_ut_trace(__LINE__,&_debug_info)
#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \
acpi_ut_trace_ptr(__LINE__,&_debug_info,(void *)b)
#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \
acpi_ut_trace_u32(__LINE__,&_debug_info,(u32)b)
#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \
acpi_ut_trace_str(__LINE__,&_debug_info,(char *)b)
/*
* Function entry tracing
*/
#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr()
/*
* If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
* define it now. This is the case where there the compiler does not support
* a __FUNCTION__ macro or equivalent. We save the function name on the
* local stack.
*/
#ifndef ACPI_GET_FUNCTION_NAME
#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
* 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;
#else
/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
#define ACPI_FUNCTION_NAME(name)
#endif
#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
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)
#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \
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)
#define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr()
/*
* Function exit tracing.
* 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 "_proc_name" is defined.
* so that "_acpi_function_name" is defined.
*/
#ifdef ACPI_USE_DO_WHILE_0
#define ACPI_DO_WHILE0(a) do a while(0)
@@ -517,10 +532,10 @@
#define ACPI_DO_WHILE0(a) a
#endif
#define return_VOID ACPI_DO_WHILE0 ({acpi_ut_exit(__LINE__,&_debug_info);return;})
#define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({acpi_ut_status_exit(__LINE__,&_debug_info,(s));return((s));})
#define return_VALUE(s) ACPI_DO_WHILE0 ({acpi_ut_value_exit(__LINE__,&_debug_info,(acpi_integer)(s));return((s));})
#define return_PTR(s) ACPI_DO_WHILE0 ({acpi_ut_ptr_exit(__LINE__,&_debug_info,(u8 *)(s));return((s));})
#define return_VOID ACPI_DO_WHILE0 ({acpi_ut_exit(ACPI_DEBUG_PARAMETERS);return;})
#define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({acpi_ut_status_exit(ACPI_DEBUG_PARAMETERS,(s));return((s));})
#define return_VALUE(s) ACPI_DO_WHILE0 ({acpi_ut_value_exit(ACPI_DEBUG_PARAMETERS,(acpi_integer)(s));return((s));})
#define return_PTR(s) ACPI_DO_WHILE0 ({acpi_ut_ptr_exit(ACPI_DEBUG_PARAMETERS,(u8 *)(s));return((s));})
/* Conditional execution */
@@ -531,12 +546,10 @@
#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
#define _VERBOSE_STRUCTURES
/* Stack and buffer dumping */
#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0)
#define ACPI_DUMP_OPERANDS(a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_THIS_MODULE,__LINE__)
#define ACPI_DUMP_OPERANDS(a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_acpi_module_name,__LINE__)
#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b)
#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)
@@ -544,7 +557,6 @@
#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
#define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a))
/*
* Generate INT3 on ACPI_ERROR (Debug only!)
*/
@@ -565,14 +577,13 @@
#define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl)
#define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl)
#else
/*
* This is the non-debug case -- make everything go away,
* leaving no executable debug code!
*/
#define ACPI_MODULE_NAME(name)
#define _THIS_MODULE ""
#define _acpi_module_name ""
#define ACPI_DEBUG_EXEC(a)
#define ACPI_NORMAL_EXEC(a) a;
@@ -616,7 +627,6 @@
#define ACPI_DEBUGGER_EXEC(a)
#endif
/*
* For 16-bit code, we want to shrink some things even though
* we are using ACPI_DEBUG_OUTPUT to get the debug output
@@ -627,7 +637,6 @@
#define ACPI_DEBUG_ONLY_MEMBERS(a)
#endif
#ifdef ACPI_DEBUG_OUTPUT
/*
* 1) Set name to blanks
@@ -640,7 +649,6 @@
#define ACPI_ADD_OBJECT_NAME(a,b)
#endif
/*
* Memory allocation tracking (DEBUG ONLY)
*/
@@ -648,21 +656,20 @@
/* Memory allocation */
#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_THIS_MODULE,__LINE__)
#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_THIS_MODULE,__LINE__)
#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_MEM_TRACKING(a)
#else
/* Memory allocation */
#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_THIS_MODULE,__LINE__)
#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_THIS_MODULE,__LINE__)
#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_THIS_MODULE,__LINE__)
#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
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
#endif /* ACMACROS_H */
#endif /* ACMACROS_H */

查看文件

@@ -71,14 +71,13 @@
/* Definitions of the predefined namespace names */
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
#define ACPI_SYS_BUS_NAME (u32) 0x5F53425F /* Sys bus name is "_SB_" */
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
#define ACPI_ROOT_NAME (u32) 0x5F5F5F5C /* Root name is "\___" */
#define ACPI_PREFIX_MIXED (u32) 0x69706341 /* "Acpi" */
#define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */
#define ACPI_NS_ROOT_PATH "\\"
#define ACPI_NS_SYSTEM_BUS "_SB_"
#endif /* __ACNAMES_H__ */
#endif /* __ACNAMES_H__ */

查看文件

@@ -44,7 +44,6 @@
#ifndef __ACNAMESP_H__
#define __ACNAMESP_H__
/* To search the entire name space, pass this as search_base */
#define ACPI_NS_ALL ((acpi_handle)0)
@@ -54,8 +53,8 @@
* and should be one-to-one with values of acpi_object_type
*/
#define ACPI_NS_NORMAL 0
#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
#define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
@@ -68,357 +67,237 @@
#define ACPI_NS_WALK_UNLOCK TRUE
#define ACPI_NS_WALK_NO_UNLOCK FALSE
/*
* nsinit - Namespace initialization
*/
acpi_status
acpi_ns_initialize_objects (
void);
acpi_status
acpi_ns_initialize_devices (
void);
acpi_status acpi_ns_initialize_objects(void);
acpi_status acpi_ns_initialize_devices(void);
/*
* nsload - Namespace loading
*/
acpi_status
acpi_ns_load_namespace (
void);
acpi_status acpi_ns_load_namespace(void);
acpi_status
acpi_ns_load_table (
struct acpi_table_desc *table_desc,
struct acpi_namespace_node *node);
acpi_ns_load_table(struct acpi_table_desc *table_desc,
struct acpi_namespace_node *node);
/*
* nswalk - walk the namespace
*/
acpi_status
acpi_ns_walk_namespace (
acpi_object_type type,
acpi_handle start_object,
u32 max_depth,
u8 unlock_before_callback,
acpi_walk_callback user_function,
void *context,
void **return_value);
struct acpi_namespace_node *
acpi_ns_get_next_node (
acpi_object_type type,
struct acpi_namespace_node *parent,
struct acpi_namespace_node *child);
acpi_ns_walk_namespace(acpi_object_type type,
acpi_handle start_object,
u32 max_depth,
u8 unlock_before_callback,
acpi_walk_callback user_function,
void *context, void **return_value);
struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type,
struct acpi_namespace_node
*parent,
struct acpi_namespace_node
*child);
/*
* nsparse - table parsing
*/
acpi_status
acpi_ns_parse_table (
struct acpi_table_desc *table_desc,
struct acpi_namespace_node *scope);
acpi_ns_parse_table(struct acpi_table_desc *table_desc,
struct acpi_namespace_node *scope);
acpi_status
acpi_ns_one_complete_parse (
u32 pass_number,
struct acpi_table_desc *table_desc);
acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc *table_desc);
/*
* nsaccess - Top-level namespace access
*/
acpi_status
acpi_ns_root_initialize (
void);
acpi_status acpi_ns_root_initialize(void);
acpi_status
acpi_ns_lookup (
union acpi_generic_state *scope_info,
char *name,
acpi_object_type type,
acpi_interpreter_mode interpreter_mode,
u32 flags,
struct acpi_walk_state *walk_state,
struct acpi_namespace_node **ret_node);
acpi_ns_lookup(union acpi_generic_state *scope_info,
char *name,
acpi_object_type type,
acpi_interpreter_mode interpreter_mode,
u32 flags,
struct acpi_walk_state *walk_state,
struct acpi_namespace_node **ret_node);
/*
* nsalloc - Named object allocation/deallocation
*/
struct acpi_namespace_node *
acpi_ns_create_node (
u32 name);
struct acpi_namespace_node *acpi_ns_create_node(u32 name);
void acpi_ns_delete_node(struct acpi_namespace_node *node);
void
acpi_ns_delete_node (
struct acpi_namespace_node *node);
acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle);
void
acpi_ns_delete_namespace_subtree (
struct acpi_namespace_node *parent_handle);
void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id);
void
acpi_ns_delete_namespace_by_owner (
u16 table_id);
void acpi_ns_detach_object(struct acpi_namespace_node *node);
void
acpi_ns_detach_object (
struct acpi_namespace_node *node);
void
acpi_ns_delete_children (
struct acpi_namespace_node *parent);
int
acpi_ns_compare_names (
char *name1,
char *name2);
void acpi_ns_delete_children(struct acpi_namespace_node *parent);
int acpi_ns_compare_names(char *name1, char *name2);
/*
* nsdump - Namespace dump/print utilities
*/
#ifdef ACPI_FUTURE_USAGE
void
acpi_ns_dump_tables (
acpi_handle search_base,
u32 max_depth);
#endif /* ACPI_FUTURE_USAGE */
void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth);
#endif /* ACPI_FUTURE_USAGE */
void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);
void
acpi_ns_dump_entry (
acpi_handle handle,
u32 debug_level);
acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component);
void
acpi_ns_dump_pathname (
acpi_handle handle,
char *msg,
u32 level,
u32 component);
void
acpi_ns_print_pathname (
u32 num_segments,
char *pathname);
void acpi_ns_print_pathname(u32 num_segments, char *pathname);
acpi_status
acpi_ns_dump_one_object (
acpi_handle obj_handle,
u32 level,
void *context,
void **return_value);
acpi_ns_dump_one_object(acpi_handle obj_handle,
u32 level, void *context, void **return_value);
#ifdef ACPI_FUTURE_USAGE
void
acpi_ns_dump_objects (
acpi_object_type type,
u8 display_type,
u32 max_depth,
u32 ownder_id,
acpi_handle start_handle);
#endif /* ACPI_FUTURE_USAGE */
acpi_ns_dump_objects(acpi_object_type type,
u8 display_type,
u32 max_depth,
acpi_owner_id owner_id, acpi_handle start_handle);
#endif /* ACPI_FUTURE_USAGE */
/*
* nseval - Namespace evaluation functions
*/
acpi_status
acpi_ns_evaluate_by_handle (
struct acpi_parameter_info *info);
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_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_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info);
/*
* nsnames - Name and Scope manipulation
*/
u32
acpi_ns_opens_scope (
acpi_object_type type);
u32 acpi_ns_opens_scope(acpi_object_type type);
char *
acpi_ns_get_external_pathname (
struct acpi_namespace_node *node);
char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
char *
acpi_ns_name_of_current_scope (
struct acpi_walk_state *walk_state);
char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
acpi_status
acpi_ns_handle_to_pathname (
acpi_handle target_handle,
struct acpi_buffer *buffer);
acpi_ns_handle_to_pathname(acpi_handle target_handle,
struct acpi_buffer *buffer);
u8
acpi_ns_pattern_match (
struct acpi_namespace_node *obj_node,
char *search_for);
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_size
acpi_ns_get_pathname_length (
struct acpi_namespace_node *node);
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_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
/*
* nsobject - Object management for namespace nodes
*/
acpi_status
acpi_ns_attach_object (
struct acpi_namespace_node *node,
union acpi_operand_object *object,
acpi_object_type type);
acpi_ns_attach_object(struct acpi_namespace_node *node,
union acpi_operand_object *object, acpi_object_type type);
union acpi_operand_object *
acpi_ns_get_attached_object (
struct acpi_namespace_node *node);
union acpi_operand_object *acpi_ns_get_attached_object(struct
acpi_namespace_node
*node);
union acpi_operand_object *
acpi_ns_get_secondary_object (
union acpi_operand_object *obj_desc);
union acpi_operand_object *acpi_ns_get_secondary_object(union
acpi_operand_object
*obj_desc);
acpi_status
acpi_ns_attach_data (
struct acpi_namespace_node *node,
acpi_object_handler handler,
void *data);
acpi_ns_attach_data(struct acpi_namespace_node *node,
acpi_object_handler handler, void *data);
acpi_status
acpi_ns_detach_data (
struct acpi_namespace_node *node,
acpi_object_handler handler);
acpi_ns_detach_data(struct acpi_namespace_node *node,
acpi_object_handler handler);
acpi_status
acpi_ns_get_attached_data (
struct acpi_namespace_node *node,
acpi_object_handler handler,
void **data);
acpi_ns_get_attached_data(struct acpi_namespace_node *node,
acpi_object_handler handler, void **data);
/*
* nssearch - Namespace searching and entry
*/
acpi_status
acpi_ns_search_and_enter (
u32 entry_name,
struct acpi_walk_state *walk_state,
struct acpi_namespace_node *node,
acpi_interpreter_mode interpreter_mode,
acpi_object_type type,
u32 flags,
struct acpi_namespace_node **ret_node);
acpi_ns_search_and_enter(u32 entry_name,
struct acpi_walk_state *walk_state,
struct acpi_namespace_node *node,
acpi_interpreter_mode interpreter_mode,
acpi_object_type type,
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_node(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,
struct acpi_namespace_node *parent_node,
struct acpi_namespace_node *node,
acpi_object_type type);
acpi_ns_install_node(struct acpi_walk_state *walk_state,
struct acpi_namespace_node *parent_node,
struct acpi_namespace_node *node, acpi_object_type type);
/*
* nsutils - Utility functions
*/
u8
acpi_ns_valid_root_prefix (
char prefix);
u8 acpi_ns_valid_root_prefix(char prefix);
acpi_object_type
acpi_ns_get_type (
struct acpi_namespace_node *node);
acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
u32
acpi_ns_local (
acpi_object_type type);
u32 acpi_ns_local(acpi_object_type type);
void
acpi_ns_report_error (
char *module_name,
u32 line_number,
u32 component_id,
char *internal_name,
acpi_status lookup_status);
acpi_ns_report_error(char *module_name,
u32 line_number,
u32 component_id,
char *internal_name, acpi_status lookup_status);
void
acpi_ns_report_method_error (
char *module_name,
u32 line_number,
u32 component_id,
char *message,
struct acpi_namespace_node *node,
char *path,
acpi_status lookup_status);
acpi_ns_report_method_error(char *module_name,
u32 line_number,
u32 component_id,
char *message,
struct acpi_namespace_node *node,
char *path, acpi_status lookup_status);
void
acpi_ns_print_node_pathname (
struct acpi_namespace_node *node,
char *msg);
void acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *msg);
acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info);
void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);
acpi_status acpi_ns_internalize_name(char *dotted_name, char **converted_name);
acpi_status
acpi_ns_build_internal_name (
struct acpi_namestring_info *info);
acpi_ns_externalize_name(u32 internal_name_length,
char *internal_name,
u32 * converted_name_length, char **converted_name);
void
acpi_ns_get_internal_name_length (
struct acpi_namestring_info *info);
struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle);
acpi_status
acpi_ns_internalize_name (
char *dotted_name,
char **converted_name);
acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node *node);
acpi_status
acpi_ns_externalize_name (
u32 internal_name_length,
char *internal_name,
u32 *converted_name_length,
char **converted_name);
void acpi_ns_terminate(void);
struct acpi_namespace_node *
acpi_ns_map_handle_to_node (
acpi_handle handle);
struct acpi_namespace_node *acpi_ns_get_parent_node(struct acpi_namespace_node
*node);
acpi_handle
acpi_ns_convert_entry_to_handle(
struct acpi_namespace_node *node);
struct acpi_namespace_node *acpi_ns_get_next_valid_node(struct
acpi_namespace_node
*node);
void
acpi_ns_terminate (
void);
struct acpi_namespace_node *
acpi_ns_get_parent_node (
struct acpi_namespace_node *node);
struct acpi_namespace_node *
acpi_ns_get_next_valid_node (
struct acpi_namespace_node *node);
#endif /* __ACNAMESP_H__ */
#endif /* __ACNAMESP_H__ */

查看文件

@@ -45,7 +45,6 @@
#ifndef _ACOBJECT_H
#define _ACOBJECT_H
/*
* 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
@@ -81,7 +80,6 @@
#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
@@ -96,8 +94,7 @@
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 */
struct acpi_namespace_node *node; /* Link back to parent node */
/*
* Fields common to both Strings and Buffers
@@ -105,15 +102,13 @@
#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 */
union acpi_operand_object *handler; /* Handler for Address space */
/******************************************************************************
*
@@ -121,161 +116,110 @@
*
*****************************************************************************/
struct acpi_object_common
{
ACPI_OBJECT_COMMON_HEADER
struct acpi_object_common {
ACPI_OBJECT_COMMON_HEADER};
struct acpi_object_integer {
ACPI_OBJECT_COMMON_HEADER acpi_integer value;
};
struct acpi_object_integer
{
ACPI_OBJECT_COMMON_HEADER
acpi_integer value;
};
/*
* Note: The String and Buffer object must be identical through the Pointer
* element. There is code that depends on this.
*/
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 */
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 */
};
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;
u32 aml_length;
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;
u32 aml_length;
};
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 */
union acpi_operand_object **elements; /* Array of pointers to acpi_objects */
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 */
union acpi_operand_object **elements; /* Array of pointers to acpi_objects */
};
/******************************************************************************
*
* Complex data types
*
*****************************************************************************/
struct acpi_object_event
{
ACPI_OBJECT_COMMON_HEADER
void *semaphore;
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);
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 owning_id;
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 */
struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
void *semaphore; /* Actual OS synchronization object */
union acpi_operand_object *prev; /* Link for list of acquired mutexes */
union acpi_operand_object *next; /* Link for list of acquired mutexes */
struct acpi_namespace_node *node; /* Containing namespace node */
u8 original_sync_level; /* Owner's original sync level (0-15) */
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 */
struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
void *semaphore; /* Actual OS synchronization object */
union acpi_operand_object *prev; /* Link for list of acquired mutexes */
union acpi_operand_object *next; /* Link for list of acquired mutexes */
struct acpi_namespace_node *node; /* Containing namespace node */
u8 original_sync_level; /* Owner's original sync level (0-15) */
};
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 *next;
u32 length;
acpi_physical_address address;
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 *next;
u32 length;
acpi_physical_address address;
};
/******************************************************************************
*
* Objects that can be notified. All share a common notify_info area.
*
*****************************************************************************/
struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
{
struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
struct acpi_object_device {
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info *gpe_block;
};
struct acpi_object_device
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
struct acpi_gpe_block_info *gpe_block;
struct acpi_object_power_resource {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 system_level;
u32 resource_order;
};
struct acpi_object_power_resource
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
u32 system_level;
u32 resource_order;
};
struct acpi_object_processor
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
u32 proc_id;
u32 length;
acpi_io_address address;
};
struct acpi_object_thermal_zone
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
struct acpi_object_processor {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 proc_id;
u32 length;
acpi_io_address address;
};
struct acpi_object_thermal_zone {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
/******************************************************************************
*
@@ -283,90 +227,63 @@ struct acpi_object_thermal_zone
*
*****************************************************************************/
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) */
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) */
};
struct acpi_object_region_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
union acpi_operand_object *region_obj; /* Containing op_region object */
struct acpi_object_region_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */
};
struct acpi_object_bank_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
union acpi_operand_object *region_obj; /* Containing op_region object */
union acpi_operand_object *bank_obj; /* bank_select Register object */
struct acpi_object_bank_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */
union acpi_operand_object *bank_obj; /* bank_select Register object */
};
struct acpi_object_index_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
/*
* No "region_obj" pointer needed since the Index and Data registers
* are each field definitions unto themselves.
*/
union acpi_operand_object *index_obj; /* Index register */
union acpi_operand_object *data_obj; /* Data register */
struct acpi_object_index_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO
/*
* No "region_obj" pointer needed since the Index and Data registers
* are each field definitions unto themselves.
*/
union acpi_operand_object *index_obj; /* Index register */
union acpi_operand_object *data_obj; /* Data register */
};
/* The buffer_field is different in that it is part of a Buffer, not an op_region */
struct acpi_object_buffer_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
union acpi_operand_object *buffer_obj; /* Containing Buffer object */
struct acpi_object_buffer_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *buffer_obj; /* Containing Buffer object */
};
/******************************************************************************
*
* Objects for handlers
*
*****************************************************************************/
struct acpi_object_notify_handler
{
ACPI_OBJECT_COMMON_HEADER
struct acpi_namespace_node *node; /* Parent device */
acpi_notify_handler handler;
void *context;
struct acpi_object_notify_handler {
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */
acpi_notify_handler 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;
acpi_adr_space_handler handler;
struct acpi_namespace_node *node; /* Parent device */
void *context;
acpi_adr_space_setup setup;
union acpi_operand_object *region_list; /* regions using this handler */
union acpi_operand_object *next;
struct acpi_object_addr_handler {
ACPI_OBJECT_COMMON_HEADER u8 space_id;
u16 hflags;
acpi_adr_space_handler handler;
struct acpi_namespace_node *node; /* Parent device */
void *context;
acpi_adr_space_setup setup;
union acpi_operand_object *region_list; /* regions using this handler */
union acpi_operand_object *next;
};
/******************************************************************************
*
* Special internal objects
@@ -377,18 +294,15 @@ struct acpi_object_addr_handler
* The Reference object type is used for these opcodes:
* Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op
*/
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 */
struct acpi_namespace_node *node;
union acpi_operand_object **where;
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 */
struct acpi_namespace_node *node;
union acpi_operand_object **where;
};
/*
* Extra object is used as additional storage for types that
* have AML code in their declarations (term_args) that must be
@@ -396,73 +310,62 @@ 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) */
void *region_context; /* Region-specific data */
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) */
void *region_context; /* Region-specific data */
};
/* Additional data that can be attached to namespace nodes */
struct acpi_object_data
{
ACPI_OBJECT_COMMON_HEADER
acpi_object_handler handler;
void *pointer;
struct acpi_object_data {
ACPI_OBJECT_COMMON_HEADER acpi_object_handler handler;
void *pointer;
};
/* Structure used when objects are cached for reuse */
struct acpi_object_cache_list
{
ACPI_OBJECT_COMMON_HEADER
union acpi_operand_object *next; /* Link for object cache and internal lists*/
struct acpi_object_cache_list {
ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* Link for object cache and internal lists */
};
/******************************************************************************
*
* union acpi_operand_object Descriptor - a giant union of all of the above
*
*****************************************************************************/
union acpi_operand_object
{
struct acpi_object_common common;
struct acpi_object_integer integer;
struct acpi_object_string string;
struct acpi_object_buffer buffer;
struct acpi_object_package package;
struct acpi_object_event event;
struct acpi_object_method method;
struct acpi_object_mutex mutex;
struct acpi_object_region region;
struct acpi_object_notify_common common_notify;
struct acpi_object_device device;
struct acpi_object_power_resource power_resource;
struct acpi_object_processor processor;
struct acpi_object_thermal_zone thermal_zone;
struct acpi_object_field_common common_field;
struct acpi_object_region_field field;
struct acpi_object_buffer_field buffer_field;
struct acpi_object_bank_field bank_field;
struct acpi_object_index_field index_field;
struct acpi_object_notify_handler notify;
struct acpi_object_addr_handler address_space;
struct acpi_object_reference reference;
struct acpi_object_extra extra;
struct acpi_object_data data;
struct acpi_object_cache_list cache;
union acpi_operand_object {
struct acpi_object_common common;
struct acpi_object_integer integer;
struct acpi_object_string string;
struct acpi_object_buffer buffer;
struct acpi_object_package package;
struct acpi_object_event event;
struct acpi_object_method method;
struct acpi_object_mutex mutex;
struct acpi_object_region region;
struct acpi_object_notify_common common_notify;
struct acpi_object_device device;
struct acpi_object_power_resource power_resource;
struct acpi_object_processor processor;
struct acpi_object_thermal_zone thermal_zone;
struct acpi_object_field_common common_field;
struct acpi_object_region_field field;
struct acpi_object_buffer_field buffer_field;
struct acpi_object_bank_field bank_field;
struct acpi_object_index_field index_field;
struct acpi_object_notify_handler notify;
struct acpi_object_addr_handler address_space;
struct acpi_object_reference reference;
struct acpi_object_extra extra;
struct acpi_object_data data;
struct acpi_object_cache_list cache;
};
/******************************************************************************
*
* union acpi_descriptor - objects that share a common descriptor identifier
@@ -471,7 +374,7 @@ union acpi_operand_object
/* Object descriptor types */
#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */
#define ACPI_DESC_TYPE_STATE 0x02
#define ACPI_DESC_TYPE_STATE_UPDATE 0x03
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x04
@@ -488,14 +391,11 @@ union acpi_operand_object
#define ACPI_DESC_TYPE_NAMED 0x0F
#define ACPI_DESC_TYPE_MAX 0x0F
union acpi_descriptor
{
u8 descriptor_id; /* To differentiate various internal objs */\
union acpi_operand_object object;
struct acpi_namespace_node node;
union acpi_parse_object op;
union acpi_descriptor {
u8 descriptor_id; /* To differentiate various internal objs */
union acpi_operand_object object;
struct acpi_namespace_node node;
union acpi_parse_object op;
};
#endif /* _ACOBJECT_H */
#endif /* _ACOBJECT_H */

查看文件

@@ -62,7 +62,6 @@
#define _NAM 0x6C
#define _PFX 0x6D
/*
* All AML opcodes and the parse-time arguments for each. Used by the AML
* parser Each list is compressed into a 32-bit number and stored in the
@@ -191,7 +190,6 @@
#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA)
#define ARGP_ZERO_OP ARG_NONE
/*
* All AML opcodes and the runtime arguments for each. Used by the AML
* interpreter Each list is compressed into a 32-bit number and stored
@@ -246,7 +244,7 @@
#define ARGI_FIELD_OP ARGI_INVALID_OPCODE
#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
#define ARGI_IF_OP ARGI_INVALID_OPCODE
#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
@@ -322,4 +320,4 @@
#define ARGI_WORD_OP ARGI_INVALID_OPCODE
#define ARGI_ZERO_OP ARG_NONE
#endif /* __ACOPCODE_H__ */
#endif /* __ACOPCODE_H__ */

查看文件

@@ -73,12 +73,10 @@
#define ACPI_ALL_COMPONENTS 0x00003FFF
#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS)
/* Component IDs reserved for ACPI drivers */
#define ACPI_ALL_DRIVERS 0xFFFF0000
/*
* Raw debug output levels, do not use these in the DEBUG_PRINT macros
*/
@@ -132,11 +130,10 @@
#define ACPI_LV_VERBOSE 0xF0000000
/*
* Debug level macros that are used in the DEBUG_PRINT macros
*/
#define ACPI_DEBUG_LEVEL(dl) (u32) dl,__LINE__,&_debug_info
#define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS
/* Exception level -- used in the global "debug_level" */
@@ -147,7 +144,6 @@
#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
/* Trace level -- also used in the global "debug_level" */
#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
@@ -174,12 +170,10 @@
#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL)
/* Defaults for debug_level, debug and normal */
#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
#endif /* __ACOUTPUT_H__ */
#endif /* __ACOUTPUT_H__ */

查看文件

@@ -41,18 +41,15 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ACPARSER_H__
#define __ACPARSER_H__
#define OP_HAS_RETURN_VALUE 1
/* variable # arguments */
#define ACPI_VAR_ARGS ACPI_UINT32_MAX
#define ACPI_PARSE_DELETE_TREE 0x0001
#define ACPI_PARSE_NO_TREE_DELETE 0x0000
#define ACPI_PARSE_TREE_MASK 0x0001
@@ -63,7 +60,7 @@
#define ACPI_PARSE_MODE_MASK 0x0030
#define ACPI_PARSE_DEFERRED_OP 0x0100
#define ACPI_PARSE_DISASSEMBLE 0x0200
/******************************************************************************
*
@@ -71,251 +68,165 @@
*
*****************************************************************************/
/*
* psxface - Parser external interfaces
*/
acpi_status
acpi_psx_load_table (
u8 *pcode_addr,
u32 pcode_length);
acpi_status
acpi_psx_execute (
struct acpi_parameter_info *info);
acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info);
/*
* psargs - Parse AML opcode arguments
*/
u8 *
acpi_ps_get_next_package_end (
struct acpi_parse_state *parser_state);
u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state);
char *
acpi_ps_get_next_namestring (
struct acpi_parse_state *parser_state);
char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state);
void
acpi_ps_get_next_simple_arg (
struct acpi_parse_state *parser_state,
u32 arg_type,
union acpi_parse_object *arg);
acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
u32 arg_type, union acpi_parse_object *arg);
acpi_status
acpi_ps_get_next_namepath (
struct acpi_walk_state *walk_state,
struct acpi_parse_state *parser_state,
union acpi_parse_object *arg,
u8 method_call);
acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
struct acpi_parse_state *parser_state,
union acpi_parse_object *arg, u8 method_call);
acpi_status
acpi_ps_get_next_arg (
struct acpi_walk_state *walk_state,
struct acpi_parse_state *parser_state,
u32 arg_type,
union acpi_parse_object **return_arg);
acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
struct acpi_parse_state *parser_state,
u32 arg_type, union acpi_parse_object **return_arg);
/*
* psfind
*/
union acpi_parse_object *
acpi_ps_find_name (
union acpi_parse_object *scope,
u32 name,
u32 opcode);
union acpi_parse_object*
acpi_ps_get_parent (
union acpi_parse_object *op);
union acpi_parse_object *acpi_ps_find_name(union acpi_parse_object *scope,
u32 name, u32 opcode);
union acpi_parse_object *acpi_ps_get_parent(union acpi_parse_object *op);
/*
* psopcode - AML Opcode information
*/
const struct acpi_opcode_info *
acpi_ps_get_opcode_info (
u16 opcode);
char *
acpi_ps_get_opcode_name (
u16 opcode);
const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode);
char *acpi_ps_get_opcode_name(u16 opcode);
/*
* psparse - top level parsing routines
*/
acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state);
u32 acpi_ps_get_opcode_size(u32 opcode);
u16 acpi_ps_peek_opcode(struct acpi_parse_state *state);
acpi_status
acpi_ps_parse_aml (
struct acpi_walk_state *walk_state);
acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op);
u32
acpi_ps_get_opcode_size (
u32 opcode);
u16
acpi_ps_peek_opcode (
struct acpi_parse_state *state);
acpi_status
acpi_ps_next_parse_state(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
acpi_status callback_status);
/*
* psloop - main parse loop
*/
acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state);
/*
* psscope - Scope stack management routines
*/
acpi_status
acpi_ps_init_scope (
struct acpi_parse_state *parser_state,
union acpi_parse_object *root);
acpi_ps_init_scope(struct acpi_parse_state *parser_state,
union acpi_parse_object *root);
union acpi_parse_object *
acpi_ps_get_parent_scope (
struct acpi_parse_state *state);
union acpi_parse_object *acpi_ps_get_parent_scope(struct acpi_parse_state
*state);
u8
acpi_ps_has_completed_scope (
struct acpi_parse_state *parser_state);
u8 acpi_ps_has_completed_scope(struct acpi_parse_state *parser_state);
void
acpi_ps_pop_scope (
struct acpi_parse_state *parser_state,
union acpi_parse_object **op,
u32 *arg_list,
u32 *arg_count);
acpi_ps_pop_scope(struct acpi_parse_state *parser_state,
union acpi_parse_object **op,
u32 * arg_list, u32 * arg_count);
acpi_status
acpi_ps_push_scope (
struct acpi_parse_state *parser_state,
union acpi_parse_object *op,
u32 remaining_args,
u32 arg_count);
void
acpi_ps_cleanup_scope (
struct acpi_parse_state *state);
acpi_ps_push_scope(struct acpi_parse_state *parser_state,
union acpi_parse_object *op,
u32 remaining_args, u32 arg_count);
void acpi_ps_cleanup_scope(struct acpi_parse_state *state);
/*
* pstree - parse tree manipulation routines
*/
void
acpi_ps_append_arg(
union acpi_parse_object *op,
union acpi_parse_object *arg);
acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg);
union acpi_parse_object*
acpi_ps_find (
union acpi_parse_object *scope,
char *path,
u16 opcode,
u32 create);
union acpi_parse_object *acpi_ps_find(union acpi_parse_object *scope,
char *path, u16 opcode, u32 create);
union acpi_parse_object *
acpi_ps_get_arg(
union acpi_parse_object *op,
u32 argn);
union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn);
#ifdef ACPI_FUTURE_USAGE
union acpi_parse_object *
acpi_ps_get_depth_next (
union acpi_parse_object *origin,
union acpi_parse_object *op);
#endif /* ACPI_FUTURE_USAGE */
union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin,
union acpi_parse_object *op);
#endif /* ACPI_FUTURE_USAGE */
/*
* pswalk - parse tree walk routines
*/
acpi_status
acpi_ps_walk_parsed_aml (
union acpi_parse_object *start_op,
union acpi_parse_object *end_op,
union acpi_operand_object *mth_desc,
struct acpi_namespace_node *start_node,
union acpi_operand_object **params,
union acpi_operand_object **caller_return_desc,
acpi_owner_id owner_id,
acpi_parse_downwards descending_callback,
acpi_parse_upwards ascending_callback);
acpi_ps_walk_parsed_aml(union acpi_parse_object *start_op,
union acpi_parse_object *end_op,
union acpi_operand_object *mth_desc,
struct acpi_namespace_node *start_node,
union acpi_operand_object **params,
union acpi_operand_object **caller_return_desc,
acpi_owner_id owner_id,
acpi_parse_downwards descending_callback,
acpi_parse_upwards ascending_callback);
acpi_status
acpi_ps_get_next_walk_op (
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
acpi_parse_upwards ascending_callback);
acpi_ps_get_next_walk_op(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
acpi_parse_upwards ascending_callback);
acpi_status
acpi_ps_delete_completed_op (
struct acpi_walk_state *walk_state);
void
acpi_ps_delete_parse_tree (
union acpi_parse_object *root);
acpi_status acpi_ps_delete_completed_op(struct acpi_walk_state *walk_state);
void acpi_ps_delete_parse_tree(union acpi_parse_object *root);
/*
* psutils - parser utilities
*/
union acpi_parse_object *
acpi_ps_create_scope_op (
void);
union acpi_parse_object *acpi_ps_create_scope_op(void);
void
acpi_ps_init_op (
union acpi_parse_object *op,
u16 opcode);
void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode);
union acpi_parse_object *
acpi_ps_alloc_op (
u16 opcode);
union acpi_parse_object *acpi_ps_alloc_op(u16 opcode);
void
acpi_ps_free_op (
union acpi_parse_object *op);
void acpi_ps_free_op(union acpi_parse_object *op);
u8
acpi_ps_is_leading_char (
u32 c);
u8 acpi_ps_is_leading_char(u32 c);
u8
acpi_ps_is_prefix_char (
u32 c);
u8 acpi_ps_is_prefix_char(u32 c);
#ifdef ACPI_FUTURE_USAGE
u32
acpi_ps_get_name(
union acpi_parse_object *op);
#endif /* ACPI_FUTURE_USAGE */
void
acpi_ps_set_name(
union acpi_parse_object *op,
u32 name);
#ifdef ACPI_ENABLE_OBJECT_CACHE
void
acpi_ps_delete_parse_cache (
void);
#endif
u32 acpi_ps_get_name(union acpi_parse_object *op);
#endif /* ACPI_FUTURE_USAGE */
void acpi_ps_set_name(union acpi_parse_object *op, u32 name);
/*
* psdump - display parser tree
*/
u32
acpi_ps_sprint_path (
char *buffer_start,
u32 buffer_size,
union acpi_parse_object *op);
acpi_ps_sprint_path(char *buffer_start,
u32 buffer_size, union acpi_parse_object *op);
u32
acpi_ps_sprint_op (
char *buffer_start,
u32 buffer_size,
union acpi_parse_object *op);
acpi_ps_sprint_op(char *buffer_start,
u32 buffer_size, union acpi_parse_object *op);
void
acpi_ps_show (
union acpi_parse_object *op);
void acpi_ps_show(union acpi_parse_object *op);
#endif /* __ACPARSER_H__ */
#endif /* __ACPARSER_H__ */

查看文件

@@ -49,22 +49,21 @@
* We put them here because we don't want to duplicate them
* in the rest of the source code again and again.
*/
#include "acnames.h" /* Global ACPI names and strings */
#include "acconfig.h" /* Configuration constants */
#include "platform/acenv.h" /* Target environment specific items */
#include "actypes.h" /* Fundamental common data types */
#include "acexcep.h" /* ACPI exception codes */
#include "acmacros.h" /* C macros */
#include "actbl.h" /* ACPI table definitions */
#include "aclocal.h" /* Internal data types */
#include "acoutput.h" /* Error output and Debug macros */
#include "acpiosxf.h" /* Interfaces to the ACPI-to-OS layer*/
#include "acpixf.h" /* ACPI core subsystem external interfaces */
#include "acobject.h" /* ACPI internal object */
#include "acstruct.h" /* Common structures */
#include "acglobal.h" /* All global variables */
#include "achware.h" /* Hardware defines and interfaces */
#include "acutils.h" /* Utility interfaces */
#include "acnames.h" /* Global ACPI names and strings */
#include "acconfig.h" /* Configuration constants */
#include "platform/acenv.h" /* Target environment specific items */
#include "actypes.h" /* Fundamental common data types */
#include "acexcep.h" /* ACPI exception codes */
#include "acmacros.h" /* C macros */
#include "actbl.h" /* ACPI table definitions */
#include "aclocal.h" /* Internal data types */
#include "acoutput.h" /* Error output and Debug macros */
#include "acpiosxf.h" /* Interfaces to the ACPI-to-OS layer */
#include "acpixf.h" /* ACPI core subsystem external interfaces */
#include "acobject.h" /* ACPI internal object */
#include "acstruct.h" /* Common structures */
#include "acglobal.h" /* All global variables */
#include "achware.h" /* Hardware defines and interfaces */
#include "acutils.h" /* Utility interfaces */
#endif /* __ACPI_H__ */
#endif /* __ACPI_H__ */

查看文件

@@ -35,48 +35,41 @@
/* TBD: Make dynamic */
#define ACPI_MAX_HANDLES 10
struct acpi_handle_list {
u32 count;
acpi_handle handles[ACPI_MAX_HANDLES];
u32 count;
acpi_handle handles[ACPI_MAX_HANDLES];
};
/* acpi_utils.h */
acpi_status
acpi_extract_package (
union acpi_object *package,
struct acpi_buffer *format,
struct acpi_buffer *buffer);
acpi_extract_package(union acpi_object *package,
struct acpi_buffer *format, struct acpi_buffer *buffer);
acpi_status
acpi_evaluate_integer (
acpi_handle handle,
acpi_string pathname,
struct acpi_object_list *arguments,
unsigned long *data);
acpi_evaluate_integer(acpi_handle handle,
acpi_string pathname,
struct acpi_object_list *arguments, unsigned long *data);
acpi_status
acpi_evaluate_reference (
acpi_handle handle,
acpi_string pathname,
struct acpi_object_list *arguments,
struct acpi_handle_list *list);
acpi_evaluate_reference(acpi_handle handle,
acpi_string pathname,
struct acpi_object_list *arguments,
struct acpi_handle_list *list);
#ifdef CONFIG_ACPI_BUS
#ifdef CONFIG_ACPI
#include <linux/proc_fs.h>
#define ACPI_BUS_FILE_ROOT "acpi"
extern struct proc_dir_entry *acpi_root_dir;
extern FADT_DESCRIPTOR acpi_fadt;
extern struct proc_dir_entry *acpi_root_dir;
extern FADT_DESCRIPTOR acpi_fadt;
enum acpi_bus_removal_type {
ACPI_BUS_REMOVAL_NORMAL = 0,
ACPI_BUS_REMOVAL_NORMAL = 0,
ACPI_BUS_REMOVAL_EJECT,
ACPI_BUS_REMOVAL_SUPRISE,
ACPI_BUS_REMOVAL_TYPE_COUNT
};
enum acpi_bus_device_type {
ACPI_BUS_TYPE_DEVICE = 0,
ACPI_BUS_TYPE_DEVICE = 0,
ACPI_BUS_TYPE_POWER,
ACPI_BUS_TYPE_PROCESSOR,
ACPI_BUS_TYPE_THERMAL,
@@ -89,61 +82,60 @@ enum acpi_bus_device_type {
struct acpi_driver;
struct acpi_device;
/*
* ACPI Driver
* -----------
*/
typedef int (*acpi_op_add) (struct acpi_device *device);
typedef int (*acpi_op_remove) (struct acpi_device *device, int type);
typedef int (*acpi_op_lock) (struct acpi_device *device, int type);
typedef int (*acpi_op_start) (struct acpi_device *device);
typedef int (*acpi_op_stop) (struct acpi_device *device, int type);
typedef int (*acpi_op_suspend) (struct acpi_device *device, int state);
typedef int (*acpi_op_resume) (struct acpi_device *device, int state);
typedef int (*acpi_op_scan) (struct acpi_device *device);
typedef int (*acpi_op_bind) (struct acpi_device *device);
typedef int (*acpi_op_unbind) (struct acpi_device *device);
typedef int (*acpi_op_match) (struct acpi_device *device,
struct acpi_driver *driver);
typedef int (*acpi_op_add) (struct acpi_device * device);
typedef int (*acpi_op_remove) (struct acpi_device * device, int type);
typedef int (*acpi_op_lock) (struct acpi_device * device, int type);
typedef int (*acpi_op_start) (struct acpi_device * device);
typedef int (*acpi_op_stop) (struct acpi_device * device, int type);
typedef int (*acpi_op_suspend) (struct acpi_device * device, int state);
typedef int (*acpi_op_resume) (struct acpi_device * device, int state);
typedef int (*acpi_op_scan) (struct acpi_device * device);
typedef int (*acpi_op_bind) (struct acpi_device * device);
typedef int (*acpi_op_unbind) (struct acpi_device * device);
typedef int (*acpi_op_match) (struct acpi_device * device,
struct acpi_driver * driver);
struct acpi_bus_ops {
u32 acpi_op_add:1;
u32 acpi_op_remove:1;
u32 acpi_op_lock:1;
u32 acpi_op_start:1;
u32 acpi_op_stop:1;
u32 acpi_op_suspend:1;
u32 acpi_op_resume:1;
u32 acpi_op_scan:1;
u32 acpi_op_bind:1;
u32 acpi_op_unbind:1;
u32 acpi_op_match:1;
u32 reserved:21;
u32 acpi_op_add:1;
u32 acpi_op_remove:1;
u32 acpi_op_lock:1;
u32 acpi_op_start:1;
u32 acpi_op_stop:1;
u32 acpi_op_suspend:1;
u32 acpi_op_resume:1;
u32 acpi_op_scan:1;
u32 acpi_op_bind:1;
u32 acpi_op_unbind:1;
u32 acpi_op_match:1;
u32 reserved:21;
};
struct acpi_device_ops {
acpi_op_add add;
acpi_op_remove remove;
acpi_op_lock lock;
acpi_op_start start;
acpi_op_stop stop;
acpi_op_suspend suspend;
acpi_op_resume resume;
acpi_op_scan scan;
acpi_op_bind bind;
acpi_op_unbind unbind;
acpi_op_match match;
acpi_op_add add;
acpi_op_remove remove;
acpi_op_lock lock;
acpi_op_start start;
acpi_op_stop stop;
acpi_op_suspend suspend;
acpi_op_resume resume;
acpi_op_scan scan;
acpi_op_bind bind;
acpi_op_unbind unbind;
acpi_op_match match;
};
struct acpi_driver {
struct list_head node;
char name[80];
char class[80];
atomic_t references;
char *ids; /* Supported Hardware IDs */
struct acpi_device_ops ops;
struct list_head node;
char name[80];
char class[80];
atomic_t references;
char *ids; /* Supported Hardware IDs */
struct acpi_device_ops ops;
};
/*
@@ -154,60 +146,57 @@ struct acpi_driver {
/* Status (_STA) */
struct acpi_device_status {
u32 present:1;
u32 enabled:1;
u32 show_in_ui:1;
u32 functional:1;
u32 battery_present:1;
u32 reserved:27;
u32 present:1;
u32 enabled:1;
u32 show_in_ui:1;
u32 functional:1;
u32 battery_present:1;
u32 reserved:27;
};
/* Flags */
struct acpi_device_flags {
u32 dynamic_status:1;
u32 hardware_id:1;
u32 compatible_ids:1;
u32 bus_address:1;
u32 unique_id:1;
u32 removable:1;
u32 ejectable:1;
u32 lockable:1;
u32 suprise_removal_ok:1;
u32 power_manageable:1;
u32 performance_manageable:1;
u32 wake_capable:1; /* Wakeup(_PRW) supported? */
u32 reserved:20;
u32 dynamic_status:1;
u32 hardware_id:1;
u32 compatible_ids:1;
u32 bus_address:1;
u32 unique_id:1;
u32 removable:1;
u32 ejectable:1;
u32 lockable:1;
u32 suprise_removal_ok:1;
u32 power_manageable:1;
u32 performance_manageable:1;
u32 wake_capable:1; /* Wakeup(_PRW) supported? */
u32 reserved:20;
};
/* File System */
struct acpi_device_dir {
struct proc_dir_entry *entry;
struct proc_dir_entry *entry;
};
#define acpi_device_dir(d) ((d)->dir.entry)
/* Plug and Play */
typedef char acpi_bus_id[5];
typedef unsigned long acpi_bus_address;
typedef char acpi_hardware_id[9];
typedef char acpi_unique_id[9];
typedef char acpi_device_name[40];
typedef char acpi_device_class[20];
typedef char acpi_bus_id[5];
typedef unsigned long acpi_bus_address;
typedef char acpi_hardware_id[9];
typedef char acpi_unique_id[9];
typedef char acpi_device_name[40];
typedef char acpi_device_class[20];
struct acpi_device_pnp {
acpi_bus_id bus_id; /* Object name */
acpi_bus_address bus_address; /* _ADR */
acpi_hardware_id hardware_id; /* _HID */
struct acpi_compatible_id_list *cid_list; /* _CIDs */
acpi_unique_id unique_id; /* _UID */
acpi_device_name device_name; /* Driver-determined */
acpi_device_class device_class; /* " */
acpi_bus_id bus_id; /* Object name */
acpi_bus_address bus_address; /* _ADR */
acpi_hardware_id hardware_id; /* _HID */
struct acpi_compatible_id_list *cid_list; /* _CIDs */
acpi_unique_id unique_id; /* _UID */
acpi_device_name device_name; /* Driver-determined */
acpi_device_class device_class; /* " */
};
#define acpi_device_bid(d) ((d)->pnp.bus_id)
@@ -217,114 +206,111 @@ struct acpi_device_pnp {
#define acpi_device_name(d) ((d)->pnp.device_name)
#define acpi_device_class(d) ((d)->pnp.device_class)
/* Power Management */
struct acpi_device_power_flags {
u32 explicit_get:1; /* _PSC present? */
u32 power_resources:1; /* Power resources */
u32 inrush_current:1; /* Serialize Dx->D0 */
u32 power_removed:1; /* Optimize Dx->D0 */
u32 reserved:28;
u32 explicit_get:1; /* _PSC present? */
u32 power_resources:1; /* Power resources */
u32 inrush_current:1; /* Serialize Dx->D0 */
u32 power_removed:1; /* Optimize Dx->D0 */
u32 reserved:28;
};
struct acpi_device_power_state {
struct {
u8 valid:1;
u8 explicit_set:1; /* _PSx present? */
u8 reserved:6;
} flags;
int power; /* % Power (compared to D0) */
int latency; /* Dx->D0 time (microseconds) */
struct acpi_handle_list resources; /* Power resources referenced */
u8 valid:1;
u8 explicit_set:1; /* _PSx present? */
u8 reserved:6;
} flags;
int power; /* % Power (compared to D0) */
int latency; /* Dx->D0 time (microseconds) */
struct acpi_handle_list resources; /* Power resources referenced */
};
struct acpi_device_power {
int state; /* Current state */
int state; /* Current state */
struct acpi_device_power_flags flags;
struct acpi_device_power_state states[4]; /* Power states (D0-D3) */
struct acpi_device_power_state states[4]; /* Power states (D0-D3) */
};
/* Performance Management */
struct acpi_device_perf_flags {
u8 reserved:8;
u8 reserved:8;
};
struct acpi_device_perf_state {
struct {
u8 valid:1;
u8 reserved:7;
} flags;
u8 power; /* % Power (compared to P0) */
u8 performance; /* % Performance ( " ) */
int latency; /* Px->P0 time (microseconds) */
u8 valid:1;
u8 reserved:7;
} flags;
u8 power; /* % Power (compared to P0) */
u8 performance; /* % Performance ( " ) */
int latency; /* Px->P0 time (microseconds) */
};
struct acpi_device_perf {
int state;
int state;
struct acpi_device_perf_flags flags;
int state_count;
int state_count;
struct acpi_device_perf_state *states;
};
/* Wakeup Management */
struct acpi_device_wakeup_flags {
u8 valid:1; /* Can successfully enable wakeup? */
u8 run_wake:1; /* Run-Wake GPE devices */
u8 valid:1; /* Can successfully enable wakeup? */
u8 run_wake:1; /* Run-Wake GPE devices */
};
struct acpi_device_wakeup_state {
u8 enabled:1;
u8 active:1;
u8 enabled:1;
u8 active:1;
};
struct acpi_device_wakeup {
acpi_handle gpe_device;
acpi_integer gpe_number;;
acpi_integer sleep_state;
struct acpi_handle_list resources;
struct acpi_device_wakeup_state state;
struct acpi_device_wakeup_flags flags;
acpi_handle gpe_device;
acpi_integer gpe_number;;
acpi_integer sleep_state;
struct acpi_handle_list resources;
struct acpi_device_wakeup_state state;
struct acpi_device_wakeup_flags flags;
};
/* Device */
struct acpi_device {
acpi_handle handle;
struct acpi_device *parent;
struct list_head children;
struct list_head node;
struct list_head wakeup_list;
struct list_head g_list;
acpi_handle handle;
struct acpi_device *parent;
struct list_head children;
struct list_head node;
struct list_head wakeup_list;
struct list_head g_list;
struct acpi_device_status status;
struct acpi_device_flags flags;
struct acpi_device_pnp pnp;
struct acpi_device_pnp pnp;
struct acpi_device_power power;
struct acpi_device_wakeup wakeup;
struct acpi_device_perf performance;
struct acpi_device_dir dir;
struct acpi_device_ops ops;
struct acpi_driver *driver;
void *driver_data;
struct kobject kobj;
struct acpi_device_perf performance;
struct acpi_device_dir dir;
struct acpi_device_ops ops;
struct acpi_driver *driver;
void *driver_data;
struct kobject kobj;
};
#define acpi_driver_data(d) ((d)->driver_data)
/*
* Events
* ------
*/
struct acpi_bus_event {
struct list_head node;
acpi_device_class device_class;
acpi_bus_id bus_id;
u32 type;
u32 data;
struct list_head node;
acpi_device_class device_class;
acpi_bus_id bus_id;
u32 type;
u32 data;
};
extern struct subsystem acpi_subsys;
@@ -335,34 +321,32 @@ extern struct subsystem acpi_subsys;
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
int acpi_bus_get_status (struct acpi_device *device);
int acpi_bus_get_power (acpi_handle handle, int *state);
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);
int acpi_bus_add (struct acpi_device **child, struct acpi_device *parent,
acpi_handle handle, int type);
int acpi_bus_start (struct acpi_device *device);
int acpi_bus_get_status(struct acpi_device *device);
int acpi_bus_get_power(acpi_handle handle, int *state);
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);
int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
acpi_handle handle, int type);
int acpi_bus_start(struct acpi_device *device);
int acpi_match_ids (struct acpi_device *device, char *ids);
int acpi_match_ids(struct acpi_device *device, char *ids);
int acpi_create_dir(struct acpi_device *);
void acpi_remove_dir(struct acpi_device *);
/*
* Bind physical devices with ACPI devices
*/
#include <linux/device.h>
struct acpi_bus_type {
struct list_head list;
struct bus_type *bus;
/* For general devices under the bus*/
int (*find_device)(struct device *, acpi_handle*);
struct list_head list;
struct bus_type *bus;
/* For general devices under the bus */
int (*find_device) (struct device *, acpi_handle *);
/* For bridges, such as PCI root bridge, IDE controller */
int (*find_bridge)(struct device *, acpi_handle *);
int (*find_bridge) (struct device *, acpi_handle *);
};
int register_acpi_bus_type(struct acpi_bus_type *);
int unregister_acpi_bus_type(struct acpi_bus_type *);
@@ -372,6 +356,6 @@ acpi_handle acpi_get_child(acpi_handle, acpi_integer);
acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->firmware_data))
#endif /*CONFIG_ACPI_BUS*/
#endif /* CONFIG_ACPI */
#endif /*__ACPI_BUS_H__*/

查看文件

@@ -29,7 +29,6 @@
#include <linux/acpi.h>
#include <acpi/acpi_bus.h>
#define ACPI_MAX_STRING 80
#define ACPI_BUS_COMPONENT 0x00010000
@@ -44,60 +43,55 @@
#define ACPI_BUTTON_HID_POWERF "ACPI_FPB"
#define ACPI_BUTTON_HID_SLEEPF "ACPI_FSB"
/* --------------------------------------------------------------------------
PCI
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_PCI
#define ACPI_PCI_COMPONENT 0x00400000
/* ACPI PCI Interrupt Link (pci_link.c) */
int acpi_irq_penalty_init (void);
int acpi_pci_link_allocate_irq (acpi_handle handle, int index, int *edge_level,
int *active_high_low, char **name);
int acpi_irq_penalty_init(void);
int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *edge_level,
int *active_high_low, char **name);
int acpi_pci_link_free_irq(acpi_handle handle);
/* ACPI PCI Interrupt Routing (pci_irq.c) */
int acpi_pci_irq_add_prt (acpi_handle handle, int segment, int bus);
void acpi_pci_irq_del_prt (int segment, int bus);
int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus);
void acpi_pci_irq_del_prt(int segment, int bus);
/* ACPI PCI Device Binding (pci_bind.c) */
struct pci_bus;
acpi_status acpi_get_pci_id (acpi_handle handle, struct acpi_pci_id *id);
int acpi_pci_bind (struct acpi_device *device);
int acpi_pci_unbind (struct acpi_device *device);
int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);
acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id);
int acpi_pci_bind(struct acpi_device *device);
int acpi_pci_unbind(struct acpi_device *device);
int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id,
struct pci_bus *bus);
/* Arch-defined function to add a bus to the system */
struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, int bus);
#endif /*CONFIG_ACPI_PCI*/
struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain,
int bus);
/* --------------------------------------------------------------------------
Power Resource
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_POWER
int acpi_enable_wakeup_device_power (struct acpi_device *dev);
int acpi_disable_wakeup_device_power (struct acpi_device *dev);
int acpi_power_get_inferred_state (struct acpi_device *device);
int acpi_power_transition (struct acpi_device *device, int state);
int acpi_enable_wakeup_device_power(struct acpi_device *dev);
int acpi_disable_wakeup_device_power(struct acpi_device *dev);
int acpi_power_get_inferred_state(struct acpi_device *device);
int acpi_power_transition(struct acpi_device *device, int state);
#endif
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_EC
int acpi_ec_ecdt_probe (void);
int acpi_ec_ecdt_probe(void);
#endif
/* --------------------------------------------------------------------------

查看文件

@@ -7,7 +7,6 @@
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* All rights reserved.
@@ -51,7 +50,6 @@
#include "platform/acenv.h"
#include "actypes.h"
/* Priorities for acpi_os_queue_for_execution */
#define OSD_PRIORITY_GPE 1
@@ -62,200 +60,136 @@
#define ACPI_NO_UNIT_LIMIT ((u32) -1)
#define ACPI_MUTEX_SEM 1
/* Functions for acpi_os_signal */
#define ACPI_SIGNAL_FATAL 0
#define ACPI_SIGNAL_BREAKPOINT 1
struct acpi_signal_fatal_info
{
u32 type;
u32 code;
u32 argument;
struct acpi_signal_fatal_info {
u32 type;
u32 code;
u32 argument;
};
/*
* OSL Initialization and shutdown primitives
*/
acpi_status
acpi_os_initialize (
void);
acpi_status
acpi_os_terminate (
void);
acpi_status acpi_os_initialize(void);
acpi_status acpi_os_terminate(void);
/*
* ACPI Table interfaces
*/
acpi_status
acpi_os_get_root_pointer (
u32 flags,
struct acpi_pointer *address);
acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *address);
acpi_status
acpi_os_predefined_override (
const struct acpi_predefined_names *init_val,
acpi_string *new_val);
acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
acpi_string * new_val);
acpi_status
acpi_os_table_override (
struct acpi_table_header *existing_table,
struct acpi_table_header **new_table);
acpi_os_table_override(struct acpi_table_header *existing_table,
struct acpi_table_header **new_table);
/*
* Synchronization primitives
*/
acpi_status
acpi_os_create_semaphore (
u32 max_units,
u32 initial_units,
acpi_handle *out_handle);
acpi_os_create_semaphore(u32 max_units,
u32 initial_units, acpi_handle * out_handle);
acpi_status
acpi_os_delete_semaphore (
acpi_handle handle);
acpi_status acpi_os_delete_semaphore(acpi_handle handle);
acpi_status
acpi_os_wait_semaphore (
acpi_handle handle,
u32 units,
u16 timeout);
acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout);
acpi_status
acpi_os_signal_semaphore (
acpi_handle handle,
u32 units);
acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units);
acpi_status
acpi_os_create_lock (
acpi_handle *out_handle);
acpi_status acpi_os_create_lock(acpi_handle * out_handle);
void
acpi_os_delete_lock (
acpi_handle handle);
void acpi_os_delete_lock(acpi_handle handle);
void
acpi_os_acquire_lock (
acpi_handle handle,
u32 flags);
void
acpi_os_release_lock (
acpi_handle handle,
u32 flags);
unsigned long acpi_os_acquire_lock(acpi_handle handle);
void acpi_os_release_lock(acpi_handle handle, unsigned long flags);
/*
* Memory allocation and mapping
*/
void *
acpi_os_allocate (
acpi_size size);
void *acpi_os_allocate(acpi_size size);
void
acpi_os_free (
void * memory);
void acpi_os_free(void *memory);
acpi_status
acpi_os_map_memory (
acpi_physical_address physical_address,
acpi_size size,
void __iomem **logical_address);
acpi_os_map_memory(acpi_physical_address physical_address,
acpi_size size, void __iomem ** logical_address);
void
acpi_os_unmap_memory (
void __iomem *logical_address,
acpi_size size);
void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_os_get_physical_address (
void *logical_address,
acpi_physical_address *physical_address);
acpi_os_get_physical_address(void *logical_address,
acpi_physical_address * physical_address);
#endif
/*
* Memory/Object Cache
*/
acpi_status
acpi_os_create_cache(char *cache_name,
u16 object_size,
u16 max_depth, acpi_cache_t ** return_cache);
acpi_status acpi_os_delete_cache(acpi_cache_t * cache);
acpi_status acpi_os_purge_cache(acpi_cache_t * cache);
void *acpi_os_acquire_object(acpi_cache_t * cache);
acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
/*
* Interrupt handlers
*/
acpi_status
acpi_os_install_interrupt_handler (
u32 gsi,
acpi_osd_handler service_routine,
void *context);
acpi_os_install_interrupt_handler(u32 gsi,
acpi_osd_handler service_routine,
void *context);
acpi_status
acpi_os_remove_interrupt_handler (
u32 gsi,
acpi_osd_handler service_routine);
acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
/*
* Threads and Scheduling
*/
u32
acpi_os_get_thread_id (
void);
u32 acpi_os_get_thread_id(void);
acpi_status
acpi_os_queue_for_execution (
u32 priority,
acpi_osd_exec_callback function,
void *context);
acpi_os_queue_for_execution(u32 priority,
acpi_osd_exec_callback function, void *context);
void
acpi_os_wait_events_complete(
void * context);
void acpi_os_wait_events_complete(void *context);
void
acpi_os_wait_events_complete (
void *context);
void acpi_os_wait_events_complete(void *context);
void
acpi_os_sleep (
acpi_integer milliseconds);
void
acpi_os_stall (
u32 microseconds);
void acpi_os_sleep(acpi_integer milliseconds);
void acpi_os_stall(u32 microseconds);
/*
* Platform and hardware-independent I/O interfaces
*/
acpi_status
acpi_os_read_port (
acpi_io_address address,
u32 *value,
u32 width);
acpi_status
acpi_os_write_port (
acpi_io_address address,
u32 value,
u32 width);
acpi_status acpi_os_read_port(acpi_io_address address, u32 * value, u32 width);
acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width);
/*
* Platform and hardware-independent physical memory interfaces
*/
acpi_status
acpi_os_read_memory (
acpi_physical_address address,
u32 *value,
u32 width);
acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width);
acpi_status
acpi_os_write_memory (
acpi_physical_address address,
u32 value,
u32 width);
acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width);
/*
* Platform and hardware-independent PCI configuration space access
@@ -263,111 +197,69 @@ acpi_os_write_memory (
* certain compilers complain.
*/
acpi_status
acpi_os_read_pci_configuration (
struct acpi_pci_id *pci_id,
u32 reg,
void *value,
u32 width);
acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,
u32 reg, void *value, u32 width);
acpi_status
acpi_os_write_pci_configuration (
struct acpi_pci_id *pci_id,
u32 reg,
acpi_integer value,
u32 width);
acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id,
u32 reg, acpi_integer value, u32 width);
/*
* Interim function needed for PCI IRQ routing
*/
void
acpi_os_derive_pci_id(
acpi_handle rhandle,
acpi_handle chandle,
struct acpi_pci_id **pci_id);
acpi_os_derive_pci_id(acpi_handle rhandle,
acpi_handle chandle, struct acpi_pci_id **pci_id);
/*
* Miscellaneous
*/
u8
acpi_os_readable (
void *pointer,
acpi_size length);
u8 acpi_os_readable(void *pointer, acpi_size length);
#ifdef ACPI_FUTURE_USAGE
u8
acpi_os_writable (
void *pointer,
acpi_size length);
u8 acpi_os_writable(void *pointer, acpi_size length);
#endif
u64
acpi_os_get_timer (
void);
u64 acpi_os_get_timer(void);
acpi_status
acpi_os_signal (
u32 function,
void *info);
acpi_status acpi_os_signal(u32 function, void *info);
/*
* Debug print routines
*/
void ACPI_INTERNAL_VAR_XFACE
acpi_os_printf (
const char *format,
...);
void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...);
void
acpi_os_vprintf (
const char *format,
va_list args);
void
acpi_os_redirect_output (
void *destination);
void acpi_os_vprintf(const char *format, va_list args);
void acpi_os_redirect_output(void *destination);
#ifdef ACPI_FUTURE_USAGE
/*
* Debug input
*/
u32
acpi_os_get_line (
char *buffer);
u32 acpi_os_get_line(char *buffer);
#endif
/*
* Directory manipulation
*/
void *
acpi_os_open_directory (
char *pathname,
char *wildcard_spec,
char requested_file_type);
void *acpi_os_open_directory(char *pathname,
char *wildcard_spec, char requested_file_type);
/* requeste_file_type values */
#define REQUEST_FILE_ONLY 0
#define REQUEST_DIR_ONLY 1
char *acpi_os_get_next_filename(void *dir_handle);
char *
acpi_os_get_next_filename (
void *dir_handle);
void
acpi_os_close_directory (
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);
acpi_os_dbg_assert(void *failed_assertion,
void *file_name, u32 line_number, char *message);
#endif /* __ACPIOSXF_H__ */
#endif /* __ACPIOSXF_H__ */

查看文件

@@ -42,447 +42,283 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ACXFACE_H__
#define __ACXFACE_H__
#include "actypes.h"
#include "actbl.h"
/*
* Global interfaces
*/
acpi_status
acpi_initialize_subsystem (
void);
acpi_status acpi_initialize_subsystem(void);
acpi_status
acpi_enable_subsystem (
u32 flags);
acpi_status acpi_enable_subsystem(u32 flags);
acpi_status
acpi_initialize_objects (
u32 flags);
acpi_status acpi_initialize_objects(u32 flags);
acpi_status
acpi_terminate (
void);
acpi_status acpi_terminate(void);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_subsystem_status (
void);
acpi_status acpi_subsystem_status(void);
#endif
acpi_status
acpi_enable (
void);
acpi_status acpi_enable(void);
acpi_status
acpi_disable (
void);
acpi_status acpi_disable(void);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_get_system_info (
struct acpi_buffer *ret_buffer);
acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
#endif
const char *
acpi_format_exception (
acpi_status exception);
const char *acpi_format_exception(acpi_status exception);
acpi_status
acpi_purge_cached_objects (
void);
acpi_status acpi_purge_cached_objects(void);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_install_initialization_handler (
acpi_init_handler handler,
u32 function);
acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
#endif
/*
* ACPI Memory managment
*/
void *
acpi_allocate (
u32 size);
void *acpi_allocate(u32 size);
void *
acpi_callocate (
u32 size);
void
acpi_free (
void *address);
void *acpi_callocate(u32 size);
void acpi_free(void *address);
/*
* ACPI table manipulation interfaces
*/
acpi_status
acpi_find_root_pointer (
u32 flags,
struct acpi_pointer *rsdp_address);
acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address);
acpi_status
acpi_load_tables (
void);
acpi_status acpi_load_tables(void);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_load_table (
struct acpi_table_header *table_ptr);
acpi_status acpi_load_table(struct acpi_table_header *table_ptr);
acpi_status acpi_unload_table(acpi_table_type table_type);
acpi_status
acpi_unload_table (
acpi_table_type table_type);
acpi_get_table_header(acpi_table_type table_type,
u32 instance, struct acpi_table_header *out_table_header);
#endif /* ACPI_FUTURE_USAGE */
acpi_status
acpi_get_table_header (
acpi_table_type table_type,
u32 instance,
struct acpi_table_header *out_table_header);
#endif /* ACPI_FUTURE_USAGE */
acpi_get_table(acpi_table_type table_type,
u32 instance, struct acpi_buffer *ret_buffer);
acpi_status
acpi_get_table (
acpi_table_type table_type,
u32 instance,
struct acpi_buffer *ret_buffer);
acpi_status
acpi_get_firmware_table (
acpi_string signature,
u32 instance,
u32 flags,
struct acpi_table_header **table_pointer);
acpi_get_firmware_table(acpi_string signature,
u32 instance,
u32 flags, struct acpi_table_header **table_pointer);
/*
* Namespace and name interfaces
*/
acpi_status
acpi_walk_namespace (
acpi_object_type type,
acpi_handle start_object,
u32 max_depth,
acpi_walk_callback user_function,
void *context,
void **return_value);
acpi_walk_namespace(acpi_object_type type,
acpi_handle start_object,
u32 max_depth,
acpi_walk_callback user_function,
void *context, void **return_value);
acpi_status
acpi_get_devices (
char *HID,
acpi_walk_callback user_function,
void *context,
void **return_value);
acpi_get_devices(char *HID,
acpi_walk_callback user_function,
void *context, void **return_value);
acpi_status
acpi_get_name (
acpi_handle handle,
u32 name_type,
struct acpi_buffer *ret_path_ptr);
acpi_get_name(acpi_handle handle,
u32 name_type, struct acpi_buffer *ret_path_ptr);
acpi_status
acpi_get_handle (
acpi_handle parent,
acpi_string pathname,
acpi_handle *ret_handle);
acpi_get_handle(acpi_handle parent,
acpi_string pathname, acpi_handle * ret_handle);
acpi_status
acpi_attach_data (
acpi_handle obj_handle,
acpi_object_handler handler,
void *data);
acpi_attach_data(acpi_handle obj_handle,
acpi_object_handler handler, void *data);
acpi_status
acpi_detach_data (
acpi_handle obj_handle,
acpi_object_handler handler);
acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler);
acpi_status
acpi_get_data (
acpi_handle obj_handle,
acpi_object_handler handler,
void **data);
acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data);
/*
* Object manipulation and enumeration
*/
acpi_status
acpi_evaluate_object (
acpi_handle object,
acpi_string pathname,
struct acpi_object_list *parameter_objects,
struct acpi_buffer *return_object_buffer);
acpi_evaluate_object(acpi_handle object,
acpi_string pathname,
struct acpi_object_list *parameter_objects,
struct acpi_buffer *return_object_buffer);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_evaluate_object_typed (
acpi_handle object,
acpi_string pathname,
struct acpi_object_list *external_params,
struct acpi_buffer *return_buffer,
acpi_object_type return_type);
acpi_evaluate_object_typed(acpi_handle object,
acpi_string pathname,
struct acpi_object_list *external_params,
struct acpi_buffer *return_buffer,
acpi_object_type return_type);
#endif
acpi_status
acpi_get_object_info (
acpi_handle handle,
struct acpi_buffer *return_buffer);
acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer);
acpi_status
acpi_get_next_object (
acpi_object_type type,
acpi_handle parent,
acpi_handle child,
acpi_handle *out_handle);
acpi_get_next_object(acpi_object_type type,
acpi_handle parent,
acpi_handle child, acpi_handle * out_handle);
acpi_status
acpi_get_type (
acpi_handle object,
acpi_object_type *out_type);
acpi_status
acpi_get_parent (
acpi_handle object,
acpi_handle *out_handle);
acpi_status acpi_get_type(acpi_handle object, acpi_object_type * out_type);
acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);
/*
* Event handler interfaces
*/
acpi_status
acpi_install_fixed_event_handler (
u32 acpi_event,
acpi_event_handler handler,
void *context);
acpi_install_fixed_event_handler(u32 acpi_event,
acpi_event_handler handler, void *context);
acpi_status
acpi_remove_fixed_event_handler (
u32 acpi_event,
acpi_event_handler handler);
acpi_remove_fixed_event_handler(u32 acpi_event, acpi_event_handler handler);
acpi_status
acpi_install_notify_handler (
acpi_handle device,
u32 handler_type,
acpi_notify_handler handler,
void *context);
acpi_install_notify_handler(acpi_handle device,
u32 handler_type,
acpi_notify_handler handler, void *context);
acpi_status
acpi_remove_notify_handler (
acpi_handle device,
u32 handler_type,
acpi_notify_handler handler);
acpi_remove_notify_handler(acpi_handle device,
u32 handler_type, acpi_notify_handler handler);
acpi_status
acpi_install_address_space_handler (
acpi_handle device,
acpi_adr_space_type space_id,
acpi_adr_space_handler handler,
acpi_adr_space_setup setup,
void *context);
acpi_install_address_space_handler(acpi_handle device,
acpi_adr_space_type space_id,
acpi_adr_space_handler handler,
acpi_adr_space_setup setup, void *context);
acpi_status
acpi_remove_address_space_handler (
acpi_handle device,
acpi_adr_space_type space_id,
acpi_adr_space_handler handler);
acpi_remove_address_space_handler(acpi_handle device,
acpi_adr_space_type space_id,
acpi_adr_space_handler handler);
acpi_status
acpi_install_gpe_handler (
acpi_handle gpe_device,
u32 gpe_number,
u32 type,
acpi_event_handler address,
void *context);
acpi_install_gpe_handler(acpi_handle gpe_device,
u32 gpe_number,
u32 type, acpi_event_handler address, void *context);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_install_exception_handler (
acpi_exception_handler handler);
acpi_status acpi_install_exception_handler(acpi_exception_handler handler);
#endif
/*
* Event interfaces
*/
acpi_status
acpi_acquire_global_lock (
u16 timeout,
u32 *handle);
acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle);
acpi_status acpi_release_global_lock(u32 handle);
acpi_status
acpi_release_global_lock (
u32 handle);
acpi_remove_gpe_handler(acpi_handle gpe_device,
u32 gpe_number, acpi_event_handler address);
acpi_status
acpi_remove_gpe_handler (
acpi_handle gpe_device,
u32 gpe_number,
acpi_event_handler address);
acpi_status acpi_enable_event(u32 event, u32 flags);
acpi_status
acpi_enable_event (
u32 event,
u32 flags);
acpi_status acpi_disable_event(u32 event, u32 flags);
acpi_status
acpi_disable_event (
u32 event,
u32 flags);
acpi_status acpi_clear_event(u32 event);
acpi_status
acpi_clear_event (
u32 event);
#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
#endif /* ACPI_FUTURE_USAGE */
acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);
acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_get_event_status (
u32 event,
acpi_event_status *event_status);
#endif /* ACPI_FUTURE_USAGE */
acpi_get_gpe_status(acpi_handle gpe_device,
u32 gpe_number,
u32 flags, acpi_event_status * event_status);
#endif /* ACPI_FUTURE_USAGE */
acpi_status
acpi_set_gpe_type (
acpi_handle gpe_device,
u32 gpe_number,
u8 type);
acpi_status
acpi_enable_gpe (
acpi_handle gpe_device,
u32 gpe_number,
u32 flags);
acpi_status
acpi_disable_gpe (
acpi_handle gpe_device,
u32 gpe_number,
u32 flags);
acpi_status
acpi_clear_gpe (
acpi_handle gpe_device,
u32 gpe_number,
u32 flags);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_get_gpe_status (
acpi_handle gpe_device,
u32 gpe_number,
u32 flags,
acpi_event_status *event_status);
#endif /* ACPI_FUTURE_USAGE */
acpi_status
acpi_install_gpe_block (
acpi_handle gpe_device,
struct acpi_generic_address *gpe_block_address,
u32 register_count,
u32 interrupt_level);
acpi_status
acpi_remove_gpe_block (
acpi_handle gpe_device);
acpi_install_gpe_block(acpi_handle gpe_device,
struct acpi_generic_address *gpe_block_address,
u32 register_count, u32 interrupt_number);
acpi_status acpi_remove_gpe_block(acpi_handle gpe_device);
/*
* Resource interfaces
*/
typedef
acpi_status (*ACPI_WALK_RESOURCE_CALLBACK) (
struct acpi_resource *resource,
void *context);
acpi_status(*ACPI_WALK_RESOURCE_CALLBACK) (struct acpi_resource * resource,
void *context);
acpi_status
acpi_get_current_resources(
acpi_handle device_handle,
struct acpi_buffer *ret_buffer);
acpi_get_current_resources(acpi_handle device_handle,
struct acpi_buffer *ret_buffer);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_get_possible_resources(
acpi_handle device_handle,
struct acpi_buffer *ret_buffer);
acpi_get_possible_resources(acpi_handle device_handle,
struct acpi_buffer *ret_buffer);
#endif
acpi_status
acpi_walk_resources (
acpi_handle device_handle,
char *path,
ACPI_WALK_RESOURCE_CALLBACK user_function,
void *context);
acpi_walk_resources(acpi_handle device_handle,
char *path,
ACPI_WALK_RESOURCE_CALLBACK user_function, void *context);
acpi_status
acpi_set_current_resources (
acpi_handle device_handle,
struct acpi_buffer *in_buffer);
acpi_set_current_resources(acpi_handle device_handle,
struct acpi_buffer *in_buffer);
acpi_status
acpi_get_irq_routing_table (
acpi_handle bus_device_handle,
struct acpi_buffer *ret_buffer);
acpi_get_irq_routing_table(acpi_handle bus_device_handle,
struct acpi_buffer *ret_buffer);
acpi_status
acpi_resource_to_address64 (
struct acpi_resource *resource,
struct acpi_resource_address64 *out);
acpi_resource_to_address64(struct acpi_resource *resource,
struct acpi_resource_address64 *out);
/*
* Hardware (ACPI device) interfaces
*/
acpi_status
acpi_get_register (
u32 register_id,
u32 *return_value,
u32 flags);
acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags);
acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags);
acpi_status
acpi_set_register (
u32 register_id,
u32 value,
u32 flags);
acpi_status
acpi_set_firmware_waking_vector (
acpi_physical_address physical_address);
acpi_set_firmware_waking_vector(acpi_physical_address physical_address);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_get_firmware_waking_vector (
acpi_physical_address *physical_address);
acpi_get_firmware_waking_vector(acpi_physical_address * physical_address);
#endif
acpi_status
acpi_get_sleep_type_data (
u8 sleep_state,
u8 *slp_typ_a,
u8 *slp_typ_b);
acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b);
acpi_status
acpi_enter_sleep_state_prep (
u8 sleep_state);
acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
acpi_status asmlinkage
acpi_enter_sleep_state (
u8 sleep_state);
acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state);
acpi_status asmlinkage
acpi_enter_sleep_state_s4bios (
void);
acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void);
acpi_status
acpi_leave_sleep_state (
u8 sleep_state);
acpi_status acpi_leave_sleep_state(u8 sleep_state);
#endif /* __ACXFACE_H__ */
#endif /* __ACXFACE_H__ */

查看文件

@@ -44,303 +44,216 @@
#ifndef __ACRESRC_H__
#define __ACRESRC_H__
/*
* Function prototypes called from Acpi* APIs
*/
acpi_status
acpi_rs_get_prt_method_data (
acpi_handle handle,
struct acpi_buffer *ret_buffer);
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_crs_method_data(acpi_handle handle, 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_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer);
#endif /* ACPI_FUTURE_USAGE */
acpi_status
acpi_rs_get_method_data (
acpi_handle handle,
char *path,
struct acpi_buffer *ret_buffer);
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(acpi_handle handle, struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_create_resource_list (
union acpi_operand_object *byte_stream_buffer,
struct acpi_buffer *output_buffer);
acpi_rs_create_resource_list(union acpi_operand_object *byte_stream_buffer,
struct acpi_buffer *output_buffer);
acpi_status
acpi_rs_create_byte_stream (
struct acpi_resource *linked_list_buffer,
struct acpi_buffer *output_buffer);
acpi_rs_create_byte_stream(struct acpi_resource *linked_list_buffer,
struct acpi_buffer *output_buffer);
acpi_status
acpi_rs_create_pci_routing_table (
union acpi_operand_object *package_object,
struct acpi_buffer *output_buffer);
acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
struct acpi_buffer *output_buffer);
/*
* rsdump
*/
#ifdef ACPI_FUTURE_USAGE
void
acpi_rs_dump_resource_list (
struct acpi_resource *resource);
void
acpi_rs_dump_irq_list (
u8 *route_table);
#endif /* ACPI_FUTURE_USAGE */
void acpi_rs_dump_resource_list(struct acpi_resource *resource);
void acpi_rs_dump_irq_list(u8 * route_table);
#endif /* ACPI_FUTURE_USAGE */
/*
* rscalc
*/
acpi_status
acpi_rs_get_byte_stream_start (
u8 *byte_stream_buffer,
u8 **byte_stream_start,
u32 *size);
acpi_rs_get_byte_stream_start(u8 * byte_stream_buffer,
u8 ** byte_stream_start, u32 * size);
acpi_status
acpi_rs_get_list_length (
u8 *byte_stream_buffer,
u32 byte_stream_buffer_length,
acpi_size *size_needed);
acpi_rs_get_list_length(u8 * byte_stream_buffer,
u32 byte_stream_buffer_length, acpi_size * size_needed);
acpi_status
acpi_rs_get_byte_stream_length (
struct acpi_resource *linked_list_buffer,
acpi_size *size_needed);
acpi_rs_get_byte_stream_length(struct acpi_resource *linked_list_buffer,
acpi_size * size_needed);
acpi_status
acpi_rs_get_pci_routing_table_length (
union acpi_operand_object *package_object,
acpi_size *buffer_size_needed);
acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
acpi_size * buffer_size_needed);
acpi_status
acpi_rs_byte_stream_to_list (
u8 *byte_stream_buffer,
u32 byte_stream_buffer_length,
u8 *output_buffer);
acpi_rs_byte_stream_to_list(u8 * byte_stream_buffer,
u32 byte_stream_buffer_length, u8 * output_buffer);
acpi_status
acpi_rs_list_to_byte_stream (
struct acpi_resource *linked_list,
acpi_size byte_stream_size_needed,
u8 *output_buffer);
acpi_rs_list_to_byte_stream(struct acpi_resource *linked_list,
acpi_size byte_stream_size_needed,
u8 * output_buffer);
acpi_status
acpi_rs_io_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_io_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_fixed_io_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_fixed_io_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_io_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_io_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_fixed_io_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_fixed_io_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_irq_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_irq_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_irq_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_irq_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_dma_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_dma_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_dma_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_dma_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_address16_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_address16_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_address16_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_address16_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_address32_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_address32_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_address32_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_address32_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_address64_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_address64_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_address64_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_address64_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_start_depend_fns_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_start_depend_fns_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer,
acpi_size * structure_size);
acpi_status
acpi_rs_end_depend_fns_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_end_depend_fns_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer,
acpi_size * structure_size);
acpi_status
acpi_rs_start_depend_fns_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_start_depend_fns_stream(struct acpi_resource *linked_list,
u8 ** output_buffer,
acpi_size * bytes_consumed);
acpi_status
acpi_rs_end_depend_fns_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_end_depend_fns_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_memory24_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_memory24_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_memory24_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_memory24_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_memory32_range_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_memory32_range_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer,
acpi_size * structure_size);
acpi_status
acpi_rs_fixed_memory32_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_fixed_memory32_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer,
acpi_size * structure_size);
acpi_status
acpi_rs_memory32_range_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_memory32_range_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_fixed_memory32_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_fixed_memory32_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_extended_irq_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_extended_irq_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_extended_irq_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_extended_irq_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_end_tag_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_end_tag_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_end_tag_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_end_tag_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
acpi_status
acpi_rs_vendor_resource (
u8 *byte_stream_buffer,
acpi_size *bytes_consumed,
u8 **output_buffer,
acpi_size *structure_size);
acpi_rs_vendor_resource(u8 * byte_stream_buffer,
acpi_size * bytes_consumed,
u8 ** output_buffer, acpi_size * structure_size);
acpi_status
acpi_rs_vendor_stream (
struct acpi_resource *linked_list,
u8 **output_buffer,
acpi_size *bytes_consumed);
acpi_rs_vendor_stream(struct acpi_resource *linked_list,
u8 ** output_buffer, acpi_size * bytes_consumed);
u8
acpi_rs_get_resource_type (
u8 resource_start_byte);
u8 acpi_rs_get_resource_type(u8 resource_start_byte);
#endif /* __ACRESRC_H__ */
#endif /* __ACRESRC_H__ */

查看文件

@@ -44,14 +44,12 @@
#ifndef __ACSTRUCT_H__
#define __ACSTRUCT_H__
/*****************************************************************************
*
* Tree walking typedefs and structs
*
****************************************************************************/
/*
* 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.
@@ -65,152 +63,142 @@
#define ACPI_WALK_CONST_REQUIRED 3
#define ACPI_WALK_CONST_OPTIONAL 4
struct acpi_walk_state
{
u8 data_type; /* To differentiate various internal objs MUST BE FIRST!*/\
u8 walk_type;
acpi_owner_id owner_id; /* Owner of objects created during the walk */
u8 last_predicate; /* Result of last predicate */
u8 reserved; /* For alignment */
u8 current_result; /* */
u8 next_op_info; /* Info about next_op */
u8 num_operands; /* Stack pointer for Operands[] array */
u8 return_used;
u16 opcode; /* Current AML opcode */
u8 scope_depth;
u8 reserved1;
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;
u32 prev_arg_types;
struct acpi_walk_state {
u8 data_type; /* To differentiate various internal objs MUST BE FIRST! */
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; /* */
u8 next_op_info; /* Info about next_op */
u8 num_operands; /* Stack pointer for Operands[] array */
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;
u32 prev_arg_types;
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 */
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 */
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 */
union acpi_parse_object *prev_op; /* Last op that was processed */
union acpi_parse_object *next_op; /* next op to be processed */
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 */
struct acpi_init_walk_info
{
u16 method_count;
u16 device_count;
u16 op_region_count;
u16 field_count;
u16 buffer_count;
u16 package_count;
u16 op_region_init;
u16 field_init;
u16 buffer_init;
u16 package_init;
u16 object_count;
struct acpi_table_desc *table_desc;
struct acpi_init_walk_info {
u16 method_count;
u16 device_count;
u16 op_region_count;
u16 field_count;
u16 buffer_count;
u16 package_count;
u16 op_region_init;
u16 field_init;
u16 buffer_init;
u16 package_init;
u16 object_count;
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;
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 owner_id;
u8 display_type;
struct acpi_walk_info {
u32 debug_level;
u32 count;
acpi_owner_id owner_id;
u8 display_type;
};
/* Display Types */
#define ACPI_DISPLAY_SUMMARY 0
#define ACPI_DISPLAY_OBJECTS 1
#define ACPI_DISPLAY_SUMMARY (u8) 0
#define ACPI_DISPLAY_OBJECTS (u8) 1
#define ACPI_DISPLAY_MASK (u8) 1
struct acpi_get_devices_info
{
acpi_walk_callback user_function;
void *context;
char *hid;
#define ACPI_DISPLAY_SHORT (u8) 2
struct acpi_get_devices_info {
acpi_walk_callback user_function;
void *context;
char *hid;
};
union acpi_aml_operands {
union acpi_operand_object *operands[7];
union acpi_aml_operands
{
union acpi_operand_object *operands[7];
struct
{
struct acpi_object_integer *type;
struct acpi_object_integer *code;
struct acpi_object_integer *argument;
struct {
struct acpi_object_integer *type;
struct acpi_object_integer *code;
struct acpi_object_integer *argument;
} fatal;
struct
{
union acpi_operand_object *source;
struct acpi_object_integer *index;
union acpi_operand_object *target;
struct {
union acpi_operand_object *source;
struct acpi_object_integer *index;
union acpi_operand_object *target;
} index;
struct
{
union acpi_operand_object *source;
struct acpi_object_integer *index;
struct acpi_object_integer *length;
union acpi_operand_object *target;
struct {
union acpi_operand_object *source;
struct acpi_object_integer *index;
struct acpi_object_integer *length;
union acpi_operand_object *target;
} mid;
};
/* Internal method parameter list */
struct acpi_parameter_info
{
struct acpi_namespace_node *node;
union acpi_operand_object **parameters;
union acpi_operand_object *return_object;
u8 parameter_type;
u8 return_object_type;
struct acpi_parameter_info {
struct acpi_namespace_node *node;
union acpi_operand_object *obj_desc;
union acpi_operand_object **parameters;
union acpi_operand_object *return_object;
u8 pass_number;
u8 parameter_type;
u8 return_object_type;
};
/* Types for parameter_type above */
@@ -218,5 +206,4 @@ struct acpi_parameter_info
#define ACPI_PARAM_ARGS 0
#define ACPI_PARAM_GPE 1
#endif

查看文件

@@ -44,146 +44,101 @@
#ifndef __ACTABLES_H__
#define __ACTABLES_H__
/* Used in acpi_tb_map_acpi_table for size parameter if table header is to be used */
#define SIZE_IN_HEADER 0
/*
* tbconvrt - Table conversion routines
*/
acpi_status
acpi_tb_convert_to_xsdt (
struct acpi_table_desc *table_info);
acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info);
acpi_status
acpi_tb_convert_table_fadt (
void);
acpi_status acpi_tb_convert_table_fadt(void);
acpi_status
acpi_tb_build_common_facs (
struct acpi_table_desc *table_info);
acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info);
u32
acpi_tb_get_table_count (
struct rsdp_descriptor *RSDP,
struct acpi_table_header *RSDT);
acpi_tb_get_table_count(struct rsdp_descriptor *RSDP,
struct acpi_table_header *RSDT);
/*
* tbget - Table "get" routines
*/
acpi_status
acpi_tb_get_table (
struct acpi_pointer *address,
struct acpi_table_desc *table_info);
acpi_tb_get_table(struct acpi_pointer *address,
struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_table_header (
struct acpi_pointer *address,
struct acpi_table_header *return_header);
acpi_tb_get_table_header(struct acpi_pointer *address,
struct acpi_table_header *return_header);
acpi_status
acpi_tb_get_table_body (
struct acpi_pointer *address,
struct acpi_table_header *header,
struct acpi_table_desc *table_info);
acpi_tb_get_table_body(struct acpi_pointer *address,
struct acpi_table_header *header,
struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_table_ptr (
acpi_table_type table_type,
u32 instance,
struct acpi_table_header **table_ptr_loc);
acpi_tb_get_table_ptr(acpi_table_type table_type,
u32 instance, struct acpi_table_header **table_ptr_loc);
acpi_status
acpi_tb_verify_rsdp (
struct acpi_pointer *address);
acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address);
void
acpi_tb_get_rsdt_address (
struct acpi_pointer *out_address);
acpi_status
acpi_tb_validate_rsdt (
struct acpi_table_header *table_ptr);
void acpi_tb_get_rsdt_address(struct acpi_pointer *out_address);
acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr);
/*
* tbgetall - get multiple required tables
*/
acpi_status
acpi_tb_get_required_tables (
void);
acpi_status acpi_tb_get_required_tables(void);
/*
* tbinstall - Table installation
*/
acpi_status
acpi_tb_install_table (
struct acpi_table_desc *table_info);
acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info);
acpi_status
acpi_tb_recognize_table (
struct acpi_table_desc *table_info,
u8 search_type);
acpi_tb_recognize_table(struct acpi_table_desc *table_info, u8 search_type);
acpi_status
acpi_tb_init_table_descriptor (
acpi_table_type table_type,
struct acpi_table_desc *table_info);
acpi_tb_init_table_descriptor(acpi_table_type table_type,
struct acpi_table_desc *table_info);
/*
* tbremove - Table removal and deletion
*/
void
acpi_tb_delete_all_tables (
void);
void acpi_tb_delete_all_tables(void);
void
acpi_tb_delete_tables_by_type (
acpi_table_type type);
void acpi_tb_delete_tables_by_type(acpi_table_type type);
void
acpi_tb_delete_single_table (
struct acpi_table_desc *table_desc);
struct acpi_table_desc *
acpi_tb_uninstall_table (
struct acpi_table_desc *table_desc);
void acpi_tb_delete_single_table(struct acpi_table_desc *table_desc);
struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc
*table_desc);
/*
* tbxfroot - RSDP, RSDT utilities
*/
acpi_status
acpi_tb_find_table (
char *signature,
char *oem_id,
char *oem_table_id,
struct acpi_table_header **table_ptr);
acpi_tb_find_table(char *signature,
char *oem_id,
char *oem_table_id, struct acpi_table_header **table_ptr);
acpi_status
acpi_tb_get_table_rsdt (
void);
acpi_status acpi_tb_get_table_rsdt(void);
acpi_status acpi_tb_validate_rsdp(struct rsdp_descriptor *rsdp);
/*
* tbutils - common table utilities
*/
acpi_status
acpi_tb_verify_table_checksum (
struct acpi_table_header *table_header);
u8
acpi_tb_checksum (
void *buffer,
u32 length);
acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc);
acpi_status
acpi_tb_validate_table_header (
struct acpi_table_header *table_header);
acpi_tb_verify_table_checksum(struct acpi_table_header *table_header);
#endif /* __ACTABLES_H__ */
u8 acpi_tb_generate_checksum(void *buffer, u32 length);
acpi_status
acpi_tb_validate_table_header(struct acpi_table_header *table_header);
#endif /* __ACTABLES_H__ */

查看文件

@@ -44,27 +44,24 @@
#ifndef __ACTBL_H__
#define __ACTBL_H__
/*
* 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 */
#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
@@ -75,7 +72,6 @@
#define FACS_DESCRIPTOR struct facs_descriptor_rev2
#define FADT_DESCRIPTOR struct fadt_descriptor_rev2
#pragma pack(1)
/*
@@ -84,45 +80,37 @@
* 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; /* To make sum of struct == 0 */
char oem_id [6]; /* OEM identification */
u8 revision; /* Must be 0 for 1.0, 2 for 2.0 */
u32 rsdt_physical_address; /* 32-bit physical address of RSDT */
u32 length; /* XSDT Length in bytes including hdr */
u64 xsdt_physical_address; /* 64-bit physical address of XSDT */
u8 extended_checksum; /* Checksum of entire table */
char reserved [3]; /* Reserved field must be 0 */
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 */
};
struct acpi_common_facs /* Common FACS for internal use */
{
u32 *global_lock;
u64 *firmware_waking_vector;
u8 vector_width;
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 */ \
char signature [4]; /* ACPI signature (4 ASCII characters) */\
u32 length; /* Length of table, in bytes, including header */\
char signature[4]; /* ASCII table signature */\
u32 length; /* Length of table in bytes, including this header */\
u8 revision; /* ACPI Specification minor version # */\
u8 checksum; /* To make sum of entire table == 0 */\
char oem_id [6]; /* OEM identification */\
char oem_table_id [8]; /* OEM table identification */\
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]; /* ASL compiler vendor ID */\
u32 asl_compiler_revision; /* ASL compiler revision number */
struct acpi_table_header /* ACPI common table header */
{
ACPI_TABLE_HEADER_DEF
};
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 */
ACPI_TABLE_HEADER_DEF};
/*
* MADT values and structures
@@ -135,12 +123,15 @@ struct acpi_table_header /* ACPI common table header */
/* Master MADT */
struct multiple_apic_table
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 local_apic_address; /* Physical address of local APIC */
u32 PCATcompat : 1; /* A one indicates system also has dual 8259s */
u32 reserved1 : 31;
struct multiple_apic_table {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 local_apic_address; /* Physical address of local APIC */
/* Flags (32 bits) */
u8 PCATcompat:1; /* 00: System also has dual 8259s */
u8:7; /* 01-07: Reserved, must be zero */
u8 reserved1[3]; /* 08-31: Reserved, must be zero */
};
/* Values for Type in APIC_HEADER_DEF */
@@ -154,7 +145,7 @@ struct multiple_apic_table
#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 APIC_RESERVED 9 /* 9 and greater are reserved */
/*
* MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE)
@@ -163,10 +154,8 @@ struct multiple_apic_table
u8 type; \
u8 length;
struct apic_header
{
APIC_HEADER_DEF
};
struct apic_header {
APIC_HEADER_DEF};
/* Values for MPS INTI flags */
@@ -180,117 +169,90 @@ struct apic_header
#define TRIGGER_RESERVED 2
#define TRIGGER_LEVEL 3
/* Common flag definitions */
/* Common flag definitions (16 bits each) */
#define MPS_INTI_FLAGS \
u16 polarity : 2; /* Polarity of APIC I/O input signals */\
u16 trigger_mode : 2; /* Trigger mode of APIC input signals */\
u16 reserved1 : 12; /* Reserved, must be zero */
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 \
u32 processor_enabled: 1; /* Processor is usable if set */\
u32 reserved2 : 31; /* Reserved, must be zero */
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_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 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 madt_interrupt_override {
APIC_HEADER_DEF u8 bus; /* 0 - ISA */
u8 source; /* Interrupt source (IRQ) */
u32 interrupt; /* Global system interrupt */
MPS_INTI_FLAGS};
struct madt_nmi_source {
APIC_HEADER_DEF MPS_INTI_FLAGS u32 interrupt; /* Global system interrupt */
};
struct madt_interrupt_override
{
APIC_HEADER_DEF
u8 bus; /* 0 - ISA */
u8 source; /* Interrupt source (IRQ) */
u32 interrupt; /* Global system interrupt */
MPS_INTI_FLAGS
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 */
};
struct madt_nmi_source
{
APIC_HEADER_DEF
MPS_INTI_FLAGS
u32 interrupt; /* Global system interrupt */
struct madt_address_override {
APIC_HEADER_DEF u16 reserved; /* Reserved, must be zero */
u64 address; /* APIC physical address */
};
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 */
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 */
};
struct madt_address_override
{
APIC_HEADER_DEF
u16 reserved; /* Reserved - must be zero */
u64 address; /* APIC physical address */
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_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 */
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 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 */
};
/*
* Smart Battery
*/
struct smart_battery_table
{
ACPI_TABLE_HEADER_DEF
u32 warning_level;
u32 low_level;
u32 critical_level;
struct smart_battery_table {
ACPI_TABLE_HEADER_DEF u32 warning_level;
u32 low_level;
u32 critical_level;
};
#pragma pack()
/*
* ACPI Table information. We save the table address, length,
* and type of memory allocation (mapped or allocated) for each
@@ -314,39 +276,35 @@ struct smart_battery_table
/* Data about each known table type */
struct acpi_table_support
{
char *name;
char *signature;
void **global_ptr;
u8 sig_length;
u8 flags;
struct acpi_table_support {
char *name;
char *signature;
void **global_ptr;
u8 sig_length;
u8 flags;
};
/*
* Get the ACPI version-specific tables
*/
#include "actbl1.h" /* Acpi 1.0 table definitions */
#include "actbl2.h" /* Acpi 2.0 table definitions */
#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 */
extern u8 acpi_fadt_is_v1; /* is set to 1 if FADT is revision 1,
* needed for certain workarounds */
#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;
struct hpet_table {
ACPI_TABLE_HEADER_DEF u32 hardware_id;
struct acpi_generic_address base_address;
u8 hpet_number;
u16 clock_tick;
u8 attributes;
};
#pragma pack()
#endif /* __ACTBL_H__ */
#endif /* __ACTBL_H__ */

查看文件

@@ -49,88 +49,87 @@
/*
* ACPI 1.0 Root System Description Table (RSDT)
*/
struct rsdt_descriptor_rev1
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 table_offset_entry [1]; /* Array of pointers to other */
/* ACPI tables */
struct rsdt_descriptor_rev1 {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */
};
/*
* ACPI 1.0 Firmware ACPI Control Structure (FACS)
*/
struct facs_descriptor_rev1
{
char signature[4]; /* ACPI Signature */
u32 length; /* Length of structure, in bytes */
u32 hardware_signature; /* Hardware configuration signature */
u32 firmware_waking_vector; /* ACPI OS waking vector */
u32 global_lock; /* Global Lock */
u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
u32 reserved1 : 31; /* Must be 0 */
u8 resverved3 [40]; /* Reserved - must be zero */
};
struct facs_descriptor_rev1 {
char signature[4]; /* ASCII table signature */
u32 length; /* Length of structure in bytes */
u32 hardware_signature; /* Hardware configuration signature */
u32 firmware_waking_vector; /* ACPI OS waking vector */
u32 global_lock; /* Global Lock */
/* Flags (32 bits) */
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 */
u8 reserved2[40]; /* Reserved, must be zero */
};
/*
* ACPI 1.0 Fixed ACPI Description Table (FADT)
*/
struct fadt_descriptor_rev1
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 firmware_ctrl; /* Physical address of FACS */
u32 dsdt; /* Physical address of DSDT */
u8 model; /* System Interrupt Model */
u8 reserved1; /* Reserved */
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 reserved2; /* Reserved - must be zero */
u32 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
u32 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
u32 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
u32 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
u32 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
u32 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
u32 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
u32 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 reserved3; /* Reserved */
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; /* Size of area read to flush caches */
u16 flush_stride; /* Stride used in flushing caches */
u8 duty_offset; /* Bit location of duty cycle field in p_cnt reg */
u8 duty_width; /* Bit width of duty cycle field in p_cnt reg */
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 */
u8 reserved4; /* Reserved */
u8 reserved4a; /* Reserved */
u8 reserved4b; /* Reserved */
u32 wb_invd : 1; /* The wbinvd instruction works properly */
u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
u32 proc_c1 : 1; /* All processors support C1 state */
u32 plvl2_up : 1; /* C2 state works on MP system */
u32 pwr_button : 1; /* Power button is handled as a generic feature */
u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
u32 tmr_val_ext : 1; /* The tmr_val width is 32 bits (0 = 24 bits) */
u32 reserved5 : 23; /* Reserved - must be zero */
struct fadt_descriptor_rev1 {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 firmware_ctrl; /* Physical address of FACS */
u32 dsdt; /* Physical address of DSDT */
u8 model; /* System Interrupt Model */
u8 reserved1; /* Reserved, must be zero */
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 reserved2; /* Reserved, must be zero */
u32 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
u32 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
u32 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
u32 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
u32 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
u32 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
u32 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
u32 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 reserved3; /* Reserved, must be zero */
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; /* Size of area read to flush caches */
u16 flush_stride; /* Stride used in flushing caches */
u8 duty_offset; /* Bit location of duty cycle field in p_cnt reg */
u8 duty_width; /* Bit width of duty cycle field in p_cnt reg */
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 */
u8 reserved4[3]; /* Reserved, must be zero */
/* 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 width is 32 bits (0 = 24 bits) */
u8:7; /* 09-15: Reserved, must be zero */
u8 reserved5[2]; /* 16-31: Reserved, must be zero */
};
#pragma pack()
#endif /* __ACTBL1_H__ */
#endif /* __ACTBL1_H__ */

查看文件

@@ -64,62 +64,56 @@
#define FADT2_REVISION_ID 3
#define FADT2_MINUS_REVISION_ID 2
#pragma pack(1)
/*
* ACPI 2.0 Root System Description Table (RSDT)
*/
struct rsdt_descriptor_rev2
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 table_offset_entry [1]; /* Array of pointers to */
/* ACPI table headers */
struct rsdt_descriptor_rev2 {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */
};
/*
* ACPI 2.0 Extended System Description Table (XSDT)
*/
struct xsdt_descriptor_rev2
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u64 table_offset_entry [1]; /* Array of pointers to */
/* ACPI table headers */
struct xsdt_descriptor_rev2 {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */
};
/*
* ACPI 2.0 Firmware ACPI Control Structure (FACS)
*/
struct facs_descriptor_rev2
{
char signature[4]; /* ACPI signature */
u32 length; /* Length of structure, in bytes */
u32 hardware_signature; /* Hardware configuration signature */
u32 firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */
u32 S4bios_f : 1; /* S4Bios_f - Indicates if S4BIOS support is present */
u32 reserved1 : 31; /* Must be 0 */
u64 xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
u8 version; /* Version of this table */
u8 reserved3 [31]; /* Reserved - must be zero */
};
struct facs_descriptor_rev2 {
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 used to synchronize access to shared hardware resources */
/* Flags (32 bits) */
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 physical address of the Firmware Waking Vector. */
u8 version; /* Version of this table */
u8 reserved3[31]; /* Reserved, must be zero */
};
/*
* ACPI 2.0+ Generic Address Structure (GAS)
*/
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 */
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 */
};
#define FADT_REV2_COMMON \
u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \
u32 V1_dsdt; /* 32-bit physical address of DSDT */ \
@@ -161,129 +155,123 @@ struct acpi_generic_address
/*
* ACPI 2.0+ Fixed ACPI Description Table (FADT)
*/
struct fadt_descriptor_rev2
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
FADT_REV2_COMMON
u8 reserved2; /* Reserved */
u32 wb_invd : 1; /* The wbinvd instruction works properly */
u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
u32 proc_c1 : 1; /* All processors support C1 state */
u32 plvl2_up : 1; /* C2 state works on MP system */
u32 pwr_button : 1; /* Power button is handled as a generic feature */
u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
u32 tmr_val_ext : 1; /* Indicates tmr_val is 32 bits 0=24-bits */
u32 dock_cap : 1; /* Supports Docking */
u32 reset_reg_sup : 1; /* Indicates system supports system reset via the FADT RESET_REG */
u32 sealed_case : 1; /* Indicates system has no internal expansion capabilities and case is sealed */
u32 headless : 1; /* Indicates system does not have local video capabilities or local input devices */
u32 cpu_sw_sleep : 1; /* Indicates to OSPM that a processor native instruction */
/* must be executed after writing the SLP_TYPx register */
/* ACPI 3.0 flag bits */
struct fadt_descriptor_rev2 {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
FADT_REV2_COMMON u8 reserved2; /* Reserved, must be zero */
u32 pci_exp_wak : 1; /* System supports PCIEXP_WAKE (STS/EN) bits */
u32 use_platform_clock : 1; /* OSPM should use platform-provided timer */
u32 S4rtc_sts_valid : 1; /* Contents of RTC_STS valid after S4 wake */
u32 remote_power_on_capable : 1; /* System is compatible with remote power on */
u32 force_apic_cluster_model : 1; /* All local APICs must use cluster model */
u32 force_apic_physical_destination_mode : 1; /* all local x_aPICs must use physical dest mode */
u32 reserved6 : 12;/* Reserved - must be zero */
/* Flags (32 bits) */
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]; /* 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 */
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 */
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 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 */
};
/* "Down-revved" ACPI 2.0 FADT descriptor */
struct fadt_descriptor_rev2_minus
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
FADT_REV2_COMMON
u8 reserved2; /* Reserved */
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]; /* These three bytes must be zero */
struct fadt_descriptor_rev2_minus {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
FADT_REV2_COMMON u8 reserved2; /* Reserved, must be zero */
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 */
};
/* ECDT - Embedded Controller Boot Resources Table */
struct ec_boot_resources
{
ACPI_TABLE_HEADER_DEF
struct acpi_generic_address ec_control; /* Address of EC command/status register */
struct acpi_generic_address ec_data; /* Address of EC data register */
u32 uid; /* Unique ID - must be same as the EC _UID method */
u8 gpe_bit; /* The GPE for the EC */
u8 ec_id[1]; /* Full namepath of the EC in the ACPI namespace */
struct ec_boot_resources {
ACPI_TABLE_HEADER_DEF struct acpi_generic_address ec_control; /* Address of EC command/status register */
struct acpi_generic_address ec_data; /* Address of EC data register */
u32 uid; /* Unique ID - must be same as the EC _UID method */
u8 gpe_bit; /* The GPE for the EC */
u8 ec_id[1]; /* Full namepath of the EC in the ACPI namespace */
};
/* SRAT - System Resource Affinity Table */
struct static_resource_alloc
{
u8 type;
u8 length;
u8 proximity_domain_lo;
u8 apic_id;
u32 enabled :1;
u32 reserved3 :31;
u8 local_sapic_eid;
u8 proximity_domain_hi[3];
u32 reserved4;
struct static_resource_alloc {
u8 type;
u8 length;
u8 proximity_domain_lo;
u8 apic_id;
/* Flags (32 bits) */
u8 enabled:1; /* 00: Use affinity structure */
u8:7; /* 01-07: Reserved, must be zero */
u8 reserved3[3]; /* 08-31: Reserved, must be zero */
u8 local_sapic_eid;
u8 proximity_domain_hi[3];
u32 reserved4; /* Reserved, must be zero */
};
struct memory_affinity
{
u8 type;
u8 length;
u32 proximity_domain;
u16 reserved3;
u64 base_address;
u64 address_length;
u32 reserved4;
u32 enabled :1;
u32 hot_pluggable :1;
u32 non_volatile :1;
u32 reserved5 :29;
u64 reserved6;
struct memory_affinity {
u8 type;
u8 length;
u32 proximity_domain;
u16 reserved3;
u64 base_address;
u64 address_length;
u32 reserved4;
/* Flags (32 bits) */
u8 enabled:1; /* 00: Use affinity structure */
u8 hot_pluggable:1; /* 01: Memory region is hot pluggable */
u8 non_volatile:1; /* 02: Memory is non-volatile */
u8:5; /* 03-07: Reserved, must be zero */
u8 reserved5[3]; /* 08-31: Reserved, must be zero */
u64 reserved6; /* Reserved, must be zero */
};
struct system_resource_affinity
{
ACPI_TABLE_HEADER_DEF
u32 reserved1; /* Must be value '1' */
u64 reserved2;
struct system_resource_affinity {
ACPI_TABLE_HEADER_DEF u32 reserved1; /* Must be value '1' */
u64 reserved2; /* Reserved, must be zero */
};
/* SLIT - System Locality Distance Information Table */
struct system_locality_info
{
ACPI_TABLE_HEADER_DEF
u64 locality_count;
u8 entry[1][1];
struct system_locality_info {
ACPI_TABLE_HEADER_DEF u64 locality_count;
u8 entry[1][1];
};
#pragma pack()
#endif /* __ACTBL2_H__ */
#endif /* __ACTBL2_H__ */

查看文件

@@ -27,7 +27,6 @@
#ifndef __ACTBL71_H__
#define __ACTBL71_H__
/* 0.71 FADT address_space data item bitmasks defines */
/* If the associated bit is zero then it is in memory space else in io space */
@@ -40,105 +39,96 @@
/* Only for clarity in declarations */
typedef u64 IO_ADDRESS;
typedef u64 IO_ADDRESS;
#pragma pack(1)
struct /* Root System Descriptor Pointer */
{
NATIVE_CHAR signature [8]; /* contains "RSD PTR " */
u8 checksum; /* to make sum of struct == 0 */
NATIVE_CHAR oem_id [6]; /* OEM identification */
u8 reserved; /* Must be 0 for 1.0, 2 for 2.0 */
u64 rsdt_physical_address; /* 64-bit physical address of RSDT */
struct { /* Root System Descriptor Pointer */
NATIVE_CHAR signature[8]; /* contains "RSD PTR " */
u8 checksum; /* to make sum of struct == 0 */
NATIVE_CHAR oem_id[6]; /* OEM identification */
u8 reserved; /* Must be 0 for 1.0, 2 for 2.0 */
u64 rsdt_physical_address; /* 64-bit physical address of RSDT */
};
/*****************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Root System Description Table */
/*****************************************/
struct
{
struct acpi_table_header header; /* Table header */
u32 reserved_pad; /* IA64 alignment, must be 0 */
u64 table_offset_entry [1]; /* Array of pointers to other */
/* tables' headers */
struct {
struct acpi_table_header header; /* Table header */
u32 reserved_pad; /* IA64 alignment, must be 0 */
u64 table_offset_entry[1]; /* Array of pointers to other */
/* tables' headers */
};
/*******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Firmware ACPI Control Structure */
/*******************************************/
struct
{
NATIVE_CHAR signature[4]; /* signature "FACS" */
u32 length; /* length of structure, in bytes */
u32 hardware_signature; /* hardware configuration signature */
u32 reserved4; /* must be 0 */
u64 firmware_waking_vector; /* ACPI OS waking vector */
u64 global_lock; /* Global Lock */
u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
u32 reserved1 : 31; /* must be 0 */
u8 reserved3 [28]; /* reserved - must be zero */
struct {
NATIVE_CHAR signature[4]; /* signature "FACS" */
u32 length; /* length of structure, in bytes */
u32 hardware_signature; /* hardware configuration signature */
u32 reserved4; /* must be 0 */
u64 firmware_waking_vector; /* ACPI OS waking vector */
u64 global_lock; /* Global Lock */
u32 S4bios_f:1; /* Indicates if S4BIOS support is present */
u32 reserved1:31; /* must be 0 */
u8 reserved3[28]; /* reserved - must be zero */
};
/******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Fixed ACPI Description Table */
/******************************************/
struct
{
struct acpi_table_header header; /* table header */
u32 reserved_pad; /* IA64 alignment, must be 0 */
u64 firmware_ctrl; /* 64-bit Physical address of FACS */
u64 dsdt; /* 64-bit Physical address of DSDT */
u8 model; /* System Interrupt Model */
u8 address_space; /* Address Space Bitmask */
u16 sci_int; /* System vector of SCI interrupt */
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 reserved2; /* reserved - must be zero */
u64 smi_cmd; /* Port address of SMI command port */
u64 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
u64 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
u64 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
u64 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
u64 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
u64 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
u64 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
u64 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 reserved3; /* reserved */
u16 plvl2_lat; /* worst case HW latency to enter/exit C2 state */
u16 plvl3_lat; /* worst case HW latency to enter/exit C3 state */
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 */
u8 reserved4; /* reserved */
u32 flush_cash : 1; /* PAL_FLUSH_CACHE is correctly supported */
u32 reserved5 : 1; /* reserved - must be zero */
u32 proc_c1 : 1; /* all processors support C1 state */
u32 plvl2_up : 1; /* C2 state works on MP system */
u32 pwr_button : 1; /* Power button is handled as a generic feature */
u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
u32 tmr_val_ext : 1; /* tmr_val is 32 bits */
u32 dock_cap : 1; /* Supports Docking */
u32 reserved6 : 22; /* reserved - must be zero */
struct {
struct acpi_table_header header; /* table header */
u32 reserved_pad; /* IA64 alignment, must be 0 */
u64 firmware_ctrl; /* 64-bit Physical address of FACS */
u64 dsdt; /* 64-bit Physical address of DSDT */
u8 model; /* System Interrupt Model */
u8 address_space; /* Address Space Bitmask */
u16 sci_int; /* System vector of SCI interrupt */
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 reserved2; /* reserved - must be zero */
u64 smi_cmd; /* Port address of SMI command port */
u64 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
u64 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
u64 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
u64 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
u64 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
u64 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
u64 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
u64 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 reserved3; /* reserved */
u16 plvl2_lat; /* worst case HW latency to enter/exit C2 state */
u16 plvl3_lat; /* worst case HW latency to enter/exit C3 state */
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 */
u8 reserved4; /* reserved */
u32 flush_cash:1; /* PAL_FLUSH_CACHE is correctly supported */
u32 reserved5:1; /* reserved - must be zero */
u32 proc_c1:1; /* all processors support C1 state */
u32 plvl2_up:1; /* C2 state works on MP system */
u32 pwr_button:1; /* Power button is handled as a generic feature */
u32 sleep_button:1; /* Sleep button is handled as a generic feature, or not present */
u32 fixed_rTC:1; /* RTC wakeup stat not in fixed register space */
u32 rtcs4:1; /* RTC wakeup stat not possible from S4 */
u32 tmr_val_ext:1; /* tmr_val is 32 bits */
u32 dock_cap:1; /* Supports Docking */
u32 reserved6:22; /* reserved - must be zero */
};
#pragma pack()
#endif /* __ACTBL71_H__ */
#endif /* __ACTBL71_H__ */

檔案差異因為檔案過大而無法顯示 載入差異

查看文件

@@ -44,20 +44,17 @@
#ifndef _ACUTILS_H
#define _ACUTILS_H
typedef
acpi_status (*acpi_pkg_callback) (
u8 object_type,
union acpi_operand_object *source_object,
union acpi_generic_state *state,
void *context);
acpi_status(*acpi_pkg_callback) (u8 object_type,
union acpi_operand_object * source_object,
union acpi_generic_state * state,
void *context);
struct acpi_pkg_info
{
u8 *free_space;
acpi_size length;
u32 object_space;
u32 num_packages;
struct acpi_pkg_info {
u8 *free_space;
acpi_size length;
u32 object_space;
u32 num_packages;
};
#define REF_INCREMENT (u16) 0
@@ -71,167 +68,89 @@ struct acpi_pkg_info
#define DB_DWORD_DISPLAY 4
#define DB_QWORD_DISPLAY 8
/*
* utglobal - Global data structures and procedures
*/
void
acpi_ut_init_globals (
void);
void acpi_ut_init_globals(void);
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
char *
acpi_ut_get_mutex_name (
u32 mutex_id);
char *acpi_ut_get_mutex_name(u32 mutex_id);
#endif
char *
acpi_ut_get_type_name (
acpi_object_type type);
char *acpi_ut_get_type_name(acpi_object_type type);
char *
acpi_ut_get_node_name (
void *object);
char *acpi_ut_get_node_name(void *object);
char *
acpi_ut_get_descriptor_name (
void *object);
char *acpi_ut_get_descriptor_name(void *object);
char *
acpi_ut_get_object_type_name (
union acpi_operand_object *obj_desc);
char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
char *
acpi_ut_get_region_name (
u8 space_id);
char *acpi_ut_get_region_name(u8 space_id);
char *
acpi_ut_get_event_name (
u32 event_id);
char *acpi_ut_get_event_name(u32 event_id);
char
acpi_ut_hex_to_ascii_char (
acpi_integer integer,
u32 position);
u8
acpi_ut_valid_object_type (
acpi_object_type type);
acpi_owner_id
acpi_ut_allocate_owner_id (
u32 id_type);
char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position);
u8 acpi_ut_valid_object_type(acpi_object_type type);
/*
* utinit - miscellaneous initialization and shutdown
*/
acpi_status
acpi_ut_hardware_initialize (
void);
acpi_status acpi_ut_hardware_initialize(void);
void
acpi_ut_subsystem_shutdown (
void);
acpi_status
acpi_ut_validate_fadt (
void);
void acpi_ut_subsystem_shutdown(void);
acpi_status acpi_ut_validate_fadt(void);
/*
* utclib - Local implementations of C library functions
*/
#ifndef ACPI_USE_SYSTEM_CLIBRARY
acpi_size
acpi_ut_strlen (
const char *string);
acpi_size acpi_ut_strlen(const char *string);
char *
acpi_ut_strcpy (
char *dst_string,
const char *src_string);
char *acpi_ut_strcpy(char *dst_string, const char *src_string);
char *
acpi_ut_strncpy (
char *dst_string,
const char *src_string,
acpi_size count);
char *acpi_ut_strncpy(char *dst_string,
const char *src_string, acpi_size count);
int
acpi_ut_memcmp (
const char *buffer1,
const char *buffer2,
acpi_size count);
int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count);
int
acpi_ut_strncmp (
const char *string1,
const char *string2,
acpi_size count);
int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count);
int
acpi_ut_strcmp (
const char *string1,
const char *string2);
int acpi_ut_strcmp(const char *string1, const char *string2);
char *
acpi_ut_strcat (
char *dst_string,
const char *src_string);
char *acpi_ut_strcat(char *dst_string, const char *src_string);
char *
acpi_ut_strncat (
char *dst_string,
const char *src_string,
acpi_size count);
char *acpi_ut_strncat(char *dst_string,
const char *src_string, acpi_size count);
u32
acpi_ut_strtoul (
const char *string,
char **terminator,
u32 base);
u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base);
char *
acpi_ut_strstr (
char *string1,
char *string2);
char *acpi_ut_strstr(char *string1, char *string2);
void *
acpi_ut_memcpy (
void *dest,
const void *src,
acpi_size count);
void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count);
void *
acpi_ut_memset (
void *dest,
acpi_native_uint value,
acpi_size count);
void *acpi_ut_memset(void *dest, acpi_native_uint value, acpi_size count);
int
acpi_ut_to_upper (
int c);
int acpi_ut_to_upper(int c);
int
acpi_ut_to_lower (
int c);
int acpi_ut_to_lower(int c);
extern const u8 _acpi_ctype[];
#define _ACPI_XA 0x00 /* extra alphabetic - not supported */
#define _ACPI_XS 0x40 /* extra space */
#define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
#define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
#define _ACPI_DI 0x04 /* '0'-'9' */
#define _ACPI_LO 0x02 /* 'a'-'z' */
#define _ACPI_PU 0x10 /* punctuation */
#define _ACPI_SP 0x08 /* space */
#define _ACPI_UP 0x01 /* 'A'-'Z' */
#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
#define _ACPI_XA 0x00 /* extra alphabetic - not supported */
#define _ACPI_XS 0x40 /* extra space */
#define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
#define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
#define _ACPI_DI 0x04 /* '0'-'9' */
#define _ACPI_LO 0x02 /* 'a'-'z' */
#define _ACPI_PU 0x10 /* punctuation */
#define _ACPI_SP 0x08 /* space */
#define _ACPI_UP 0x01 /* 'A'-'Z' */
#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
#define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
#define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
@@ -242,502 +161,323 @@ extern const u8 _acpi_ctype[];
#define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
#define ACPI_IS_ASCII(c) ((c) < 0x80)
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
/*
* utcopy - Object construction and conversion interfaces
*/
acpi_status
acpi_ut_build_simple_object(
union acpi_operand_object *obj,
union acpi_object *user_obj,
u8 *data_space,
u32 *buffer_space_used);
acpi_ut_build_simple_object(union acpi_operand_object *obj,
union acpi_object *user_obj,
u8 * data_space, u32 * buffer_space_used);
acpi_status
acpi_ut_build_package_object (
union acpi_operand_object *obj,
u8 *buffer,
u32 *space_used);
acpi_ut_build_package_object(union acpi_operand_object *obj,
u8 * buffer, u32 * space_used);
acpi_status
acpi_ut_copy_iobject_to_eobject (
union acpi_operand_object *obj,
struct acpi_buffer *ret_buffer);
acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *obj,
struct acpi_buffer *ret_buffer);
acpi_status
acpi_ut_copy_eobject_to_iobject (
union acpi_object *obj,
union acpi_operand_object **internal_obj);
acpi_ut_copy_eobject_to_iobject(union acpi_object *obj,
union acpi_operand_object **internal_obj);
acpi_status
acpi_ut_copy_isimple_to_isimple (
union acpi_operand_object *source_obj,
union acpi_operand_object *dest_obj);
acpi_ut_copy_isimple_to_isimple(union acpi_operand_object *source_obj,
union acpi_operand_object *dest_obj);
acpi_status
acpi_ut_copy_iobject_to_iobject (
union acpi_operand_object *source_desc,
union acpi_operand_object **dest_desc,
struct acpi_walk_state *walk_state);
acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc,
union acpi_operand_object **dest_desc,
struct acpi_walk_state *walk_state);
/*
* utcreate - Object creation
*/
acpi_status
acpi_ut_update_object_reference (
union acpi_operand_object *object,
u16 action);
acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action);
/*
* utdebug - Debug interfaces
*/
void
acpi_ut_init_stack_ptr_trace (
void);
void acpi_ut_init_stack_ptr_trace(void);
void acpi_ut_track_stack_ptr(void);
void
acpi_ut_track_stack_ptr (
void);
acpi_ut_trace(u32 line_number,
const char *function_name, char *module_name, u32 component_id);
void
acpi_ut_trace (
u32 line_number,
struct acpi_debug_print_info *dbg_info);
acpi_ut_trace_ptr(u32 line_number,
const char *function_name,
char *module_name, u32 component_id, void *pointer);
void
acpi_ut_trace_ptr (
u32 line_number,
struct acpi_debug_print_info *dbg_info,
void *pointer);
acpi_ut_trace_u32(u32 line_number,
const char *function_name,
char *module_name, u32 component_id, u32 integer);
void
acpi_ut_trace_u32 (
u32 line_number,
struct acpi_debug_print_info *dbg_info,
u32 integer);
acpi_ut_trace_str(u32 line_number,
const char *function_name,
char *module_name, u32 component_id, char *string);
void
acpi_ut_trace_str (
u32 line_number,
struct acpi_debug_print_info *dbg_info,
char *string);
acpi_ut_exit(u32 line_number,
const char *function_name, char *module_name, u32 component_id);
void
acpi_ut_exit (
u32 line_number,
struct acpi_debug_print_info *dbg_info);
acpi_ut_status_exit(u32 line_number,
const char *function_name,
char *module_name, u32 component_id, acpi_status status);
void
acpi_ut_status_exit (
u32 line_number,
struct acpi_debug_print_info *dbg_info,
acpi_status status);
acpi_ut_value_exit(u32 line_number,
const char *function_name,
char *module_name, u32 component_id, acpi_integer value);
void
acpi_ut_value_exit (
u32 line_number,
struct acpi_debug_print_info *dbg_info,
acpi_integer value);
acpi_ut_ptr_exit(u32 line_number,
const char *function_name,
char *module_name, u32 component_id, u8 * ptr);
void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id);
void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id);
void
acpi_ut_ptr_exit (
u32 line_number,
struct acpi_debug_print_info *dbg_info,
u8 *ptr);
acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id);
void
acpi_ut_report_info (
char *module_name,
u32 line_number,
u32 component_id);
void
acpi_ut_report_error (
char *module_name,
u32 line_number,
u32 component_id);
void
acpi_ut_report_warning (
char *module_name,
u32 line_number,
u32 component_id);
void
acpi_ut_dump_buffer (
u8 *buffer,
u32 count,
u32 display,
u32 component_id);
void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print (
u32 requested_debug_level,
u32 line_number,
struct acpi_debug_print_info *dbg_info,
char *format,
...) ACPI_PRINTF_LIKE_FUNC;
acpi_ut_debug_print(u32 requested_debug_level,
u32 line_number,
const char *function_name,
char *module_name,
u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC;
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print_raw (
u32 requested_debug_level,
u32 line_number,
struct acpi_debug_print_info *dbg_info,
char *format,
...) ACPI_PRINTF_LIKE_FUNC;
acpi_ut_debug_print_raw(u32 requested_debug_level,
u32 line_number,
const char *function_name,
char *module_name,
u32 component_id,
char *format, ...) ACPI_PRINTF_LIKE_FUNC;
/*
* utdelete - Object deletion and reference counts
*/
void
acpi_ut_add_reference (
union acpi_operand_object *object);
void acpi_ut_add_reference(union acpi_operand_object *object);
void
acpi_ut_remove_reference (
union acpi_operand_object *object);
void acpi_ut_remove_reference(union acpi_operand_object *object);
void
acpi_ut_delete_internal_package_object (
union acpi_operand_object *object);
void acpi_ut_delete_internal_package_object(union acpi_operand_object *object);
void
acpi_ut_delete_internal_simple_object (
union acpi_operand_object *object);
void
acpi_ut_delete_internal_object_list (
union acpi_operand_object **obj_list);
void acpi_ut_delete_internal_simple_object(union acpi_operand_object *object);
void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list);
/*
* uteval - object evaluation
*/
acpi_status
acpi_ut_osi_implementation (
struct acpi_walk_state *walk_state);
acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state);
acpi_status
acpi_ut_evaluate_object (
struct acpi_namespace_node *prefix_node,
char *path,
u32 expected_return_btypes,
union acpi_operand_object **return_desc);
acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
char *path,
u32 expected_return_btypes,
union acpi_operand_object **return_desc);
acpi_status
acpi_ut_evaluate_numeric_object (
char *object_name,
struct acpi_namespace_node *device_node,
acpi_integer *address);
acpi_ut_evaluate_numeric_object(char *object_name,
struct acpi_namespace_node *device_node,
acpi_integer * address);
acpi_status
acpi_ut_execute_HID (
struct acpi_namespace_node *device_node,
struct acpi_device_id *hid);
acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
struct acpi_device_id *hid);
acpi_status
acpi_ut_execute_CID (
struct acpi_namespace_node *device_node,
struct acpi_compatible_id_list **return_cid_list);
acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
struct acpi_compatible_id_list **return_cid_list);
acpi_status
acpi_ut_execute_STA (
struct acpi_namespace_node *device_node,
u32 *status_flags);
acpi_ut_execute_STA(struct acpi_namespace_node *device_node,
u32 * status_flags);
acpi_status
acpi_ut_execute_UID (
struct acpi_namespace_node *device_node,
struct acpi_device_id *uid);
acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
struct acpi_device_id *uid);
acpi_status
acpi_ut_execute_sxds (
struct acpi_namespace_node *device_node,
u8 *highest);
acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest);
/*
* utobject - internal object create/delete/cache routines
*/
union acpi_operand_object *
acpi_ut_create_internal_object_dbg (
char *module_name,
u32 line_number,
u32 component_id,
acpi_object_type type);
union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name,
u32 line_number,
u32 component_id,
acpi_object_type
type);
void *
acpi_ut_allocate_object_desc_dbg (
char *module_name,
u32 line_number,
u32 component_id);
void *acpi_ut_allocate_object_desc_dbg(char *module_name,
u32 line_number, u32 component_id);
#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_THIS_MODULE,__LINE__,_COMPONENT)
#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t)
#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_acpi_module_name,__LINE__,_COMPONENT)
void
acpi_ut_delete_object_desc (
union acpi_operand_object *object);
void acpi_ut_delete_object_desc(union acpi_operand_object *object);
u8
acpi_ut_valid_internal_object (
void *object);
u8 acpi_ut_valid_internal_object(void *object);
union acpi_operand_object *
acpi_ut_create_buffer_object (
acpi_size buffer_size);
union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);
union acpi_operand_object *
acpi_ut_create_string_object (
acpi_size string_size);
union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size);
acpi_status
acpi_ut_get_object_size(
union acpi_operand_object *obj,
acpi_size *obj_length);
acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size * obj_length);
/*
* utstate - Generic state creation/cache routines
*/
void
acpi_ut_push_generic_state (
union acpi_generic_state **list_head,
union acpi_generic_state *state);
acpi_ut_push_generic_state(union acpi_generic_state **list_head,
union acpi_generic_state *state);
union acpi_generic_state *
acpi_ut_pop_generic_state (
union acpi_generic_state **list_head);
union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state
**list_head);
union acpi_generic_state *acpi_ut_create_generic_state(void);
union acpi_generic_state *
acpi_ut_create_generic_state (
void);
struct acpi_thread_state *acpi_ut_create_thread_state(void);
struct acpi_thread_state *
acpi_ut_create_thread_state (
void);
union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object
*object, u16 action);
union acpi_generic_state *
acpi_ut_create_update_state (
union acpi_operand_object *object,
u16 action);
union acpi_generic_state *
acpi_ut_create_pkg_state (
void *internal_object,
void *external_object,
u16 index);
union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object,
void *external_object,
u16 index);
acpi_status
acpi_ut_create_update_state_and_push (
union acpi_operand_object *object,
u16 action,
union acpi_generic_state **state_list);
acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
u16 action,
union acpi_generic_state **state_list);
#ifdef ACPI_FUTURE_USAGE
acpi_status
acpi_ut_create_pkg_state_and_push (
void *internal_object,
void *external_object,
u16 index,
union acpi_generic_state **state_list);
#endif /* ACPI_FUTURE_USAGE */
acpi_ut_create_pkg_state_and_push(void *internal_object,
void *external_object,
u16 index,
union acpi_generic_state **state_list);
#endif /* ACPI_FUTURE_USAGE */
union acpi_generic_state *
acpi_ut_create_control_state (
void);
void
acpi_ut_delete_generic_state (
union acpi_generic_state *state);
#ifdef ACPI_ENABLE_OBJECT_CACHE
void
acpi_ut_delete_generic_state_cache (
void);
void
acpi_ut_delete_object_cache (
void);
#endif
union acpi_generic_state *acpi_ut_create_control_state(void);
void acpi_ut_delete_generic_state(union acpi_generic_state *state);
/*
* utmath
*/
acpi_status
acpi_ut_divide (
acpi_integer in_dividend,
acpi_integer in_divisor,
acpi_integer *out_quotient,
acpi_integer *out_remainder);
acpi_ut_divide(acpi_integer in_dividend,
acpi_integer in_divisor,
acpi_integer * out_quotient, acpi_integer * out_remainder);
acpi_status
acpi_ut_short_divide (
acpi_integer in_dividend,
u32 divisor,
acpi_integer *out_quotient,
u32 *out_remainder);
acpi_ut_short_divide(acpi_integer in_dividend,
u32 divisor,
acpi_integer * out_quotient, u32 * out_remainder);
/*
* utmisc
*/
acpi_status
acpi_ut_walk_package_tree (
union acpi_operand_object *source_object,
void *target_object,
acpi_pkg_callback walk_callback,
void *context);
acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id);
char *
acpi_ut_strupr (
char *src_string);
void
acpi_ut_print_string (
char *string,
u8 max_length);
u8
acpi_ut_valid_acpi_name (
u32 name);
u8
acpi_ut_valid_acpi_character (
char character);
void acpi_ut_release_owner_id(acpi_owner_id * owner_id);
acpi_status
acpi_ut_strtoul64 (
char *string,
u32 base,
acpi_integer *ret_integer);
acpi_ut_walk_package_tree(union acpi_operand_object *source_object,
void *target_object,
acpi_pkg_callback walk_callback, void *context);
void acpi_ut_strupr(char *src_string);
void acpi_ut_print_string(char *string, u8 max_length);
u8 acpi_ut_valid_acpi_name(u32 name);
u8 acpi_ut_valid_acpi_character(char character);
acpi_status
acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);
/* Values for Base above (16=Hex, 10=Decimal) */
#define ACPI_ANY_BASE 0
acpi_status
acpi_ut_mutex_initialize (
void);
u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc);
void
acpi_ut_mutex_terminate (
void);
u8 acpi_ut_generate_checksum(u8 * buffer, u32 length);
acpi_status
acpi_ut_acquire_mutex (
acpi_mutex_handle mutex_id);
u32 acpi_ut_dword_byte_swap(u32 value);
acpi_status
acpi_ut_release_mutex (
acpi_mutex_handle mutex_id);
u8 *
acpi_ut_get_resource_end_tag (
union acpi_operand_object *obj_desc);
u8
acpi_ut_generate_checksum (
u8 *buffer,
u32 length);
u32
acpi_ut_dword_byte_swap (
u32 value);
void
acpi_ut_set_integer_width (
u8 revision);
void acpi_ut_set_integer_width(u8 revision);
#ifdef ACPI_DEBUG_OUTPUT
void
acpi_ut_display_init_pathname (
u8 type,
struct acpi_namespace_node *obj_handle,
char *path);
acpi_ut_display_init_pathname(u8 type,
struct acpi_namespace_node *obj_handle,
char *path);
#endif
/*
* utmutex - mutex support
*/
acpi_status acpi_ut_mutex_initialize(void);
void acpi_ut_mutex_terminate(void);
acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id);
acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id);
/*
* utalloc - memory allocation and object caching
*/
void *
acpi_ut_acquire_from_cache (
u32 list_id);
acpi_status acpi_ut_create_caches(void);
void
acpi_ut_release_to_cache (
u32 list_id,
void *object);
acpi_status acpi_ut_delete_caches(void);
#ifdef ACPI_ENABLE_OBJECT_CACHE
void
acpi_ut_delete_generic_cache (
u32 list_id);
#endif
acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer);
acpi_status
acpi_ut_validate_buffer (
struct acpi_buffer *buffer);
acpi_ut_initialize_buffer(struct acpi_buffer *buffer,
acpi_size required_length);
acpi_status
acpi_ut_initialize_buffer (
struct acpi_buffer *buffer,
acpi_size required_length);
void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line);
void *
acpi_ut_allocate (
acpi_size size,
u32 component,
char *module,
u32 line);
void *
acpi_ut_callocate (
acpi_size size,
u32 component,
char *module,
u32 line);
void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line);
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
void *
acpi_ut_allocate_and_track (
acpi_size size,
u32 component,
char *module,
u32 line);
void *acpi_ut_allocate_and_track(acpi_size size,
u32 component, char *module, u32 line);
void *
acpi_ut_callocate_and_track (
acpi_size size,
u32 component,
char *module,
u32 line);
void *acpi_ut_callocate_and_track(acpi_size size,
u32 component, char *module, u32 line);
void
acpi_ut_free_and_track (
void *address,
u32 component,
char *module,
u32 line);
acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line);
#ifdef ACPI_FUTURE_USAGE
void
acpi_ut_dump_allocation_info (
void);
#endif /* ACPI_FUTURE_USAGE */
void acpi_ut_dump_allocation_info(void);
#endif /* ACPI_FUTURE_USAGE */
void
acpi_ut_dump_allocations (
u32 component,
char *module);
void acpi_ut_dump_allocations(u32 component, char *module);
#endif
#endif /* _ACUTILS_H */
#endif /* _ACUTILS_H */

查看文件

@@ -59,17 +59,17 @@
#define AML_WORD_OP (u16) 0x0b
#define AML_DWORD_OP (u16) 0x0c
#define AML_STRING_OP (u16) 0x0d
#define AML_QWORD_OP (u16) 0x0e /* ACPI 2.0 */
#define AML_QWORD_OP (u16) 0x0e /* ACPI 2.0 */
#define AML_SCOPE_OP (u16) 0x10
#define AML_BUFFER_OP (u16) 0x11
#define AML_PACKAGE_OP (u16) 0x12
#define AML_VAR_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */
#define AML_VAR_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */
#define AML_METHOD_OP (u16) 0x14
#define AML_DUAL_NAME_PREFIX (u16) 0x2e
#define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f
#define AML_NAME_CHAR_SUBSEQ (u16) 0x30
#define AML_NAME_CHAR_FIRST (u16) 0x41
#define AML_OP_PREFIX (u16) 0x5b
#define AML_EXTENDED_OP_PREFIX (u16) 0x5b
#define AML_ROOT_PREFIX (u16) 0x5c
#define AML_PARENT_PREFIX (u16) 0x5e
#define AML_LOCAL_OP (u16) 0x60
@@ -109,8 +109,8 @@
#define AML_FIND_SET_LEFT_BIT_OP (u16) 0x81
#define AML_FIND_SET_RIGHT_BIT_OP (u16) 0x82
#define AML_DEREF_OF_OP (u16) 0x83
#define AML_CONCAT_RES_OP (u16) 0x84 /* ACPI 2.0 */
#define AML_MOD_OP (u16) 0x85 /* ACPI 2.0 */
#define AML_CONCAT_RES_OP (u16) 0x84 /* ACPI 2.0 */
#define AML_MOD_OP (u16) 0x85 /* ACPI 2.0 */
#define AML_NOTIFY_OP (u16) 0x86
#define AML_SIZE_OF_OP (u16) 0x87
#define AML_INDEX_OP (u16) 0x88
@@ -120,21 +120,21 @@
#define AML_CREATE_BYTE_FIELD_OP (u16) 0x8c
#define AML_CREATE_BIT_FIELD_OP (u16) 0x8d
#define AML_TYPE_OP (u16) 0x8e
#define AML_CREATE_QWORD_FIELD_OP (u16) 0x8f /* ACPI 2.0 */
#define AML_CREATE_QWORD_FIELD_OP (u16) 0x8f /* ACPI 2.0 */
#define AML_LAND_OP (u16) 0x90
#define AML_LOR_OP (u16) 0x91
#define AML_LNOT_OP (u16) 0x92
#define AML_LEQUAL_OP (u16) 0x93
#define AML_LGREATER_OP (u16) 0x94
#define AML_LLESS_OP (u16) 0x95
#define AML_TO_BUFFER_OP (u16) 0x96 /* ACPI 2.0 */
#define AML_TO_DECSTRING_OP (u16) 0x97 /* ACPI 2.0 */
#define AML_TO_HEXSTRING_OP (u16) 0x98 /* ACPI 2.0 */
#define AML_TO_INTEGER_OP (u16) 0x99 /* ACPI 2.0 */
#define AML_TO_STRING_OP (u16) 0x9c /* ACPI 2.0 */
#define AML_COPY_OP (u16) 0x9d /* ACPI 2.0 */
#define AML_MID_OP (u16) 0x9e /* ACPI 2.0 */
#define AML_CONTINUE_OP (u16) 0x9f /* ACPI 2.0 */
#define AML_TO_BUFFER_OP (u16) 0x96 /* ACPI 2.0 */
#define AML_TO_DECSTRING_OP (u16) 0x97 /* ACPI 2.0 */
#define AML_TO_HEXSTRING_OP (u16) 0x98 /* ACPI 2.0 */
#define AML_TO_INTEGER_OP (u16) 0x99 /* ACPI 2.0 */
#define AML_TO_STRING_OP (u16) 0x9c /* ACPI 2.0 */
#define AML_COPY_OP (u16) 0x9d /* ACPI 2.0 */
#define AML_MID_OP (u16) 0x9e /* ACPI 2.0 */
#define AML_CONTINUE_OP (u16) 0x9f /* ACPI 2.0 */
#define AML_IF_OP (u16) 0xa0
#define AML_ELSE_OP (u16) 0xa1
#define AML_WHILE_OP (u16) 0xa2
@@ -146,7 +146,7 @@
/* prefixed opcodes */
#define AML_EXTOP (u16) 0x005b /* prefix for 2-byte opcodes */
#define AML_EXTENDED_OPCODE (u16) 0x5b00 /* prefix for 2-byte opcodes */
#define AML_MUTEX_OP (u16) 0x5b01
#define AML_EVENT_OP (u16) 0x5b02
@@ -154,7 +154,7 @@
#define AML_SHIFT_LEFT_BIT_OP (u16) 0x5b11
#define AML_COND_REF_OF_OP (u16) 0x5b12
#define AML_CREATE_FIELD_OP (u16) 0x5b13
#define AML_LOAD_TABLE_OP (u16) 0x5b1f /* ACPI 2.0 */
#define AML_LOAD_TABLE_OP (u16) 0x5b1f /* ACPI 2.0 */
#define AML_LOAD_OP (u16) 0x5b20
#define AML_STALL_OP (u16) 0x5b21
#define AML_SLEEP_OP (u16) 0x5b22
@@ -169,7 +169,7 @@
#define AML_REVISION_OP (u16) 0x5b30
#define AML_DEBUG_OP (u16) 0x5b31
#define AML_FATAL_OP (u16) 0x5b32
#define AML_TIMER_OP (u16) 0x5b33 /* ACPI 3.0 */
#define AML_TIMER_OP (u16) 0x5b33 /* ACPI 3.0 */
#define AML_REGION_OP (u16) 0x5b80
#define AML_FIELD_OP (u16) 0x5b81
#define AML_DEVICE_OP (u16) 0x5b82
@@ -178,8 +178,7 @@
#define AML_THERMAL_ZONE_OP (u16) 0x5b85
#define AML_INDEX_FIELD_OP (u16) 0x5b86
#define AML_BANK_FIELD_OP (u16) 0x5b87
#define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */
#define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */
/* Bogus opcodes (they are actually two separate opcodes) */
@@ -187,7 +186,6 @@
#define AML_LLESSEQUAL_OP (u16) 0x9294
#define AML_LNOTEQUAL_OP (u16) 0x9293
/*
* Internal opcodes
* Use only "Unknown" AML opcodes, don't attempt to use
@@ -203,7 +201,6 @@
#define AML_INT_RETURN_VALUE_OP (u16) 0x0036
#define AML_INT_EVAL_SUBTREE_OP (u16) 0x0037
#define ARG_NONE 0x0
/*
@@ -245,7 +242,7 @@
/* Single, simple types */
#define ARGI_ANYTYPE 0x01 /* Don't care */
#define ARGI_ANYTYPE 0x01 /* Don't care */
#define ARGI_PACKAGE 0x02
#define ARGI_EVENT 0x03
#define ARGI_MUTEX 0x04
@@ -256,8 +253,8 @@
#define ARGI_INTEGER 0x06
#define ARGI_STRING 0x07
#define ARGI_BUFFER 0x08
#define ARGI_BUFFER_OR_STRING 0x09 /* Used by MID op only */
#define ARGI_COMPUTEDATA 0x0A /* Buffer, String, or Integer */
#define ARGI_BUFFER_OR_STRING 0x09 /* Used by MID op only */
#define ARGI_COMPUTEDATA 0x0A /* Buffer, String, or Integer */
/* Reference objects */
@@ -265,30 +262,28 @@
#define ARGI_OBJECT_REF 0x0C
#define ARGI_DEVICE_REF 0x0D
#define ARGI_REFERENCE 0x0E
#define ARGI_TARGETREF 0x0F /* Target, subject to implicit conversion */
#define ARGI_FIXED_TARGET 0x10 /* Target, no implicit conversion */
#define ARGI_SIMPLE_TARGET 0x11 /* Name, Local, Arg -- no implicit conversion */
#define ARGI_TARGETREF 0x0F /* Target, subject to implicit conversion */
#define ARGI_FIXED_TARGET 0x10 /* Target, no implicit conversion */
#define ARGI_SIMPLE_TARGET 0x11 /* Name, Local, Arg -- no implicit conversion */
/* Multiple/complex types */
#define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by size_of operator*/
#define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */
#define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */
#define ARGI_REGION_OR_FIELD 0x15 /* Used by LOAD op only */
#define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by size_of operator */
#define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */
#define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */
#define ARGI_REGION_OR_FIELD 0x15 /* Used by LOAD op only */
#define ARGI_DATAREFOBJ 0x16
/* Note: types above can expand to 0x1F maximum */
#define ARGI_INVALID_OPCODE 0xFFFFFFFF
/*
* hash offsets
*/
#define AML_EXTOP_HASH_OFFSET 22
#define AML_LNOT_HASH_OFFSET 19
/*
* opcode groups and types
*/
@@ -296,7 +291,6 @@
#define OPGRP_FIELD 0x02
#define OPGRP_BYTELIST 0x04
/*
* Opcode information
*/
@@ -322,31 +316,30 @@
/* Convenient flag groupings */
#define AML_FLAGS_EXEC_0A_0T_1R AML_HAS_RETVAL
#define AML_FLAGS_EXEC_1A_0T_0R AML_HAS_ARGS /* Monadic1 */
#define AML_FLAGS_EXEC_1A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL /* Monadic2 */
#define AML_FLAGS_EXEC_1A_0T_0R AML_HAS_ARGS /* Monadic1 */
#define AML_FLAGS_EXEC_1A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL /* Monadic2 */
#define AML_FLAGS_EXEC_1A_1T_0R AML_HAS_ARGS | AML_HAS_TARGET
#define AML_FLAGS_EXEC_1A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* monadic2_r */
#define AML_FLAGS_EXEC_2A_0T_0R AML_HAS_ARGS /* Dyadic1 */
#define AML_FLAGS_EXEC_2A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL /* Dyadic2 */
#define AML_FLAGS_EXEC_2A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* dyadic2_r */
#define AML_FLAGS_EXEC_1A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* monadic2_r */
#define AML_FLAGS_EXEC_2A_0T_0R AML_HAS_ARGS /* Dyadic1 */
#define AML_FLAGS_EXEC_2A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL /* Dyadic2 */
#define AML_FLAGS_EXEC_2A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL /* dyadic2_r */
#define AML_FLAGS_EXEC_2A_2T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL
#define AML_FLAGS_EXEC_3A_0T_0R AML_HAS_ARGS
#define AML_FLAGS_EXEC_3A_1T_1R AML_HAS_ARGS | AML_HAS_TARGET | AML_HAS_RETVAL
#define AML_FLAGS_EXEC_6A_0T_1R AML_HAS_ARGS | AML_HAS_RETVAL
/*
* The opcode Type is used in a dispatch table, do not change
* without updating the table.
*/
#define AML_TYPE_EXEC_0A_0T_1R 0x00
#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */
#define AML_TYPE_EXEC_1A_0T_1R 0x02 /* Monadic2 */
#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */
#define AML_TYPE_EXEC_1A_0T_1R 0x02 /* Monadic2 */
#define AML_TYPE_EXEC_1A_1T_0R 0x03
#define AML_TYPE_EXEC_1A_1T_1R 0x04 /* monadic2_r */
#define AML_TYPE_EXEC_2A_0T_0R 0x05 /* Dyadic1 */
#define AML_TYPE_EXEC_2A_0T_1R 0x06 /* Dyadic2 */
#define AML_TYPE_EXEC_2A_1T_1R 0x07 /* dyadic2_r */
#define AML_TYPE_EXEC_1A_1T_1R 0x04 /* monadic2_r */
#define AML_TYPE_EXEC_2A_0T_0R 0x05 /* Dyadic1 */
#define AML_TYPE_EXEC_2A_0T_1R 0x06 /* Dyadic2 */
#define AML_TYPE_EXEC_2A_1T_1R 0x07 /* dyadic2_r */
#define AML_TYPE_EXEC_2A_2T_1R 0x08
#define AML_TYPE_EXEC_3A_0T_0R 0x09
#define AML_TYPE_EXEC_3A_1T_1R 0x0A
@@ -399,40 +392,33 @@
#define AML_CLASS_METHOD_CALL 0x09
#define AML_CLASS_UNKNOWN 0x0A
/* Predefined Operation Region space_iDs */
typedef enum
{
REGION_MEMORY = 0,
typedef enum {
REGION_MEMORY = 0,
REGION_IO,
REGION_PCI_CONFIG,
REGION_EC,
REGION_SMBUS,
REGION_CMOS,
REGION_PCI_BAR,
REGION_DATA_TABLE, /* Internal use only */
REGION_FIXED_HW = 0x7F
REGION_DATA_TABLE, /* Internal use only */
REGION_FIXED_HW = 0x7F
} AML_REGION_TYPES;
/* Comparison operation codes for match_op operator */
typedef enum
{
MATCH_MTR = 0,
MATCH_MEQ = 1,
MATCH_MLE = 2,
MATCH_MLT = 3,
MATCH_MGE = 4,
MATCH_MGT = 5
typedef enum {
MATCH_MTR = 0,
MATCH_MEQ = 1,
MATCH_MLE = 2,
MATCH_MLT = 3,
MATCH_MGE = 4,
MATCH_MGT = 5
} AML_MATCH_OPERATOR;
#define MAX_MATCH_OPERATOR 5
/*
* field_flags
*
@@ -450,60 +436,47 @@ typedef enum
#define AML_FIELD_LOCK_RULE_MASK 0x10
#define AML_FIELD_UPDATE_RULE_MASK 0x60
/* 1) Field Access Types */
typedef enum
{
AML_FIELD_ACCESS_ANY = 0x00,
AML_FIELD_ACCESS_BYTE = 0x01,
AML_FIELD_ACCESS_WORD = 0x02,
AML_FIELD_ACCESS_DWORD = 0x03,
AML_FIELD_ACCESS_QWORD = 0x04, /* ACPI 2.0 */
AML_FIELD_ACCESS_BUFFER = 0x05 /* ACPI 2.0 */
typedef enum {
AML_FIELD_ACCESS_ANY = 0x00,
AML_FIELD_ACCESS_BYTE = 0x01,
AML_FIELD_ACCESS_WORD = 0x02,
AML_FIELD_ACCESS_DWORD = 0x03,
AML_FIELD_ACCESS_QWORD = 0x04, /* ACPI 2.0 */
AML_FIELD_ACCESS_BUFFER = 0x05 /* ACPI 2.0 */
} AML_ACCESS_TYPE;
/* 2) Field Lock Rules */
typedef enum
{
AML_FIELD_LOCK_NEVER = 0x00,
AML_FIELD_LOCK_ALWAYS = 0x10
typedef enum {
AML_FIELD_LOCK_NEVER = 0x00,
AML_FIELD_LOCK_ALWAYS = 0x10
} AML_LOCK_RULE;
/* 3) Field Update Rules */
typedef enum
{
AML_FIELD_UPDATE_PRESERVE = 0x00,
AML_FIELD_UPDATE_WRITE_AS_ONES = 0x20,
typedef enum {
AML_FIELD_UPDATE_PRESERVE = 0x00,
AML_FIELD_UPDATE_WRITE_AS_ONES = 0x20,
AML_FIELD_UPDATE_WRITE_AS_ZEROS = 0x40
} AML_UPDATE_RULE;
/*
* Field Access Attributes.
* This byte is extracted from the AML via the
* access_as keyword
*/
typedef enum
{
AML_FIELD_ATTRIB_SMB_QUICK = 0x02,
AML_FIELD_ATTRIB_SMB_SEND_RCV = 0x04,
AML_FIELD_ATTRIB_SMB_BYTE = 0x06,
AML_FIELD_ATTRIB_SMB_WORD = 0x08,
AML_FIELD_ATTRIB_SMB_BLOCK = 0x0A,
AML_FIELD_ATTRIB_SMB_WORD_CALL = 0x0C,
typedef enum {
AML_FIELD_ATTRIB_SMB_QUICK = 0x02,
AML_FIELD_ATTRIB_SMB_SEND_RCV = 0x04,
AML_FIELD_ATTRIB_SMB_BYTE = 0x06,
AML_FIELD_ATTRIB_SMB_WORD = 0x08,
AML_FIELD_ATTRIB_SMB_BLOCK = 0x0A,
AML_FIELD_ATTRIB_SMB_WORD_CALL = 0x0C,
AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D
} AML_ACCESS_ATTRIBUTE;
/* Bit fields in method_flags byte */
#define AML_METHOD_ARG_COUNT 0x07
@@ -516,5 +489,4 @@ typedef enum
#define AML_METHOD_RESERVED1 0x02
#define AML_METHOD_RESERVED2 0x04
#endif /* __AMLCODE_H__ */
#endif /* __AMLCODE_H__ */

查看文件

@@ -42,29 +42,27 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __AMLRESRC_H
#define __AMLRESRC_H
#define ASL_RESNAME_ADDRESS "_ADR"
#define ASL_RESNAME_ALIGNMENT "_ALN"
#define ASL_RESNAME_ADDRESSSPACE "_ASI"
#define ASL_RESNAME_ACCESSSIZE "_ASZ"
#define ASL_RESNAME_TYPESPECIFICATTRIBUTES "_ATT"
#define ASL_RESNAME_BASEADDRESS "_BAS"
#define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */
#define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */
#define ASL_RESNAME_DECODE "_DEC"
#define ASL_RESNAME_DMA "_DMA"
#define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */
#define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */
#define ASL_RESNAME_GRANULARITY "_GRA"
#define ASL_RESNAME_INTERRUPT "_INT"
#define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */
#define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */
#define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */
#define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */
#define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */
#define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */
#define ASL_RESNAME_LENGTH "_LEN"
#define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
#define ASL_RESNAME_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
#define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
#define ASL_RESNAME_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
#define ASL_RESNAME_MAXADDR "_MAX"
#define ASL_RESNAME_MINADDR "_MIN"
#define ASL_RESNAME_MAXTYPE "_MAF"
@@ -72,12 +70,11 @@
#define ASL_RESNAME_REGISTERBITOFFSET "_RBO"
#define ASL_RESNAME_REGISTERBITWIDTH "_RBW"
#define ASL_RESNAME_RANGETYPE "_RNG"
#define ASL_RESNAME_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */
#define ASL_RESNAME_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */
#define ASL_RESNAME_TRANSLATION "_TRA"
#define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */
#define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */
#define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */
#define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */
#define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */
#define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */
/* Default sizes for "small" resource descriptors */
@@ -89,15 +86,12 @@
#define ASL_RDESC_FIXED_IO_SIZE 0x03
#define ASL_RDESC_END_TAG_SIZE 0x01
struct asl_resource_node
{
u32 buffer_length;
void *buffer;
struct asl_resource_node *next;
struct asl_resource_node {
u32 buffer_length;
void *buffer;
struct asl_resource_node *next;
};
/*
* Resource descriptors defined in the ACPI specification.
*
@@ -106,214 +100,175 @@ struct asl_resource_node
*/
#pragma pack(1)
struct asl_irq_format_desc
{
u8 descriptor_type;
u16 irq_mask;
u8 flags;
struct asl_irq_format_desc {
u8 descriptor_type;
u16 irq_mask;
u8 flags;
};
struct asl_irq_noflags_desc
{
u8 descriptor_type;
u16 irq_mask;
struct asl_irq_noflags_desc {
u8 descriptor_type;
u16 irq_mask;
};
struct asl_dma_format_desc
{
u8 descriptor_type;
u8 dma_channel_mask;
u8 flags;
struct asl_dma_format_desc {
u8 descriptor_type;
u8 dma_channel_mask;
u8 flags;
};
struct asl_start_dependent_desc
{
u8 descriptor_type;
u8 flags;
struct asl_start_dependent_desc {
u8 descriptor_type;
u8 flags;
};
struct asl_start_dependent_noprio_desc
{
u8 descriptor_type;
struct asl_start_dependent_noprio_desc {
u8 descriptor_type;
};
struct asl_end_dependent_desc
{
u8 descriptor_type;
struct asl_end_dependent_desc {
u8 descriptor_type;
};
struct asl_io_port_desc
{
u8 descriptor_type;
u8 information;
u16 address_min;
u16 address_max;
u8 alignment;
u8 length;
struct asl_io_port_desc {
u8 descriptor_type;
u8 information;
u16 address_min;
u16 address_max;
u8 alignment;
u8 length;
};
struct asl_fixed_io_port_desc
{
u8 descriptor_type;
u16 base_address;
u8 length;
struct asl_fixed_io_port_desc {
u8 descriptor_type;
u16 base_address;
u8 length;
};
struct asl_small_vendor_desc
{
u8 descriptor_type;
u8 vendor_defined[7];
struct asl_small_vendor_desc {
u8 descriptor_type;
u8 vendor_defined[7];
};
struct asl_end_tag_desc
{
u8 descriptor_type;
u8 checksum;
struct asl_end_tag_desc {
u8 descriptor_type;
u8 checksum;
};
/* LARGE descriptors */
struct asl_memory_24_desc
{
u8 descriptor_type;
u16 length;
u8 information;
u16 address_min;
u16 address_max;
u16 alignment;
u16 range_length;
struct asl_memory_24_desc {
u8 descriptor_type;
u16 length;
u8 information;
u16 address_min;
u16 address_max;
u16 alignment;
u16 range_length;
};
struct asl_large_vendor_desc
{
u8 descriptor_type;
u16 length;
u8 vendor_defined[1];
struct asl_large_vendor_desc {
u8 descriptor_type;
u16 length;
u8 vendor_defined[1];
};
struct asl_memory_32_desc
{
u8 descriptor_type;
u16 length;
u8 information;
u32 address_min;
u32 address_max;
u32 alignment;
u32 range_length;
struct asl_memory_32_desc {
u8 descriptor_type;
u16 length;
u8 information;
u32 address_min;
u32 address_max;
u32 alignment;
u32 range_length;
};
struct asl_fixed_memory_32_desc
{
u8 descriptor_type;
u16 length;
u8 information;
u32 base_address;
u32 range_length;
struct asl_fixed_memory_32_desc {
u8 descriptor_type;
u16 length;
u8 information;
u32 base_address;
u32 range_length;
};
struct asl_extended_address_desc
{
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u8 revision_iD;
u8 reserved;
u64 granularity;
u64 address_min;
u64 address_max;
u64 translation_offset;
u64 address_length;
u64 type_specific_attributes;
u8 optional_fields[2]; /* Used for length calculation only */
struct asl_extended_address_desc {
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u8 revision_iD;
u8 reserved;
u64 granularity;
u64 address_min;
u64 address_max;
u64 translation_offset;
u64 address_length;
u64 type_specific_attributes;
u8 optional_fields[2]; /* Used for length calculation only */
};
#define ASL_EXTENDED_ADDRESS_DESC_REVISION 1 /* ACPI 3.0 */
#define ASL_EXTENDED_ADDRESS_DESC_REVISION 1 /* ACPI 3.0 */
struct asl_qword_address_desc
{
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u64 granularity;
u64 address_min;
u64 address_max;
u64 translation_offset;
u64 address_length;
u8 optional_fields[2];
struct asl_qword_address_desc {
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u64 granularity;
u64 address_min;
u64 address_max;
u64 translation_offset;
u64 address_length;
u8 optional_fields[2];
};
struct asl_dword_address_desc
{
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u32 granularity;
u32 address_min;
u32 address_max;
u32 translation_offset;
u32 address_length;
u8 optional_fields[2];
struct asl_dword_address_desc {
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u32 granularity;
u32 address_min;
u32 address_max;
u32 translation_offset;
u32 address_length;
u8 optional_fields[2];
};
struct asl_word_address_desc
{
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u16 granularity;
u16 address_min;
u16 address_max;
u16 translation_offset;
u16 address_length;
u8 optional_fields[2];
struct asl_word_address_desc {
u8 descriptor_type;
u16 length;
u8 resource_type;
u8 flags;
u8 specific_flags;
u16 granularity;
u16 address_min;
u16 address_max;
u16 translation_offset;
u16 address_length;
u8 optional_fields[2];
};
struct asl_extended_xrupt_desc
{
u8 descriptor_type;
u16 length;
u8 flags;
u8 table_length;
u32 interrupt_number[1];
struct asl_extended_xrupt_desc {
u8 descriptor_type;
u16 length;
u8 flags;
u8 table_length;
u32 interrupt_number[1];
/* res_source_index, res_source optional fields follow */
};
struct asl_general_register_desc
{
u8 descriptor_type;
u16 length;
u8 address_space_id;
u8 bit_width;
u8 bit_offset;
u8 access_size; /* ACPI 3.0, was Reserved */
u64 address;
struct asl_general_register_desc {
u8 descriptor_type;
u16 length;
u8 address_space_id;
u8 bit_width;
u8 bit_offset;
u8 access_size; /* ACPI 3.0, was Reserved */
u64 address;
};
/* restore default alignment */
@@ -322,32 +277,29 @@ struct asl_general_register_desc
/* Union of all resource descriptors, so we can allocate the worst case */
union asl_resource_desc
{
struct asl_irq_format_desc irq;
struct asl_dma_format_desc dma;
struct asl_start_dependent_desc std;
struct asl_end_dependent_desc end;
struct asl_io_port_desc iop;
struct asl_fixed_io_port_desc fio;
struct asl_small_vendor_desc smv;
struct asl_end_tag_desc et;
union asl_resource_desc {
struct asl_irq_format_desc irq;
struct asl_dma_format_desc dma;
struct asl_start_dependent_desc std;
struct asl_end_dependent_desc end;
struct asl_io_port_desc iop;
struct asl_fixed_io_port_desc fio;
struct asl_small_vendor_desc smv;
struct asl_end_tag_desc et;
struct asl_memory_24_desc M24;
struct asl_large_vendor_desc lgv;
struct asl_memory_32_desc M32;
struct asl_fixed_memory_32_desc F32;
struct asl_qword_address_desc qas;
struct asl_dword_address_desc das;
struct asl_word_address_desc was;
struct asl_extended_address_desc eas;
struct asl_extended_xrupt_desc exx;
struct asl_general_register_desc grg;
u32 u32_item;
u16 u16_item;
u8 U8item;
struct asl_memory_24_desc M24;
struct asl_large_vendor_desc lgv;
struct asl_memory_32_desc M32;
struct asl_fixed_memory_32_desc F32;
struct asl_qword_address_desc qas;
struct asl_dword_address_desc das;
struct asl_word_address_desc was;
struct asl_extended_address_desc eas;
struct asl_extended_xrupt_desc exx;
struct asl_general_register_desc grg;
u32 u32_item;
u16 u16_item;
u8 U8item;
};
#endif

查看文件

@@ -9,5 +9,4 @@ struct acpi_container {
int state;
};
#endif /* __ACPI_CONTAINER_H */
#endif /* __ACPI_CONTAINER_H */

查看文件

@@ -14,7 +14,6 @@
#define ACPI_PDC_SMP_T_SWCOORD (0x0080)
#define ACPI_PDC_C_C1_FFH (0x0100)
#define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \
ACPI_PDC_C_C1_HALT)
@@ -25,5 +24,4 @@
ACPI_PDC_SMP_C1PT | \
ACPI_PDC_C_C1_HALT)
#endif /* __PDC_INTEL_H__ */
#endif /* __PDC_INTEL_H__ */

查看文件

@@ -44,40 +44,42 @@
#ifndef __ACENV_H__
#define __ACENV_H__
/*
* Configuration for ACPI tools and utilities
*/
#ifdef _ACPI_DUMP_APP
#ifdef ACPI_LIBRARY
#define ACPI_USE_LOCAL_CACHE
#endif
#ifdef ACPI_DUMP_APP
#ifndef MSDOS
#define ACPI_DEBUG_OUTPUT
#endif
#define ACPI_APPLICATION
#define ACPI_DISASSEMBLER
#define ACPI_NO_METHOD_EXECUTION
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_ENABLE_OBJECT_CACHE
#endif
#ifdef _ACPI_EXEC_APP
#ifdef ACPI_EXEC_APP
#undef DEBUGGER_THREADING
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#define ACPI_DEBUG_OUTPUT
#define ACPI_APPLICATION
#define ACPI_DEBUGGER
#define ACPI_DISASSEMBLER
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_ENABLE_OBJECT_CACHE
#endif
#ifdef _ACPI_ASL_COMPILER
#ifdef ACPI_ASL_COMPILER
#define ACPI_DEBUG_OUTPUT
#define ACPI_APPLICATION
#define ACPI_DISASSEMBLER
#define ACPI_CONSTANT_EVAL_ONLY
#endif
#ifdef ACPI_APPLICATION
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_ENABLE_OBJECT_CACHE
#define ACPI_USE_LOCAL_CACHE
#endif
/*
@@ -131,7 +133,7 @@
#elif defined(WIN64)
#include "acwin64.h"
#elif defined(MSDOS) /* Must appear after WIN32 and WIN64 check */
#elif defined(MSDOS) /* Must appear after WIN32 and WIN64 check */
#include "acdos16.h"
#elif defined(__FreeBSD__)
@@ -177,7 +179,6 @@
/*! [End] no source code translation !*/
/*
* Debugger threading model
* Use single threaded if the entire subsystem is contained in an application
@@ -196,8 +197,7 @@
#else
#define DEBUGGER_THREADING DEBUGGER_MULTI_THREADED
#endif
#endif /* !DEBUGGER_THREADING */
#endif /* !DEBUGGER_THREADING */
/******************************************************************************
*
@@ -219,7 +219,7 @@
#include <string.h>
#include <ctype.h>
#endif /* ACPI_USE_STANDARD_HEADERS */
#endif /* ACPI_USE_STANDARD_HEADERS */
/*
* We will be linking to the standard Clib functions
@@ -238,15 +238,15 @@
#define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n))
#define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n))
#define ACPI_TOUPPER toupper
#define ACPI_TOLOWER tolower
#define ACPI_IS_XDIGIT isxdigit
#define ACPI_IS_DIGIT isdigit
#define ACPI_IS_SPACE isspace
#define ACPI_IS_UPPER isupper
#define ACPI_IS_PRINT isprint
#define ACPI_IS_ALPHA isalpha
#define ACPI_IS_ASCII isascii
#define ACPI_TOUPPER(i) toupper((int) (i))
#define ACPI_TOLOWER(i) tolower((int) (i))
#define ACPI_IS_XDIGIT(i) isxdigit((int) (i))
#define ACPI_IS_DIGIT(i) isdigit((int) (i))
#define ACPI_IS_SPACE(i) isspace((int) (i))
#define ACPI_IS_UPPER(i) isupper((int) (i))
#define ACPI_IS_PRINT(i) isprint((int) (i))
#define ACPI_IS_ALPHA(i) isalpha((int) (i))
#define ACPI_IS_ASCII(i) isascii((int) (i))
#else
@@ -257,18 +257,18 @@
*****************************************************************************/
/*
* Use local definitions of C library macros and functions
* NOTE: The function implementations may not be as efficient
* as an inline or assembly code implementation provided by a
* native C library.
*/
* Use local definitions of C library macros and functions
* NOTE: The function implementations may not be as efficient
* as an inline or assembly code implementation provided by a
* native C library.
*/
#ifndef va_arg
#ifndef _VALIST
#define _VALIST
typedef char *va_list;
#endif /* _VALIST */
#endif /* _VALIST */
/*
* Storage alignment properties
@@ -284,8 +284,7 @@ typedef char *va_list;
#define va_end(ap) (void) 0
#define va_start(ap, A) (void) ((ap) = (((char *) &(A)) + (_bnd (A,_AUPBND))))
#endif /* va_arg */
#endif /* va_arg */
#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2))
#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c))
@@ -303,8 +302,7 @@ typedef char *va_list;
#define ACPI_TOUPPER acpi_ut_to_upper
#define ACPI_TOLOWER acpi_ut_to_lower
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
/******************************************************************************
*
@@ -345,8 +343,7 @@ typedef char *va_list;
#define ACPI_ACQUIRE_GLOBAL_LOCK(Glptr, acq)
#define ACPI_RELEASE_GLOBAL_LOCK(Glptr, acq)
#endif /* ACPI_ASM_MACROS */
#endif /* ACPI_ASM_MACROS */
#ifdef ACPI_APPLICATION
@@ -356,11 +353,10 @@ typedef char *va_list;
#define BREAKPOINT3
#endif
/******************************************************************************
*
* Compiler-specific information is contained in the compiler-specific
* headers.
*
*****************************************************************************/
#endif /* __ACENV_H__ */
#endif /* __ACENV_H__ */

查看文件

@@ -44,16 +44,20 @@
#ifndef __ACGCC_H__
#define __ACGCC_H__
/* Function name is used for debug output. Non-ANSI, compiler-dependent */
#define ACPI_GET_FUNCTION_NAME __FUNCTION__
/* This macro is used to tag functions as "printf-like" because
* some compilers (like GCC) can catch printf format string problems.
*/
#define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 4, 5)))
#define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 6, 7)))
/* Some compilers complain about unused variables. Sometimes we don't want to
* use all the variables (most specifically for _THIS_MODULE). This allow us
* use all the variables (for example, _acpi_module_name). This allows us
* to to tell the compiler warning in a per-variable manner that a variable
* is unused.
*/
#define ACPI_UNUSED_VAR __attribute__ ((unused))
#endif /* __ACGCC_H__ */
#endif /* __ACGCC_H__ */

查看文件

@@ -62,7 +62,16 @@
#define ACPI_MACHINE_WIDTH BITS_PER_LONG
#else /* !__KERNEL__ */
/* Type(s) for the OSL */
#ifdef ACPI_USE_LOCAL_CACHE
#define acpi_cache_t struct acpi_memory_list
#else
#include <linux/slab.h>
#define acpi_cache_t kmem_cache_t
#endif
#else /* !__KERNEL__ */
#include <stdarg.h>
#include <string.h>
@@ -83,10 +92,10 @@
#define __cdecl
#define ACPI_FLUSH_CPU_CACHE()
#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
/* Linux uses GCC */
#include "acgcc.h"
#endif /* __ACLINUX_H__ */
#endif /* __ACLINUX_H__ */

查看文件

@@ -23,45 +23,44 @@
struct acpi_processor_cx;
struct acpi_power_register {
u8 descriptor;
u16 length;
u8 space_id;
u8 bit_width;
u8 bit_offset;
u8 reserved;
u64 address;
u8 descriptor;
u16 length;
u8 space_id;
u8 bit_width;
u8 bit_offset;
u8 reserved;
u64 address;
} __attribute__ ((packed));
struct acpi_processor_cx_policy {
u32 count;
u32 count;
struct acpi_processor_cx *state;
struct {
u32 time;
u32 ticks;
u32 count;
u32 bm;
} threshold;
u32 time;
u32 ticks;
u32 count;
u32 bm;
} threshold;
};
struct acpi_processor_cx {
u8 valid;
u8 type;
u32 address;
u32 latency;
u32 latency_ticks;
u32 power;
u32 usage;
u8 valid;
u8 type;
u32 address;
u32 latency;
u32 latency_ticks;
u32 power;
u32 usage;
struct acpi_processor_cx_policy promotion;
struct acpi_processor_cx_policy demotion;
};
struct acpi_processor_power {
struct acpi_processor_cx *state;
unsigned long bm_check_timestamp;
u32 default_state;
u32 bm_activity;
int count;
unsigned long bm_check_timestamp;
u32 default_state;
u32 bm_activity;
int count;
struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
/* the _PDC objects passed by the driver, if any */
@@ -71,85 +70,82 @@ struct acpi_processor_power {
/* Performance Management */
struct acpi_pct_register {
u8 descriptor;
u16 length;
u8 space_id;
u8 bit_width;
u8 bit_offset;
u8 reserved;
u64 address;
u8 descriptor;
u16 length;
u8 space_id;
u8 bit_width;
u8 bit_offset;
u8 reserved;
u64 address;
} __attribute__ ((packed));
struct acpi_processor_px {
acpi_integer core_frequency; /* megahertz */
acpi_integer power; /* milliWatts */
acpi_integer transition_latency; /* microseconds */
acpi_integer bus_master_latency; /* microseconds */
acpi_integer control; /* control value */
acpi_integer status; /* success indicator */
acpi_integer core_frequency; /* megahertz */
acpi_integer power; /* milliWatts */
acpi_integer transition_latency; /* microseconds */
acpi_integer bus_master_latency; /* microseconds */
acpi_integer control; /* control value */
acpi_integer status; /* success indicator */
};
struct acpi_processor_performance {
unsigned int state;
unsigned int platform_limit;
unsigned int state;
unsigned int platform_limit;
struct acpi_pct_register control_register;
struct acpi_pct_register status_register;
unsigned int state_count;
unsigned int state_count;
struct acpi_processor_px *states;
/* the _PDC objects passed by the driver, if any */
struct acpi_object_list *pdc;
};
/* Throttling Control */
struct acpi_processor_tx {
u16 power;
u16 performance;
u16 power;
u16 performance;
};
struct acpi_processor_throttling {
int state;
u32 address;
u8 duty_offset;
u8 duty_width;
int state_count;
int state;
u32 address;
u8 duty_offset;
u8 duty_width;
int state_count;
struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING];
};
/* Limit Interface */
struct acpi_processor_lx {
int px; /* performace state */
int tx; /* throttle level */
int px; /* performace state */
int tx; /* throttle level */
};
struct acpi_processor_limit {
struct acpi_processor_lx state; /* current limit */
struct acpi_processor_lx state; /* current limit */
struct acpi_processor_lx thermal; /* thermal limit */
struct acpi_processor_lx user; /* user limit */
struct acpi_processor_lx user; /* user limit */
};
struct acpi_processor_flags {
u8 power:1;
u8 performance:1;
u8 throttling:1;
u8 limit:1;
u8 bm_control:1;
u8 bm_check:1;
u8 has_cst:1;
u8 power_setup_done:1;
u8 power:1;
u8 performance:1;
u8 throttling:1;
u8 limit:1;
u8 bm_control:1;
u8 bm_check:1;
u8 has_cst:1;
u8 power_setup_done:1;
};
struct acpi_processor {
acpi_handle handle;
u32 acpi_id;
u32 id;
u32 pblk;
int performance_platform_limit;
acpi_handle handle;
u32 acpi_id;
u32 id;
u32 pblk;
int performance_platform_limit;
struct acpi_processor_flags flags;
struct acpi_processor_power power;
struct acpi_processor_performance *performance;
@@ -158,50 +154,49 @@ struct acpi_processor {
};
struct acpi_processor_errata {
u8 smp;
u8 smp;
struct {
u8 throttle:1;
u8 fdma:1;
u8 reserved:6;
u32 bmisx;
} piix4;
u8 throttle:1;
u8 fdma:1;
u8 reserved:6;
u32 bmisx;
} piix4;
};
extern int acpi_processor_register_performance (
struct acpi_processor_performance * performance,
unsigned int cpu);
extern void acpi_processor_unregister_performance (
struct acpi_processor_performance * performance,
unsigned int cpu);
extern int acpi_processor_register_performance(struct acpi_processor_performance
*performance, unsigned int cpu);
extern void acpi_processor_unregister_performance(struct
acpi_processor_performance
*performance,
unsigned int cpu);
/* note: this locks both the calling module and the processor module
if a _PPC object exists, rmmod is disallowed then */
int acpi_processor_notify_smm(struct module *calling_module);
/* for communication between multiple parts of the processor kernel module */
extern struct acpi_processor *processors[NR_CPUS];
extern struct acpi_processor *processors[NR_CPUS];
extern struct acpi_processor_errata errata;
int acpi_processor_set_pdc(struct acpi_processor *pr,
struct acpi_object_list *pdc_in);
struct acpi_object_list *pdc_in);
#ifdef ARCH_HAS_POWER_PDC_INIT
void acpi_processor_power_init_pdc(struct acpi_processor_power *pow,
unsigned int cpu);
unsigned int cpu);
void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
unsigned int cpu);
unsigned int cpu);
#else
static inline void acpi_processor_power_init_pdc(
struct acpi_processor_power *pow, unsigned int cpu)
static inline void acpi_processor_power_init_pdc(struct acpi_processor_power
*pow, unsigned int cpu)
{
pow->pdc = NULL;
return;
}
static inline void acpi_processor_power_init_bm_check(
struct acpi_processor_flags *flags, unsigned int cpu)
static inline void acpi_processor_power_init_bm_check(struct
acpi_processor_flags
*flags, unsigned int cpu)
{
flags->bm_check = 1;
return;
@@ -215,51 +210,62 @@ void acpi_processor_ppc_init(void);
void acpi_processor_ppc_exit(void);
int acpi_processor_ppc_has_changed(struct acpi_processor *pr);
#else
static inline void acpi_processor_ppc_init(void) { return; }
static inline void acpi_processor_ppc_exit(void) { return; }
static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) {
static inline void acpi_processor_ppc_init(void)
{
return;
}
static inline void acpi_processor_ppc_exit(void)
{
return;
}
static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
{
static unsigned int printout = 1;
if (printout) {
printk(KERN_WARNING "Warning: Processor Platform Limit event detected, but not handled.\n");
printk(KERN_WARNING "Consider compiling CPUfreq support into your kernel.\n");
printk(KERN_WARNING
"Warning: Processor Platform Limit event detected, but not handled.\n");
printk(KERN_WARNING
"Consider compiling CPUfreq support into your kernel.\n");
printout = 0;
}
return 0;
}
#endif /* CONFIG_CPU_FREQ */
#endif /* CONFIG_CPU_FREQ */
/* in processor_throttling.c */
int acpi_processor_get_throttling_info (struct acpi_processor *pr);
int acpi_processor_set_throttling (struct acpi_processor *pr, int state);
ssize_t acpi_processor_write_throttling (
struct file *file,
const char __user *buffer,
size_t count,
loff_t *data);
int acpi_processor_get_throttling_info(struct acpi_processor *pr);
int acpi_processor_set_throttling(struct acpi_processor *pr, int state);
ssize_t acpi_processor_write_throttling(struct file *file,
const char __user * buffer,
size_t count, loff_t * data);
extern struct file_operations acpi_processor_throttling_fops;
/* in processor_idle.c */
int acpi_processor_power_init(struct acpi_processor *pr, struct acpi_device *device);
int acpi_processor_cst_has_changed (struct acpi_processor *pr);
int acpi_processor_power_exit(struct acpi_processor *pr, struct acpi_device *device);
int acpi_processor_power_init(struct acpi_processor *pr,
struct acpi_device *device);
int acpi_processor_cst_has_changed(struct acpi_processor *pr);
int acpi_processor_power_exit(struct acpi_processor *pr,
struct acpi_device *device);
/* in processor_thermal.c */
int acpi_processor_get_limit_info (struct acpi_processor *pr);
ssize_t acpi_processor_write_limit (
struct file *file,
const char __user *buffer,
size_t count,
loff_t *data);
int acpi_processor_get_limit_info(struct acpi_processor *pr);
ssize_t acpi_processor_write_limit(struct file *file,
const char __user * buffer,
size_t count, loff_t * data);
extern struct file_operations acpi_processor_limit_fops;
#ifdef CONFIG_CPU_FREQ
void acpi_thermal_cpufreq_init(void);
void acpi_thermal_cpufreq_exit(void);
#else
static inline void acpi_thermal_cpufreq_init(void) { return; }
static inline void acpi_thermal_cpufreq_exit(void) { return; }
static inline void acpi_thermal_cpufreq_init(void)
{
return;
}
static inline void acpi_thermal_cpufreq_exit(void)
{
return;
}
#endif
#endif

24
include/asm-alpha/auxvec.h 一般檔案
查看文件

@@ -0,0 +1,24 @@
#ifndef __ASM_ALPHA_AUXVEC_H
#define __ASM_ALPHA_AUXVEC_H
/* Reserve these numbers for any future use of a VDSO. */
#if 0
#define AT_SYSINFO 32
#define AT_SYSINFO_EHDR 33
#endif
/* More complete cache descriptions than AT_[DIU]CACHEBSIZE. If the
value is -1, then the cache doesn't exist. Otherwise:
bit 0-3: Cache set-associativity; 0 means fully associative.
bit 4-7: Log2 of cacheline size.
bit 8-31: Size of the entire cache >> 8.
bit 32-63: Reserved.
*/
#define AT_L1I_CACHESHAPE 34
#define AT_L1D_CACHESHAPE 35
#define AT_L2_CACHESHAPE 36
#define AT_L3_CACHESHAPE 37
#endif /* __ASM_ALPHA_AUXVEC_H */

查看文件

@@ -1,6 +1,8 @@
#ifndef __ASM_ALPHA_ELF_H
#define __ASM_ALPHA_ELF_H
#include <asm/auxvec.h>
/* Special values for the st_other field in the symbol table. */
#define STO_ALPHA_NOPV 0x80
@@ -142,26 +144,6 @@ extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task);
: amask (AMASK_CIX) ? "ev6" : "ev67"); \
})
/* Reserve these numbers for any future use of a VDSO. */
#if 0
#define AT_SYSINFO 32
#define AT_SYSINFO_EHDR 33
#endif
/* More complete cache descriptions than AT_[DIU]CACHEBSIZE. If the
value is -1, then the cache doesn't exist. Otherwise:
bit 0-3: Cache set-associativity; 0 means fully associative.
bit 4-7: Log2 of cacheline size.
bit 8-31: Size of the entire cache >> 8.
bit 32-63: Reserved.
*/
#define AT_L1I_CACHESHAPE 34
#define AT_L1D_CACHESHAPE 35
#define AT_L2_CACHESHAPE 36
#define AT_L3_CACHESHAPE 37
#ifdef __KERNEL__
#define SET_PERSONALITY(EX, IBCS2) \

查看文件

@@ -3,10 +3,6 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 01000 /* not fcntl */
#define O_TRUNC 02000 /* not fcntl */
#define O_EXCL 04000 /* not fcntl */
@@ -14,20 +10,13 @@
#define O_NONBLOCK 00004
#define O_APPEND 00010
#define O_NDELAY O_NONBLOCK
#define O_SYNC 040000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define O_DIRECTORY 0100000 /* must be a directory */
#define O_NOFOLLOW 0200000 /* don't follow links */
#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */
#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */
#define O_NOATIME 04000000
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
#define F_SETFD 2 /* set/clear close_on_exec */
#define F_GETFL 3 /* get file->f_flags */
#define F_SETFL 4 /* set file->f_flags */
#define F_GETLK 7
#define F_SETLK 8
#define F_SETLKW 9
@@ -37,9 +26,6 @@
#define F_SETSIG 10 /* for sockets. */
#define F_GETSIG 11 /* for sockets. */
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#define F_RDLCK 1
#define F_WRLCK 2
@@ -51,25 +37,6 @@
#define F_INPROGRESS 64
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
#define LOCK_MAND 32 /* This is a mandatory flock */
#define LOCK_READ 64 /* ... Which allows concurrent read operations */
#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */
#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */
struct flock {
short l_type;
short l_whence;
__kernel_off_t l_start;
__kernel_off_t l_len;
__kernel_pid_t l_pid;
};
#define F_LINUX_SPECIFIC_BASE 1024
#include <asm-generic/fcntl.h>
#endif

53
include/asm-alpha/futex.h 一般檔案
查看文件

@@ -0,0 +1,53 @@
#ifndef _ASM_FUTEX_H
#define _ASM_FUTEX_H
#ifdef __KERNEL__
#include <linux/futex.h>
#include <asm/errno.h>
#include <asm/uaccess.h>
static inline int
futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
{
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
int oparg = (encoded_op << 8) >> 20;
int cmparg = (encoded_op << 20) >> 20;
int oldval = 0, ret, tem;
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
inc_preempt_count();
switch (op) {
case FUTEX_OP_SET:
case FUTEX_OP_ADD:
case FUTEX_OP_OR:
case FUTEX_OP_ANDN:
case FUTEX_OP_XOR:
default:
ret = -ENOSYS;
}
dec_preempt_count();
if (!ret) {
switch (cmp) {
case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
default: ret = -ENOSYS;
}
}
return ret;
}
#endif
#endif

查看文件

@@ -1 +0,0 @@
#include <asm-generic/hdreg.h>

查看文件

@@ -48,12 +48,6 @@
__access_ok(((unsigned long)(addr)),(size),get_fs()); \
})
/* this function will go away soon - use access_ok() instead */
extern inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size)
{
return access_ok(type,addr,size) ? 0 : -EFAULT;
}
/*
* These are the main single-value transfer routines. They automatically
* use the right size if we just have the right pointer type.

查看文件

@@ -30,6 +30,9 @@
#define __ASM_ARCH_OMAP_H4_H
/* Placeholder for H4 specific defines */
/* GPMC CS1 */
#define OMAP24XX_ETHR_START 0x08000300
#define OMAP24XX_ETHR_GPIO_IRQ 92
#endif /* __ASM_ARCH_OMAP_H4_H */

查看文件

@@ -36,31 +36,6 @@
#define OMAP1510P1_EMIFS_PRI_VALUE 0x00
#define OMAP1510P1_EMIFF_PRI_VALUE 0x00
/*
* These definitions define an area of FLASH set aside
* for the use of MTD/JFFS2. This is the area of flash
* that a JFFS2 filesystem will reside which is mounted
* at boot with the "root=/dev/mtdblock/0 rw"
* command line option. The flash address used here must
* fall within the legal range defined by rrload for storing
* the filesystem component. This address will be sufficiently
* deep into the overall flash range to avoid the other
* components also stored in flash such as the bootloader,
* the bootloader params, and the kernel.
* The SW2 settings for the map below are:
* 1 off, 2 off, 3 on, 4 off.
*/
/* Intel flash_0, partitioned as expected by rrload */
#define OMAP_FLASH_0_BASE 0xD8000000
#define OMAP_FLASH_0_START 0x00000000
#define OMAP_FLASH_0_SIZE SZ_16M
/* Intel flash_1, used for cramfs or other flash file systems */
#define OMAP_FLASH_1_BASE 0xD9000000
#define OMAP_FLASH_1_START 0x01000000
#define OMAP_FLASH_1_SIZE SZ_16M
#define NR_FPGA_IRQS 24
#define NR_IRQS IH_BOARD_BASE + NR_FPGA_IRQS

查看文件

@@ -36,23 +36,14 @@
#define OMAP_SDRAM_DEVICE D256M_1X16_4B
#endif
/*
* These definitions define an area of FLASH set aside
* for the use of MTD/JFFS2. This is the area of flash
* that a JFFS2 filesystem will reside which is mounted
* at boot with the "root=/dev/mtdblock/0 rw"
* command line option.
*/
/* Intel flash_0, partitioned as expected by rrload */
#define OMAP_FLASH_0_BASE 0xD8000000 /* VA */
#define OMAP_FLASH_0_START 0x00000000 /* PA */
#define OMAP_FLASH_0_SIZE SZ_32M
#define MAXIRQNUM IH_BOARD_BASE
#define MAXFIQNUM MAXIRQNUM
#define MAXSWINUM MAXIRQNUM
#define NR_IRQS (MAXIRQNUM + 1)
/* Samsung NAND flash at CS2B or CS3(NAND Boot) */
#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */
#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */
#endif

查看文件

@@ -11,11 +11,6 @@
#ifndef __ASM_ARCH_VOICEBLUE_H
#define __ASM_ARCH_VOICEBLUE_H
#if (EXTERNAL_MAX_NR_PORTS < 4)
#undef EXTERNAL_MAX_NR_PORTS
#define EXTERNAL_MAX_NR_PORTS 4
#endif
extern void voiceblue_wdt_enable(void);
extern void voiceblue_wdt_disable(void);
extern void voiceblue_wdt_ping(void);

查看文件

@@ -30,10 +30,23 @@ struct omap_clock_config {
u8 system_clock_type;
};
struct omap_mmc_conf {
unsigned enabled:1;
/* nomux means "standard" muxing is wrong on this board, and that
* board-specific code handled it before common init logic.
*/
unsigned nomux:1;
/* switch pin can be for card detect (default) or card cover */
unsigned cover:1;
/* 4 wire signaling is optional, and is only used for SD/SDIO */
unsigned wire4:1;
s16 power_pin;
s16 switch_pin;
s16 wp_pin;
};
struct omap_mmc_config {
u8 mmc_blocks;
s16 mmc1_power_pin, mmc2_power_pin;
s16 mmc1_switch_pin, mmc2_switch_pin;
struct omap_mmc_conf mmc[2];
};
struct omap_serial_console_config {

查看文件

@@ -38,146 +38,179 @@ extern unsigned int system_rev;
/*
* Test if multicore OMAP support is needed
*/
#undef MULTI_OMAP
#undef MULTI_OMAP1
#undef MULTI_OMAP2
#undef OMAP_NAME
#ifdef CONFIG_ARCH_OMAP730
# ifdef OMAP_NAME
# undef MULTI_OMAP
# define MULTI_OMAP
# undef MULTI_OMAP1
# define MULTI_OMAP1
# else
# define OMAP_NAME omap730
# endif
#endif
#ifdef CONFIG_ARCH_OMAP1510
# ifdef OMAP_NAME
# undef MULTI_OMAP
# define MULTI_OMAP
# undef MULTI_OMAP1
# define MULTI_OMAP1
# else
# define OMAP_NAME omap1510
# endif
#endif
#ifdef CONFIG_ARCH_OMAP16XX
# ifdef OMAP_NAME
# undef MULTI_OMAP
# define MULTI_OMAP
# undef MULTI_OMAP1
# define MULTI_OMAP1
# else
# define OMAP_NAME omap1610
# define OMAP_NAME omap16xx
# endif
#endif
#ifdef CONFIG_ARCH_OMAP16XX
# ifdef OMAP_NAME
# undef MULTI_OMAP
# define MULTI_OMAP
#ifdef CONFIG_ARCH_OMAP24XX
# if (defined(OMAP_NAME) || defined(MULTI_OMAP1))
# error "OMAP1 and OMAP2 can't be selected at the same time"
# else
# define OMAP_NAME omap1710
# undef MULTI_OMAP2
# define OMAP_NAME omap24xx
# endif
#endif
/*
* Generate various OMAP cpu specific macros, and cpu class
* specific macros
* Macros to group OMAP into cpu classes.
* These can be used in most places.
* cpu_is_omap7xx(): True for OMAP730
* cpu_is_omap15xx(): True for OMAP1510 and OMAP5910
* cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710
* cpu_is_omap24xx(): True for OMAP2420
*/
#define GET_OMAP_TYPE ((system_rev >> 24) & 0xff)
#define GET_OMAP_CLASS (system_rev & 0xff)
#define IS_OMAP_TYPE(type, id) \
static inline int is_omap ##type (void) \
{ \
return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
}
#define IS_OMAP_CLASS(class, id) \
static inline int is_omap ##class (void) \
{ \
return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
}
IS_OMAP_TYPE(730, 0x07)
IS_OMAP_TYPE(1510, 0x15)
IS_OMAP_TYPE(1610, 0x16)
IS_OMAP_TYPE(5912, 0x16)
IS_OMAP_TYPE(1710, 0x17)
IS_OMAP_TYPE(2420, 0x24)
IS_OMAP_CLASS(7xx, 0x07)
IS_OMAP_CLASS(15xx, 0x15)
IS_OMAP_CLASS(16xx, 0x16)
IS_OMAP_CLASS(24xx, 0x24)
/*
* Macros to group OMAP types into cpu classes.
* These can be used in most places.
* cpu_is_omap15xx(): True for 1510 and 5910
* cpu_is_omap16xx(): True for 1610, 5912 and 1710
*/
#if defined(MULTI_OMAP)
# define cpu_is_omap7xx() is_omap7xx()
# define cpu_is_omap15xx() is_omap15xx()
# if !(defined(CONFIG_ARCH_OMAP1510) || defined(CONFIG_ARCH_OMAP730))
# define cpu_is_omap16xx() 1
# else
#define cpu_is_omap7xx() 0
#define cpu_is_omap15xx() 0
#define cpu_is_omap16xx() 0
#define cpu_is_omap24xx() 0
#if defined(MULTI_OMAP1)
# if defined(CONFIG_ARCH_OMAP730)
# undef cpu_is_omap7xx
# define cpu_is_omap7xx() is_omap7xx()
# endif
# if defined(CONFIG_ARCH_OMAP1510)
# undef cpu_is_omap15xx
# define cpu_is_omap15xx() is_omap15xx()
# endif
# if defined(CONFIG_ARCH_OMAP16XX)
# undef cpu_is_omap16xx
# define cpu_is_omap16xx() is_omap16xx()
# endif
#else
# if defined(CONFIG_ARCH_OMAP730)
# undef cpu_is_omap7xx
# define cpu_is_omap7xx() 1
# else
# define cpu_is_omap7xx() 0
# endif
# if defined(CONFIG_ARCH_OMAP1510)
# undef cpu_is_omap15xx
# define cpu_is_omap15xx() 1
# else
# define cpu_is_omap15xx() 0
# endif
# if defined(CONFIG_ARCH_OMAP16XX)
# undef cpu_is_omap16xx
# define cpu_is_omap16xx() 1
# else
# define cpu_is_omap16xx() 0
# endif
# if defined(CONFIG_ARCH_OMAP24XX)
# undef cpu_is_omap24xx
# define cpu_is_omap24xx() 1
# endif
#endif
#if defined(MULTI_OMAP)
# define cpu_is_omap730() is_omap730()
# define cpu_is_omap1510() is_omap1510()
# define cpu_is_omap1610() is_omap1610()
# define cpu_is_omap5912() is_omap5912()
# define cpu_is_omap1710() is_omap1710()
/*
* Macros to detect individual cpu types.
* These are only rarely needed.
* cpu_is_omap730(): True for OMAP730
* cpu_is_omap1510(): True for OMAP1510
* cpu_is_omap1610(): True for OMAP1610
* cpu_is_omap1611(): True for OMAP1611
* cpu_is_omap5912(): True for OMAP5912
* cpu_is_omap1621(): True for OMAP1621
* cpu_is_omap1710(): True for OMAP1710
* cpu_is_omap2420(): True for OMAP2420
*/
#define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff)
#define IS_OMAP_TYPE(type, id) \
static inline int is_omap ##type (void) \
{ \
return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
}
IS_OMAP_TYPE(730, 0x0730)
IS_OMAP_TYPE(1510, 0x1510)
IS_OMAP_TYPE(1610, 0x1610)
IS_OMAP_TYPE(1611, 0x1611)
IS_OMAP_TYPE(5912, 0x1611)
IS_OMAP_TYPE(1621, 0x1621)
IS_OMAP_TYPE(1710, 0x1710)
IS_OMAP_TYPE(2420, 0x2420)
#define cpu_is_omap730() 0
#define cpu_is_omap1510() 0
#define cpu_is_omap1610() 0
#define cpu_is_omap5912() 0
#define cpu_is_omap1611() 0
#define cpu_is_omap1621() 0
#define cpu_is_omap1710() 0
#define cpu_is_omap2420() 0
#if defined(MULTI_OMAP1)
# if defined(CONFIG_ARCH_OMAP730)
# undef cpu_is_omap730
# define cpu_is_omap730() is_omap730()
# endif
# if defined(CONFIG_ARCH_OMAP1510)
# undef cpu_is_omap1510
# define cpu_is_omap1510() is_omap1510()
# endif
#else
# if defined(CONFIG_ARCH_OMAP730)
# undef cpu_is_omap730
# define cpu_is_omap730() 1
# else
# define cpu_is_omap730() 0
# endif
# if defined(CONFIG_ARCH_OMAP1510)
# undef cpu_is_omap1510
# define cpu_is_omap1510() 1
# else
# define cpu_is_omap1510() 0
# endif
# if defined(CONFIG_ARCH_OMAP16XX)
# define cpu_is_omap1610() 1
# else
# define cpu_is_omap1610() 0
# endif
# if defined(CONFIG_ARCH_OMAP16XX)
# define cpu_is_omap5912() 1
# else
# define cpu_is_omap5912() 0
# endif
# if defined(CONFIG_ARCH_OMAP16XX)
# define cpu_is_omap1610() is_omap1610()
# define cpu_is_omap5912() is_omap5912()
# define cpu_is_omap1710() is_omap1710()
# else
# define cpu_is_omap1610() 0
# define cpu_is_omap5912() 0
# define cpu_is_omap1710() 0
# endif
# if defined(CONFIG_ARCH_OMAP2420)
# define cpu_is_omap2420() 1
# else
# define cpu_is_omap2420() 0
# endif
#endif
/*
* Whether we have MULTI_OMAP1 or not, we still need to distinguish
* between 1611B/5912 and 1710.
*/
#if defined(CONFIG_ARCH_OMAP16XX)
# undef cpu_is_omap1610
# undef cpu_is_omap1611
# undef cpu_is_omap5912
# undef cpu_is_omap1621
# undef cpu_is_omap1710
# define cpu_is_omap1610() is_omap1610()
# define cpu_is_omap1611() is_omap1611()
# define cpu_is_omap5912() is_omap5912()
# define cpu_is_omap1621() is_omap1621()
# define cpu_is_omap1710() is_omap1710()
#endif
#if defined(CONFIG_ARCH_OMAP2420)
# undef cpu_is_omap2420
# define cpu_is_omap2420() 1
#endif
#endif

查看文件

@@ -14,6 +14,7 @@
.macro addruart,rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
#ifdef CONFIG_ARCH_OMAP1
moveq \rx, #0xff000000 @ physical base address
movne \rx, #0xfe000000 @ virtual base
orr \rx, \rx, #0x00fb0000
@@ -22,6 +23,18 @@
#endif
#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
orr \rx, \rx, #0x00000800 @ UART 2 & 3
#endif
#elif CONFIG_ARCH_OMAP2
moveq \rx, #0x48000000 @ physical base address
movne \rx, #0xd8000000 @ virtual base
orr \rx, \rx, #0x0006a000
#ifdef CONFIG_OMAP_LL_DEBUG_UART2
add \rx, \rx, #0x00002000 @ UART 2
#endif
#ifdef CONFIG_OMAP_LL_DEBUG_UART3
add \rx, \rx, #0x00004000 @ UART 3
#endif
#endif
.endm

查看文件

@@ -240,6 +240,7 @@ extern void omap_dma_unlink_lch (int lch_head, int lch_queue);
extern dma_addr_t omap_get_dma_src_pos(int lch);
extern dma_addr_t omap_get_dma_dst_pos(int lch);
extern int omap_get_dma_src_addr_counter(int lch);
extern void omap_clear_dma(int lch);
extern int omap_dma_running(void);

查看文件

@@ -0,0 +1,92 @@
/*
* linux/include/asm-arm/arm/arch-omap/dmtimer.h
*
* OMAP Dual-Mode Timers
*
* Copyright (C) 2005 Nokia Corporation
* Author: Lauri Leukkunen <lauri.leukkunen@nokia.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ASM_ARCH_TIMER_H
#define __ASM_ARCH_TIMER_H
#include <linux/list.h>
#define OMAP_TIMER_SRC_ARMXOR 0x00
#define OMAP_TIMER_SRC_32_KHZ 0x01
#define OMAP_TIMER_SRC_EXT_CLK 0x02
/* timer control reg bits */
#define OMAP_TIMER_CTRL_CAPTMODE (1 << 13)
#define OMAP_TIMER_CTRL_PT (1 << 12)
#define OMAP_TIMER_CTRL_TRG_OVERFLOW (0x1 << 10)
#define OMAP_TIMER_CTRL_TRG_OFANDMATCH (0x2 << 10)
#define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8)
#define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8)
#define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8)
#define OMAP_TIMER_CTRL_SCPWM (1 << 7)
#define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */
#define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */
#define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */
#define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */
#define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */
/* timer interrupt enable bits */
#define OMAP_TIMER_INT_CAPTURE (1 << 2)
#define OMAP_TIMER_INT_OVERFLOW (1 << 1)
#define OMAP_TIMER_INT_MATCH (1 << 0)
struct omap_dm_timer {
struct list_head timer_list;
u32 base;
unsigned int irq;
};
u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg);
void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value);
struct omap_dm_timer * omap_dm_timer_request(void);
void omap_dm_timer_free(struct omap_dm_timer *timer);
void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source);
void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value);
void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value);
void omap_dm_timer_enable_compare(struct omap_dm_timer *timer);
void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer);
void omap_dm_timer_trigger(struct omap_dm_timer *timer);
void omap_dm_timer_start(struct omap_dm_timer *timer);
void omap_dm_timer_stop(struct omap_dm_timer *timer);
void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load);
void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match);
unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer);
void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value);
unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer);
void omap_dm_timer_reset_counter(struct omap_dm_timer *timer);
int omap_dm_timers_active(void);
#endif /* __ASM_ARCH_TIMER_H */

查看文件

@@ -0,0 +1,244 @@
/*
* linux/include/asm-arm/arch-omap/dsp.h
*
* Header for OMAP DSP driver
*
* Copyright (C) 2002-2005 Nokia Corporation
*
* Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* 2005/06/01: DSP Gateway version 3.3
*/
#ifndef ASM_ARCH_DSP_H
#define ASM_ARCH_DSP_H
/*
* for /dev/dspctl/ctl
*/
#define OMAP_DSP_IOCTL_RESET 1
#define OMAP_DSP_IOCTL_RUN 2
#define OMAP_DSP_IOCTL_SETRSTVECT 3
#define OMAP_DSP_IOCTL_CPU_IDLE 4
#define OMAP_DSP_IOCTL_MPUI_WORDSWAP_ON 5
#define OMAP_DSP_IOCTL_MPUI_WORDSWAP_OFF 6
#define OMAP_DSP_IOCTL_MPUI_BYTESWAP_ON 7
#define OMAP_DSP_IOCTL_MPUI_BYTESWAP_OFF 8
#define OMAP_DSP_IOCTL_GBL_IDLE 9
#define OMAP_DSP_IOCTL_DSPCFG 10
#define OMAP_DSP_IOCTL_DSPUNCFG 11
#define OMAP_DSP_IOCTL_TASKCNT 12
#define OMAP_DSP_IOCTL_POLL 13
#define OMAP_DSP_IOCTL_REGMEMR 40
#define OMAP_DSP_IOCTL_REGMEMW 41
#define OMAP_DSP_IOCTL_REGIOR 42
#define OMAP_DSP_IOCTL_REGIOW 43
#define OMAP_DSP_IOCTL_GETVAR 44
#define OMAP_DSP_IOCTL_SETVAR 45
#define OMAP_DSP_IOCTL_RUNLEVEL 50
#define OMAP_DSP_IOCTL_SUSPEND 51
#define OMAP_DSP_IOCTL_RESUME 52
#define OMAP_DSP_IOCTL_FBEN 53
#define OMAP_DSP_IOCTL_FBDIS 54
#define OMAP_DSP_IOCTL_MBSEND 99
/*
* for taskdev
* (ioctls below should be >= 0x10000)
*/
#define OMAP_DSP_TASK_IOCTL_BFLSH 0x10000
#define OMAP_DSP_TASK_IOCTL_SETBSZ 0x10001
#define OMAP_DSP_TASK_IOCTL_LOCK 0x10002
#define OMAP_DSP_TASK_IOCTL_UNLOCK 0x10003
#define OMAP_DSP_TASK_IOCTL_GETNAME 0x10004
/*
* for /dev/dspctl/mem
*/
#define OMAP_DSP_MEM_IOCTL_EXMAP 1
#define OMAP_DSP_MEM_IOCTL_EXUNMAP 2
#define OMAP_DSP_MEM_IOCTL_EXMAP_FLUSH 3
#define OMAP_DSP_MEM_IOCTL_FBEXPORT 5
#define OMAP_DSP_MEM_IOCTL_MMUITACK 7
#define OMAP_DSP_MEM_IOCTL_MMUINIT 9
#define OMAP_DSP_MEM_IOCTL_KMEM_RESERVE 11
#define OMAP_DSP_MEM_IOCTL_KMEM_RELEASE 12
struct omap_dsp_mapinfo {
unsigned long dspadr;
unsigned long size;
};
/*
* for /dev/dspctl/twch
*/
#define OMAP_DSP_TWCH_IOCTL_MKDEV 1
#define OMAP_DSP_TWCH_IOCTL_RMDEV 2
#define OMAP_DSP_TWCH_IOCTL_TADD 11
#define OMAP_DSP_TWCH_IOCTL_TDEL 12
#define OMAP_DSP_TWCH_IOCTL_TKILL 13
#define OMAP_DSP_DEVSTATE_NOTASK 0x00000001
#define OMAP_DSP_DEVSTATE_ATTACHED 0x00000002
#define OMAP_DSP_DEVSTATE_GARBAGE 0x00000004
#define OMAP_DSP_DEVSTATE_INVALID 0x00000008
#define OMAP_DSP_DEVSTATE_ADDREQ 0x00000100
#define OMAP_DSP_DEVSTATE_DELREQ 0x00000200
#define OMAP_DSP_DEVSTATE_ADDFAIL 0x00001000
#define OMAP_DSP_DEVSTATE_ADDING 0x00010000
#define OMAP_DSP_DEVSTATE_DELING 0x00020000
#define OMAP_DSP_DEVSTATE_KILLING 0x00040000
#define OMAP_DSP_DEVSTATE_STATE_MASK 0x7fffffff
#define OMAP_DSP_DEVSTATE_STALE 0x80000000
struct omap_dsp_taddinfo {
unsigned char minor;
unsigned long taskadr;
};
#define OMAP_DSP_TADD_ABORTADR 0xffffffff
/*
* error cause definition (for error detection device)
*/
#define OMAP_DSP_ERRDT_WDT 0x00000001
#define OMAP_DSP_ERRDT_MMU 0x00000002
/*
* mailbox protocol definitions
*/
struct omap_dsp_mailbox_cmd {
unsigned short cmd;
unsigned short data;
};
struct omap_dsp_reginfo {
unsigned short adr;
unsigned short val;
};
struct omap_dsp_varinfo {
unsigned char varid;
unsigned short val[0];
};
#define OMAP_DSP_MBPROT_REVISION 0x0019
#define OMAP_DSP_MBCMD_WDSND 0x10
#define OMAP_DSP_MBCMD_WDREQ 0x11
#define OMAP_DSP_MBCMD_BKSND 0x20
#define OMAP_DSP_MBCMD_BKREQ 0x21
#define OMAP_DSP_MBCMD_BKYLD 0x23
#define OMAP_DSP_MBCMD_BKSNDP 0x24
#define OMAP_DSP_MBCMD_BKREQP 0x25
#define OMAP_DSP_MBCMD_TCTL 0x30
#define OMAP_DSP_MBCMD_TCTLDATA 0x31
#define OMAP_DSP_MBCMD_POLL 0x32
#define OMAP_DSP_MBCMD_WDT 0x50 /* v3.3: obsolete */
#define OMAP_DSP_MBCMD_RUNLEVEL 0x51
#define OMAP_DSP_MBCMD_PM 0x52
#define OMAP_DSP_MBCMD_SUSPEND 0x53
#define OMAP_DSP_MBCMD_KFUNC 0x54
#define OMAP_DSP_MBCMD_TCFG 0x60
#define OMAP_DSP_MBCMD_TADD 0x62
#define OMAP_DSP_MBCMD_TDEL 0x63
#define OMAP_DSP_MBCMD_TSTOP 0x65
#define OMAP_DSP_MBCMD_DSPCFG 0x70
#define OMAP_DSP_MBCMD_REGRW 0x72
#define OMAP_DSP_MBCMD_GETVAR 0x74
#define OMAP_DSP_MBCMD_SETVAR 0x75
#define OMAP_DSP_MBCMD_ERR 0x78
#define OMAP_DSP_MBCMD_DBG 0x79
#define OMAP_DSP_MBCMD_TCTL_TINIT 0x0000
#define OMAP_DSP_MBCMD_TCTL_TEN 0x0001
#define OMAP_DSP_MBCMD_TCTL_TDIS 0x0002
#define OMAP_DSP_MBCMD_TCTL_TCLR 0x0003
#define OMAP_DSP_MBCMD_TCTL_TCLR_FORCE 0x0004
#define OMAP_DSP_MBCMD_RUNLEVEL_USER 0x01
#define OMAP_DSP_MBCMD_RUNLEVEL_SUPER 0x0e
#define OMAP_DSP_MBCMD_RUNLEVEL_RECOVERY 0x10
#define OMAP_DSP_MBCMD_PM_DISABLE 0x00
#define OMAP_DSP_MBCMD_PM_ENABLE 0x01
#define OMAP_DSP_MBCMD_KFUNC_FBCTL 0x00
#define OMAP_DSP_MBCMD_FBCTL_ENABLE 0x0002
#define OMAP_DSP_MBCMD_FBCTL_DISABLE 0x0003
#define OMAP_DSP_MBCMD_TDEL_SAFE 0x0000
#define OMAP_DSP_MBCMD_TDEL_KILL 0x0001
#define OMAP_DSP_MBCMD_DSPCFG_REQ 0x00
#define OMAP_DSP_MBCMD_DSPCFG_SYSADRH 0x28
#define OMAP_DSP_MBCMD_DSPCFG_SYSADRL 0x29
#define OMAP_DSP_MBCMD_DSPCFG_PROTREV 0x70
#define OMAP_DSP_MBCMD_DSPCFG_ABORT 0x78
#define OMAP_DSP_MBCMD_DSPCFG_LAST 0x80
#define OMAP_DSP_MBCMD_REGRW_MEMR 0x00
#define OMAP_DSP_MBCMD_REGRW_MEMW 0x01
#define OMAP_DSP_MBCMD_REGRW_IOR 0x02
#define OMAP_DSP_MBCMD_REGRW_IOW 0x03
#define OMAP_DSP_MBCMD_REGRW_DATA 0x04
#define OMAP_DSP_MBCMD_VARID_ICRMASK 0x00
#define OMAP_DSP_MBCMD_VARID_LOADINFO 0x01
#define OMAP_DSP_TTYP_ARCV 0x0001
#define OMAP_DSP_TTYP_ASND 0x0002
#define OMAP_DSP_TTYP_BKMD 0x0004
#define OMAP_DSP_TTYP_BKDM 0x0008
#define OMAP_DSP_TTYP_PVMD 0x0010
#define OMAP_DSP_TTYP_PVDM 0x0020
#define OMAP_DSP_EID_BADTID 0x10
#define OMAP_DSP_EID_BADTCN 0x11
#define OMAP_DSP_EID_BADBID 0x20
#define OMAP_DSP_EID_BADCNT 0x21
#define OMAP_DSP_EID_NOTLOCKED 0x22
#define OMAP_DSP_EID_STVBUF 0x23
#define OMAP_DSP_EID_BADADR 0x24
#define OMAP_DSP_EID_BADTCTL 0x30
#define OMAP_DSP_EID_BADPARAM 0x50
#define OMAP_DSP_EID_FATAL 0x58
#define OMAP_DSP_EID_NOMEM 0xc0
#define OMAP_DSP_EID_NORES 0xc1
#define OMAP_DSP_EID_IPBFULL 0xc2
#define OMAP_DSP_EID_WDT 0xd0
#define OMAP_DSP_EID_TASKNOTRDY 0xe0
#define OMAP_DSP_EID_TASKBSY 0xe1
#define OMAP_DSP_EID_TASKERR 0xef
#define OMAP_DSP_EID_BADCFGTYP 0xf0
#define OMAP_DSP_EID_DEBUG 0xf8
#define OMAP_DSP_EID_BADSEQ 0xfe
#define OMAP_DSP_EID_BADCMD 0xff
#define OMAP_DSP_TNM_LEN 16
#define OMAP_DSP_TID_FREE 0xff
#define OMAP_DSP_TID_ANON 0xfe
#define OMAP_DSP_BID_NULL 0xffff
#define OMAP_DSP_BID_PVT 0xfffe
#endif /* ASM_ARCH_DSP_H */

查看文件

@@ -0,0 +1,37 @@
/*
* linux/include/asm-arm/arch-omap/dsp_common.h
*
* Header for OMAP DSP subsystem control
*
* Copyright (C) 2004,2005 Nokia Corporation
*
* Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* 2005/06/03: DSP Gateway version 3.3
*/
#ifndef ASM_ARCH_DSP_COMMON_H
#define ASM_ARCH_DSP_COMMON_H
void omap_dsp_pm_suspend(void);
void omap_dsp_pm_resume(void);
void omap_dsp_request_mpui(void);
void omap_dsp_release_mpui(void);
int omap_dsp_request_mem(void);
int omap_dsp_release_mem(void);
#endif /* ASM_ARCH_DSP_COMMON_H */

查看文件

@@ -8,6 +8,8 @@
* warranty of any kind, whether express or implied.
*/
#if defined(CONFIG_ARCH_OMAP1)
.macro disable_fiq
.endm
@@ -30,3 +32,29 @@
1510:
.endm
#elif defined(CONFIG_ARCH_OMAP24XX)
#include <asm/arch/omap24xx.h>
.macro disable_fiq
.endm
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
ldr \base, =VA_IC_BASE
ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
cmp \irqnr, #0x0
bne 2222f
ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
cmp \irqnr, #0x0
bne 2222f
ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
cmp \irqnr, #0x0
2222:
ldrne \irqnr, [\base, #IRQ_SIR_IRQ]
.endm
.macro irq_prio_table
.endm
#endif

查看文件

@@ -3,7 +3,7 @@
*
* OMAP GPIO handling defines and functions
*
* Copyright (C) 2003 Nokia Corporation
* Copyright (C) 2003-2005 Nokia Corporation
*
* Written by Juha Yrj<72>l<EFBFBD> <juha.yrjola@nokia.com>
*
@@ -30,7 +30,23 @@
#include <asm/arch/irqs.h>
#include <asm/io.h>
#define OMAP_MPUIO_BASE 0xfffb5000
#define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000
#ifdef CONFIG_ARCH_OMAP730
#define OMAP_MPUIO_INPUT_LATCH 0x00
#define OMAP_MPUIO_OUTPUT 0x02
#define OMAP_MPUIO_IO_CNTL 0x04
#define OMAP_MPUIO_KBR_LATCH 0x08
#define OMAP_MPUIO_KBC 0x0a
#define OMAP_MPUIO_GPIO_EVENT_MODE 0x0c
#define OMAP_MPUIO_GPIO_INT_EDGE 0x0e
#define OMAP_MPUIO_KBD_INT 0x10
#define OMAP_MPUIO_GPIO_INT 0x12
#define OMAP_MPUIO_KBD_MASKIT 0x14
#define OMAP_MPUIO_GPIO_MASKIT 0x16
#define OMAP_MPUIO_GPIO_DEBOUNCING 0x18
#define OMAP_MPUIO_LATCH 0x1a
#else
#define OMAP_MPUIO_INPUT_LATCH 0x00
#define OMAP_MPUIO_OUTPUT 0x04
#define OMAP_MPUIO_IO_CNTL 0x08
@@ -44,6 +60,7 @@
#define OMAP_MPUIO_GPIO_MASKIT 0x2c
#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
#define OMAP_MPUIO_LATCH 0x34
#endif
#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
@@ -52,18 +69,11 @@
IH_MPUIO_BASE + ((nr) & 0x0f) : \
IH_GPIO_BASE + ((nr) & 0x3f))
/* For EDGECTRL */
#define OMAP_GPIO_NO_EDGE 0x00
#define OMAP_GPIO_FALLING_EDGE 0x01
#define OMAP_GPIO_RISING_EDGE 0x02
#define OMAP_GPIO_BOTH_EDGES 0x03
extern int omap_gpio_init(void); /* Call from board init only */
extern int omap_request_gpio(int gpio);
extern void omap_free_gpio(int gpio);
extern void omap_set_gpio_direction(int gpio, int is_input);
extern void omap_set_gpio_dataout(int gpio, int enable);
extern int omap_get_gpio_datain(int gpio);
extern void omap_set_gpio_edge_ctrl(int gpio, int edge);
#endif

查看文件

@@ -43,6 +43,7 @@
#include <asm/arch/cpu.h>
#endif
#include <asm/arch/io.h>
#include <asm/arch/serial.h>
/*
* ---------------------------------------------------------------------------
@@ -89,11 +90,12 @@
/* DPLL control registers */
#define DPLL_CTL (0xfffecf00)
/* DSP clock control */
/* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
#define DSP_CONFIG_REG_BASE (0xe1008000)
#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
/*
* ---------------------------------------------------------------------------
@@ -142,6 +144,13 @@
* Interrupts
* ---------------------------------------------------------------------------
*/
#ifdef CONFIG_ARCH_OMAP1
/*
* XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
* or something similar.. -- PFM.
*/
#define OMAP_IH1_BASE 0xfffecb00
#define OMAP_IH2_BASE 0xfffe0000
@@ -170,6 +179,8 @@
#define IRQ_ILR0_REG_OFFSET 0x1c
#define IRQ_GMR_REG_OFFSET 0xa0
#endif
/*
* ----------------------------------------------------------------------------
* System control registers
@@ -258,26 +269,6 @@
#ifndef __ASSEMBLER__
/*
* ---------------------------------------------------------------------------
* Serial ports
* ---------------------------------------------------------------------------
*/
#define OMAP_UART1_BASE (unsigned char *)0xfffb0000
#define OMAP_UART2_BASE (unsigned char *)0xfffb0800
#define OMAP_UART3_BASE (unsigned char *)0xfffb9800
#define OMAP_MAX_NR_PORTS 3
#define OMAP1510_BASE_BAUD (12000000/16)
#define OMAP16XX_BASE_BAUD (48000000/16)
#define is_omap_port(p) ({int __ret = 0; \
if (p == IO_ADDRESS(OMAP_UART1_BASE) || \
p == IO_ADDRESS(OMAP_UART2_BASE) || \
p == IO_ADDRESS(OMAP_UART3_BASE)) \
__ret = 1; \
__ret; \
})
/*
* ---------------------------------------------------------------------------
* Processor specific defines
@@ -286,6 +277,11 @@
#include "omap730.h"
#include "omap1510.h"
#ifdef CONFIG_ARCH_OMAP24XX
#include "omap24xx.h"
#endif
#include "omap16xx.h"
/*
@@ -312,7 +308,6 @@
#ifdef CONFIG_MACH_OMAP_H4
#include "board-h4.h"
#error "Support for H4 board not yet implemented."
#endif
#ifdef CONFIG_MACH_OMAP_OSK

查看文件

@@ -49,16 +49,24 @@
* I/O mapping
* ----------------------------------------------------------------------------
*/
#define IO_PHYS 0xFFFB0000
#define IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */
#define IO_VIRT (IO_PHYS - IO_OFFSET)
#define IO_SIZE 0x40000
#define IO_ADDRESS(x) ((x) - IO_OFFSET)
#define PCIO_BASE 0
#if defined(CONFIG_ARCH_OMAP1)
#define IO_PHYS 0xFFFB0000
#define IO_OFFSET -0x01000000 /* Virtual IO = 0xfefb0000 */
#define IO_SIZE 0x40000
#define io_p2v(x) ((x) - IO_OFFSET)
#define io_v2p(x) ((x) + IO_OFFSET)
#elif defined(CONFIG_ARCH_OMAP2)
#define IO_PHYS 0x48000000 /* L4 peripherals; other stuff has to be mapped *
* manually. */
#define IO_OFFSET 0x90000000 /* Virtual IO = 0xd8000000 */
#define IO_SIZE 0x08000000
#endif
#define IO_VIRT (IO_PHYS + IO_OFFSET)
#define IO_ADDRESS(x) ((x) + IO_OFFSET)
#define PCIO_BASE 0
#define io_p2v(x) ((x) + IO_OFFSET)
#define io_v2p(x) ((x) - IO_OFFSET)
#ifndef __ASSEMBLER__
@@ -96,6 +104,8 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
->offset[((vaddr)&4095)>>2]
#define __REG32(paddr) __REGV32(io_p2v(paddr))
extern void omap_map_common_io(void);
#else
#define __REG8(paddr) io_p2v(paddr)

查看文件

@@ -135,7 +135,6 @@
/*
* OMAP-1510 specific IRQ numbers for interrupt handler 2
*/
#define INT_1510_OS_32kHz_TIMER (22 + IH2_BASE)
#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
/*
@@ -232,6 +231,11 @@
#define INT_730_DMA_CH15 (62 + IH2_BASE)
#define INT_730_NAND (63 + IH2_BASE)
#define INT_24XX_GPIO_BANK1 29
#define INT_24XX_GPIO_BANK2 30
#define INT_24XX_GPIO_BANK3 31
#define INT_24XX_GPIO_BANK4 32
/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
* 16 MPUIO lines */
#define OMAP_MAX_GPIO_LINES 192

查看文件

@@ -36,12 +36,11 @@
/*
* Physical DRAM offset.
*/
#if defined(CONFIG_ARCH_OMAP1)
#define PHYS_OFFSET (0x10000000UL)
/*
* OMAP-1510 Local Bus address offset
*/
#define OMAP1510_LB_OFFSET (0x30000000UL)
#elif defined(CONFIG_ARCH_OMAP2)
#define PHYS_OFFSET (0x80000000UL)
#endif
/*
* Conversion between SDRAM and fake PCI bus, used by USB
@@ -64,6 +63,11 @@
*/
#ifdef CONFIG_ARCH_OMAP1510
/*
* OMAP-1510 Local Bus address offset
*/
#define OMAP1510_LB_OFFSET (0x30000000UL)
#define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)
#define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
#define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0))

查看文件

@@ -0,0 +1,61 @@
/*
* MTD primitives for XIP support. Architecture specific functions.
*
* Do not include this file directly. It's included from linux/mtd/xip.h
*
* Author: Vladimir Barinov <vbarinov@ru.mvista.com>
*
* (c) 2005 MontaVista Software, Inc. This file is licensed under the
* terms of the GNU General Public License version 2. This program is
* licensed "as is" without any warranty of any kind, whether express or
* implied.
*/
#ifndef __ARCH_OMAP_MTD_XIP_H__
#define __ARCH_OMAP_MTD_XIP_H__
#include <asm/hardware.h>
#define OMAP_MPU_TIMER_BASE (0xfffec500)
#define OMAP_MPU_TIMER_OFFSET 0x100
typedef struct {
u32 cntl; /* CNTL_TIMER, R/W */
u32 load_tim; /* LOAD_TIM, W */
u32 read_tim; /* READ_TIM, R */
} xip_omap_mpu_timer_regs_t;
#define xip_omap_mpu_timer_base(n) \
((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
(n)*OMAP_MPU_TIMER_OFFSET))
static inline unsigned long xip_omap_mpu_timer_read(int nr)
{
volatile xip_omap_mpu_timer_regs_t* timer = xip_omap_mpu_timer_base(nr);
return timer->read_tim;
}
#define xip_irqpending() \
(omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
#define xip_currtime() (~xip_omap_mpu_timer_read(0))
/*
* It's permitted to do approxmation for xip_elapsed_since macro
* (see linux/mtd/xip.h)
*/
#ifdef CONFIG_MACH_OMAP_PERSEUS2
#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 7)
#else
#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
#endif
/*
* xip_cpu_idle() is used when waiting for a delay equal or larger than
* the system timer tick period. This should put the CPU into idle mode
* to save power and to be woken up only when some interrupts are pending.
* As above, this should not rely upon standard kernel code.
*/
#define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))
#endif /* __ARCH_OMAP_MTD_XIP_H__ */

查看文件

@@ -185,6 +185,7 @@ typedef enum {
/* MPUIO */
MPUIO2,
N15_1610_MPUIO2,
MPUIO4,
MPUIO5,
T20_1610_MPUIO5,
@@ -210,6 +211,7 @@ typedef enum {
/* Misc ballouts */
BALLOUT_V8_ARMIO3,
N20_HDQ,
/* OMAP-1610 MMC2 */
W8_1610_MMC2_DAT0,
@@ -235,6 +237,7 @@ typedef enum {
P20_1610_GPIO4,
V9_1610_GPIO7,
W8_1610_GPIO9,
N20_1610_GPIO11,
N19_1610_GPIO13,
P10_1610_GPIO22,
V5_1610_GPIO24,
@@ -250,7 +253,7 @@ typedef enum {
U18_1610_UWIRE_SDI,
W21_1610_UWIRE_SDO,
N14_1610_UWIRE_CS0,
P15_1610_UWIRE_CS0,
P15_1610_UWIRE_CS3,
N15_1610_UWIRE_CS1,
/* OMAP-1610 Flash */
@@ -411,7 +414,8 @@ MUX_CFG("N21_1710_GPIO14", 6, 9, 0, 1, 1, 1, 1, 1, 1)
MUX_CFG("W15_1710_GPIO40", 9, 27, 7, 2, 5, 1, 2, 1, 1)
/* MPUIO */
MUX_CFG("MPUIO2", 7, 18, 0, 1, 1, 1, NA, 0, 1)
MUX_CFG("MPUIO2", 7, 18, 0, 1, 14, 1, NA, 0, 1)
MUX_CFG("N15_1610_MPUIO2", 7, 18, 0, 1, 14, 1, 1, 0, 1)
MUX_CFG("MPUIO4", 7, 15, 0, 1, 13, 1, NA, 0, 1)
MUX_CFG("MPUIO5", 7, 12, 0, 1, 12, 1, NA, 0, 1)
@@ -438,6 +442,7 @@ MUX_CFG("MCBSP3_CLKX", 9, 3, 1, 1, 29, 0, NA, 0, 1)
/* Misc ballouts */
MUX_CFG("BALLOUT_V8_ARMIO3", B, 18, 0, 2, 25, 1, NA, 0, 1)
MUX_CFG("N20_HDQ", 6, 18, 1, 1, 4, 0, 1, 4, 0)
/* OMAP-1610 MMC2 */
MUX_CFG("W8_1610_MMC2_DAT0", B, 21, 6, 2, 23, 1, 2, 1, 1)
@@ -463,6 +468,7 @@ MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1)
MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1)
MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1)
MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1)
MUX_CFG("N20_1610_GPIO11", 6, 18, 0, 1, 4, 0, 1, 1, 1)
MUX_CFG("N19_1610_GPIO13", 6, 12, 0, 1, 2, 0, 1, 1, 1)
MUX_CFG("P10_1610_GPIO22", C, 0, 7, 2, 26, 0, 2, 1, 1)
MUX_CFG("V5_1610_GPIO24", B, 15, 7, 2, 21, 0, 2, 1, 1)

查看文件

@@ -36,10 +36,6 @@
/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
#define OMAP1510_SRAM_BASE 0xD0000000
#define OMAP1510_SRAM_SIZE (SZ_128K + SZ_64K)
#define OMAP1510_SRAM_START 0x20000000
#define OMAP1510_DSP_BASE 0xE0000000
#define OMAP1510_DSP_SIZE 0x28000
#define OMAP1510_DSP_START 0xE0000000
@@ -48,14 +44,5 @@
#define OMAP1510_DSPREG_SIZE SZ_128K
#define OMAP1510_DSPREG_START 0xE1000000
/*
* ----------------------------------------------------------------------------
* Memory used by power management
* ----------------------------------------------------------------------------
*/
#define OMAP1510_SRAM_IDLE_SUSPEND (OMAP1510_SRAM_BASE + OMAP1510_SRAM_SIZE - 0x200)
#define OMAP1510_SRAM_API_SUSPEND (OMAP1510_SRAM_IDLE_SUSPEND + 0x100)
#endif /* __ASM_ARCH_OMAP1510_H */

查看文件

@@ -36,11 +36,6 @@
/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
#define OMAP16XX_SRAM_BASE 0xD0000000
#define OMAP1610_SRAM_SIZE (SZ_16K)
#define OMAP5912_SRAM_SIZE 0x3E800
#define OMAP16XX_SRAM_START 0x20000000
#define OMAP16XX_DSP_BASE 0xE0000000
#define OMAP16XX_DSP_SIZE 0x28000
#define OMAP16XX_DSP_START 0xE0000000
@@ -49,17 +44,6 @@
#define OMAP16XX_DSPREG_SIZE SZ_128K
#define OMAP16XX_DSPREG_START 0xE1000000
/*
* ----------------------------------------------------------------------------
* Memory used by power management
* ----------------------------------------------------------------------------
*/
#define OMAP1610_SRAM_IDLE_SUSPEND (OMAP16XX_SRAM_BASE + OMAP1610_SRAM_SIZE - 0x200)
#define OMAP1610_SRAM_API_SUSPEND (OMAP1610_SRAM_IDLE_SUSPEND + 0x100)
#define OMAP5912_SRAM_IDLE_SUSPEND (OMAP16XX_SRAM_BASE + OMAP5912_SRAM_SIZE - 0x200)
#define OMAP5912_SRAM_API_SUSPEND (OMAP5912_SRAM_IDLE_SUSPEND + 0x100)
/*
* ---------------------------------------------------------------------------
* Interrupts

查看文件

@@ -0,0 +1,15 @@
#ifndef __ASM_ARCH_OMAP24XX_H
#define __ASM_ARCH_OMAP24XX_H
#define OMAP24XX_L4_IO_BASE 0x48000000
/* interrupt controller */
#define OMAP24XX_IC_BASE (OMAP24XX_L4_IO_BASE + 0xfe000)
#define VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE)
#define OMAP24XX_IVA_INTC_BASE 0x40000000
#define IRQ_SIR_IRQ 0x0040
#endif /* __ASM_ARCH_OMAP24XX_H */

查看文件

@@ -36,10 +36,6 @@
/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
#define OMAP730_SRAM_BASE 0xD0000000
#define OMAP730_SRAM_SIZE (SZ_128K + SZ_64K + SZ_8K)
#define OMAP730_SRAM_START 0x20000000
#define OMAP730_DSP_BASE 0xE0000000
#define OMAP730_DSP_SIZE 0x50000
#define OMAP730_DSP_START 0xE0000000

查看文件

@@ -61,7 +61,10 @@
#define PER_EN 0x1
#define CPU_SUSPEND_SIZE 200
#define ULPD_LOW_POWER_EN 0x0001
#define ULPD_LOW_PWR_EN 0x0001
#define ULPD_DEEP_SLEEP_TRANSITION_EN 0x0010
#define ULPD_SETUP_ANALOG_CELL_3_VAL 0
#define ULPD_POWER_CTRL_REG_VAL 0x0219
#define DSP_IDLE_DELAY 10
#define DSP_IDLE 0x0040
@@ -86,46 +89,35 @@
#define OMAP1510_BIG_SLEEP_REQUEST 0x0cc5
#define OMAP1510_IDLE_LOOP_REQUEST 0x0c00
#define OMAP1510_IDLE_CLOCK_DOMAINS 0x2
#define OMAP1510_ULPD_LOW_POWER_REQ 0x0001
#define OMAP1610_DEEP_SLEEP_REQUEST 0x17c7
#define OMAP1610_BIG_SLEEP_REQUEST TBD
/* Both big sleep and deep sleep use same values. Difference is in ULPD. */
#define OMAP1610_IDLECT1_SLEEP_VAL 0x13c7
#define OMAP1610_IDLECT2_SLEEP_VAL 0x09c7
#define OMAP1610_IDLECT3_VAL 0x3f
#define OMAP1610_IDLECT3_SLEEP_ORMASK 0x2c
#define OMAP1610_IDLECT3 0xfffece24
#define OMAP1610_IDLE_LOOP_REQUEST 0x0400
#define OMAP1610_IDLE_CLOCK_DOMAINS 0x09c7
#define OMAP1610_ULPD_LOW_POWER_REQ 0x3
#ifndef OMAP1510_SRAM_IDLE_SUSPEND
#define OMAP1510_SRAM_IDLE_SUSPEND 0
#endif
#ifndef OMAP1610_SRAM_IDLE_SUSPEND
#define OMAP1610_SRAM_IDLE_SUSPEND 0
#endif
#ifndef OMAP5912_SRAM_IDLE_SUSPEND
#define OMAP5912_SRAM_IDLE_SUSPEND 0
#endif
#ifndef OMAP1510_SRAM_API_SUSPEND
#define OMAP1510_SRAM_API_SUSPEND 0
#endif
#ifndef OMAP1610_SRAM_API_SUSPEND
#define OMAP1610_SRAM_API_SUSPEND 0
#endif
#ifndef OMAP5912_SRAM_API_SUSPEND
#define OMAP5912_SRAM_API_SUSPEND 0
#endif
#if !defined(CONFIG_ARCH_OMAP1510) && \
!defined(CONFIG_ARCH_OMAP16XX)
!defined(CONFIG_ARCH_OMAP16XX) && \
!defined(CONFIG_ARCH_OMAP24XX)
#error "Power management for this processor not implemented yet"
#endif
#ifndef __ASSEMBLER__
extern void omap_pm_idle(void);
extern void omap_pm_suspend(void);
extern int omap1510_cpu_suspend(unsigned short, unsigned short);
extern int omap1610_cpu_suspend(unsigned short, unsigned short);
extern int omap1510_idle_loop_suspend(void);
extern int omap1610_idle_loop_suspend(void);
extern void omap1510_cpu_suspend(unsigned short, unsigned short);
extern void omap1610_cpu_suspend(unsigned short, unsigned short);
extern void omap1510_idle_loop_suspend(void);
extern void omap1610_idle_loop_suspend(void);
#ifdef CONFIG_OMAP_SERIAL_WAKE
extern void omap_serial_wake_trigger(int enable);
#else
#define omap_serial_wake_trigger(x) {}
#endif /* CONFIG_OMAP_SERIAL_WAKE */
extern unsigned int omap1510_cpu_suspend_sz;
extern unsigned int omap1510_idle_loop_suspend_sz;
extern unsigned int omap1610_cpu_suspend_sz;
@@ -161,6 +153,7 @@ enum arm_save_state {
ARM_SLEEP_SAVE_ARM_CKCTL,
ARM_SLEEP_SAVE_ARM_IDLECT1,
ARM_SLEEP_SAVE_ARM_IDLECT2,
ARM_SLEEP_SAVE_ARM_IDLECT3,
ARM_SLEEP_SAVE_ARM_EWUPCT,
ARM_SLEEP_SAVE_ARM_RSTCT1,
ARM_SLEEP_SAVE_ARM_RSTCT2,

查看文件

@@ -0,0 +1,37 @@
/*
* linux/include/asm-arm/arch-omap/serial.h
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __ASM_ARCH_SERIAL_H
#define __ASM_ARCH_SERIAL_H
#if defined(CONFIG_ARCH_OMAP1)
/* OMAP1 serial ports */
#define OMAP_UART1_BASE 0xfffb0000
#define OMAP_UART2_BASE 0xfffb0800
#define OMAP_UART3_BASE 0xfffb9800
#elif defined(CONFIG_ARCH_OMAP2)
/* OMAP2 serial ports */
#define OMAP_UART1_BASE 0x4806a000
#define OMAP_UART2_BASE 0x4806c000
#define OMAP_UART3_BASE 0x4806e000
#endif
#define OMAP_MAX_NR_PORTS 3
#define OMAP1510_BASE_BAUD (12000000/16)
#define OMAP16XX_BASE_BAUD (48000000/16)
#define is_omap_port(p) ({int __ret = 0; \
if (p == IO_ADDRESS(OMAP_UART1_BASE) || \
p == IO_ADDRESS(OMAP_UART2_BASE) || \
p == IO_ADDRESS(OMAP_UART3_BASE)) \
__ret = 1; \
__ret; \
})
#endif

查看文件

@@ -20,7 +20,7 @@
#include <linux/config.h>
#include <linux/types.h>
#include <linux/serial_reg.h>
#include <asm/arch/hardware.h>
#include <asm/arch/serial.h>
unsigned int system_rev;
@@ -34,8 +34,9 @@ static void
putstr(const char *s)
{
volatile u8 * uart = 0;
int shift;
int shift = 2;
#ifdef CONFIG_ARCH_OMAP
#ifdef CONFIG_OMAP_LL_DEBUG_UART3
uart = (volatile u8 *)(OMAP_UART3_BASE);
#elif CONFIG_OMAP_LL_DEBUG_UART2
@@ -44,6 +45,7 @@ putstr(const char *s)
uart = (volatile u8 *)(OMAP_UART1_BASE);
#endif
#ifdef CONFIG_ARCH_OMAP1
/* Determine which serial port to use */
do {
/* MMU is not on, so cpu_is_omapXXXX() won't work here */
@@ -51,14 +53,14 @@ putstr(const char *s)
if (omap_id == OMAP_ID_730)
shift = 0;
else
shift = 2;
if (check_port(uart, shift))
break;
/* Silent boot if no serial ports are enabled. */
return;
} while (0);
#endif /* CONFIG_ARCH_OMAP1 */
#endif
/*
* Now, xmit each character

查看文件

@@ -103,18 +103,20 @@
* Shared data structures
*/
extern struct platform_device corgiscoop_device;
extern struct platform_device corgissp_device;
extern struct platform_device corgifb_device;
/*
* External Functions
*/
extern unsigned long corgi_ssp_ads7846_putget(unsigned long);
extern unsigned long corgi_ssp_ads7846_get(void);
extern void corgi_ssp_ads7846_put(ulong data);
extern void corgi_ssp_ads7846_put(unsigned long data);
extern void corgi_ssp_ads7846_lock(void);
extern void corgi_ssp_ads7846_unlock(void);
extern void corgi_ssp_lcdtg_send (u8 adrs, u8 data);
extern void corgi_ssp_lcdtg_send (unsigned char adrs, unsigned char data);
extern void corgi_ssp_blduty_set(int duty);
extern int corgi_ssp_max1111_get(ulong data);
extern int corgi_ssp_max1111_get(unsigned long data);
#endif /* __ASM_ARCH_CORGI_H */

查看文件

@@ -10,6 +10,7 @@ struct mmc_host;
struct pxamci_platform_data {
unsigned int ocr_mask; /* available voltages */
int (*init)(struct device *, irqreturn_t (*)(int, void *, struct pt_regs *), void *);
int (*get_ro)(struct device *);
void (*setpower)(struct device *, unsigned int);
void (*exit)(struct device *, void *);
};

查看文件

@@ -0,0 +1,24 @@
/* linux/include/asm-arm/arch-s3c2410/anubis-cpld.h
*
* (c) 2005 Simtec Electronics
* http://www.simtec.co.uk/products/
* Ben Dooks <ben@simtec.co.uk>
*
* ANUBIS - CPLD control constants
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
*
*/
#ifndef __ASM_ARCH_ANUBISCPLD_H
#define __ASM_ARCH_ANUBISCPLD_H
/* CTRL2 - NAND WP control, IDE Reset assert/check */
#define ANUBIS_CTRL1_NANDSEL (0x3)
#endif /* __ASM_ARCH_ANUBISCPLD_H */

查看文件

@@ -0,0 +1,23 @@
/* linux/include/asm-arm/arch-s3c2410/anubis-irq.h
*
* (c) 2005 Simtec Electronics
* http://www.simtec.co.uk/products/
* Ben Dooks <ben@simtec.co.uk>
*
* ANUBIS - IRQ Number definitions
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
*/
#ifndef __ASM_ARCH_ANUBISIRQ_H
#define __ASM_ARCH_ANUBISIRQ_H
#define IRQ_IDE0 IRQ_EINT2
#define IRQ_IDE1 IRQ_EINT3
#define IRQ_ASIX IRQ_EINT1
#endif /* __ASM_ARCH_ANUBISIRQ_H */

查看文件

@@ -0,0 +1,46 @@
/* linux/include/asm-arm/arch-s3c2410/anubis-map.h
*
* (c) 2005 Simtec Electronics
* http://www.simtec.co.uk/products/
* Ben Dooks <ben@simtec.co.uk>
*
* ANUBIS - Memory map definitions
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
*/
/* needs arch/map.h including with this */
#ifndef __ASM_ARCH_ANUBISMAP_H
#define __ASM_ARCH_ANUBISMAP_H
/* start peripherals off after the S3C2410 */
#define ANUBIS_IOADDR(x) (S3C2410_ADDR((x) + 0x02000000))
#define ANUBIS_PA_CPLD (S3C2410_CS1 | (1<<26))
/* we put the CPLD registers next, to get them out of the way */
#define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01300000 */
#define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD)
#define ANUBIS_VA_CTRL2 ANUBIS_IOADDR(0x00100000) /* 0x01400000 */
#define ANUBIS_PA_CTRL2 (ANUBIS_PA_CPLD)
#define ANUBIS_VA_CTRL3 ANUBIS_IOADDR(0x00200000) /* 0x01500000 */
#define ANUBIS_PA_CTRL3 (ANUBIS_PA_CPLD)
#define ANUBIS_VA_CTRL4 ANUBIS_IOADDR(0x00300000) /* 0x01600000 */
#define ANUBIS_PA_CTRL4 (ANUBIS_PA_CPLD)
#define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000)
#define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000)
#define ANUBIS_IDESEC ANUBIS_IOADDR(0x01200000)
#define ANUBIS_IDESECAUX ANUBIS_IOADDR(0x01300000)
#endif /* __ASM_ARCH_ANUBISMAP_H */

4
include/asm-arm/auxvec.h 一般檔案
查看文件

@@ -0,0 +1,4 @@
#ifndef __ASMARM_AUXVEC_H
#define __ASMARM_AUXVEC_H
#endif

查看文件

@@ -1,87 +1,11 @@
#ifndef _ARM_FCNTL_H
#define _ARM_FCNTL_H
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 0100 /* not fcntl */
#define O_EXCL 0200 /* not fcntl */
#define O_NOCTTY 0400 /* not fcntl */
#define O_TRUNC 01000 /* not fcntl */
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
#define O_SYNC 010000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define O_DIRECTORY 040000 /* must be a directory */
#define O_NOFOLLOW 0100000 /* don't follow links */
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0400000
#define O_NOATIME 01000000
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
#define F_SETFD 2 /* set/clear close_on_exec */
#define F_GETFL 3 /* get file->f_flags */
#define F_SETFL 4 /* set file->f_flags */
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#include <asm-generic/fcntl.h>
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
#define F_SETSIG 10 /* for sockets. */
#define F_GETSIG 11 /* for sockets. */
#define F_GETLK64 12 /* using 'struct flock64' */
#define F_SETLK64 13
#define F_SETLKW64 14
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
/* for leases */
#define F_INPROGRESS 16
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
#define LOCK_MAND 32 /* This is a mandatory flock */
#define LOCK_READ 64 /* ... Which allows concurrent read operations */
#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */
#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
struct flock64 {
short l_type;
short l_whence;
loff_t l_start;
loff_t l_len;
pid_t l_pid;
};
#define F_LINUX_SPECIFIC_BASE 1024
#endif

53
include/asm-arm/futex.h 一般檔案
查看文件

@@ -0,0 +1,53 @@
#ifndef _ASM_FUTEX_H
#define _ASM_FUTEX_H
#ifdef __KERNEL__
#include <linux/futex.h>
#include <asm/errno.h>
#include <asm/uaccess.h>
static inline int
futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
{
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
int oparg = (encoded_op << 8) >> 20;
int cmparg = (encoded_op << 20) >> 20;
int oldval = 0, ret, tem;
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
inc_preempt_count();
switch (op) {
case FUTEX_OP_SET:
case FUTEX_OP_ADD:
case FUTEX_OP_OR:
case FUTEX_OP_ANDN:
case FUTEX_OP_XOR:
default:
ret = -ENOSYS;
}
dec_preempt_count();
if (!ret) {
switch (cmp) {
case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
default: ret = -ENOSYS;
}
}
return ret;
}
#endif
#endif

查看文件

@@ -1 +0,0 @@
#include <asm-generic/hdreg.h>

查看文件

@@ -77,12 +77,6 @@ static inline void set_fs (mm_segment_t fs)
#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
/* this function will go away soon - use access_ok() instead */
static inline int __deprecated verify_area(int type, const void __user *addr, unsigned long size)
{
return access_ok(type, addr, size) ? 0 : -EFAULT;
}
/*
* Single-value transfer routines. They automatically use the right
* size if we just have the right pointer type. Note that the functions

查看文件

@@ -0,0 +1,4 @@
#ifndef __ASMARM_AUXVEC_H
#define __ASMARM_AUXVEC_H
#endif

查看文件

@@ -3,85 +3,11 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 0100 /* not fcntl */
#define O_EXCL 0200 /* not fcntl */
#define O_NOCTTY 0400 /* not fcntl */
#define O_TRUNC 01000 /* not fcntl */
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
#define O_SYNC 010000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define O_DIRECTORY 040000 /* must be a directory */
#define O_NOFOLLOW 0100000 /* don't follow links */
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0400000
#define O_NOATIME 01000000
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
#define F_SETFD 2 /* set/clear close_on_exec */
#define F_GETFL 3 /* get file->f_flags */
#define F_SETFL 4 /* set file->f_flags */
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#include <asm-generic/fcntl.h>
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
#define F_SETSIG 10 /* for sockets. */
#define F_GETSIG 11 /* for sockets. */
#define F_GETLK64 12 /* using 'struct flock64' */
#define F_SETLK64 13
#define F_SETLKW64 14
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
/* for leases */
#define F_INPROGRESS 16
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
#define LOCK_MAND 32 /* This is a mandatory flock */
#define LOCK_READ 64 /* ... Which allows concurrent read operations */
#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */
#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
struct flock64 {
short l_type;
short l_whence;
loff_t l_start;
loff_t l_len;
pid_t l_pid;
};
#define F_LINUX_SPECIFIC_BASE 1024
#endif

53
include/asm-arm26/futex.h 一般檔案
查看文件

@@ -0,0 +1,53 @@
#ifndef _ASM_FUTEX_H
#define _ASM_FUTEX_H
#ifdef __KERNEL__
#include <linux/futex.h>
#include <asm/errno.h>
#include <asm/uaccess.h>
static inline int
futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
{
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
int oparg = (encoded_op << 8) >> 20;
int cmparg = (encoded_op << 20) >> 20;
int oldval = 0, ret, tem;
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
inc_preempt_count();
switch (op) {
case FUTEX_OP_SET:
case FUTEX_OP_ADD:
case FUTEX_OP_OR:
case FUTEX_OP_ANDN:
case FUTEX_OP_XOR:
default:
ret = -ENOSYS;
}
dec_preempt_count();
if (!ret) {
switch (cmp) {
case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
default: ret = -ENOSYS;
}
}
return ret;
}
#endif
#endif

查看文件

@@ -1 +0,0 @@
#include <asm-generic/hdreg.h>

查看文件

@@ -40,12 +40,6 @@ extern int fixup_exception(struct pt_regs *regs);
#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
/* this function will go away soon - use access_ok() instead */
static inline int __deprecated verify_area(int type, const void * addr, unsigned long size)
{
return access_ok(type, addr, size) ? 0 : -EFAULT;
}
/*
* Single-value transfer routines. They automatically use the right
* size if we just have the right pointer type. Note that the functions

4
include/asm-cris/auxvec.h 一般檔案
查看文件

@@ -0,0 +1,4 @@
#ifndef __ASMCRIS_AUXVEC_H
#define __ASMCRIS_AUXVEC_H
#endif

查看文件

@@ -1,90 +1 @@
#ifndef _CRIS_FCNTL_H
#define _CRIS_FCNTL_H
/* verbatim copy of i386 version */
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 0100 /* not fcntl */
#define O_EXCL 0200 /* not fcntl */
#define O_NOCTTY 0400 /* not fcntl */
#define O_TRUNC 01000 /* not fcntl */
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
#define O_SYNC 010000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define O_DIRECT 040000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0100000
#define O_DIRECTORY 0200000 /* must be a directory */
#define O_NOFOLLOW 0400000 /* don't follow links */
#define O_NOATIME 01000000
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get f_flags */
#define F_SETFD 2 /* set f_flags */
#define F_GETFL 3 /* more flags (cloexec) */
#define F_SETFL 4
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
#define F_SETSIG 10 /* for sockets. */
#define F_GETSIG 11 /* for sockets. */
#define F_GETLK64 12 /* using 'struct flock64' */
#define F_SETLK64 13
#define F_SETLKW64 14
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
/* for leases */
#define F_INPROGRESS 16
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
#define LOCK_MAND 32 /* This is a mandatory flock */
#define LOCK_READ 64 /* ... Which allows concurrent read operations */
#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */
#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
struct flock64 {
short l_type;
short l_whence;
loff_t l_start;
loff_t l_len;
pid_t l_pid;
};
#define F_LINUX_SPECIFIC_BASE 1024
#endif
#include <asm-generic/fcntl.h>

53
include/asm-cris/futex.h 一般檔案
查看文件

@@ -0,0 +1,53 @@
#ifndef _ASM_FUTEX_H
#define _ASM_FUTEX_H
#ifdef __KERNEL__
#include <linux/futex.h>
#include <asm/errno.h>
#include <asm/uaccess.h>
static inline int
futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
{
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
int oparg = (encoded_op << 8) >> 20;
int cmparg = (encoded_op << 20) >> 20;
int oldval = 0, ret, tem;
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
inc_preempt_count();
switch (op) {
case FUTEX_OP_SET:
case FUTEX_OP_ADD:
case FUTEX_OP_OR:
case FUTEX_OP_ANDN:
case FUTEX_OP_XOR:
default:
ret = -ENOSYS;
}
dec_preempt_count();
if (!ret) {
switch (cmp) {
case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
default: ret = -ENOSYS;
}
}
return ret;
}
#endif
#endif

查看文件

@@ -1,6 +1,11 @@
#ifndef _ASM_IRQ_H
#define _ASM_IRQ_H
/*
* IRQ line status macro IRQ_PER_CPU is used
*/
#define ARCH_HAS_IRQ_PER_CPU
#include <asm/arch/irq.h>
extern __inline__ int irq_canonicalize(int irq)

查看文件

@@ -91,13 +91,6 @@
#define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size)))
#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
/* this function will go away soon - use access_ok() instead */
extern inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size)
{
return access_ok(type,addr,size) ? 0 : -EFAULT;
}
#include <asm/arch/uaccess.h>
/*

4
include/asm-frv/auxvec.h 一般檔案
查看文件

@@ -0,0 +1,4 @@
#ifndef __FRV_AUXVEC_H
#define __FRV_AUXVEC_H
#endif

查看文件

@@ -1,88 +1 @@
#ifndef _ASM_FCNTL_H
#define _ASM_FCNTL_H
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
#define O_CREAT 0100 /* not fcntl */
#define O_EXCL 0200 /* not fcntl */
#define O_NOCTTY 0400 /* not fcntl */
#define O_TRUNC 01000 /* not fcntl */
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
#define O_SYNC 010000
#define FASYNC 020000 /* fcntl, for BSD compatibility */
#define O_DIRECT 040000 /* direct disk access hint */
#define O_LARGEFILE 0100000
#define O_DIRECTORY 0200000 /* must be a directory */
#define O_NOFOLLOW 0400000 /* don't follow links */
#define O_NOATIME 01000000
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
#define F_SETFD 2 /* set/clear close_on_exec */
#define F_GETFL 3 /* get file->f_flags */
#define F_SETFL 4 /* set file->f_flags */
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
#define F_SETSIG 10 /* for sockets. */
#define F_GETSIG 11 /* for sockets. */
#define F_GETLK64 12 /* using 'struct flock64' */
#define F_SETLK64 13
#define F_SETLKW64 14
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
/* for leases */
#define F_INPROGRESS 16
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
#define LOCK_MAND 32 /* This is a mandatory flock */
#define LOCK_READ 64 /* ... Which allows concurrent read operations */
#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */
#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
struct flock64 {
short l_type;
short l_whence;
loff_t l_start;
loff_t l_len;
pid_t l_pid;
};
#define F_LINUX_SPECIFIC_BASE 1024
#endif /* _ASM_FCNTL_H */
#include <asm-generic/fcntl.h>

53
include/asm-frv/futex.h 一般檔案
查看文件

@@ -0,0 +1,53 @@
#ifndef _ASM_FUTEX_H
#define _ASM_FUTEX_H
#ifdef __KERNEL__
#include <linux/futex.h>
#include <asm/errno.h>
#include <asm/uaccess.h>
static inline int
futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
{
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
int oparg = (encoded_op << 8) >> 20;
int cmparg = (encoded_op << 20) >> 20;
int oldval = 0, ret, tem;
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
inc_preempt_count();
switch (op) {
case FUTEX_OP_SET:
case FUTEX_OP_ADD:
case FUTEX_OP_OR:
case FUTEX_OP_ANDN:
case FUTEX_OP_XOR:
default:
ret = -ENOSYS;
}
dec_preempt_count();
if (!ret) {
switch (cmp) {
case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
default: ret = -ENOSYS;
}
}
return ret;
}
#endif
#endif

查看文件

@@ -67,12 +67,6 @@ static inline int ___range_ok(unsigned long addr, unsigned long size)
#define access_ok(type,addr,size) (__range_ok((addr), (size)) == 0)
#define __access_ok(addr,size) (__range_ok((addr), (size)) == 0)
/* this function will go away soon - use access_ok() / __range_ok() instead */
static inline int __deprecated verify_area(int type, const void * addr, unsigned long size)
{
return __range_ok(addr, size);
}
/*
* The exception table consists of pairs of addresses: the first is the
* address of an instruction that is allowed to fault, and the second is

149
include/asm-generic/fcntl.h 一般檔案
查看文件

@@ -0,0 +1,149 @@
#ifndef _ASM_GENERIC_FCNTL_H
#define _ASM_GENERIC_FCNTL_H
#include <linux/config.h>
#include <linux/types.h>
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 00000003
#define O_RDONLY 00000000
#define O_WRONLY 00000001
#define O_RDWR 00000002
#ifndef O_CREAT
#define O_CREAT 00000100 /* not fcntl */
#endif
#ifndef O_EXCL
#define O_EXCL 00000200 /* not fcntl */
#endif
#ifndef O_NOCTTY
#define O_NOCTTY 00000400 /* not fcntl */
#endif
#ifndef O_TRUNC
#define O_TRUNC 00001000 /* not fcntl */
#endif
#ifndef O_APPEND
#define O_APPEND 00002000
#endif
#ifndef O_NONBLOCK
#define O_NONBLOCK 00004000
#endif
#ifndef O_SYNC
#define O_SYNC 00010000
#endif
#ifndef FASYNC
#define FASYNC 00020000 /* fcntl, for BSD compatibility */
#endif
#ifndef O_DIRECT
#define O_DIRECT 00040000 /* direct disk access hint */
#endif
#ifndef O_LARGEFILE
#define O_LARGEFILE 00100000
#endif
#ifndef O_DIRECTORY
#define O_DIRECTORY 00200000 /* must be a directory */
#endif
#ifndef O_NOFOLLOW
#define O_NOFOLLOW 00400000 /* don't follow links */
#endif
#ifndef O_NOATIME
#define O_NOATIME 01000000
#endif
#ifndef O_NDELAY
#define O_NDELAY O_NONBLOCK
#endif
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
#define F_SETFD 2 /* set/clear close_on_exec */
#define F_GETFL 3 /* get file->f_flags */
#define F_SETFL 4 /* set file->f_flags */
#ifndef F_GETLK
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#endif
#ifndef F_SETOWN
#define F_SETOWN 8 /* for sockets. */
#define F_GETOWN 9 /* for sockets. */
#endif
#ifndef F_SETSIG
#define F_SETSIG 10 /* for sockets. */
#define F_GETSIG 11 /* for sockets. */
#endif
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* for posix fcntl() and lockf() */
#ifndef F_RDLCK
#define F_RDLCK 0
#define F_WRLCK 1
#define F_UNLCK 2
#endif
/* for old implementation of bsd flock () */
#ifndef F_EXLCK
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
#endif
/* for leases */
#ifndef F_INPROGRESS
#define F_INPROGRESS 16
#endif
/* operations for bsd flock(), also used by the kernel implementation */
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
#define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
#define LOCK_UN 8 /* remove lock */
#define LOCK_MAND 32 /* This is a mandatory flock ... */
#define LOCK_READ 64 /* which allows concurrent read operations */
#define LOCK_WRITE 128 /* which allows concurrent write operations */
#define LOCK_RW 192 /* which allows concurrent read & write ops */
#define F_LINUX_SPECIFIC_BASE 1024
#ifndef HAVE_ARCH_STRUCT_FLOCK
#ifndef __ARCH_FLOCK_PAD
#define __ARCH_FLOCK_PAD
#endif
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
__ARCH_FLOCK_PAD
};
#endif
#ifndef CONFIG_64BIT
#ifndef F_GETLK64
#define F_GETLK64 12 /* using 'struct flock64' */
#define F_SETLK64 13
#define F_SETLKW64 14
#endif
#ifndef HAVE_ARCH_STRUCT_FLOCK64
#ifndef __ARCH_FLOCK64_PAD
#define __ARCH_FLOCK64_PAD
#endif
struct flock64 {
short l_type;
short l_whence;
loff_t l_start;
loff_t l_len;
pid_t l_pid;
__ARCH_FLOCK64_PAD
};
#endif
#endif /* !CONFIG_64BIT */
#endif /* _ASM_GENERIC_FCNTL_H */

查看文件

@@ -1,8 +0,0 @@
#warning <asm/hdreg.h> is obsolete, please do not use it
#ifndef __ASM_GENERIC_HDREG_H
#define __ASM_GENERIC_HDREG_H
typedef unsigned long ide_ioreg_t;
#endif /* __ASM_GENERIC_HDREG_H */

查看文件

@@ -12,5 +12,6 @@ extern char _sextratext[] __attribute__((weak));
extern char _eextratext[] __attribute__((weak));
extern char _end[];
extern char __per_cpu_start[], __per_cpu_end[];
extern char __kprobes_text_start[], __kprobes_text_end[];
#endif /* _ASM_GENERIC_SECTIONS_H_ */

查看文件

@@ -16,9 +16,9 @@
* The main single-value unaligned transfer routines.
*/
#define get_unaligned(ptr) \
((__typeof__(*(ptr)))__get_unaligned((ptr), sizeof(*(ptr))))
__get_unaligned((ptr), sizeof(*(ptr)))
#define put_unaligned(x,ptr) \
__put_unaligned((unsigned long)(x), (ptr), sizeof(*(ptr)))
__put_unaligned((__u64)(x), (ptr), sizeof(*(ptr)))
/*
* This function doesn't actually exist. The idea is that when
@@ -36,19 +36,19 @@ struct __una_u16 { __u16 x __attribute__((packed)); };
* Elemental unaligned loads
*/
static inline unsigned long __uldq(const __u64 *addr)
static inline __u64 __uldq(const __u64 *addr)
{
const struct __una_u64 *ptr = (const struct __una_u64 *) addr;
return ptr->x;
}
static inline unsigned long __uldl(const __u32 *addr)
static inline __u32 __uldl(const __u32 *addr)
{
const struct __una_u32 *ptr = (const struct __una_u32 *) addr;
return ptr->x;
}
static inline unsigned long __uldw(const __u16 *addr)
static inline __u16 __uldw(const __u16 *addr)
{
const struct __una_u16 *ptr = (const struct __una_u16 *) addr;
return ptr->x;
@@ -78,7 +78,7 @@ static inline void __ustw(__u16 val, __u16 *addr)
#define __get_unaligned(ptr, size) ({ \
const void *__gu_p = ptr; \
unsigned long val; \
__typeof__(*(ptr)) val; \
switch (size) { \
case 1: \
val = *(const __u8 *)__gu_p; \

查看文件

@@ -97,3 +97,9 @@
VMLINUX_SYMBOL(__lock_text_start) = .; \
*(.spinlock.text) \
VMLINUX_SYMBOL(__lock_text_end) = .;
#define KPROBES_TEXT \
ALIGN_FUNCTION(); \
VMLINUX_SYMBOL(__kprobes_text_start) = .; \
*(.kprobes.text) \
VMLINUX_SYMBOL(__kprobes_text_end) = .;

本差異變更的檔案數量過多導致部分檔案未顯示 顯示更多