summaryrefslogtreecommitdiff
path: root/drivers/acpi/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@penguin.transmeta.com>2002-07-26 01:39:38 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-07-26 01:39:38 -0700
commita8a4e4a9b2fa28ebf48ef9c34f461de95256a020 (patch)
tree10fec7baa36bd0ae83e599ef2897be7e325be593 /drivers/acpi/include
parent025f143cddaaf9827fca546eba574fea6e0f514a (diff)
parentd243f1a8e0dcb20c1728919dce5f6e8b3e4136dc (diff)
Merge bk://lsm.bkbits.net/linus-2.5
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'drivers/acpi/include')
-rw-r--r--drivers/acpi/include/acconfig.h13
-rw-r--r--drivers/acpi/include/acdebug.h48
-rw-r--r--drivers/acpi/include/acdisasm.h362
-rw-r--r--drivers/acpi/include/acglobal.h14
-rw-r--r--drivers/acpi/include/aclocal.h30
-rw-r--r--drivers/acpi/include/acmacros.h15
-rw-r--r--drivers/acpi/include/acnamesp.h4
-rw-r--r--drivers/acpi/include/acpiosxf.h8
-rw-r--r--drivers/acpi/include/acutils.h5
-rw-r--r--drivers/acpi/include/amlcode.h11
-rw-r--r--drivers/acpi/include/amlresrc.h37
-rw-r--r--drivers/acpi/include/platform/acenv.h17
12 files changed, 453 insertions, 111 deletions
diff --git a/drivers/acpi/include/acconfig.h b/drivers/acpi/include/acconfig.h
index 3987706d5ecf..bc88390e874c 100644
--- a/drivers/acpi/include/acconfig.h
+++ b/drivers/acpi/include/acconfig.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
- * $Revision: 105 $
+ * $Revision: 107 $
*
*****************************************************************************/
@@ -54,7 +54,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20020702
+#define ACPI_CA_VERSION 0x20020725
/* Version of ACPI supported */
@@ -152,6 +152,15 @@
#define ACPI_MAX_ADDRESS_SPACE 255
+/* Array sizes. Used for range checking also */
+
+#define NUM_ACCESS_TYPES 6
+#define NUM_UPDATE_RULES 3
+#define NUM_LOCK_RULES 2
+#define NUM_MATCH_OPS 6
+#define NUM_OPCODES 256
+#define NUM_FIELD_NAMES 2
+
/* RSDP checksums */
#define ACPI_RSDP_CHECKSUM_LENGTH 20
diff --git a/drivers/acpi/include/acdebug.h b/drivers/acpi/include/acdebug.h
index e76ad4b956fc..f32ebd8fe1bc 100644
--- a/drivers/acpi/include/acdebug.h
+++ b/drivers/acpi/include/acdebug.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
- * $Revision: 62 $
+ * $Revision: 63 $
*
*****************************************************************************/
@@ -29,7 +29,6 @@
#define ACPI_DEBUG_BUFFER_SIZE 4196
-
typedef struct command_info
{
NATIVE_CHAR *name; /* Command Name */
@@ -186,47 +185,6 @@ acpi_db_walk_for_specific_objects (
/*
- * dbdisasm - AML disassembler
- */
-
-void
-acpi_db_display_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *origin,
- u32 num_opcodes);
-
-void
-acpi_db_display_namestring (
- NATIVE_CHAR *name);
-
-void
-acpi_db_display_path (
- acpi_parse_object *op);
-
-void
-acpi_db_display_opcode (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
-
-void
-acpi_db_decode_internal_object (
- acpi_operand_object *obj_desc);
-
-void
-acpi_db_decode_node (
- acpi_namespace_node *node);
-
-u32
-acpi_db_block_type (
- acpi_parse_object *op);
-
-acpi_status
-acpi_ps_display_object_pathname (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
-
-
-/*
* dbdisply - debug display commands
*/
@@ -282,6 +240,10 @@ void *
acpi_db_get_pointer (
void *target);
+void
+acpi_db_decode_internal_object (
+ acpi_operand_object *obj_desc);
+
/*
* dbexec - debugger control method execution
diff --git a/drivers/acpi/include/acdisasm.h b/drivers/acpi/include/acdisasm.h
new file mode 100644
index 000000000000..6c126d07f728
--- /dev/null
+++ b/drivers/acpi/include/acdisasm.h
@@ -0,0 +1,362 @@
+/******************************************************************************
+ *
+ * Name: acdisasm.h - AML disassembler
+ * $Revision: 2 $
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2002, R. Byron Moore
+ *
+ * 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
+ */
+
+#ifndef __ACDISASM_H__
+#define __ACDISASM_H__
+
+#include "amlresrc.h"
+
+
+#define BLOCK_NONE 0
+#define BLOCK_PAREN 1
+#define BLOCK_BRACE 2
+#define BLOCK_COMMA_LIST 4
+
+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 NATIVE_CHAR *acpi_gbl_lock_rule[NUM_LOCK_RULES];
+extern const NATIVE_CHAR *acpi_gbl_access_types[NUM_ACCESS_TYPES];
+extern const NATIVE_CHAR *acpi_gbl_update_rules[NUM_UPDATE_RULES];
+extern const NATIVE_CHAR *acpi_gbl_match_ops[NUM_MATCH_OPS];
+
+
+typedef struct acpi_op_walk_info
+{
+ u32 level;
+ u32 bit_offset;
+
+} ACPI_OP_WALK_INFO;
+
+typedef
+acpi_status (*ASL_WALK_CALLBACK) (
+ acpi_parse_object *op,
+ u32 level,
+ void *context);
+
+
+/*
+ * dmwalk
+ */
+
+void
+acpi_dm_walk_parse_tree (
+ acpi_parse_object *op,
+ ASL_WALK_CALLBACK descending_callback,
+ ASL_WALK_CALLBACK ascending_callback,
+ void *context);
+
+acpi_status
+acpi_dm_descending_op (
+ acpi_parse_object *op,
+ u32 level,
+ void *context);
+
+acpi_status
+acpi_dm_ascending_op (
+ acpi_parse_object *op,
+ u32 level,
+ void *context);
+
+
+/*
+ * dmopcode
+ */
+
+void
+acpi_dm_validate_name (
+ char *name,
+ acpi_parse_object *op);
+
+u32
+acpi_dm_dump_name (
+ char *name);
+
+void
+acpi_dm_string (
+ char *string);
+
+void
+acpi_dm_unicode (
+ acpi_parse_object *op);
+
+void
+acpi_dm_disassemble (
+ acpi_walk_state *walk_state,
+ acpi_parse_object *origin,
+ u32 num_opcodes);
+
+void
+acpi_dm_namestring (
+ NATIVE_CHAR *name);
+
+void
+acpi_dm_display_path (
+ acpi_parse_object *op);
+
+void
+acpi_dm_disassemble_one_op (
+ acpi_walk_state *walk_state,
+ ACPI_OP_WALK_INFO *info,
+ acpi_parse_object *op);
+
+void
+acpi_dm_decode_internal_object (
+ acpi_operand_object *obj_desc);
+
+void
+acpi_dm_decode_node (
+ acpi_namespace_node *node);
+
+u32
+acpi_dm_block_type (
+ acpi_parse_object *op);
+
+u32
+acpi_dm_list_type (
+ acpi_parse_object *op);
+
+acpi_status
+acpi_ps_display_object_pathname (
+ acpi_walk_state *walk_state,
+ acpi_parse_object *op);
+
+void
+acpi_dm_method_flags (
+ acpi_parse_object *op);
+
+void
+acpi_dm_field_flags (
+ acpi_parse_object *op);
+
+void
+acpi_dm_address_space (
+ u8 space_id);
+
+void
+acpi_dm_region_flags (
+ acpi_parse_object *op);
+
+void
+acpi_dm_match_op (
+ acpi_parse_object *op);
+
+void
+acpi_dm_match_keyword (
+ acpi_parse_object *op);
+
+u8
+acpi_dm_comma_if_list_member (
+ acpi_parse_object *op);
+
+void
+acpi_dm_comma_if_field_member (
+ acpi_parse_object *op);
+
+
+/*
+ * dmbuffer
+ */
+
+void
+acpi_is_eisa_id (
+ acpi_parse_object *op);
+
+void
+acpi_dm_eisa_id (
+ u32 encoded_id);
+
+u8
+acpi_dm_is_unicode_buffer (
+ acpi_parse_object *op);
+
+u8
+acpi_dm_is_string_buffer (
+ acpi_parse_object *op);
+
+
+/*
+ * dmresrc
+ */
+
+void
+acpi_dm_disasm_byte_list (
+ u32 level,
+ u8 *byte_data,
+ u32 byte_count);
+
+void
+acpi_dm_byte_list (
+ ACPI_OP_WALK_INFO *info,
+ acpi_parse_object *op);
+
+void
+acpi_dm_resource_descriptor (
+ ACPI_OP_WALK_INFO *info,
+ u8 *byte_data,
+ u32 byte_count);
+
+u8
+acpi_dm_is_resource_descriptor (
+ acpi_parse_object *op);
+
+void
+acpi_dm_indent (
+ u32 level);
+
+void
+acpi_dm_bit_list (
+ u16 mask);
+
+
+/*
+ * dmresrcl
+ */
+
+void
+acpi_dm_io_flags (
+ u8 flags);
+
+void
+acpi_dm_memory_flags (
+ u8 flags,
+ u8 specific_flags);
+
+void
+acpi_dm_word_descriptor (
+ ASL_WORD_ADDRESS_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_dword_descriptor (
+ ASL_DWORD_ADDRESS_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_qword_descriptor (
+ ASL_QWORD_ADDRESS_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_memory24_descriptor (
+ ASL_MEMORY_24_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_memory32_descriptor (
+ ASL_MEMORY_32_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_fixed_mem32_descriptor (
+ ASL_FIXED_MEMORY_32_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_generic_register_descriptor (
+ ASL_GENERAL_REGISTER_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_interrupt_descriptor (
+ ASL_EXTENDED_XRUPT_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_vendor_large_descriptor (
+ ASL_LARGE_VENDOR_DESC *resource,
+ u32 length,
+ u32 level);
+
+
+/*
+ * dmresrcs
+ */
+
+void
+acpi_dm_irq_descriptor (
+ ASL_IRQ_FORMAT_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_dma_descriptor (
+ ASL_DMA_FORMAT_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_io_descriptor (
+ ASL_IO_PORT_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_fixed_io_descriptor (
+ ASL_FIXED_IO_PORT_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_start_dependent_descriptor (
+ ASL_START_DEPENDENT_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_end_dependent_descriptor (
+ ASL_START_DEPENDENT_DESC *resource,
+ u32 length,
+ u32 level);
+
+void
+acpi_dm_vendor_small_descriptor (
+ ASL_SMALL_VENDOR_DESC *resource,
+ u32 length,
+ u32 level);
+
+
+#endif /* __ACDISASM_H__ */
diff --git a/drivers/acpi/include/acglobal.h b/drivers/acpi/include/acglobal.h
index 1d10c1b4203a..28e9d46ae359 100644
--- a/drivers/acpi/include/acglobal.h
+++ b/drivers/acpi/include/acglobal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
- * $Revision: 126 $
+ * $Revision: 128 $
*
*****************************************************************************/
@@ -140,8 +140,9 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_present;
extern u8 acpi_gbl_shutdown;
extern u32 acpi_gbl_startup_flags;
extern const u8 acpi_gbl_decode_to8bit[8];
-extern const NATIVE_CHAR *acpi_gbl_db_sleep_states[ACPI_NUM_SLEEP_STATES];
+extern const NATIVE_CHAR *acpi_gbl_db_sleep_states[ACPI_NUM_SLEEP_STATES];
extern const acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
+extern const NATIVE_CHAR *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
/*****************************************************************************
@@ -237,6 +238,12 @@ ACPI_EXTERN ACPI_GPE_INDEX_INFO *acpi_gbl_gpe_number_to_index;
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;
+#endif
+
#ifdef ENABLE_DEBUGGER
@@ -247,9 +254,7 @@ ACPI_EXTERN int optind;
ACPI_EXTERN NATIVE_CHAR *optarg;
ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
-ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
-ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
@@ -261,7 +266,6 @@ ACPI_EXTERN NATIVE_CHAR acpi_gbl_db_debug_filename[40];
ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
ACPI_EXTERN NATIVE_CHAR *acpi_gbl_db_buffer;
ACPI_EXTERN NATIVE_CHAR *acpi_gbl_db_filename;
-ACPI_EXTERN NATIVE_CHAR *acpi_gbl_db_disasm_indent;
ACPI_EXTERN u32 acpi_gbl_db_debug_level;
ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
ACPI_EXTERN acpi_table_header *acpi_gbl_db_table_ptr;
diff --git a/drivers/acpi/include/aclocal.h b/drivers/acpi/include/aclocal.h
index 54eb05fc66c8..f9d6e2f1f031 100644
--- a/drivers/acpi/include/aclocal.h
+++ b/drivers/acpi/include/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 168 $
+ * $Revision: 173 $
*
*****************************************************************************/
@@ -567,8 +567,8 @@ acpi_status (*ACPI_EXECUTE_OP) (
*/
typedef struct acpi_opcode_info
{
-#ifdef _OPCODE_NAMES
- NATIVE_CHAR *name; /* Opcode name (debug only) */
+#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG)
+ NATIVE_CHAR *name; /* Opcode name (disassembler/debug only) */
#endif
u32 parse_args; /* Grammar/Parse time arguments */
u32 runtime_args; /* Interpret time arguments */
@@ -603,15 +603,23 @@ typedef union acpi_parse_val
u32 aml_offset; /* offset of declaration in AML */\
union acpi_parse_obj *parent; /* parent op */\
union acpi_parse_obj *next; /* next op */\
- ACPI_DEBUG_ONLY_MEMBERS (\
+ ACPI_DISASM_ONLY_MEMBERS (\
+ u8 disasm_flags; /* Used during AML disassembly */\
+ u8 disasm_opcode; /* Subtype used for disassembly */\
NATIVE_CHAR aml_op_name[16]) /* op name (debug only) */\
/* NON-DEBUG members below: */\
acpi_namespace_node *node; /* for use by interpreter */\
acpi_parse_value value; /* Value or args associated with the opcode */\
+#define ACPI_DASM_BUFFER 0x00
+#define ACPI_DASM_RESOURCE 0x01
+#define ACPI_DASM_STRING 0x02
+#define ACPI_DASM_UNICODE 0x03
+#define ACPI_DASM_EISAID 0x04
+#define ACPI_DASM_MATCHOP 0x05
/*
- * generic operation (eg. If, While, Store)
+ * generic operation (for example: If, While, Store)
*/
typedef struct acpi_parseobj_common
{
@@ -626,6 +634,7 @@ typedef struct acpi_parseobj_common
typedef struct acpi_parseobj_named
{
ACPI_PARSE_COMMON
+ u8 *path;
u8 *data; /* AML body or bytelist data */
u32 length; /* AML length */
u32 name; /* 4-byte name or zero if no name */
@@ -653,15 +662,15 @@ typedef struct acpi_parseobj_asl
u32 logical_byte_offset;
u32 end_line;
u32 end_logical_line;
- u16 parse_opcode;
u32 acpi_btype;
u32 aml_length;
u32 aml_subtree_length;
u32 final_aml_length;
u32 final_aml_offset;
+ u16 parse_opcode;
+ u16 compile_flags;
u8 aml_opcode_length;
u8 aml_pkg_len_bytes;
- u16 compile_flags;
u8 extra;
char parse_op_name[12];
@@ -705,6 +714,13 @@ typedef struct acpi_parse_state
#define ACPI_PARSEOP_BYTELIST 0x08
#define ACPI_PARSEOP_IN_CACHE 0x80
+/* Parse object Disasm_flags */
+
+#define ACPI_PARSEOP_IGNORE 0x01
+#define ACPI_PARSEOP_PARAMLIST 0x02
+#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
+#define ACPI_PARSEOP_SPECIAL 0x10
+
/*****************************************************************************
*
diff --git a/drivers/acpi/include/acmacros.h b/drivers/acpi/include/acmacros.h
index f48ac95210bf..57452f9b6cbf 100644
--- a/drivers/acpi/include/acmacros.h
+++ b/drivers/acpi/include/acmacros.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
- * $Revision: 124 $
+ * $Revision: 126 $
*
*****************************************************************************/
@@ -287,12 +287,18 @@
/*
* Macros for the master AML opcode table
*/
-#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
+#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG)
#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {name,Pargs,Iargs,flags,obj_type,class,type}
#else
#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags) {Pargs,Iargs,flags,obj_type,class,type}
#endif
+#ifdef ACPI_DISASSEMBLER
+#define ACPI_DISASM_ONLY_MEMBERS(a) a;
+#else
+#define ACPI_DISASM_ONLY_MEMBERS(a)
+#endif
+
#define ARG_TYPE_WIDTH 5
#define ARG_1(x) ((u32)(x))
#define ARG_2(x) ((u32)(x) << (1 * ARG_TYPE_WIDTH))
@@ -435,7 +441,6 @@
#define ACPI_DEBUG_DEFINE(a) a;
#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
-#define _OPCODE_NAMES
#define _VERBOSE_STRUCTURES
@@ -515,10 +520,6 @@
#define return_VALUE(s) return(s)
#define return_PTR(s) return(s)
-#ifdef ENABLE_DEBUGGER
-#define _OPCODE_NAMES
-#endif
-
#endif
/*
diff --git a/drivers/acpi/include/acnamesp.h b/drivers/acpi/include/acnamesp.h
index c5a90435c3f7..49c5223e1f27 100644
--- a/drivers/acpi/include/acnamesp.h
+++ b/drivers/acpi/include/acnamesp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
- * $Revision: 125 $
+ * $Revision: 126 $
*
*****************************************************************************/
@@ -43,7 +43,7 @@
/* Definitions of the predefined namespace names */
#define ACPI_UNKNOWN_NAME (u32) 0x3F3F3F3F /* Unknown name is "????" */
-#define ACPI_ROOT_NAME (u32) 0x2F202020 /* Root 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_NS_ROOT_PATH "\\"
diff --git a/drivers/acpi/include/acpiosxf.h b/drivers/acpi/include/acpiosxf.h
index 56d4037f8b46..b6cac89b91b9 100644
--- a/drivers/acpi/include/acpiosxf.h
+++ b/drivers/acpi/include/acpiosxf.h
@@ -204,7 +204,6 @@ acpi_os_read_port (
void *value,
u32 width);
-
acpi_status
acpi_os_write_port (
ACPI_IO_ADDRESS address,
@@ -222,7 +221,6 @@ acpi_os_read_memory (
void *value,
u32 width);
-
acpi_status
acpi_os_write_memory (
ACPI_PHYSICAL_ADDRESS address,
@@ -241,7 +239,6 @@ acpi_os_read_pci_configuration (
void *value,
u32 width);
-
acpi_status
acpi_os_write_pci_configuration (
acpi_pci_id *pci_id,
@@ -259,7 +256,6 @@ acpi_os_readable (
void *pointer,
u32 length);
-
u8
acpi_os_writable (
void *pointer,
@@ -288,6 +284,10 @@ acpi_os_vprintf (
const NATIVE_CHAR *format,
va_list args);
+void
+acpi_os_redirect_output (
+ void *destination);
+
/*
* Debug input
diff --git a/drivers/acpi/include/acutils.h b/drivers/acpi/include/acutils.h
index 46ea89bafd70..3af0afac24b5 100644
--- a/drivers/acpi/include/acutils.h
+++ b/drivers/acpi/include/acutils.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- * $Revision: 140 $
+ * $Revision: 142 $
*
*****************************************************************************/
@@ -224,6 +224,9 @@ extern const u8 _acpi_ctype[];
#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
+#define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
+#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 */
diff --git a/drivers/acpi/include/amlcode.h b/drivers/acpi/include/amlcode.h
index ddcffdf80897..b5802baca761 100644
--- a/drivers/acpi/include/amlcode.h
+++ b/drivers/acpi/include/amlcode.h
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
- * $Revision: 68 $
+ * $Revision: 69 $
*
*****************************************************************************/
@@ -474,13 +474,4 @@ typedef enum
#define METHOD_FLAGS_SYNCH_LEVEL 0xF0
-/* Array sizes. Used for range checking also */
-
-#define NUM_ACCESS_TYPES 6
-#define NUM_UPDATE_RULES 3
-#define NUM_MATCH_OPS 7
-#define NUM_OPCODES 256
-#define NUM_FIELD_NAMES 2
-
-
#endif /* __AMLCODE_H__ */
diff --git a/drivers/acpi/include/amlresrc.h b/drivers/acpi/include/amlresrc.h
index d8aa2befb2c1..a97dbf2f59e4 100644
--- a/drivers/acpi/include/amlresrc.h
+++ b/drivers/acpi/include/amlresrc.h
@@ -1,8 +1,8 @@
/******************************************************************************
*
- * Module Name: aslresource.h - ASL resource descriptors
- * $Revision: 19 $
+ * Module Name: amlresrc.h - AML resource descriptors
+ * $Revision: 20 $
*
*****************************************************************************/
@@ -25,8 +25,8 @@
*/
-#ifndef __ASLRESOURCE_H
-#define __ASLRESOURCE_H
+#ifndef __AMLRESRC_H
+#define __AMLRESRC_H
#define ASL_RESNAME_ADDRESS "_ADR"
@@ -80,11 +80,13 @@ typedef struct asl_resource_node
/*
- * Resource descriptors defined in the ACPI specification
+ * Resource descriptors defined in the ACPI specification.
+ *
+ * Alignment must be BYTE because these descriptors
+ * are used to overlay the AML byte stream.
*/
-
-
#pragma pack(1)
+
typedef struct asl_irq_format_desc
{
u8 descriptor_type;
@@ -94,7 +96,6 @@ typedef struct asl_irq_format_desc
} ASL_IRQ_FORMAT_DESC;
-#pragma pack(1)
typedef struct asl_irq_noflags_desc
{
u8 descriptor_type;
@@ -103,7 +104,6 @@ typedef struct asl_irq_noflags_desc
} ASL_IRQ_NOFLAGS_DESC;
-#pragma pack(1)
typedef struct asl_dma_format_desc
{
u8 descriptor_type;
@@ -113,7 +113,6 @@ typedef struct asl_dma_format_desc
} ASL_DMA_FORMAT_DESC;
-#pragma pack(1)
typedef struct asl_start_dependent_desc
{
u8 descriptor_type;
@@ -122,7 +121,6 @@ typedef struct asl_start_dependent_desc
} ASL_START_DEPENDENT_DESC;
-#pragma pack(1)
typedef struct asl_start_dependent_noprio_desc
{
u8 descriptor_type;
@@ -130,7 +128,6 @@ typedef struct asl_start_dependent_noprio_desc
} ASL_START_DEPENDENT_NOPRIO_DESC;
-#pragma pack(1)
typedef struct asl_end_dependent_desc
{
u8 descriptor_type;
@@ -138,7 +135,6 @@ typedef struct asl_end_dependent_desc
} ASL_END_DEPENDENT_DESC;
-#pragma pack(1)
typedef struct asl_io_port_desc
{
u8 descriptor_type;
@@ -151,7 +147,6 @@ typedef struct asl_io_port_desc
} ASL_IO_PORT_DESC;
-#pragma pack(1)
typedef struct asl_fixed_io_port_desc
{
u8 descriptor_type;
@@ -161,7 +156,6 @@ typedef struct asl_fixed_io_port_desc
} ASL_FIXED_IO_PORT_DESC;
-#pragma pack(1)
typedef struct asl_small_vendor_desc
{
u8 descriptor_type;
@@ -170,7 +164,6 @@ typedef struct asl_small_vendor_desc
} ASL_SMALL_VENDOR_DESC;
-#pragma pack(1)
typedef struct asl_end_tag_desc
{
u8 descriptor_type;
@@ -181,7 +174,6 @@ typedef struct asl_end_tag_desc
/* LARGE descriptors */
-#pragma pack(1)
typedef struct asl_memory_24_desc
{
u8 descriptor_type;
@@ -195,7 +187,6 @@ typedef struct asl_memory_24_desc
} ASL_MEMORY_24_DESC;
-#pragma pack(1)
typedef struct asl_large_vendor_desc
{
u8 descriptor_type;
@@ -205,7 +196,6 @@ typedef struct asl_large_vendor_desc
} ASL_LARGE_VENDOR_DESC;
-#pragma pack(1)
typedef struct asl_memory_32_desc
{
u8 descriptor_type;
@@ -219,7 +209,6 @@ typedef struct asl_memory_32_desc
} ASL_MEMORY_32_DESC;
-#pragma pack(1)
typedef struct asl_fixed_memory_32_desc
{
u8 descriptor_type;
@@ -231,7 +220,6 @@ typedef struct asl_fixed_memory_32_desc
} ASL_FIXED_MEMORY_32_DESC;
-#pragma pack(1)
typedef struct asl_qword_address_desc
{
u8 descriptor_type;
@@ -249,7 +237,6 @@ typedef struct asl_qword_address_desc
} ASL_QWORD_ADDRESS_DESC;
-#pragma pack(1)
typedef struct asl_dword_address_desc
{
u8 descriptor_type;
@@ -267,7 +254,6 @@ typedef struct asl_dword_address_desc
} ASL_DWORD_ADDRESS_DESC;
-#pragma pack(1)
typedef struct asl_word_address_desc
{
u8 descriptor_type;
@@ -285,7 +271,6 @@ typedef struct asl_word_address_desc
} ASL_WORD_ADDRESS_DESC;
-#pragma pack(1)
typedef struct asl_extended_xrupt_desc
{
u8 descriptor_type;
@@ -298,7 +283,6 @@ typedef struct asl_extended_xrupt_desc
} ASL_EXTENDED_XRUPT_DESC;
-#pragma pack(1)
typedef struct asl_general_register_desc
{
u8 descriptor_type;
@@ -311,6 +295,9 @@ typedef struct asl_general_register_desc
} ASL_GENERAL_REGISTER_DESC;
+/* restore default alignment */
+
+#pragma pack()
/* Union of all resource descriptors, sow we can allocate the worst case */
diff --git a/drivers/acpi/include/platform/acenv.h b/drivers/acpi/include/platform/acenv.h
index 1cb3f2939509..47f8f1cb2d3e 100644
--- a/drivers/acpi/include/platform/acenv.h
+++ b/drivers/acpi/include/platform/acenv.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acenv.h - Generation environment specific items
- * $Revision: 95 $
+ * $Revision: 99 $
*
*****************************************************************************/
@@ -32,11 +32,13 @@
*/
#ifdef _ACPI_DUMP_APP
+#ifndef MSDOS
#define ACPI_DEBUG
+#endif
#define ACPI_APPLICATION
-#define ENABLE_DEBUGGER
+#define ACPI_DISASSEMBLER
+#define ACPI_NO_METHOD_EXECUTION
#define ACPI_USE_SYSTEM_CLIBRARY
-#define PARSER_ONLY
#endif
#ifdef _ACPI_EXEC_APP
@@ -45,13 +47,15 @@
#define ACPI_DEBUG
#define ACPI_APPLICATION
#define ENABLE_DEBUGGER
+#define ACPI_DISASSEMBLER
#define ACPI_USE_SYSTEM_CLIBRARY
#endif
#ifdef _ACPI_ASL_COMPILER
#define ACPI_DEBUG
#define ACPI_APPLICATION
-/* #define ENABLE_DEBUGGER */
+#define ACPI_DISASSEMBLER
+#define ACPI_CONSTANT_EVAL_ONLY
#define ACPI_USE_SYSTEM_CLIBRARY
#endif
@@ -183,7 +187,6 @@
/*
* Use the standard C library headers.
* We want to keep these to a minimum.
- *
*/
#ifdef ACPI_USE_STANDARD_HEADERS
@@ -213,12 +216,16 @@
#define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (ACPI_SIZE)(n))
#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
/******************************************************************************
*