Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Removed acpi include directories
Trammell Hudson [Wed, 22 Oct 2008 14:18:41 +0000 (09:18 -0500)]
41 files changed:
kitten/include/acpi/acconfig.h [deleted file]
kitten/include/acpi/acdebug.h [deleted file]
kitten/include/acpi/acdisasm.h [deleted file]
kitten/include/acpi/acdispat.h [deleted file]
kitten/include/acpi/acevents.h [deleted file]
kitten/include/acpi/acexcep.h [deleted file]
kitten/include/acpi/acglobal.h [deleted file]
kitten/include/acpi/achware.h [deleted file]
kitten/include/acpi/acinterp.h [deleted file]
kitten/include/acpi/aclocal.h [deleted file]
kitten/include/acpi/acmacros.h [deleted file]
kitten/include/acpi/acnames.h [deleted file]
kitten/include/acpi/acnamesp.h [deleted file]
kitten/include/acpi/acobject.h [deleted file]
kitten/include/acpi/acopcode.h [deleted file]
kitten/include/acpi/acoutput.h [deleted file]
kitten/include/acpi/acparser.h [deleted file]
kitten/include/acpi/acpi.h [deleted file]
kitten/include/acpi/acpi_bus.h [deleted file]
kitten/include/acpi/acpi_drivers.h [deleted file]
kitten/include/acpi/acpi_numa.h [deleted file]
kitten/include/acpi/acpiosxf.h [deleted file]
kitten/include/acpi/acpixf.h [deleted file]
kitten/include/acpi/acresrc.h [deleted file]
kitten/include/acpi/acstruct.h [deleted file]
kitten/include/acpi/actables.h [deleted file]
kitten/include/acpi/actbl.h [deleted file]
kitten/include/acpi/actbl1.h [deleted file]
kitten/include/acpi/actbl2.h [deleted file]
kitten/include/acpi/actbl71.h [deleted file]
kitten/include/acpi/actypes.h [deleted file]
kitten/include/acpi/acutils.h [deleted file]
kitten/include/acpi/amlcode.h [deleted file]
kitten/include/acpi/amlresrc.h [deleted file]
kitten/include/acpi/container.h [deleted file]
kitten/include/acpi/pdc_intel.h [deleted file]
kitten/include/acpi/platform/acenv.h [deleted file]
kitten/include/acpi/platform/acgcc.h [deleted file]
kitten/include/acpi/platform/aclinux.h [deleted file]
kitten/include/acpi/processor.h [deleted file]
kitten/include/arch-x86_64/acpi.h [deleted file]

diff --git a/kitten/include/acpi/acconfig.h b/kitten/include/acpi/acconfig.h
deleted file mode 100644 (file)
index 9e6c23c..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/******************************************************************************
- *
- * Name: acconfig.h - Global configuration constants
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef _ACCONFIG_H
-#define _ACCONFIG_H
-
-/******************************************************************************
- *
- * Configuration options
- *
- *****************************************************************************/
-
-/*
- * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
- *                        ACPI subsystem.  This includes the DEBUG_PRINT output
- *                        statements.  When disabled, all DEBUG_PRINT
- *                        statements are compiled out.
- *
- * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
- *                        at the application level.
- *
- */
-
-/* Current ACPICA subsystem version in YYYYMMDD format */
-
-#define ACPI_CA_VERSION                 0x20060707
-
-/*
- * OS name, used for the _OS object.  The _OS object is essentially obsolete,
- * but there is a large base of ASL/AML code in existing machines that check
- * for the string below.  The use of this string usually guarantees that
- * the ASL will execute down the most tested code path.  Also, there is some
- * code that will not execute the _OSI method unless _OS matches the string
- * below.  Therefore, change this string at your own risk.
- */
-#define ACPI_OS_NAME                    "Microsoft Windows NT"
-
-/* Maximum objects in the various object caches */
-
-#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 */
-#define ACPI_MAX_NAMESPACE_CACHE_DEPTH  96     /* Namespace objects */
-
-/*
- * Should the subsystem abort the loading of an ACPI table if the
- * table checksum is incorrect?
- */
-#define ACPI_CHECKSUM_ABORT             FALSE
-
-/******************************************************************************
- *
- * Subsystem Constants
- *
- *****************************************************************************/
-
-/* Version of ACPI supported */
-
-#define ACPI_CA_SUPPORT_LEVEL           3
-
-/* Maximum count for a semaphore object */
-
-#define ACPI_MAX_SEMAPHORE_COUNT        256
-
-/* Maximum object reference count (detects object deletion issues) */
-
-#define ACPI_MAX_REFERENCE_COUNT        0x800
-
-/* Size of cached memory mapping for system memory operation region */
-
-#define ACPI_SYSMEM_REGION_WINDOW_SIZE  4096
-
-/* owner_id tracking. 8 entries allows for 255 owner_ids */
-
-#define ACPI_NUM_OWNERID_MASKS          8
-
-/******************************************************************************
- *
- * ACPI Specification constants (Do not change unless the specification changes)
- *
- *****************************************************************************/
-
-/* Number of distinct GPE register blocks and register width */
-
-#define ACPI_MAX_GPE_BLOCKS             2
-#define ACPI_GPE_REGISTER_WIDTH         8
-
-/* Method info (in WALK_STATE), containing local variables and argumetns */
-
-#define ACPI_METHOD_NUM_LOCALS          8
-#define ACPI_METHOD_MAX_LOCAL           7
-
-#define ACPI_METHOD_NUM_ARGS            7
-#define ACPI_METHOD_MAX_ARG             6
-
-/* Length of _HID, _UID, _CID, and UUID values */
-
-#define ACPI_DEVICE_ID_LENGTH           0x09
-#define ACPI_MAX_CID_LENGTH             48
-#define ACPI_UUID_LENGTH                16
-
-/*
- * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
- */
-#define ACPI_OBJ_NUM_OPERANDS           8
-#define ACPI_OBJ_MAX_OPERAND            7
-
-/* 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_SEPARATOR             '.'
-
-/* Constants used in searching for the RSDP in low memory */
-
-#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_SIZE        0x00020000
-#define ACPI_RSDP_SCAN_STEP             16
-
-/* Operation regions */
-
-#define ACPI_NUM_PREDEFINED_REGIONS     8
-#define ACPI_USER_REGION_BEGIN          0x80
-
-/* Maximum space_ids for Operation Regions */
-
-#define ACPI_MAX_ADDRESS_SPACE          255
-
-/* Array sizes.  Used for range checking also */
-
-#define ACPI_MAX_MATCH_OPCODE           5
-
-/* RSDP checksums */
-
-#define ACPI_RSDP_CHECKSUM_LENGTH       20
-#define ACPI_RSDP_XCHECKSUM_LENGTH      36
-
-/* SMBus bidirectional buffer size */
-
-#define ACPI_SMBUS_BUFFER_SIZE          34
-
-/******************************************************************************
- *
- * ACPI AML Debugger
- *
- *****************************************************************************/
-
-#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 */
diff --git a/kitten/include/acpi/acdebug.h b/kitten/include/acpi/acdebug.h
deleted file mode 100644 (file)
index d816709..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-/******************************************************************************
- *
- * Name: acdebug.h - ACPI/AML debugger
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#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 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) {\
-                         acpi_os_printf PARAM_LIST(fp);}
-
-#define EX_NO_SINGLE_STEP               1
-#define EX_SINGLE_STEP                  2
-
-/*
- * dbxface - external debugger interfaces
- */
-acpi_status acpi_db_initialize(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);
-
-/*
- * dbcmds - debug commands and output routines
- */
-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_set_method_breakpoint(char *location,
-                             struct acpi_walk_state *walk_state,
-                             union acpi_parse_object *op);
-
-void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op);
-
-void acpi_db_get_bus_info(void);
-
-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_by_owner(char *owner_arg, char *depth_arg);
-
-void acpi_db_send_notify(char *name, u32 value);
-
-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_status acpi_db_find_name_in_namespace(char *name_arg);
-
-void acpi_db_set_scope(char *name);
-
-acpi_status acpi_db_sleep(char *object_arg);
-
-void acpi_db_find_references(char *object_arg);
-
-void acpi_db_display_locks(void);
-
-void acpi_db_display_resources(char *object_arg);
-
-void acpi_db_display_gpes(void);
-
-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_decode_and_display_object(char *target, char *output_type);
-
-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);
-
-/*
- * dbexec - debugger control method execution
- */
-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);
-
-/*
- * dbfileio - Debugger file I/O commands
- */
-acpi_object_type
-acpi_db_match_argument(char *user_argument, struct argument_info *arguments);
-
-void acpi_db_close_debug_file(void);
-
-void acpi_db_open_debug_file(char *name);
-
-acpi_status acpi_db_load_acpi_table(char *filename);
-
-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);
-
-/*
- * dbhistry - debugger HISTORY command
- */
-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);
-
-/*
- * 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);
-
-/*
- * 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);
-
-/*
- * dbutils - AML debugger utilities
- */
-void acpi_db_set_output_destination(u32 where);
-
-void acpi_db_dump_external_object(union acpi_object *obj_desc, u32 level);
-
-void acpi_db_prep_namestring(char *name);
-
-struct acpi_namespace_node *acpi_db_local_ns_lookup(char *name);
-
-#endif                         /* __ACDEBUG_H__ */
diff --git a/kitten/include/acpi/acdisasm.h b/kitten/include/acpi/acdisasm.h
deleted file mode 100644 (file)
index 9a7d692..0000000
+++ /dev/null
@@ -1,410 +0,0 @@
-/******************************************************************************
- *
- * Name: acdisasm.h - AML disassembler
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#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
-#define ACPI_DEFAULT_RESNAME    *(u32 *) "__RD"
-
-struct acpi_external_list {
-       char *path;
-       char *internal_path;
-       struct acpi_external_list *next;
-       u32 value;
-       u16 length;
-       u8 type;
-};
-
-extern struct acpi_external_list *acpi_gbl_external_list;
-
-typedef const struct acpi_dmtable_info {
-       u8 opcode;
-       u8 offset;
-       char *name;
-
-} acpi_dmtable_info;
-
-/*
- * Values for Opcode above.
- * Note: 0-7 must not change, used as a flag shift value
- */
-#define ACPI_DMT_FLAG0                  0
-#define ACPI_DMT_FLAG1                  1
-#define ACPI_DMT_FLAG2                  2
-#define ACPI_DMT_FLAG3                  3
-#define ACPI_DMT_FLAG4                  4
-#define ACPI_DMT_FLAG5                  5
-#define ACPI_DMT_FLAG6                  6
-#define ACPI_DMT_FLAG7                  7
-#define ACPI_DMT_FLAGS0                 8
-#define ACPI_DMT_FLAGS2                 9
-#define ACPI_DMT_UINT8                  10
-#define ACPI_DMT_UINT16                 11
-#define ACPI_DMT_UINT24                 12
-#define ACPI_DMT_UINT32                 13
-#define ACPI_DMT_UINT56                 14
-#define ACPI_DMT_UINT64                 15
-#define ACPI_DMT_STRING                 16
-#define ACPI_DMT_NAME4                  17
-#define ACPI_DMT_NAME6                  18
-#define ACPI_DMT_NAME8                  19
-#define ACPI_DMT_CHKSUM                 20
-#define ACPI_DMT_SPACEID                21
-#define ACPI_DMT_GAS                    22
-#define ACPI_DMT_MADT                   23
-#define ACPI_DMT_SRAT                   24
-#define ACPI_DMT_EXIT                   25
-
-typedef
-void (*ACPI_TABLE_HANDLER) (struct acpi_table_header * table);
-
-struct acpi_dmtable_data {
-       char *signature;
-       struct acpi_dmtable_info *table_info;
-       ACPI_TABLE_HANDLER table_handler;
-};
-
-struct acpi_op_walk_info {
-       u32 level;
-       u32 last_level;
-       u32 count;
-       u32 bit_offset;
-       u32 flags;
-       struct acpi_walk_state *walk_state;
-};
-
-typedef
-acpi_status(*asl_walk_callback) (union acpi_parse_object * op,
-                                u32 level, void *context);
-
-struct acpi_resource_tag {
-       u32 bit_index;
-       char *tag;
-};
-
-/* Strings used for decoding flags to ASL keywords */
-
-extern const char *acpi_gbl_word_decode[];
-extern const char *acpi_gbl_irq_decode[];
-extern const char *acpi_gbl_lock_rule[];
-extern const char *acpi_gbl_access_types[];
-extern const char *acpi_gbl_update_rules[];
-extern const char *acpi_gbl_match_ops[];
-
-extern struct acpi_dmtable_info acpi_dm_table_info_asf0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf3[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf4[];
-extern struct acpi_dmtable_info acpi_dm_table_info_asf_hdr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_boot[];
-extern struct acpi_dmtable_info acpi_dm_table_info_cpep[];
-extern struct acpi_dmtable_info acpi_dm_table_info_cpep0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_dbgp[];
-extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[];
-extern struct acpi_dmtable_info acpi_dm_table_info_facs[];
-extern struct acpi_dmtable_info acpi_dm_table_info_fadt1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_fadt2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_gas[];
-extern struct acpi_dmtable_info acpi_dm_table_info_header[];
-extern struct acpi_dmtable_info acpi_dm_table_info_hpet[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt3[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt4[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt5[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt6[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt7[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt8[];
-extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[];
-extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_rsdp1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_rsdp2[];
-extern struct acpi_dmtable_info acpi_dm_table_info_sbst[];
-extern struct acpi_dmtable_info acpi_dm_table_info_slit[];
-extern struct acpi_dmtable_info acpi_dm_table_info_spcr[];
-extern struct acpi_dmtable_info acpi_dm_table_info_spmi[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat0[];
-extern struct acpi_dmtable_info acpi_dm_table_info_srat1[];
-extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[];
-extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[];
-
-/*
- * dmtable
- */
-void acpi_dm_dump_data_table(struct acpi_table_header *table);
-
-void
-acpi_dm_dump_table(u32 table_length,
-                  u32 table_offset,
-                  void *table,
-                  u32 sub_table_length, struct acpi_dmtable_info *info);
-
-void acpi_dm_line_header(u32 offset, u32 byte_length, char *name);
-
-void acpi_dm_line_header2(u32 offset, u32 byte_length, char *name, u32 value);
-
-/*
- * dmtbdump
- */
-void acpi_dm_dump_asf(struct acpi_table_header *table);
-
-void acpi_dm_dump_cpep(struct acpi_table_header *table);
-
-void acpi_dm_dump_fadt(struct acpi_table_header *table);
-
-void acpi_dm_dump_srat(struct acpi_table_header *table);
-
-void acpi_dm_dump_mcfg(struct acpi_table_header *table);
-
-void acpi_dm_dump_madt(struct acpi_table_header *table);
-
-u32 acpi_dm_dump_rsdp(struct acpi_table_header *table);
-
-void acpi_dm_dump_rsdt(struct acpi_table_header *table);
-
-void acpi_dm_dump_slit(struct acpi_table_header *table);
-
-void acpi_dm_dump_xsdt(struct acpi_table_header *table);
-
-/*
- * dmwalk
- */
-void
-acpi_dm_disassemble(struct acpi_walk_state *walk_state,
-                   union acpi_parse_object *origin, u32 num_opcodes);
-
-void
-acpi_dm_walk_parse_tree(union acpi_parse_object *op,
-                       asl_walk_callback descending_callback,
-                       asl_walk_callback ascending_callback, void *context);
-
-/*
- * dmopcode
- */
-void
-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);
-
-u32 acpi_dm_list_type(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_address_space(u8 space_id);
-
-void acpi_dm_region_flags(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);
-
-/*
- * dmnames
- */
-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);
-
-/*
- * dmobject
- */
-void
-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_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_byte_list(struct acpi_op_walk_info *info, union acpi_parse_object *op);
-
-void acpi_dm_is_eisa_id(union acpi_parse_object *op);
-
-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);
-
-/*
- * dmresrc
- */
-void acpi_dm_dump_integer8(u8 value, char *name);
-
-void acpi_dm_dump_integer16(u16 value, char *name);
-
-void acpi_dm_dump_integer32(u32 value, char *name);
-
-void acpi_dm_dump_integer64(u64 value, char *name);
-
-void
-acpi_dm_resource_template(struct acpi_op_walk_info *info,
-                         union acpi_parse_object *op,
-                         u8 * byte_data, u32 byte_count);
-
-u8 acpi_dm_is_resource_template(union acpi_parse_object *op);
-
-void acpi_dm_indent(u32 level);
-
-void acpi_dm_bit_list(u16 mask);
-
-void acpi_dm_decode_attribute(u8 attribute);
-
-void acpi_dm_descriptor_name(void);
-
-/*
- * dmresrcl
- */
-void
-acpi_dm_word_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_dword_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_extended_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_qword_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_memory24_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_memory32_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_fixed_memory32_descriptor(union aml_resource *resource,
-                                 u32 length, u32 level);
-
-void
-acpi_dm_generic_register_descriptor(union aml_resource *resource,
-                                   u32 length, u32 level);
-
-void
-acpi_dm_interrupt_descriptor(union aml_resource *resource,
-                            u32 length, u32 level);
-
-void
-acpi_dm_vendor_large_descriptor(union aml_resource *resource,
-                               u32 length, u32 level);
-
-void acpi_dm_vendor_common(char *name, u8 * byte_data, u32 length, u32 level);
-
-/*
- * dmresrcs
- */
-void
-acpi_dm_irq_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_dma_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void acpi_dm_io_descriptor(union aml_resource *resource, u32 length, u32 level);
-
-void
-acpi_dm_fixed_io_descriptor(union aml_resource *resource,
-                           u32 length, u32 level);
-
-void
-acpi_dm_start_dependent_descriptor(union aml_resource *resource,
-                                  u32 length, u32 level);
-
-void
-acpi_dm_end_dependent_descriptor(union aml_resource *resource,
-                                u32 length, u32 level);
-
-void
-acpi_dm_vendor_small_descriptor(union aml_resource *resource,
-                               u32 length, u32 level);
-
-/*
- * dmutils
- */
-void acpi_dm_add_to_external_list(char *path, u8 type, u32 value);
-
-/*
- * dmrestag
- */
-void acpi_dm_find_resources(union acpi_parse_object *root);
-
-void
-acpi_dm_check_resource_reference(union acpi_parse_object *op,
-                                struct acpi_walk_state *walk_state);
-
-#endif                         /* __ACDISASM_H__ */
diff --git a/kitten/include/acpi/acdispat.h b/kitten/include/acpi/acdispat.h
deleted file mode 100644 (file)
index a22fe9c..0000000
+++ /dev/null
@@ -1,349 +0,0 @@
-/******************************************************************************
- *
- * Name: acdispat.h - dispatcher (parser to interpreter interface)
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 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_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_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);
-
-/*
- * 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_status
-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_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);
-
-/*
- * 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_status
-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_status
-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);
-
-/*
- * 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_status acpi_ds_load1_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);
-
-/*
- * 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_status
-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);
-
-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_status
-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);
-
-/*
- * dsmethod - Parser/Interpreter interface - control method parsing
- */
-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_status
-acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
-                              union acpi_operand_object *return_desc);
-
-void
-acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
-                                struct acpi_walk_state *walk_state);
-
-acpi_status
-acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
-                              union acpi_operand_object *obj_desc,
-                              struct acpi_walk_state *walk_state);
-
-acpi_status
-acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state);
-
-/*
- * dsinit
- */
-acpi_status
-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_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_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_status
-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);
-
-u8
-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);
-
-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_status
-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_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_status acpi_ds_scope_stack_pop(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_status
-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);
-
-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_evaluate_info *info, u8 pass_number);
-
-acpi_status
-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_push_walk_state(struct acpi_walk_state *walk_state,
-                       struct acpi_thread_state *thread);
-
-acpi_status acpi_ds_result_stack_pop(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);
-
-#ifdef ACPI_FUTURE_USAGE
-acpi_status
-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_status
-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);
-
-#endif                         /* _ACDISPAT_H_ */
diff --git a/kitten/include/acpi/acevents.h b/kitten/include/acpi/acevents.h
deleted file mode 100644 (file)
index 2341428..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-/******************************************************************************
- *
- * Name: acevents.h - Event subcomponent prototypes and defines
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACEVENTS_H__
-#define __ACEVENTS_H__
-
-/*
- * evevent
- */
-acpi_status acpi_ev_initialize_events(void);
-
-acpi_status acpi_ev_install_xrupt_handlers(void);
-
-acpi_status acpi_ev_install_fadt_gpes(void);
-
-u32 acpi_ev_fixed_event_detect(void);
-
-/*
- * evmisc
- */
-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_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_status
-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);
-
-/*
- * evgpeblk
- */
-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_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
-                           struct acpi_gpe_block_info *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_number,
-                        struct acpi_gpe_block_info **return_gpe_block);
-
-acpi_status
-acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
-                            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);
-
-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_status
-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_initialize_op_regions(void);
-
-acpi_status
-acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
-                              u32 function,
-                              acpi_physical_address address,
-                              u32 bit_width, acpi_integer * value);
-
-acpi_status
-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_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_status
-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);
-
-/*
- * 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_status
-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_status
-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_status
-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);
-
-/*
- * evsci - SCI (System Control Interrupt) handling/dispatch
- */
-u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context);
-
-u32 acpi_ev_install_sci_handler(void);
-
-acpi_status acpi_ev_remove_sci_handler(void);
-
-u32 acpi_ev_initialize_sCI(u32 program_sCI);
-
-void acpi_ev_terminate(void);
-
-#endif                         /* __ACEVENTS_H__  */
diff --git a/kitten/include/acpi/acexcep.h b/kitten/include/acpi/acexcep.h
deleted file mode 100644 (file)
index 797ca1e..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-/******************************************************************************
- *
- * Name: acexcep.h - Exception codes returned by the ACPI subsystem
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACEXCEP_H__
-#define __ACEXCEP_H__
-
-/*
- * Exceptions returned by external ACPI interfaces
- */
-#define AE_CODE_ENVIRONMENTAL           0x0000
-#define AE_CODE_PROGRAMMER              0x1000
-#define AE_CODE_ACPI_TABLES             0x2000
-#define AE_CODE_AML                     0x3000
-#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
-
-/*
- * Environmental exceptions
- */
-#define AE_ERROR                        (acpi_status) (0x0001 | AE_CODE_ENVIRONMENTAL)
-#define AE_NO_ACPI_TABLES               (acpi_status) (0x0002 | AE_CODE_ENVIRONMENTAL)
-#define AE_NO_NAMESPACE                 (acpi_status) (0x0003 | AE_CODE_ENVIRONMENTAL)
-#define AE_NO_MEMORY                    (acpi_status) (0x0004 | AE_CODE_ENVIRONMENTAL)
-#define AE_NOT_FOUND                    (acpi_status) (0x0005 | AE_CODE_ENVIRONMENTAL)
-#define AE_NOT_EXIST                    (acpi_status) (0x0006 | AE_CODE_ENVIRONMENTAL)
-#define AE_ALREADY_EXISTS               (acpi_status) (0x0007 | AE_CODE_ENVIRONMENTAL)
-#define AE_TYPE                         (acpi_status) (0x0008 | AE_CODE_ENVIRONMENTAL)
-#define AE_NULL_OBJECT                  (acpi_status) (0x0009 | AE_CODE_ENVIRONMENTAL)
-#define AE_NULL_ENTRY                   (acpi_status) (0x000A | AE_CODE_ENVIRONMENTAL)
-#define AE_BUFFER_OVERFLOW              (acpi_status) (0x000B | AE_CODE_ENVIRONMENTAL)
-#define AE_STACK_OVERFLOW               (acpi_status) (0x000C | AE_CODE_ENVIRONMENTAL)
-#define AE_STACK_UNDERFLOW              (acpi_status) (0x000D | AE_CODE_ENVIRONMENTAL)
-#define AE_NOT_IMPLEMENTED              (acpi_status) (0x000E | AE_CODE_ENVIRONMENTAL)
-#define AE_VERSION_MISMATCH             (acpi_status) (0x000F | AE_CODE_ENVIRONMENTAL)
-#define AE_SUPPORT                      (acpi_status) (0x0010 | AE_CODE_ENVIRONMENTAL)
-#define AE_SHARE                        (acpi_status) (0x0011 | AE_CODE_ENVIRONMENTAL)
-#define AE_LIMIT                        (acpi_status) (0x0012 | AE_CODE_ENVIRONMENTAL)
-#define AE_TIME                         (acpi_status) (0x0013 | AE_CODE_ENVIRONMENTAL)
-#define AE_UNKNOWN_STATUS               (acpi_status) (0x0014 | AE_CODE_ENVIRONMENTAL)
-#define AE_ACQUIRE_DEADLOCK             (acpi_status) (0x0015 | AE_CODE_ENVIRONMENTAL)
-#define AE_RELEASE_DEADLOCK             (acpi_status) (0x0016 | AE_CODE_ENVIRONMENTAL)
-#define AE_NOT_ACQUIRED                 (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL)
-#define AE_ALREADY_ACQUIRED             (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL)
-#define AE_NO_HARDWARE_RESPONSE         (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL)
-#define AE_NO_GLOBAL_LOCK               (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL)
-#define AE_LOGICAL_ADDRESS              (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL)
-#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                 0x001F
-
-/*
- * Programmer exceptions
- */
-#define AE_BAD_PARAMETER                (acpi_status) (0x0001 | AE_CODE_PROGRAMMER)
-#define AE_BAD_CHARACTER                (acpi_status) (0x0002 | AE_CODE_PROGRAMMER)
-#define AE_BAD_PATHNAME                 (acpi_status) (0x0003 | AE_CODE_PROGRAMMER)
-#define AE_BAD_DATA                     (acpi_status) (0x0004 | AE_CODE_PROGRAMMER)
-#define AE_BAD_ADDRESS                  (acpi_status) (0x0005 | AE_CODE_PROGRAMMER)
-#define AE_ALIGNMENT                    (acpi_status) (0x0006 | AE_CODE_PROGRAMMER)
-#define AE_BAD_HEX_CONSTANT             (acpi_status) (0x0007 | AE_CODE_PROGRAMMER)
-#define AE_BAD_OCTAL_CONSTANT           (acpi_status) (0x0008 | AE_CODE_PROGRAMMER)
-#define AE_BAD_DECIMAL_CONSTANT         (acpi_status) (0x0009 | AE_CODE_PROGRAMMER)
-
-#define AE_CODE_PGM_MAX                 0x0009
-
-/*
- * Acpi table exceptions
- */
-#define AE_BAD_SIGNATURE                (acpi_status) (0x0001 | AE_CODE_ACPI_TABLES)
-#define AE_BAD_HEADER                   (acpi_status) (0x0002 | AE_CODE_ACPI_TABLES)
-#define AE_BAD_CHECKSUM                 (acpi_status) (0x0003 | AE_CODE_ACPI_TABLES)
-#define AE_BAD_VALUE                    (acpi_status) (0x0004 | AE_CODE_ACPI_TABLES)
-#define AE_TABLE_NOT_SUPPORTED          (acpi_status) (0x0005 | AE_CODE_ACPI_TABLES)
-#define AE_INVALID_TABLE_LENGTH         (acpi_status) (0x0006 | AE_CODE_ACPI_TABLES)
-
-#define AE_CODE_TBL_MAX                 0x0006
-
-/*
- * AML exceptions.  These are caused by problems with
- * the actual AML byte stream
- */
-#define AE_AML_ERROR                    (acpi_status) (0x0001 | AE_CODE_AML)
-#define AE_AML_PARSE                    (acpi_status) (0x0002 | AE_CODE_AML)
-#define AE_AML_BAD_OPCODE               (acpi_status) (0x0003 | AE_CODE_AML)
-#define AE_AML_NO_OPERAND               (acpi_status) (0x0004 | AE_CODE_AML)
-#define AE_AML_OPERAND_TYPE             (acpi_status) (0x0005 | AE_CODE_AML)
-#define AE_AML_OPERAND_VALUE            (acpi_status) (0x0006 | AE_CODE_AML)
-#define AE_AML_UNINITIALIZED_LOCAL      (acpi_status) (0x0007 | AE_CODE_AML)
-#define AE_AML_UNINITIALIZED_ARG        (acpi_status) (0x0008 | AE_CODE_AML)
-#define AE_AML_UNINITIALIZED_ELEMENT    (acpi_status) (0x0009 | AE_CODE_AML)
-#define AE_AML_NUMERIC_OVERFLOW         (acpi_status) (0x000A | AE_CODE_AML)
-#define AE_AML_REGION_LIMIT             (acpi_status) (0x000B | AE_CODE_AML)
-#define AE_AML_BUFFER_LIMIT             (acpi_status) (0x000C | AE_CODE_AML)
-#define AE_AML_PACKAGE_LIMIT            (acpi_status) (0x000D | AE_CODE_AML)
-#define AE_AML_DIVIDE_BY_ZERO           (acpi_status) (0x000E | AE_CODE_AML)
-#define AE_AML_BAD_NAME                 (acpi_status) (0x000F | AE_CODE_AML)
-#define AE_AML_NAME_NOT_FOUND           (acpi_status) (0x0010 | AE_CODE_AML)
-#define AE_AML_INTERNAL                 (acpi_status) (0x0011 | AE_CODE_AML)
-#define AE_AML_INVALID_SPACE_ID         (acpi_status) (0x0012 | AE_CODE_AML)
-#define AE_AML_STRING_LIMIT             (acpi_status) (0x0013 | AE_CODE_AML)
-#define AE_AML_NO_RETURN_VALUE          (acpi_status) (0x0014 | AE_CODE_AML)
-#define AE_AML_METHOD_LIMIT             (acpi_status) (0x0015 | AE_CODE_AML)
-#define AE_AML_NOT_OWNER                (acpi_status) (0x0016 | AE_CODE_AML)
-#define AE_AML_MUTEX_ORDER              (acpi_status) (0x0017 | AE_CODE_AML)
-#define AE_AML_MUTEX_NOT_ACQUIRED       (acpi_status) (0x0018 | AE_CODE_AML)
-#define AE_AML_INVALID_RESOURCE_TYPE    (acpi_status) (0x0019 | AE_CODE_AML)
-#define AE_AML_INVALID_INDEX            (acpi_status) (0x001A | AE_CODE_AML)
-#define AE_AML_REGISTER_LIMIT           (acpi_status) (0x001B | AE_CODE_AML)
-#define AE_AML_NO_WHILE                 (acpi_status) (0x001C | AE_CODE_AML)
-#define AE_AML_ALIGNMENT                (acpi_status) (0x001D | AE_CODE_AML)
-#define AE_AML_NO_RESOURCE_END_TAG      (acpi_status) (0x001E | AE_CODE_AML)
-#define AE_AML_BAD_RESOURCE_VALUE       (acpi_status) (0x001F | AE_CODE_AML)
-#define AE_AML_CIRCULAR_REFERENCE       (acpi_status) (0x0020 | AE_CODE_AML)
-#define AE_AML_BAD_RESOURCE_LENGTH      (acpi_status) (0x0021 | AE_CODE_AML)
-#define AE_AML_ILLEGAL_ADDRESS          (acpi_status) (0x0022 | AE_CODE_AML)
-
-#define AE_CODE_AML_MAX                 0x0022
-
-/*
- * Internal exceptions used for control
- */
-#define AE_CTRL_RETURN_VALUE            (acpi_status) (0x0001 | AE_CODE_CONTROL)
-#define AE_CTRL_PENDING                 (acpi_status) (0x0002 | AE_CODE_CONTROL)
-#define AE_CTRL_TERMINATE               (acpi_status) (0x0003 | AE_CODE_CONTROL)
-#define AE_CTRL_TRUE                    (acpi_status) (0x0004 | AE_CODE_CONTROL)
-#define AE_CTRL_FALSE                   (acpi_status) (0x0005 | AE_CODE_CONTROL)
-#define AE_CTRL_DEPTH                   (acpi_status) (0x0006 | AE_CODE_CONTROL)
-#define AE_CTRL_END                     (acpi_status) (0x0007 | AE_CODE_CONTROL)
-#define AE_CTRL_TRANSFER                (acpi_status) (0x0008 | AE_CODE_CONTROL)
-#define AE_CTRL_BREAK                   (acpi_status) (0x0009 | AE_CODE_CONTROL)
-#define AE_CTRL_CONTINUE                (acpi_status) (0x000A | AE_CODE_CONTROL)
-#define AE_CTRL_SKIP                    (acpi_status) (0x000B | AE_CODE_CONTROL)
-
-#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[] = {
-       "AE_OK",
-       "AE_ERROR",
-       "AE_NO_ACPI_TABLES",
-       "AE_NO_NAMESPACE",
-       "AE_NO_MEMORY",
-       "AE_NOT_FOUND",
-       "AE_NOT_EXIST",
-       "AE_ALREADY_EXISTS",
-       "AE_TYPE",
-       "AE_NULL_OBJECT",
-       "AE_NULL_ENTRY",
-       "AE_BUFFER_OVERFLOW",
-       "AE_STACK_OVERFLOW",
-       "AE_STACK_UNDERFLOW",
-       "AE_NOT_IMPLEMENTED",
-       "AE_VERSION_MISMATCH",
-       "AE_SUPPORT",
-       "AE_SHARE",
-       "AE_LIMIT",
-       "AE_TIME",
-       "AE_UNKNOWN_STATUS",
-       "AE_ACQUIRE_DEADLOCK",
-       "AE_RELEASE_DEADLOCK",
-       "AE_NOT_ACQUIRED",
-       "AE_ALREADY_ACQUIRED",
-       "AE_NO_HARDWARE_RESPONSE",
-       "AE_NO_GLOBAL_LOCK",
-       "AE_LOGICAL_ADDRESS",
-       "AE_ABORT_METHOD",
-       "AE_SAME_HANDLER",
-       "AE_WAKE_ONLY_GPE",
-       "AE_OWNER_ID_LIMIT"
-};
-
-char const *acpi_gbl_exception_names_pgm[] = {
-       "AE_BAD_PARAMETER",
-       "AE_BAD_CHARACTER",
-       "AE_BAD_PATHNAME",
-       "AE_BAD_DATA",
-       "AE_BAD_ADDRESS",
-       "AE_ALIGNMENT",
-       "AE_BAD_HEX_CONSTANT",
-       "AE_BAD_OCTAL_CONSTANT",
-       "AE_BAD_DECIMAL_CONSTANT"
-};
-
-char const *acpi_gbl_exception_names_tbl[] = {
-       "AE_BAD_SIGNATURE",
-       "AE_BAD_HEADER",
-       "AE_BAD_CHECKSUM",
-       "AE_BAD_VALUE",
-       "AE_TABLE_NOT_SUPPORTED",
-       "AE_INVALID_TABLE_LENGTH"
-};
-
-char const *acpi_gbl_exception_names_aml[] = {
-       "AE_AML_ERROR",
-       "AE_AML_PARSE",
-       "AE_AML_BAD_OPCODE",
-       "AE_AML_NO_OPERAND",
-       "AE_AML_OPERAND_TYPE",
-       "AE_AML_OPERAND_VALUE",
-       "AE_AML_UNINITIALIZED_LOCAL",
-       "AE_AML_UNINITIALIZED_ARG",
-       "AE_AML_UNINITIALIZED_ELEMENT",
-       "AE_AML_NUMERIC_OVERFLOW",
-       "AE_AML_REGION_LIMIT",
-       "AE_AML_BUFFER_LIMIT",
-       "AE_AML_PACKAGE_LIMIT",
-       "AE_AML_DIVIDE_BY_ZERO",
-       "AE_AML_BAD_NAME",
-       "AE_AML_NAME_NOT_FOUND",
-       "AE_AML_INTERNAL",
-       "AE_AML_INVALID_SPACE_ID",
-       "AE_AML_STRING_LIMIT",
-       "AE_AML_NO_RETURN_VALUE",
-       "AE_AML_METHOD_LIMIT",
-       "AE_AML_NOT_OWNER",
-       "AE_AML_MUTEX_ORDER",
-       "AE_AML_MUTEX_NOT_ACQUIRED",
-       "AE_AML_INVALID_RESOURCE_TYPE",
-       "AE_AML_INVALID_INDEX",
-       "AE_AML_REGISTER_LIMIT",
-       "AE_AML_NO_WHILE",
-       "AE_AML_ALIGNMENT",
-       "AE_AML_NO_RESOURCE_END_TAG",
-       "AE_AML_BAD_RESOURCE_VALUE",
-       "AE_AML_CIRCULAR_REFERENCE",
-       "AE_AML_BAD_RESOURCE_LENGTH",
-       "AE_AML_ILLEGAL_ADDRESS"
-};
-
-char const *acpi_gbl_exception_names_ctrl[] = {
-       "AE_CTRL_RETURN_VALUE",
-       "AE_CTRL_PENDING",
-       "AE_CTRL_TERMINATE",
-       "AE_CTRL_TRUE",
-       "AE_CTRL_FALSE",
-       "AE_CTRL_DEPTH",
-       "AE_CTRL_END",
-       "AE_CTRL_TRANSFER",
-       "AE_CTRL_BREAK",
-       "AE_CTRL_CONTINUE",
-       "AE_CTRL_SKIP"
-};
-
-#endif                         /* ACPI GLOBALS */
-
-#endif                         /* __ACEXCEP_H__ */
diff --git a/kitten/include/acpi/acglobal.h b/kitten/include/acpi/acglobal.h
deleted file mode 100644 (file)
index 06972e6..0000000
+++ /dev/null
@@ -1,394 +0,0 @@
-/******************************************************************************
- *
- * Name: acglobal.h - Declarations for global variables
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACGLOBAL_H__
-#define __ACGLOBAL_H__
-
-/*
- * Ensure that the globals are actually defined and initialized only once.
- *
- * The use of these macros allows a single list of globals (here) in order
- * to simplify maintenance of the code.
- */
-#ifdef DEFINE_ACPI_GLOBALS
-#define ACPI_EXTERN
-#define ACPI_INIT_GLOBAL(a,b) a=b
-#else
-#define ACPI_EXTERN extern
-#define ACPI_INIT_GLOBAL(a,b) a
-#endif
-
-/*
- * 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;
-
-/*****************************************************************************
- *
- * Debug support
- *
- ****************************************************************************/
-
-/* Runtime configuration of debug print levels */
-
-extern u32 acpi_dbg_level;
-extern u32 acpi_dbg_layer;
-
-/* Procedure nesting level for debug output */
-
-extern u32 acpi_gbl_nesting_level;
-
-/* Support for dynamic control method tracing mechanism */
-
-ACPI_EXTERN u32 acpi_gbl_original_dbg_level;
-ACPI_EXTERN u32 acpi_gbl_original_dbg_layer;
-ACPI_EXTERN acpi_name acpi_gbl_trace_method_name;
-ACPI_EXTERN u32 acpi_gbl_trace_dbg_level;
-ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;
-ACPI_EXTERN u32 acpi_gbl_trace_flags;
-
-/*****************************************************************************
- *
- * Runtime configuration (static defaults that can be overriden at runtime)
- *
- ****************************************************************************/
-
-/*
- * Enable "slack" in the AML interpreter?  Default is FALSE, and the
- * interpreter strictly follows the ACPI specification.  Setting to TRUE
- * allows the interpreter to ignore certain errors and/or bad AML constructs.
- *
- * Currently, these features are enabled by this flag:
- *
- * 1) Allow "implicit return" of last value in a control method
- * 2) Allow access beyond the end of an operation region
- * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
- * 4) Allow ANY object type to be a source operand for the Store() operator
- * 5) Allow unresolved references (invalid target name) in package objects
- * 6) Enable warning messages for behavior that is not ACPI spec compliant
- */
-ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
-
-/*
- * Automatically serialize ALL control methods? Default is FALSE, meaning
- * to use the Serialized/not_serialized method flags on a per method basis.
- * Only change this if the ASL code is poorly written and cannot handle
- * reentrancy even though methods are marked "NotSerialized".
- */
-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);
-
-/*
- * 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 Table globals
- *
- ****************************************************************************/
-
-/*
- * Table pointers.
- * Although these pointers are somewhat redundant with the global acpi_table,
- * they are convenient because they are typed pointers.
- *
- * 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 struct xsdt_descriptor *acpi_gbl_XSDT;
-ACPI_EXTERN struct fadt_descriptor *acpi_gbl_FADT;
-ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
-ACPI_EXTERN struct facs_descriptor *acpi_gbl_FACS;
-ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
-/*
- * Since there may be multiple SSDTs and PSDTs, a single pointer is not
- * 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 Table info arrays
- */
-extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1];
-extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1];
-
-/*****************************************************************************
- *
- * Mutual exlusion within ACPICA subsystem
- *
- ****************************************************************************/
-
-/*
- * 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[ACPI_NUM_MUTEX];
-
-/*
- * Global lock semaphore works in conjunction with the actual HW global lock
- */
-ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore;
-
-/*
- * Spinlocks are used for interfaces that can be possibly called at
- * interrupt level
- */
-ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock;     /* For GPE data structs and registers */
-ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock;        /* For ACPI H/W except GPE registers */
-#define acpi_gbl_gpe_lock      &_acpi_gbl_gpe_lock
-#define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock
-
-/*****************************************************************************
- *
- * Miscellaneous globals
- *
- ****************************************************************************/
-
-#ifdef ACPI_DBG_TRACK_ALLOCATIONS
-
-/* Lists for tracking memory allocations */
-
-ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
-ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
-#endif
-
-/* Object caches */
-
-ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache;
-ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache;
-ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache;
-ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache;
-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;
-
-/* 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_NUM_OWNERID_MASKS];
-ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
-ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
-ACPI_EXTERN u8 acpi_gbl_last_owner_id_index;
-ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset;
-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];
-
-/*****************************************************************************
- *
- * Namespace globals
- *
- ****************************************************************************/
-
-#define NUM_NS_TYPES                    ACPI_TYPE_INVALID+1
-
-#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
-#define NUM_PREDEFINED_NAMES            10
-#else
-#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;
-
-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;
-#endif
-
-/*****************************************************************************
- *
- * Interpreter globals
- *
- ****************************************************************************/
-
-ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
-
-/* Control method single step flag */
-
-ACPI_EXTERN u8 acpi_gbl_cm_single_step;
-
-/*****************************************************************************
- *
- * Hardware globals
- *
- ****************************************************************************/
-
-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;
-
-/*****************************************************************************
- *
- * Event and GPE globals
- *
- ****************************************************************************/
-
-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];
-
-/*****************************************************************************
- *
- * Debugger globals
- *
- ****************************************************************************/
-
-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 ACPI_DEBUGGER
-
-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 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;
-
-/*
- * 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 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                         /* __ACGLOBAL_H__ */
diff --git a/kitten/include/acpi/achware.h b/kitten/include/acpi/achware.h
deleted file mode 100644 (file)
index 29b60a8..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/******************************************************************************
- *
- * Name: achware.h -- hardware specific interfaces
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACHWARE_H__
-#define __ACHWARE_H__
-
-/* PM Timer ticks per second (HZ) */
-
-#define PM_TIMER_FREQUENCY  3579545
-
-/* Values for the _SST reserved method */
-
-#define ACPI_SST_INDICATOR_OFF  0
-#define ACPI_SST_WORKING        1
-#define ACPI_SST_WAKING         2
-#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_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);
-
-acpi_status
-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_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);
-
-/*
- * hwgpe - GPE support
- */
-acpi_status
-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_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);
-
-#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_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_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(u32 * ticks);
-
-acpi_status
-acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed);
-#endif                         /* ACPI_FUTURE_USAGE */
-
-#endif                         /* __ACHWARE_H__ */
diff --git a/kitten/include/acpi/acinterp.h b/kitten/include/acpi/acinterp.h
deleted file mode 100644 (file)
index 91586d0..0000000
+++ /dev/null
@@ -1,529 +0,0 @@
-/******************************************************************************
- *
- * Name: acinterp.h - Interpreter subcomponent prototypes and defines
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACINTERP_H__
-#define __ACINTERP_H__
-
-#define ACPI_WALK_OPERANDS          (&(walk_state->operands [walk_state->num_operands -1]))
-
-/* Macros for tables used for debug output */
-
-#define ACPI_EXD_OFFSET(f)          (u8) ACPI_OFFSET (union acpi_operand_object,f)
-#define ACPI_EXD_NSOFFSET(f)        (u8) ACPI_OFFSET (struct acpi_namespace_node,f)
-#define ACPI_EXD_TABLE_SIZE(name)   (sizeof(name) / sizeof (struct acpi_exdump_info))
-
-/*
- * If possible, pack the following structures to byte alignment, since we
- * don't care about performance for debug output. Two cases where we cannot
- * pack the structures:
- *
- * 1) Hardware does not support misaligned memory transfers
- * 2) Compiler does not support pointers within packed structures
- */
-#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
-#pragma pack(1)
-#endif
-
-typedef const struct acpi_exdump_info {
-       u8 opcode;
-       u8 offset;
-       char *name;
-
-} acpi_exdump_info;
-
-/* Values for the Opcode field above */
-
-#define ACPI_EXD_INIT                   0
-#define ACPI_EXD_TYPE                   1
-#define ACPI_EXD_UINT8                  2
-#define ACPI_EXD_UINT16                 3
-#define ACPI_EXD_UINT32                 4
-#define ACPI_EXD_UINT64                 5
-#define ACPI_EXD_LITERAL                6
-#define ACPI_EXD_POINTER                7
-#define ACPI_EXD_ADDRESS                8
-#define ACPI_EXD_STRING                 9
-#define ACPI_EXD_BUFFER                 10
-#define ACPI_EXD_PACKAGE                11
-#define ACPI_EXD_FIELD                  12
-#define ACPI_EXD_REFERENCE              13
-
-/* restore default alignment */
-
-#pragma pack()
-
-/*
- * 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_status
-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);
-
-/* Types for ->String conversion */
-
-#define ACPI_EXPLICIT_BYTE_COPY         0x00000000
-#define ACPI_EXPLICIT_CONVERT_HEX       0x00000001
-#define ACPI_IMPLICIT_CONVERT_HEX       0x00000002
-#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);
-
-/*
- * 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_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);
-
-void
-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_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_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);
-
-/*
- * 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_status
-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);
-
-/*
- * 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_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_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_status
-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_integer
-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_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);
-
-/*
- * 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_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);
-
-/*
- * 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_status
-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);
-
-/*
- * 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);
-
-/*
- * 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_status acpi_ex_system_do_suspend(acpi_integer time);
-
-acpi_status acpi_ex_system_do_stall(u32 time);
-
-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_semaphore semaphore, u16 timeout);
-
-acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, 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_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_1T_1R(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_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);
-
-/*
- * exoparg6 - ACPI AML execution, 6 operands
- */
-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_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);
-
-/*
- * exresnte - resolve namespace node
- */
-acpi_status
-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);
-
-/*
- * exdump - Interpreter debug output routines
- */
-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);
-
-#ifdef ACPI_FUTURE_USAGE
-void
-acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags);
-
-void acpi_ex_dump_namespace_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);
-
-/*
- * 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_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);
-
-#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_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);
-
-/*
- * 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_status
-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_status
-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_status
-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);
-
-void acpi_ex_exit_interpreter(void);
-
-void acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc);
-
-u8 acpi_ex_acquire_global_lock(u32 rule);
-
-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);
-
-/*
- * 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_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_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_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_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_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_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_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);
-
-#endif                         /* __INTERP_H__ */
diff --git a/kitten/include/acpi/aclocal.h b/kitten/include/acpi/aclocal.h
deleted file mode 100644 (file)
index a4d0e73..0000000
+++ /dev/null
@@ -1,928 +0,0 @@
-/******************************************************************************
- *
- * Name: aclocal.h - Internal data types used across the ACPI subsystem
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACLOCAL_H__
-#define __ACLOCAL_H__
-
-/* acpisrc:struct_defs -- for acpisrc conversion */
-
-#define ACPI_WAIT_FOREVER               0xFFFF /* u16, as per ACPI spec */
-#define ACPI_DO_NOT_WAIT                0
-#define ACPI_SERIALIZED                 0xFF
-
-typedef u32 acpi_mutex_handle;
-#define ACPI_GLOBAL_LOCK                (acpi_semaphore) (-1)
-
-/* Total number of aml opcodes defined */
-
-#define AML_NUM_OPCODES                 0x7F
-
-/* Forward declarations */
-
-struct acpi_walk_state;
-struct acpi_obj_mutex;
-union acpi_parse_object;
-
-/*****************************************************************************
- *
- * Mutex typedefs and structs
- *
- ****************************************************************************/
-
-/*
- * Predefined handles for the mutex objects used within the subsystem
- * All mutex objects are automatically created by acpi_ut_mutex_initialize.
- *
- * The acquire/release ordering protocol is implied via this list. Mutexes
- * with a lower value must be acquired before mutexes with a higher value.
- *
- * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names
- * table below also!
- */
-#define ACPI_MTX_INTERPRETER            0      /* AML Interpreter, main lock */
-#define ACPI_MTX_TABLES                 1      /* Data for ACPI tables */
-#define ACPI_MTX_NAMESPACE              2      /* ACPI Namespace */
-#define ACPI_MTX_EVENTS                 3      /* Data for ACPI events */
-#define ACPI_MTX_CACHES                 4      /* Internal caches, general purposes */
-#define ACPI_MTX_MEMORY                 5      /* Debug memory tracking lists */
-#define ACPI_MTX_DEBUG_CMD_COMPLETE     6      /* AML debugger */
-#define ACPI_MTX_DEBUG_CMD_READY        7      /* AML debugger */
-
-#define ACPI_MAX_MUTEX                  7
-#define ACPI_NUM_MUTEX                  ACPI_MAX_MUTEX+1
-
-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
-#ifdef DEFINE_ACPI_GLOBALS
-
-/* Debug names for the mutexes above */
-
-static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
-       "ACPI_MTX_Interpreter",
-       "ACPI_MTX_Tables",
-       "ACPI_MTX_Namespace",
-       "ACPI_MTX_Events",
-       "ACPI_MTX_Caches",
-       "ACPI_MTX_Memory",
-       "ACPI_MTX_CommandComplete",
-       "ACPI_MTX_CommandReady"
-};
-
-#endif
-#endif
-
-/*
- * Predefined handles for spinlocks used within the subsystem.
- * These spinlocks are created by acpi_ut_mutex_initialize
- */
-#define ACPI_LOCK_GPES                  0
-#define ACPI_LOCK_HARDWARE              1
-
-#define ACPI_MAX_LOCK                   1
-#define ACPI_NUM_LOCK                   ACPI_MAX_LOCK+1
-
-/* Owner IDs are used to track namespace nodes for selective deletion */
-
-typedef u8 acpi_owner_id;
-#define ACPI_OWNER_ID_MAX               0xFF
-
-/* This Thread ID means that the mutex is not in use (unlocked) */
-
-#define ACPI_MUTEX_NOT_ACQUIRED         (acpi_thread_id) 0
-
-/* Table for the global mutexes */
-
-struct acpi_mutex_info {
-       acpi_mutex mutex;
-       u32 use_count;
-       acpi_thread_id thread_id;
-};
-
-/* Lock flag parameter for various interfaces */
-
-#define ACPI_MTX_DO_NOT_LOCK            0
-#define ACPI_MTX_LOCK                   1
-
-/* Field access granularities */
-
-#define ACPI_FIELD_BYTE_GRANULARITY     1
-#define ACPI_FIELD_WORD_GRANULARITY     2
-#define ACPI_FIELD_DWORD_GRANULARITY    4
-#define ACPI_FIELD_QWORD_GRANULARITY    8
-
-#define ACPI_ENTRY_NOT_FOUND            NULL
-
-/*****************************************************************************
- *
- * Namespace typedefs and structs
- *
- ****************************************************************************/
-
-/* Operational modes of the AML interpreter/scanner */
-
-typedef enum {
-       ACPI_IMODE_LOAD_PASS1 = 0x01,
-       ACPI_IMODE_LOAD_PASS2 = 0x02,
-       ACPI_IMODE_EXECUTE = 0x0E
-} acpi_interpreter_mode;
-
-union acpi_name_union {
-       u32 integer;
-       char ascii[4];
-};
-
-/*
- * The Namespace Node describes a named object that appears in the AML.
- * descriptor_type is used to differentiate between internal descriptors.
- *
- * The node is optimized for both 32-bit and 64-bit platforms:
- * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
- *
- * Note: The descriptor_type and Type fields must appear in the identical
- * position in both the struct acpi_namespace_node and union acpi_operand_object
- * structures.
- */
-struct acpi_namespace_node {
-       union acpi_operand_object *object;      /* Interpreter object */
-       u8 descriptor_type;     /* Differentiate object descriptor types */
-       u8 type;                /* ACPI Type associated with this name */
-       u8 flags;               /* Miscellaneous flags */
-       acpi_owner_id owner_id; /* Node creator */
-       union acpi_name_union name;     /* ACPI Name, always 4 chars per ACPI spec */
-       struct acpi_namespace_node *child;      /* First child */
-       struct acpi_namespace_node *peer;       /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */
-
-       /*
-        * The following fields are used by the ASL compiler and disassembler only
-        */
-#ifdef ACPI_LARGE_NAMESPACE_NODE
-       union acpi_parse_object *op;
-       u32 value;
-       u32 length;
-#endif
-};
-
-/* Namespace Node flags */
-
-#define ANOBJ_END_OF_PEER_LIST          0x01   /* End-of-list, Peer field points to parent */
-#define ANOBJ_RESERVED                  0x02   /* Available for future use */
-#define ANOBJ_METHOD_ARG                0x04   /* Node is a method argument */
-#define ANOBJ_METHOD_LOCAL              0x08   /* Node is a method local */
-#define ANOBJ_SUBTREE_HAS_INI           0x10   /* Used to optimize device initialization */
-
-#define ANOBJ_IS_EXTERNAL               0x08   /* i_aSL only: This object created via External() */
-#define ANOBJ_METHOD_NO_RETVAL          0x10   /* i_aSL only: Method has no return value */
-#define ANOBJ_METHOD_SOME_NO_RETVAL     0x20   /* i_aSL only: Method has at least one return value */
-#define ANOBJ_IS_BIT_OFFSET             0x40   /* i_aSL only: Reference is a bit offset */
-#define ANOBJ_IS_REFERENCED             0x80   /* i_aSL only: Object was referenced */
-
-/*
- * ACPI Table Descriptor.  One per ACPI table
- */
-struct acpi_table_desc {
-       struct acpi_table_desc *prev;
-       struct acpi_table_desc *next;
-       struct acpi_table_desc *installed_desc;
-       struct acpi_table_header *pointer;
-       u8 *aml_start;
-       u64 physical_address;
-       acpi_size length;
-       u32 aml_length;
-       acpi_owner_id owner_id;
-       u8 type;
-       u8 allocation;
-       u8 loaded_into_namespace;
-};
-
-struct acpi_table_list {
-       struct acpi_table_desc *next;
-       u32 count;
-};
-
-struct acpi_find_context {
-       char *search_for;
-       acpi_handle *list;
-       u32 *count;
-};
-
-struct acpi_ns_search_data {
-       struct acpi_namespace_node *node;
-};
-
-/*
- * Predefined Namespace items
- */
-struct acpi_predefined_names {
-       char *name;
-       u8 type;
-       char *val;
-};
-
-/* Object types used during package copies */
-
-#define ACPI_COPY_TYPE_SIMPLE           0
-#define ACPI_COPY_TYPE_PACKAGE          1
-
-/* Info structure used to convert external<->internal namestrings */
-
-struct acpi_namestring_info {
-       char *external_name;
-       char *next_external_char;
-       char *internal_name;
-       u32 length;
-       u32 num_segments;
-       u32 num_carats;
-       u8 fully_qualified;
-};
-
-/* Field creation info */
-
-struct acpi_create_field_info {
-       struct acpi_namespace_node *region_node;
-       struct acpi_namespace_node *field_node;
-       struct acpi_namespace_node *register_node;
-       struct acpi_namespace_node *data_register_node;
-       u32 bank_value;
-       u32 field_bit_position;
-       u32 field_bit_length;
-       u8 field_flags;
-       u8 attribute;
-       u8 field_type;
-};
-
-typedef
-acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
-
-/*
- * Bitmapped ACPI types.  Used internally only
- */
-#define ACPI_BTYPE_ANY                  0x00000000
-#define ACPI_BTYPE_INTEGER              0x00000001
-#define ACPI_BTYPE_STRING               0x00000002
-#define ACPI_BTYPE_BUFFER               0x00000004
-#define ACPI_BTYPE_PACKAGE              0x00000008
-#define ACPI_BTYPE_FIELD_UNIT           0x00000010
-#define ACPI_BTYPE_DEVICE               0x00000020
-#define ACPI_BTYPE_EVENT                0x00000040
-#define ACPI_BTYPE_METHOD               0x00000080
-#define ACPI_BTYPE_MUTEX                0x00000100
-#define ACPI_BTYPE_REGION               0x00000200
-#define ACPI_BTYPE_POWER                0x00000400
-#define ACPI_BTYPE_PROCESSOR            0x00000800
-#define ACPI_BTYPE_THERMAL              0x00001000
-#define ACPI_BTYPE_BUFFER_FIELD         0x00002000
-#define ACPI_BTYPE_DDB_HANDLE           0x00004000
-#define ACPI_BTYPE_DEBUG_OBJECT         0x00008000
-#define ACPI_BTYPE_REFERENCE            0x00010000
-#define ACPI_BTYPE_RESOURCE             0x00020000
-
-#define ACPI_BTYPE_COMPUTE_DATA         (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
-
-#define ACPI_BTYPE_DATA                 (ACPI_BTYPE_COMPUTE_DATA  | ACPI_BTYPE_PACKAGE)
-#define ACPI_BTYPE_DATA_REFERENCE       (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)
-#define ACPI_BTYPE_DEVICE_OBJECTS       (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
-#define ACPI_BTYPE_OBJECTS_AND_REFS     0x0001FFFF     /* ARG or LOCAL */
-#define ACPI_BTYPE_ALL_OBJECTS          0x0000FFFF
-
-/*****************************************************************************
- *
- * Event typedefs and structs
- *
- ****************************************************************************/
-
-/* Dispatch info for each GPE -- either a method or handler, cannot be both */
-
-struct acpi_handler_info {
-       acpi_event_handler address;     /* Address of handler, if any */
-       void *context;          /* Context to be passed to handler */
-       struct acpi_namespace_node *method_node;        /* Method node for this GPE level (saved) */
-};
-
-union acpi_gpe_dispatch_info {
-       struct acpi_namespace_node *method_node;        /* Method node for this GPE level */
-       struct acpi_handler_info *handler;
-};
-
-/*
- * Information about a GPE, one per each GPE in an array.
- * NOTE: Important to keep this struct as small as possible.
- */
-struct acpi_gpe_event_info {
-       union acpi_gpe_dispatch_info dispatch;  /* Either Method or Handler */
-       struct acpi_gpe_register_info *register_info;   /* Backpointer to register info */
-       u8 flags;               /* Misc info about this GPE */
-       u8 register_bit;        /* This GPE bit within the register */
-};
-
-/* Information about a GPE register pair, one per each status/enable pair in an array */
-
-struct acpi_gpe_register_info {
-       struct acpi_generic_address status_address;     /* Address of status reg */
-       struct acpi_generic_address enable_address;     /* Address of enable reg */
-       u8 enable_for_wake;     /* GPEs to keep enabled when sleeping */
-       u8 enable_for_run;      /* GPEs to keep enabled when running */
-       u8 base_gpe_number;     /* Base GPE number for this register */
-};
-
-/*
- * Information about a GPE register block, one per each installed block --
- * GPE0, GPE1, and one per each installed GPE Block Device.
- */
-struct acpi_gpe_block_info {
-       struct acpi_namespace_node *node;
-       struct acpi_gpe_block_info *previous;
-       struct acpi_gpe_block_info *next;
-       struct acpi_gpe_xrupt_info *xrupt_block;        /* Backpointer to interrupt block */
-       struct acpi_gpe_register_info *register_info;   /* One per GPE register pair */
-       struct acpi_gpe_event_info *event_info; /* One for each GPE */
-       struct acpi_generic_address block_address;      /* Base address of the block */
-       u32 register_count;     /* Number of register pairs in block */
-       u8 block_base_number;   /* Base GPE number for this block */
-};
-
-/* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */
-
-struct acpi_gpe_xrupt_info {
-       struct acpi_gpe_xrupt_info *previous;
-       struct acpi_gpe_xrupt_info *next;
-       struct acpi_gpe_block_info *gpe_block_list_head;        /* List of GPE blocks for this xrupt */
-       u32 interrupt_number;   /* System interrupt number */
-};
-
-struct acpi_gpe_walk_info {
-       struct acpi_namespace_node *gpe_device;
-       struct acpi_gpe_block_info *gpe_block;
-};
-
-typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
-                                        gpe_xrupt_info,
-                                        struct acpi_gpe_block_info *
-                                        gpe_block);
-
-/* Information about each particular fixed event */
-
-struct acpi_fixed_event_handler {
-       acpi_event_handler handler;     /* Address of handler. */
-       void *context;          /* Context to be passed to handler */
-};
-
-struct acpi_fixed_event_info {
-       u8 status_register_id;
-       u8 enable_register_id;
-       u16 status_bit_mask;
-       u16 enable_bit_mask;
-};
-
-/* Information used during field processing */
-
-struct acpi_field_info {
-       u8 skip_field;
-       u8 field_flag;
-       u32 pkg_length;
-};
-
-/*****************************************************************************
- *
- * Generic "state" object for stacks
- *
- ****************************************************************************/
-
-#define ACPI_CONTROL_NORMAL                  0xC0
-#define ACPI_CONTROL_CONDITIONAL_EXECUTING   0xC1
-#define ACPI_CONTROL_PREDICATE_EXECUTING     0xC2
-#define ACPI_CONTROL_PREDICATE_FALSE         0xC3
-#define ACPI_CONTROL_PREDICATE_TRUE          0xC4
-
-#define ACPI_STATE_COMMON \
-       void                            *next; \
-       u8                              descriptor_type; /* To differentiate various internal objs */\
-       u8                              flags; \
-       u16                             value; \
-       u16                             state;
-
-       /* There are 2 bytes available here until the next natural alignment boundary */
-
-struct acpi_common_state {
-ACPI_STATE_COMMON};
-
-/*
- * Update state - used to traverse complex objects such as packages
- */
-struct acpi_update_state {
-       ACPI_STATE_COMMON union acpi_operand_object *object;
-};
-
-/*
- * Pkg state - used to traverse nested package structures
- */
-struct acpi_pkg_state {
-       ACPI_STATE_COMMON u16 index;
-       union acpi_operand_object *source_object;
-       union acpi_operand_object *dest_object;
-       struct acpi_walk_state *walk_state;
-       void *this_target_obj;
-       u32 num_packages;
-};
-
-/*
- * Control state - one per if/else and while constructs.
- * Allows nesting of these constructs
- */
-struct acpi_control_state {
-       ACPI_STATE_COMMON u16 opcode;
-       union acpi_parse_object *predicate_op;
-       u8 *aml_predicate_start;        /* Start of if/while predicate */
-       u8 *package_end;        /* End of if/while block */
-};
-
-/*
- * Scope state - current scope during namespace lookups
- */
-struct acpi_scope_state {
-       ACPI_STATE_COMMON struct acpi_namespace_node *node;
-};
-
-struct acpi_pscope_state {
-       ACPI_STATE_COMMON u32 arg_count;        /* Number of fixed arguments */
-       union acpi_parse_object *op;    /* Current op being parsed */
-       u8 *arg_end;            /* Current argument end */
-       u8 *pkg_end;            /* Current package end */
-       u32 arg_list;           /* Next argument to parse */
-};
-
-/*
- * Thread state - one per thread across multiple walk states.  Multiple walk
- * states are created when there are nested control methods executing.
- */
-struct acpi_thread_state {
-       ACPI_STATE_COMMON u8 current_sync_level;        /* Mutex Sync (nested acquire) level */
-       struct acpi_walk_state *walk_state_list;        /* Head of list of walk_states for this thread */
-       union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
-       acpi_thread_id thread_id;       /* Running thread ID */
-};
-
-/*
- * Result values - used to accumulate the results of nested
- * AML arguments
- */
-struct acpi_result_values {
-       ACPI_STATE_COMMON u8 num_results;
-       u8 last_insert;
-       union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS];
-};
-
-typedef
-acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state,
-                                   union acpi_parse_object ** out_op);
-
-typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state);
-
-/*
- * Notify info - used to pass info to the deferred notify
- * handler/dispatcher.
- */
-struct acpi_notify_info {
-       ACPI_STATE_COMMON struct acpi_namespace_node *node;
-       union acpi_operand_object *handler_obj;
-};
-
-/* Generic state is union of structs above */
-
-union acpi_generic_state {
-       struct acpi_common_state common;
-       struct acpi_control_state control;
-       struct acpi_update_state update;
-       struct acpi_scope_state scope;
-       struct acpi_pscope_state parse_scope;
-       struct acpi_pkg_state pkg;
-       struct acpi_thread_state thread;
-       struct acpi_result_values results;
-       struct acpi_notify_info notify;
-};
-
-/*****************************************************************************
- *
- * Interpreter typedefs and structs
- *
- ****************************************************************************/
-
-typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state);
-
-/*****************************************************************************
- *
- * Parser typedefs and structs
- *
- ****************************************************************************/
-
-/*
- * AML opcode, name, and argument layout
- */
-struct acpi_opcode_info {
-#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
-       char *name;             /* Opcode name (disassembler/debug only) */
-#endif
-       u32 parse_args;         /* Grammar/Parse time arguments */
-       u32 runtime_args;       /* Interpret time arguments */
-       u16 flags;              /* Misc flags */
-       u8 object_type;         /* Corresponding internal object type */
-       u8 class;               /* Opcode class */
-       u8 type;                /* Opcode type */
-};
-
-union acpi_parse_value {
-       acpi_integer integer;   /* Integer constant (Up to 64 bits) */
-       struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
-       u32 size;               /* bytelist or field size */
-       char *string;           /* NULL terminated string */
-       u8 *buffer;             /* buffer or string */
-       char *name;             /* NULL terminated string */
-       union acpi_parse_object *arg;   /* arguments and contained ops */
-};
-
-#define ACPI_PARSE_COMMON \
-       union acpi_parse_object         *parent;        /* Parent op */\
-       u8                              descriptor_type; /* To differentiate various internal objs */\
-       u8                              flags;          /* Type of Op */\
-       u16                             aml_opcode;     /* AML opcode */\
-       u32                             aml_offset;     /* Offset of declaration in AML */\
-       union acpi_parse_object         *next;          /* Next op */\
-       struct acpi_namespace_node      *node;          /* For use by interpreter */\
-       union acpi_parse_value          value;          /* Value or args associated with the opcode */\
-       ACPI_DISASM_ONLY_MEMBERS (\
-       u8                              disasm_flags;   /* Used during AML disassembly */\
-       u8                              disasm_opcode;  /* Subtype used for disassembly */\
-       char                            aml_op_name[16])        /* Op name (debug only) */
-
-#define ACPI_DASM_BUFFER                0x00
-#define ACPI_DASM_RESOURCE              0x01
-#define ACPI_DASM_STRING                0x02
-#define ACPI_DASM_UNICODE               0x03
-#define ACPI_DASM_EISAID                0x04
-#define ACPI_DASM_MATCHOP               0x05
-#define ACPI_DASM_LNOT_PREFIX           0x06
-#define ACPI_DASM_LNOT_SUFFIX           0x07
-#define ACPI_DASM_IGNORE                0x08
-
-/*
- * Generic operation (for example:  If, While, Store)
- */
-struct acpi_parse_obj_common {
-ACPI_PARSE_COMMON};
-
-/*
- * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions),
- * and bytelists.
- */
-struct acpi_parse_obj_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 */
-};
-
-/* This version is used by the i_aSL compiler only */
-
-#define ACPI_MAX_PARSEOP_NAME   20
-
-struct acpi_parse_obj_asl {
-       ACPI_PARSE_COMMON union acpi_parse_object *child;
-       union acpi_parse_object *parent_method;
-       char *filename;
-       char *external_name;
-       char *namepath;
-       char name_seg[4];
-       u32 extra_value;
-       u32 column;
-       u32 line_number;
-       u32 logical_line_number;
-       u32 logical_byte_offset;
-       u32 end_line;
-       u32 end_logical_line;
-       u32 acpi_btype;
-       u32 aml_length;
-       u32 aml_subtree_length;
-       u32 final_aml_length;
-       u32 final_aml_offset;
-       u32 compile_flags;
-       u16 parse_opcode;
-       u8 aml_opcode_length;
-       u8 aml_pkg_len_bytes;
-       u8 extra;
-       char parse_op_name[ACPI_MAX_PARSEOP_NAME];
-};
-
-union acpi_parse_object {
-       struct acpi_parse_obj_common common;
-       struct acpi_parse_obj_named named;
-       struct acpi_parse_obj_asl asl;
-};
-
-/*
- * Parse state - one state per parser invocation and each control
- * method.
- */
-struct acpi_parse_state {
-       u8 *aml_start;          /* First AML byte */
-       u8 *aml;                /* Next AML byte */
-       u8 *aml_end;            /* (last + 1) AML byte */
-       u8 *pkg_start;          /* Current package begin */
-       u8 *pkg_end;            /* Current package end */
-       union acpi_parse_object *start_op;      /* Root of parse tree */
-       struct acpi_namespace_node *start_node;
-       union acpi_generic_state *scope;        /* Current scope */
-       union acpi_parse_object *start_scope;
-       u32 aml_size;
-};
-
-/* Parse object flags */
-
-#define ACPI_PARSEOP_GENERIC            0x01
-#define ACPI_PARSEOP_NAMED              0x02
-#define ACPI_PARSEOP_DEFERRED           0x04
-#define ACPI_PARSEOP_BYTELIST           0x08
-#define ACPI_PARSEOP_IN_CACHE           0x80
-
-/* 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
-
-/*****************************************************************************
- *
- * Hardware (ACPI registers) and PNP
- *
- ****************************************************************************/
-
-#define PCI_ROOT_HID_STRING             "PNP0A03"
-#define PCI_EXPRESS_ROOT_HID_STRING     "PNP0A08"
-
-struct acpi_bit_register_info {
-       u8 parent_register;
-       u8 bit_position;
-       u16 access_bit_mask;
-};
-
-/*
- * Some ACPI registers have bits that must be ignored -- meaning that they
- * must be preserved.
- */
-#define ACPI_PM1_STATUS_PRESERVED_BITS          0x0800 /* Bit 11 */
-#define ACPI_PM1_CONTROL_PRESERVED_BITS         0x0201 /* Bit 9, Bit 0 (SCI_EN) */
-
-/*
- * Register IDs
- * These are the full ACPI registers
- */
-#define ACPI_REGISTER_PM1_STATUS                0x01
-#define ACPI_REGISTER_PM1_ENABLE                0x02
-#define ACPI_REGISTER_PM1_CONTROL               0x03
-#define ACPI_REGISTER_PM1A_CONTROL              0x04
-#define ACPI_REGISTER_PM1B_CONTROL              0x05
-#define ACPI_REGISTER_PM2_CONTROL               0x06
-#define ACPI_REGISTER_PM_TIMER                  0x07
-#define ACPI_REGISTER_PROCESSOR_BLOCK           0x08
-#define ACPI_REGISTER_SMI_COMMAND_BLOCK         0x09
-
-/* Masks used to access the bit_registers */
-
-#define ACPI_BITMASK_TIMER_STATUS               0x0001
-#define ACPI_BITMASK_BUS_MASTER_STATUS          0x0010
-#define ACPI_BITMASK_GLOBAL_LOCK_STATUS         0x0020
-#define ACPI_BITMASK_POWER_BUTTON_STATUS        0x0100
-#define ACPI_BITMASK_SLEEP_BUTTON_STATUS        0x0200
-#define ACPI_BITMASK_RT_CLOCK_STATUS            0x0400
-#define ACPI_BITMASK_PCIEXP_WAKE_STATUS         0x4000 /* ACPI 3.0 */
-#define ACPI_BITMASK_WAKE_STATUS                0x8000
-
-#define ACPI_BITMASK_ALL_FIXED_STATUS           (\
-       ACPI_BITMASK_TIMER_STATUS          | \
-       ACPI_BITMASK_BUS_MASTER_STATUS     | \
-       ACPI_BITMASK_GLOBAL_LOCK_STATUS    | \
-       ACPI_BITMASK_POWER_BUTTON_STATUS   | \
-       ACPI_BITMASK_SLEEP_BUTTON_STATUS   | \
-       ACPI_BITMASK_RT_CLOCK_STATUS       | \
-       ACPI_BITMASK_WAKE_STATUS)
-
-#define ACPI_BITMASK_TIMER_ENABLE               0x0001
-#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE         0x0020
-#define ACPI_BITMASK_POWER_BUTTON_ENABLE        0x0100
-#define ACPI_BITMASK_SLEEP_BUTTON_ENABLE        0x0200
-#define ACPI_BITMASK_RT_CLOCK_ENABLE            0x0400
-#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE        0x4000 /* ACPI 3.0 */
-
-#define ACPI_BITMASK_SCI_ENABLE                 0x0001
-#define ACPI_BITMASK_BUS_MASTER_RLD             0x0002
-#define ACPI_BITMASK_GLOBAL_LOCK_RELEASE        0x0004
-#define ACPI_BITMASK_SLEEP_TYPE_X               0x1C00
-#define ACPI_BITMASK_SLEEP_ENABLE               0x2000
-
-#define ACPI_BITMASK_ARB_DISABLE                0x0001
-
-/* Raw bit position of each bit_register */
-
-#define ACPI_BITPOSITION_TIMER_STATUS           0x00
-#define ACPI_BITPOSITION_BUS_MASTER_STATUS      0x04
-#define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS     0x05
-#define ACPI_BITPOSITION_POWER_BUTTON_STATUS    0x08
-#define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS    0x09
-#define ACPI_BITPOSITION_RT_CLOCK_STATUS        0x0A
-#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS     0x0E   /* ACPI 3.0 */
-#define ACPI_BITPOSITION_WAKE_STATUS            0x0F
-
-#define ACPI_BITPOSITION_TIMER_ENABLE           0x00
-#define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE     0x05
-#define ACPI_BITPOSITION_POWER_BUTTON_ENABLE    0x08
-#define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE    0x09
-#define ACPI_BITPOSITION_RT_CLOCK_ENABLE        0x0A
-#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE    0x0E   /* ACPI 3.0 */
-
-#define ACPI_BITPOSITION_SCI_ENABLE             0x00
-#define ACPI_BITPOSITION_BUS_MASTER_RLD         0x01
-#define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE    0x02
-#define ACPI_BITPOSITION_SLEEP_TYPE_X           0x0A
-#define ACPI_BITPOSITION_SLEEP_ENABLE           0x0D
-
-#define ACPI_BITPOSITION_ARB_DISABLE            0x00
-
-/*****************************************************************************
- *
- * Resource descriptors
- *
- ****************************************************************************/
-
-/* resource_type values */
-
-#define ACPI_ADDRESS_TYPE_MEMORY_RANGE          0
-#define ACPI_ADDRESS_TYPE_IO_RANGE              1
-#define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE      2
-
-/* Resource descriptor types and masks */
-
-#define ACPI_RESOURCE_NAME_LARGE                0x80
-#define ACPI_RESOURCE_NAME_SMALL                0x00
-
-#define ACPI_RESOURCE_NAME_SMALL_MASK           0x78   /* Bits 6:3 contain the type */
-#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK    0x07   /* Bits 2:0 contain the length */
-#define ACPI_RESOURCE_NAME_LARGE_MASK           0x7F   /* Bits 6:0 contain the type */
-
-/*
- * Small resource descriptor "names" as defined by the ACPI specification.
- * Note: Bits 2:0 are used for the descriptor length
- */
-#define ACPI_RESOURCE_NAME_IRQ                  0x20
-#define ACPI_RESOURCE_NAME_DMA                  0x28
-#define ACPI_RESOURCE_NAME_START_DEPENDENT      0x30
-#define ACPI_RESOURCE_NAME_END_DEPENDENT        0x38
-#define ACPI_RESOURCE_NAME_IO                   0x40
-#define ACPI_RESOURCE_NAME_FIXED_IO             0x48
-#define ACPI_RESOURCE_NAME_RESERVED_S1          0x50
-#define ACPI_RESOURCE_NAME_RESERVED_S2          0x58
-#define ACPI_RESOURCE_NAME_RESERVED_S3          0x60
-#define ACPI_RESOURCE_NAME_RESERVED_S4          0x68
-#define ACPI_RESOURCE_NAME_VENDOR_SMALL         0x70
-#define ACPI_RESOURCE_NAME_END_TAG              0x78
-
-/*
- * Large resource descriptor "names" as defined by the ACPI specification.
- * Note: includes the Large Descriptor bit in bit[7]
- */
-#define ACPI_RESOURCE_NAME_MEMORY24             0x81
-#define ACPI_RESOURCE_NAME_GENERIC_REGISTER     0x82
-#define ACPI_RESOURCE_NAME_RESERVED_L1          0x83
-#define ACPI_RESOURCE_NAME_VENDOR_LARGE         0x84
-#define ACPI_RESOURCE_NAME_MEMORY32             0x85
-#define ACPI_RESOURCE_NAME_FIXED_MEMORY32       0x86
-#define ACPI_RESOURCE_NAME_ADDRESS32            0x87
-#define ACPI_RESOURCE_NAME_ADDRESS16            0x88
-#define ACPI_RESOURCE_NAME_EXTENDED_IRQ         0x89
-#define ACPI_RESOURCE_NAME_ADDRESS64            0x8A
-#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64   0x8B
-#define ACPI_RESOURCE_NAME_LARGE_MAX            0x8B
-
-/*****************************************************************************
- *
- * Miscellaneous
- *
- ****************************************************************************/
-
-#define ACPI_ASCII_ZERO                 0x30
-
-/*****************************************************************************
- *
- * Debugger
- *
- ****************************************************************************/
-
-struct acpi_db_method_info {
-       acpi_handle thread_gate;
-       char *name;
-       char **args;
-       u32 flags;
-       u32 num_loops;
-       char pathname[128];
-};
-
-struct acpi_integrity_info {
-       u32 nodes;
-       u32 objects;
-};
-
-#define ACPI_DB_REDIRECTABLE_OUTPUT     0x01
-#define ACPI_DB_CONSOLE_OUTPUT          0x02
-#define ACPI_DB_DUPLICATE_OUTPUT        0x03
-
-/*****************************************************************************
- *
- * Debug
- *
- ****************************************************************************/
-
-/* Entry for a memory allocation (debug only) */
-
-#define ACPI_MEM_MALLOC                 0
-#define ACPI_MEM_CALLOC                 1
-#define ACPI_MAX_MODULE_NAME            16
-
-#define ACPI_COMMON_DEBUG_MEM_HEADER \
-       struct acpi_debug_mem_block     *previous; \
-       struct acpi_debug_mem_block     *next; \
-       u32                             size; \
-       u32                             component; \
-       u32                             line; \
-       char                            module[ACPI_MAX_MODULE_NAME]; \
-       u8                              alloc_type;
-
-struct acpi_debug_mem_header {
-ACPI_COMMON_DEBUG_MEM_HEADER};
-
-struct acpi_debug_mem_block {
-       ACPI_COMMON_DEBUG_MEM_HEADER u64 user_space;
-};
-
-#define ACPI_MEM_LIST_GLOBAL            0
-#define ACPI_MEM_LIST_NSNODE            1
-#define ACPI_MEM_LIST_MAX               1
-#define ACPI_NUM_MEM_LISTS              2
-
-struct acpi_memory_list {
-       char *list_name;
-       void *list_head;
-       u16 object_size;
-       u16 max_depth;
-       u16 current_depth;
-       u16 link_offset;
-
-#ifdef ACPI_DBG_TRACK_ALLOCATIONS
-
-       /* Statistics for debug memory tracking only */
-
-       u32 total_allocated;
-       u32 total_freed;
-       u32 current_total_size;
-       u32 requests;
-       u32 hits;
-#endif
-};
-
-#endif                         /* __ACLOCAL_H__ */
diff --git a/kitten/include/acpi/acmacros.h b/kitten/include/acpi/acmacros.h
deleted file mode 100644 (file)
index 192fa09..0000000
+++ /dev/null
@@ -1,749 +0,0 @@
-/******************************************************************************
- *
- * Name: acmacros.h - C macros for the entire subsystem.
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACMACROS_H__
-#define __ACMACROS_H__
-
-/*
- * Data manipulation macros
- */
-#define ACPI_LOWORD(l)                  ((u16)(u32)(l))
-#define ACPI_HIWORD(l)                  ((u16)((((u32)(l)) >> 16) & 0xFFFF))
-#define ACPI_LOBYTE(l)                  ((u8)(u16)(l))
-#define ACPI_HIBYTE(l)                  ((u8)((((u16)(l)) >> 8) & 0xFF))
-
-#define ACPI_SET_BIT(target,bit)        ((target) |= (bit))
-#define ACPI_CLEAR_BIT(target,bit)      ((target) &= ~(bit))
-#define ACPI_MIN(a,b)                   (((a)<(b))?(a):(b))
-
-/* Size calculation */
-
-#define ACPI_ARRAY_LENGTH(x)            (sizeof(x) / sizeof((x)[0]))
-
-#if ACPI_MACHINE_WIDTH == 16
-
-/*
- * For 16-bit addresses, we have to assume that the upper 32 bits
- * (out of 64) are zero.
- */
-#define ACPI_LODWORD(l)                 ((u32)(l))
-#define ACPI_HIDWORD(l)                 ((u32)(0))
-
-#define ACPI_GET_ADDRESS(a)             ((a).lo)
-#define ACPI_STORE_ADDRESS(a,b)         {(a).hi=0;(a).lo=(u32)(b);}
-#define ACPI_VALID_ADDRESS(a)           ((a).hi | (a).lo)
-
-#else
-#ifdef ACPI_NO_INTEGER64_SUPPORT
-/*
- * acpi_integer is 32-bits, no 64-bit support on this platform
- */
-#define ACPI_LODWORD(l)                 ((u32)(l))
-#define ACPI_HIDWORD(l)                 ((u32)(0))
-
-#define ACPI_GET_ADDRESS(a)             (a)
-#define ACPI_STORE_ADDRESS(a,b)         ((a)=(b))
-#define ACPI_VALID_ADDRESS(a)           (a)
-
-#else
-
-/*
- * Full 64-bit address/integer on both 32-bit and 64-bit platforms
- */
-#define ACPI_LODWORD(l)                 ((u32)(u64)(l))
-#define ACPI_HIDWORD(l)                 ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi))
-
-#define ACPI_GET_ADDRESS(a)             (a)
-#define ACPI_STORE_ADDRESS(a,b)         ((a)=(acpi_physical_address)(b))
-#define ACPI_VALID_ADDRESS(a)           (a)
-#endif
-#endif
-
-/*
- * printf() format helpers
- */
-
-/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */
-
-#define ACPI_FORMAT_UINT64(i)           ACPI_HIDWORD(i),ACPI_LODWORD(i)
-
-/*
- * Extract data using a pointer.  Any more than a byte and we
- * get into potential aligment issues -- see the STORE macros below.
- * Use with care.
- */
-#define ACPI_GET8(ptr)                  *ACPI_CAST_PTR (u8, ptr)
-#define ACPI_GET16(ptr)                 *ACPI_CAST_PTR (u16, ptr)
-#define ACPI_GET32(ptr)                 *ACPI_CAST_PTR (u32, ptr)
-#define ACPI_GET64(ptr)                 *ACPI_CAST_PTR (u64, ptr)
-#define ACPI_SET8(ptr)                  *ACPI_CAST_PTR (u8, ptr)
-#define ACPI_SET16(ptr)                 *ACPI_CAST_PTR (u16, ptr)
-#define ACPI_SET32(ptr)                 *ACPI_CAST_PTR (u32, ptr)
-#define ACPI_SET64(ptr)                 *ACPI_CAST_PTR (u64, ptr)
-
-/*
- * Pointer manipulation
- */
-#define ACPI_CAST_PTR(t, p)             ((t *) (acpi_uintptr_t) (p))
-#define ACPI_CAST_INDIRECT_PTR(t, p)    ((t **) (acpi_uintptr_t) (p))
-#define ACPI_ADD_PTR(t,a,b)             ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_native_uint)(b)))
-#define ACPI_PTR_DIFF(a,b)              (acpi_native_uint) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b)))
-
-/* Pointer/Integer type conversions */
-
-#define ACPI_TO_POINTER(i)              ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i)
-#define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p,(void *) NULL)
-#define ACPI_OFFSET(d,f)                (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
-
-#if ACPI_MACHINE_WIDTH == 16
-#define ACPI_STORE_POINTER(d,s)         ACPI_MOVE_32_TO_32(d,s)
-#define ACPI_PHYSADDR_TO_PTR(i)         (void *)(i)
-#define ACPI_PTR_TO_PHYSADDR(i)         (u32) ACPI_CAST_PTR (u8,(i))
-#else
-#define ACPI_PHYSADDR_TO_PTR(i)         ACPI_TO_POINTER(i)
-#define ACPI_PTR_TO_PHYSADDR(i)         ACPI_TO_INTEGER(i)
-#endif
-
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
-#define ACPI_COMPARE_NAME(a,b)          (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b)))
-#else
-#define ACPI_COMPARE_NAME(a,b)          (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
-#endif
-
-/*
- * Macros for moving data around to/from buffers that are possibly unaligned.
- * If the hardware supports the transfer of unaligned data, just do the store.
- * Otherwise, we have to move one byte at a time.
- */
-#ifdef ACPI_BIG_ENDIAN
-/*
- * Macros for big-endian machines
- */
-
-/* This macro sets a buffer index, starting from the end of the buffer */
-
-#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) ((buf_len) - (((buf_offset)+1) * (byte_gran)))
-
-/* These macros reverse the bytes during the move, converting little-endian to big endian */
-
-        /* Big Endian      <==        Little Endian */
-        /*  Hi...Lo                     Lo...Hi     */
-/* 16-bit source, 16/32/64 destination */
-
-#define ACPI_MOVE_16_TO_16(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[1];\
-                         ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[0];}
-
-#define ACPI_MOVE_16_TO_32(d,s)         {(*(u32 *)(void *)(d))=0;\
-                                         ((u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
-                                         ((u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
-
-#define ACPI_MOVE_16_TO_64(d,s)         {(*(u64 *)(void *)(d))=0;\
-                                                          ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
-                                                          ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
-
-/* 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_32(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\
-                                                                         ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\
-                                                                         ((  u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[1];\
-                                                                         ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[0];}
-
-#define ACPI_MOVE_32_TO_64(d,s)         {(*(u64 *)(void *)(d))=0;\
-                                                                                  ((u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
-                                                                                  ((u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
-                                                                                  ((u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
-                                                                                  ((u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
-
-/* 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_64(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\
-                                                                                ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\
-                                                                                ((  u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[5];\
-                                                                                ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[4];\
-                                                                                ((  u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[3];\
-                                                                                ((  u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[2];\
-                                                                                ((  u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[1];\
-                                                                                ((  u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[0];}
-#else
-/*
- * Macros for little-endian machines
- */
-
-/* This macro sets a buffer index, starting from the beginning of the buffer */
-
-#define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset)
-
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
-
-/* The hardware supports unaligned transfers, just do the little-endian move */
-
-#if ACPI_MACHINE_WIDTH == 16
-
-/* No 64-bit integers */
-/* 16-bit source, 16/32/64 destination */
-
-#define ACPI_MOVE_16_TO_16(d,s)         *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_32(d,s)         *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_64(d,s)         ACPI_MOVE_16_TO_32(d,s)
-
-/* 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_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_64(d,s)         ACPI_MOVE_32_TO_32(d,s)
-
-#else
-/* 16-bit source, 16/32/64 destination */
-
-#define ACPI_MOVE_16_TO_16(d,s)         *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_32(d,s)         *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_64(d,s)         *(u64 *)(void *)(d) = *(u16 *)(void *)(s)
-
-/* 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_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_64(d,s)         *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
-#endif
-
-#else
-/*
- * The hardware does not support unaligned transfers.  We must move the
- * data one byte at a time.  These macros work whether the source or
- * the destination (or both) is/are unaligned.  (Little-endian move)
- */
-
-/* 16-bit source, 16/32/64 destination */
-
-#define ACPI_MOVE_16_TO_16(d,s)         {((  u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
-                                                                                ((  u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];}
-
-#define ACPI_MOVE_16_TO_32(d,s)         {(*(u32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
-#define ACPI_MOVE_16_TO_64(d,s)         {(*(u64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
-
-/* 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_32(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];\
-                                                                                ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];}
-
-#define ACPI_MOVE_32_TO_64(d,s)         {(*(u64 *)(void *)(d)) = 0; 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_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];\
-                                                                                ((  u8 *)(void *)(d))[3] = ((u8 *)(void *)(s))[3];\
-                                                                                ((  u8 *)(void *)(d))[4] = ((u8 *)(void *)(s))[4];\
-                                                                                ((  u8 *)(void *)(d))[5] = ((u8 *)(void *)(s))[5];\
-                                                                                ((  u8 *)(void *)(d))[6] = ((u8 *)(void *)(s))[6];\
-                                                                                ((  u8 *)(void *)(d))[7] = ((u8 *)(void *)(s))[7];}
-#endif
-#endif
-
-/* Macros based on machine integer width */
-
-#if ACPI_MACHINE_WIDTH == 16
-#define ACPI_MOVE_SIZE_TO_16(d,s)       ACPI_MOVE_16_TO_16(d,s)
-
-#elif ACPI_MACHINE_WIDTH == 32
-#define ACPI_MOVE_SIZE_TO_16(d,s)       ACPI_MOVE_32_TO_16(d,s)
-
-#elif ACPI_MACHINE_WIDTH == 64
-#define ACPI_MOVE_SIZE_TO_16(d,s)       ACPI_MOVE_64_TO_16(d,s)
-
-#else
-#error unknown ACPI_MACHINE_WIDTH
-#endif
-
-/*
- * Fast power-of-two math macros for non-optimized compilers
- */
-#define _ACPI_DIV(value,power_of2)      ((u32) ((value) >> (power_of2)))
-#define _ACPI_MUL(value,power_of2)      ((u32) ((value) << (power_of2)))
-#define _ACPI_MOD(value,divisor)        ((u32) ((value) & ((divisor) -1)))
-
-#define ACPI_DIV_2(a)                   _ACPI_DIV(a,1)
-#define ACPI_MUL_2(a)                   _ACPI_MUL(a,1)
-#define ACPI_MOD_2(a)                   _ACPI_MOD(a,2)
-
-#define ACPI_DIV_4(a)                   _ACPI_DIV(a,2)
-#define ACPI_MUL_4(a)                   _ACPI_MUL(a,2)
-#define ACPI_MOD_4(a)                   _ACPI_MOD(a,4)
-
-#define ACPI_DIV_8(a)                   _ACPI_DIV(a,3)
-#define ACPI_MUL_8(a)                   _ACPI_MUL(a,3)
-#define ACPI_MOD_8(a)                   _ACPI_MOD(a,8)
-
-#define ACPI_DIV_16(a)                  _ACPI_DIV(a,4)
-#define ACPI_MUL_16(a)                  _ACPI_MUL(a,4)
-#define ACPI_MOD_16(a)                  _ACPI_MOD(a,16)
-
-#define ACPI_DIV_32(a)                  _ACPI_DIV(a,5)
-#define ACPI_MUL_32(a)                  _ACPI_MUL(a,5)
-#define ACPI_MOD_32(a)                  _ACPI_MOD(a,32)
-
-/*
- * Rounding macros (Power of two boundaries only)
- */
-#define ACPI_ROUND_DOWN(value,boundary)     (((acpi_native_uint)(value)) & \
-                                                                                               (~(((acpi_native_uint) boundary)-1)))
-
-#define ACPI_ROUND_UP(value,boundary)       ((((acpi_native_uint)(value)) + \
-                                                                                               (((acpi_native_uint) boundary)-1)) & \
-                                                                                               (~(((acpi_native_uint) boundary)-1)))
-
-/* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */
-
-#define ACPI_ROUND_DOWN_TO_32BIT(a)         ACPI_ROUND_DOWN(a,4)
-#define ACPI_ROUND_DOWN_TO_64BIT(a)         ACPI_ROUND_DOWN(a,8)
-#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a)   ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint))
-
-#define ACPI_ROUND_UP_TO_32BIT(a)           ACPI_ROUND_UP(a,4)
-#define ACPI_ROUND_UP_TO_64BIT(a)           ACPI_ROUND_UP(a,8)
-#define ACPI_ROUND_UP_TO_NATIVE_WORD(a)     ACPI_ROUND_UP(a,sizeof(acpi_native_uint))
-
-#define ACPI_ROUND_BITS_UP_TO_BYTES(a)      ACPI_DIV_8((a) + 7)
-#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a)    ACPI_DIV_8((a))
-
-#define ACPI_ROUND_UP_TO_1K(a)              (((a) + 1023) >> 10)
-
-/* Generic (non-power-of-two) rounding */
-
-#define ACPI_ROUND_UP_TO(value,boundary)    (((value) + ((boundary)-1)) / (boundary))
-
-#define ACPI_IS_MISALIGNED(value)           (((acpi_native_uint)value) & (sizeof(acpi_native_uint)-1))
-
-/*
- * Bitmask creation
- * Bit positions start at zero.
- * MASK_BITS_ABOVE creates a mask starting AT the position and above
- * MASK_BITS_BELOW creates a mask starting one bit BELOW the position
- */
-#define ACPI_MASK_BITS_ABOVE(position)      (~((ACPI_INTEGER_MAX) << ((u32) (position))))
-#define ACPI_MASK_BITS_BELOW(position)      ((ACPI_INTEGER_MAX) << ((u32) (position)))
-
-#define ACPI_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)
-#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val)  reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
-
-#define ACPI_INSERT_BITS(target, mask, source)          target = ((target & (~(mask))) | (source & mask))
-
-/* Generate a UUID */
-
-#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
-       (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
-       (b) & 0xFF, ((b) >> 8) & 0xFF, \
-       (c) & 0xFF, ((c) >> 8) & 0xFF, \
-       (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
-
-/*
- * An struct acpi_namespace_node * can appear in some contexts,
- * where a pointer to an union acpi_operand_object    can also
- * appear.  This macro is used to distinguish them.
- *
- * The "Descriptor" field is the first field in both structures.
- */
-#define ACPI_GET_DESCRIPTOR_TYPE(d)     (((union acpi_descriptor *)(void *)(d))->common.descriptor_type)
-#define ACPI_SET_DESCRIPTOR_TYPE(d,t)   (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t)
-
-/* Macro to test the object type */
-
-#define ACPI_GET_OBJECT_TYPE(d)         (((union acpi_operand_object *)(void *)(d))->common.type)
-
-/* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */
-
-#define ACPI_IS_SINGLE_TABLE(x)         (((x) & 0x01) == ACPI_TABLE_SINGLE ? 1 : 0)
-
-/*
- * Macros for the master AML opcode table
- */
-#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
-#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags)    {name,(u32)(Pargs),(u32)(Iargs),(u32)(flags),obj_type,class,type}
-#else
-#define ACPI_OP(name,Pargs,Iargs,obj_type,class,type,flags)    {(u32)(Pargs),(u32)(Iargs),(u32)(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))
-#define ARG_3(x)                        ((u32)(x) << (2 * ARG_TYPE_WIDTH))
-#define ARG_4(x)                        ((u32)(x) << (3 * ARG_TYPE_WIDTH))
-#define ARG_5(x)                        ((u32)(x) << (4 * ARG_TYPE_WIDTH))
-#define ARG_6(x)                        ((u32)(x) << (5 * ARG_TYPE_WIDTH))
-
-#define ARGI_LIST1(a)                   (ARG_1(a))
-#define ARGI_LIST2(a,b)                 (ARG_1(b)|ARG_2(a))
-#define ARGI_LIST3(a,b,c)               (ARG_1(c)|ARG_2(b)|ARG_3(a))
-#define ARGI_LIST4(a,b,c,d)             (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a))
-#define ARGI_LIST5(a,b,c,d,e)           (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a))
-#define ARGI_LIST6(a,b,c,d,e,f)         (ARG_1(f)|ARG_2(e)|ARG_3(d)|ARG_4(c)|ARG_5(b)|ARG_6(a))
-
-#define ARGP_LIST1(a)                   (ARG_1(a))
-#define ARGP_LIST2(a,b)                 (ARG_1(a)|ARG_2(b))
-#define ARGP_LIST3(a,b,c)               (ARG_1(a)|ARG_2(b)|ARG_3(c))
-#define ARGP_LIST4(a,b,c,d)             (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d))
-#define ARGP_LIST5(a,b,c,d,e)           (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e))
-#define ARGP_LIST6(a,b,c,d,e,f)         (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)|ARG_6(f))
-
-#define GET_CURRENT_ARG_TYPE(list)      (list & ((u32) 0x1F))
-#define INCREMENT_ARG_LIST(list)        (list >>= ((u32) ARG_TYPE_WIDTH))
-
-#if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
-/*
- * Module name is include in both debug and non-debug versions primarily for
- * error messages. The __FILE__ macro is not very useful for this, because it
- * often includes the entire pathname to the module
- */
-#define ACPI_MODULE_NAME(name)          static char ACPI_UNUSED_VAR *_acpi_module_name = name;
-#else
-#define ACPI_MODULE_NAME(name)
-#endif
-
-/*
- * Ascii error messages can be configured out
- */
-#ifndef ACPI_NO_ERROR_MESSAGES
-#define AE_INFO                         _acpi_module_name, __LINE__
-
-/*
- * Error reporting. Callers module and line number are inserted by AE_INFO,
- * the plist contains a set of parens to allow variable-length lists.
- * These macros are used for both the debug and non-debug versions of the code.
- */
-#define ACPI_INFO(plist)                acpi_ut_info plist
-#define ACPI_WARNING(plist)             acpi_ut_warning plist
-#define ACPI_EXCEPTION(plist)           acpi_ut_exception plist
-#define ACPI_ERROR(plist)               acpi_ut_error plist
-#define ACPI_ERROR_NAMESPACE(s,e)       acpi_ns_report_error (AE_INFO, s, e);
-#define ACPI_ERROR_METHOD(s,n,p,e)      acpi_ns_report_method_error (AE_INFO, s, n, p, e);
-
-#else
-
-/* No error messages */
-
-#define ACPI_INFO(plist)
-#define ACPI_WARNING(plist)
-#define ACPI_EXCEPTION(plist)
-#define ACPI_ERROR(plist)
-#define ACPI_ERROR_NAMESPACE(s,e)
-#define ACPI_ERROR_METHOD(s,n,p,e)
-#endif
-
-/*
- * Debug macros that are conditionally compiled
- */
-#ifdef ACPI_DEBUG_OUTPUT
-
-/*
- * Common parameters used for debug output functions:
- * line number, function name, module(file) name, component ID
- */
-#define ACPI_DEBUG_PARAMETERS           __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
-
-/*
- * Function entry tracing
- */
-
-/*
- * 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 ("MyFunctionName") so that it can
- * be also used by the function exit macros below.
- * Note: (const char) is used to be compatible with the debug interfaces
- * and macros such as __FUNCTION__.
- */
-#define ACPI_FUNCTION_NAME(name)        const char *_acpi_function_name = #name;
-
-#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 "_AcpiFunctionName" is defined.
- *
- * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining
- * about these constructs.
- */
-#ifdef ACPI_USE_DO_WHILE_0
-#define ACPI_DO_WHILE0(a)               do a while(0)
-#else
-#define ACPI_DO_WHILE0(a)               a
-#endif
-
-#define return_VOID                     ACPI_DO_WHILE0 ({ \
-                                                                                       acpi_ut_exit (ACPI_DEBUG_PARAMETERS); \
-                                                                                       return;})
-/*
- * There are two versions of most of the return macros. The default version is
- * safer, since it avoids side-effects by guaranteeing that the argument will
- * not be evaluated twice.
- *
- * A less-safe version of the macros is provided for optional use if the
- * compiler uses excessive CPU stack (for example, this may happen in the
- * debug case if code optimzation is disabled.)
- */
-#ifndef ACPI_SIMPLE_RETURN_MACROS
-
-#define return_ACPI_STATUS(s)           ACPI_DO_WHILE0 ({ \
-                                                                                       register acpi_status _s = (s); \
-                                                                                       acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, _s); \
-                                                                                       return (_s); })
-#define return_PTR(s)                   ACPI_DO_WHILE0 ({ \
-                                                                                       register void *_s = (void *) (s); \
-                                                                                       acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) _s); \
-                                                                                       return (_s); })
-#define return_VALUE(s)                 ACPI_DO_WHILE0 ({ \
-                                                                                       register acpi_integer _s = (s); \
-                                                                                       acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, _s); \
-                                                                                       return (_s); })
-#define return_UINT8(s)                 ACPI_DO_WHILE0 ({ \
-                                                                                       register u8 _s = (u8) (s); \
-                                                                                       acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \
-                                                                                       return (_s); })
-#define return_UINT32(s)                ACPI_DO_WHILE0 ({ \
-                                                                                       register u32 _s = (u32) (s); \
-                                                                                       acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \
-                                                                                       return (_s); })
-#else                          /* Use original less-safe macros */
-
-#define return_ACPI_STATUS(s)           ACPI_DO_WHILE0 ({ \
-                                                                                       acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, (s)); \
-                                                                                       return((s)); })
-#define return_PTR(s)                   ACPI_DO_WHILE0 ({ \
-                                                                                       acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) (s)); \
-                                                                                       return((s)); })
-#define return_VALUE(s)                 ACPI_DO_WHILE0 ({ \
-                                                                                       acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) (s)); \
-                                                                                       return((s)); })
-#define return_UINT8(s)                 return_VALUE(s)
-#define return_UINT32(s)                return_VALUE(s)
-
-#endif                         /* ACPI_SIMPLE_RETURN_MACROS */
-
-/* Conditional execution */
-
-#define ACPI_DEBUG_EXEC(a)              a
-#define ACPI_NORMAL_EXEC(a)
-
-#define ACPI_DEBUG_DEFINE(a)            a;
-#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,_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)
-#define ACPI_DUMP_RESOURCE_LIST(a)      acpi_rs_dump_resource_list(a)
-#define ACPI_DUMP_BUFFER(a,b)           acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
-
-/*
- * Master debug print macros
- * Print iff:
- *    1) Debug print for the current component is enabled
- *    2) Debug error level or trace level for the print statement is enabled
- */
-#define ACPI_DEBUG_PRINT(plist)         acpi_ut_debug_print plist
-#define ACPI_DEBUG_PRINT_RAW(plist)     acpi_ut_debug_print_raw plist
-
-#else
-/*
- * This is the non-debug case -- make everything go away,
- * leaving no executable debug code!
- */
-#define ACPI_DEBUG_EXEC(a)
-#define ACPI_NORMAL_EXEC(a)             a;
-
-#define ACPI_DEBUG_DEFINE(a)
-#define ACPI_DEBUG_ONLY_MEMBERS(a)
-#define ACPI_FUNCTION_NAME(a)
-#define ACPI_FUNCTION_TRACE(a)
-#define ACPI_FUNCTION_TRACE_PTR(a,b)
-#define ACPI_FUNCTION_TRACE_U32(a,b)
-#define ACPI_FUNCTION_TRACE_STR(a,b)
-#define ACPI_FUNCTION_EXIT
-#define ACPI_FUNCTION_STATUS_EXIT(s)
-#define ACPI_FUNCTION_VALUE_EXIT(s)
-#define ACPI_FUNCTION_ENTRY()
-#define ACPI_DUMP_STACK_ENTRY(a)
-#define ACPI_DUMP_OPERANDS(a,b,c,d,e)
-#define ACPI_DUMP_ENTRY(a,b)
-#define ACPI_DUMP_TABLES(a,b)
-#define ACPI_DUMP_PATHNAME(a,b,c,d)
-#define ACPI_DUMP_RESOURCE_LIST(a)
-#define ACPI_DUMP_BUFFER(a,b)
-#define ACPI_DEBUG_PRINT(pl)
-#define ACPI_DEBUG_PRINT_RAW(pl)
-
-#define return_VOID                     return
-#define return_ACPI_STATUS(s)           return(s)
-#define return_VALUE(s)                 return(s)
-#define return_UINT8(s)                 return(s)
-#define return_UINT32(s)                return(s)
-#define return_PTR(s)                   return(s)
-
-#endif
-
-/*
- * Some code only gets executed when the debugger is built in.
- * Note that this is entirely independent of whether the
- * DEBUG_PRINT stuff (set by ACPI_DEBUG_OUTPUT) is on, or not.
- */
-#ifdef ACPI_DEBUGGER
-#define ACPI_DEBUGGER_EXEC(a)           a
-#else
-#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
- */
-#if ACPI_MACHINE_WIDTH == 16
-#undef ACPI_DEBUG_ONLY_MEMBERS
-#undef _VERBOSE_STRUCTURES
-#define ACPI_DEBUG_ONLY_MEMBERS(a)
-#endif
-
-#ifdef ACPI_DEBUG_OUTPUT
-/*
- * 1) Set name to blanks
- * 2) Copy the object name
- */
-#define ACPI_ADD_OBJECT_NAME(a,b)       ACPI_MEMSET (a->common.name, ' ', sizeof (a->common.name));\
-                                                                               ACPI_STRNCPY (a->common.name, acpi_gbl_ns_type_names[b], sizeof (a->common.name))
-#else
-
-#define ACPI_ADD_OBJECT_NAME(a,b)
-#endif
-
-/*
- * Memory allocation tracking (DEBUG ONLY)
- */
-#ifndef ACPI_DBG_TRACK_ALLOCATIONS
-
-/* Memory allocation */
-
-#ifndef ACPI_ALLOCATE
-#define ACPI_ALLOCATE(a)            acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
-#endif
-#ifndef ACPI_ALLOCATE_ZEROED
-#define ACPI_ALLOCATE_ZEROED(a)     acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
-#endif
-#ifndef ACPI_FREE
-#define ACPI_FREE(a)                acpio_os_free(a)
-#endif
-#define ACPI_MEM_TRACKING(a)
-
-#else
-
-/* Memory allocation */
-
-#define ACPI_ALLOCATE(a)            acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
-#define ACPI_ALLOCATE_ZEROED(a)     acpi_ut_allocate_zeroed_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
-#define ACPI_FREE(a)                acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__)
-#define ACPI_MEM_TRACKING(a)        a
-
-#endif                         /* ACPI_DBG_TRACK_ALLOCATIONS */
-
-#endif                         /* ACMACROS_H */
diff --git a/kitten/include/acpi/acnames.h b/kitten/include/acpi/acnames.h
deleted file mode 100644 (file)
index b67da36..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/******************************************************************************
- *
- * Name: acnames.h - Global names and strings
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACNAMES_H__
-#define __ACNAMES_H__
-
-/* Method names - these methods can appear anywhere in the namespace */
-
-#define METHOD_NAME__HID        "_HID"
-#define METHOD_NAME__CID        "_CID"
-#define METHOD_NAME__UID        "_UID"
-#define METHOD_NAME__ADR        "_ADR"
-#define METHOD_NAME__INI        "_INI"
-#define METHOD_NAME__STA        "_STA"
-#define METHOD_NAME__REG        "_REG"
-#define METHOD_NAME__SEG        "_SEG"
-#define METHOD_NAME__BBN        "_BBN"
-#define METHOD_NAME__PRT        "_PRT"
-#define METHOD_NAME__CRS        "_CRS"
-#define METHOD_NAME__PRS        "_PRS"
-#define METHOD_NAME__PRW        "_PRW"
-#define METHOD_NAME__SRS        "_SRS"
-
-/* Method names - these methods must appear at the namespace root */
-
-#define METHOD_NAME__BFS        "\\_BFS"
-#define METHOD_NAME__GTS        "\\_GTS"
-#define METHOD_NAME__PTS        "\\_PTS"
-#define METHOD_NAME__SST        "\\_SI._SST"
-#define METHOD_NAME__WAK        "\\_WAK"
-
-/* 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_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__  */
diff --git a/kitten/include/acpi/acnamesp.h b/kitten/include/acpi/acnamesp.h
deleted file mode 100644 (file)
index 83b52f9..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/******************************************************************************
- *
- * Name: acnamesp.h - Namespace subcomponent prototypes and defines
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACNAMESP_H__
-#define __ACNAMESP_H__
-
-/* To search the entire name space, pass this as search_base */
-
-#define ACPI_NS_ALL                 ((acpi_handle)0)
-
-/*
- * Elements of acpi_ns_properties are bit significant
- * 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 */
-
-/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */
-
-#define ACPI_NS_NO_UPSEARCH         0
-#define ACPI_NS_SEARCH_PARENT       0x01
-#define ACPI_NS_DONT_OPEN_SCOPE     0x02
-#define ACPI_NS_NO_PEER_SEARCH      0x04
-#define ACPI_NS_ERROR_IF_FOUND      0x08
-#define ACPI_NS_PREFIX_IS_SCOPE     0x10
-#define ACPI_NS_EXTERNAL            0x20
-
-#define ACPI_NS_WALK_UNLOCK         TRUE
-#define ACPI_NS_WALK_NO_UNLOCK      FALSE
-
-/*
- * nsinit - Namespace initialization
- */
-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_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);
-
-/*
- * nsparse - table parsing
- */
-acpi_status
-acpi_ns_parse_table(struct acpi_table_desc *table_desc,
-                   struct acpi_namespace_node *scope);
-
-acpi_status
-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_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);
-
-void acpi_ns_delete_node(struct acpi_namespace_node *node);
-
-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_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);
-
-/*
- * 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_entry(acpi_handle handle, u32 debug_level);
-
-void
-acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component);
-
-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);
-
-#ifdef ACPI_FUTURE_USAGE
-void
-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(struct acpi_evaluate_info *info);
-
-/*
- * nsnames - Name and Scope manipulation
- */
-u32 acpi_ns_opens_scope(acpi_object_type type);
-
-void
-acpi_ns_build_external_path(struct acpi_namespace_node *node,
-                           acpi_size size, char *name_buffer);
-
-char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);
-
-char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
-
-acpi_status
-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_status
-acpi_ns_get_node(struct acpi_namespace_node *prefix_node,
-                char *external_pathname,
-                u32 flags, struct acpi_namespace_node **out_node);
-
-acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node);
-
-/*
- * 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);
-
-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);
-
-acpi_status
-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_status
-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_status
-acpi_ns_search_one_scope(u32 entry_name,
-                        struct acpi_namespace_node *node,
-                        acpi_object_type type,
-                        struct acpi_namespace_node **ret_node);
-
-void
-acpi_ns_install_node(struct acpi_walk_state *walk_state,
-                    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);
-
-acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);
-
-u32 acpi_ns_local(acpi_object_type type);
-
-void
-acpi_ns_report_error(char *module_name,
-                    u32 line_number,
-                    char *internal_name, acpi_status lookup_status);
-
-void
-acpi_ns_report_method_error(char *module_name,
-                           u32 line_number,
-                           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);
-
-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_externalize_name(u32 internal_name_length,
-                        char *internal_name,
-                        u32 * converted_name_length, char **converted_name);
-
-struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle);
-
-acpi_handle acpi_ns_convert_entry_to_handle(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__ */
diff --git a/kitten/include/acpi/acobject.h b/kitten/include/acpi/acobject.h
deleted file mode 100644 (file)
index 8fdee31..0000000
+++ /dev/null
@@ -1,409 +0,0 @@
-
-/******************************************************************************
- *
- * Name: acobject.h - Definition of union acpi_operand_object  (Internal object only)
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef _ACOBJECT_H
-#define _ACOBJECT_H
-
-/* acpisrc:struct_defs -- for acpisrc conversion */
-
-/*
- * The union acpi_operand_object is used to pass AML operands from the dispatcher
- * to the interpreter, and to keep track of the various handlers such as
- * address space handlers and notify handlers. The object is a constant
- * size in order to allow it to be cached and reused.
- */
-
-/*******************************************************************************
- *
- * Common Descriptors
- *
- ******************************************************************************/
-
-/*
- * Common area for all objects.
- *
- * descriptor_type is used to differentiate between internal descriptors, and
- * must be in the same place across all descriptors
- *
- * Note: The descriptor_type and Type fields must appear in the identical
- * position in both the struct acpi_namespace_node and union acpi_operand_object
- * structures.
- */
-#define ACPI_OBJECT_COMMON_HEADER \
-       union acpi_operand_object       *next_object;       /* Objects linked to parent NS node */\
-       u8                              descriptor_type;    /* To differentiate various internal objs */\
-       u8                              type;               /* acpi_object_type */\
-       u16                             reference_count;    /* For object deletion management */\
-       u8                              flags;
-       /*
-        * Note: There are 3 bytes available here before the
-        * next natural alignment boundary (for both 32/64 cases)
-        */
-
-/* Values for Flag byte above */
-
-#define AOPOBJ_AML_CONSTANT         0x01
-#define AOPOBJ_STATIC_POINTER       0x02
-#define AOPOBJ_DATA_VALID           0x04
-#define AOPOBJ_OBJECT_INITIALIZED   0x08
-#define AOPOBJ_SETUP_COMPLETE       0x10
-#define AOPOBJ_SINGLE_DATUM         0x20
-#define AOPOBJ_INVALID              0x40       /* Used if host OS won't allow an op_region address */
-
-/******************************************************************************
- *
- * Basic data types
- *
- *****************************************************************************/
-
-struct acpi_object_common {
-ACPI_OBJECT_COMMON_HEADER};
-
-struct acpi_object_integer {
-       ACPI_OBJECT_COMMON_HEADER acpi_integer value;
-};
-
-/*
- * Note: The String and Buffer object must be identical through the Pointer
- * and length elements.  There is code that depends on this.
- *
- * Fields common to both Strings and Buffers
- */
-#define ACPI_COMMON_BUFFER_INFO(_type) \
-       _type                           *pointer; \
-       u32                             length;
-
-struct acpi_object_string {    /* Null terminated, ASCII characters only */
-       ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */
-};
-
-struct acpi_object_buffer {
-       ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8)   /* Buffer in AML stream or allocated buffer */
-       u32 aml_length;
-       u8 *aml_start;
-       struct acpi_namespace_node *node;       /* Link back to parent node */
-};
-
-struct acpi_object_package {
-       ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node;     /* Link back to parent node */
-       union acpi_operand_object **elements;   /* Array of pointers to acpi_objects */
-       u8 *aml_start;
-       u32 aml_length;
-       u32 count;              /* # of elements in package */
-};
-
-/******************************************************************************
- *
- * Complex data types
- *
- *****************************************************************************/
-
-struct acpi_object_event {
-       ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore;  /* Actual OS synchronization object */
-};
-
-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 */
-       acpi_mutex os_mutex;    /* 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;
-       struct acpi_namespace_node *node;       /* Containing namespace node */
-       union acpi_operand_object *handler;     /* Handler for region access */
-       union acpi_operand_object *next;
-       acpi_physical_address address;
-       u32 length;
-};
-
-struct acpi_object_method {
-       ACPI_OBJECT_COMMON_HEADER u8 method_flags;
-       u8 param_count;
-       u8 sync_level;
-       union acpi_operand_object *mutex;
-       u8 *aml_start;
-       ACPI_INTERNAL_METHOD implementation;
-       u32 aml_length;
-       u8 thread_count;
-       acpi_owner_id owner_id;
-};
-
-/******************************************************************************
- *
- * Objects that can be notified.  All share a common notify_info area.
- *
- *****************************************************************************/
-
-/*
- * Common fields for objects that support ASL notifications
- */
-#define ACPI_COMMON_NOTIFY_INFO \
-       union acpi_operand_object       *system_notify;     /* Handler for system notifies */\
-       union acpi_operand_object       *device_notify;     /* Handler for driver notifies */\
-       union acpi_operand_object       *handler;       /* Handler for Address space */
-
-struct acpi_object_notify_common {     /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
-ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
-
-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_processor {
-       ACPI_OBJECT_COMMON_HEADER u8 proc_id;
-       u8 length;
-        ACPI_COMMON_NOTIFY_INFO acpi_io_address address;
-};
-
-struct acpi_object_thermal_zone {
-ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
-
-/******************************************************************************
- *
- * Fields.  All share a common header/info field.
- *
- *****************************************************************************/
-
-/*
- * Common bitfield for the field objects
- * "Field Datum"  -- a datum from the actual field object
- * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
- */
-#define ACPI_COMMON_FIELD_INFO \
-       u8                              field_flags;        /* Access, update, and lock bits */\
-       u8                              attribute;          /* From access_as keyword */\
-       u8                              access_byte_width;  /* Read/Write size in bytes */\
-       struct acpi_namespace_node      *node;              /* Link back to parent node */\
-       u32                             bit_length;         /* Length of field in bits */\
-       u32                             base_byte_offset;   /* Byte offset within containing object */\
-       u32                             value;              /* Value to store into the Bank or Index register */\
-       u8                              start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
-       u8                              access_bit_width;       /* Read/Write size in bits (8-64) */
-
-struct acpi_object_field_common {      /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
-       ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent 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_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 "RegionObj" 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 */
-};
-
-/******************************************************************************
- *
- * 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_addr_handler {
-       ACPI_OBJECT_COMMON_HEADER u8 space_id;
-       u8 handler_flags;
-       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;
-};
-
-/* Flags for address handler (handler_flags) */
-
-#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED  0x01
-
-/******************************************************************************
- *
- * Special internal objects
- *
- *****************************************************************************/
-
-/*
- * 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;
-       void *object;           /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
-       struct acpi_namespace_node *node;
-       union acpi_operand_object **where;
-       u32 offset;             /* Used for arg_op, local_op, and index_op */
-};
-
-/*
- * Extra object is used as additional storage for types that
- * have AML code in their declarations (term_args) that must be
- * evaluated at run time.
- *
- * Currently: Region and field_unit types
- */
-struct acpi_object_extra {
-       ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG;       /* _REG method for this region (if any) */
-       void *region_context;   /* Region-specific data */
-       u8 *aml_start;
-       u32 aml_length;
-};
-
-/* Additional data that can be attached to namespace nodes */
-
-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 */
-};
-
-/******************************************************************************
- *
- * 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_descriptor - objects that share a common descriptor identifier
- *
- *****************************************************************************/
-
-/* Object descriptor types */
-
-#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
-#define ACPI_DESC_TYPE_STATE_CONTROL    0x05
-#define ACPI_DESC_TYPE_STATE_RPSCOPE    0x06
-#define ACPI_DESC_TYPE_STATE_PSCOPE     0x07
-#define ACPI_DESC_TYPE_STATE_WSCOPE     0x08
-#define ACPI_DESC_TYPE_STATE_RESULT     0x09
-#define ACPI_DESC_TYPE_STATE_NOTIFY     0x0A
-#define ACPI_DESC_TYPE_STATE_THREAD     0x0B
-#define ACPI_DESC_TYPE_WALK             0x0C
-#define ACPI_DESC_TYPE_PARSER           0x0D
-#define ACPI_DESC_TYPE_OPERAND          0x0E
-#define ACPI_DESC_TYPE_NAMED            0x0F
-#define ACPI_DESC_TYPE_MAX              0x0F
-
-struct acpi_common_descriptor {
-       void *common_pointer;
-       u8 descriptor_type;     /* To differentiate various internal objs */
-};
-
-union acpi_descriptor {
-       struct acpi_common_descriptor common;
-       union acpi_operand_object object;
-       struct acpi_namespace_node node;
-       union acpi_parse_object op;
-};
-
-#endif                         /* _ACOBJECT_H */
diff --git a/kitten/include/acpi/acopcode.h b/kitten/include/acpi/acopcode.h
deleted file mode 100644 (file)
index 7659a46..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/******************************************************************************
- *
- * Name: acopcode.h - AML opcode information for the AML parser and interpreter
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACOPCODE_H__
-#define __ACOPCODE_H__
-
-#define MAX_EXTENDED_OPCODE         0x88
-#define NUM_EXTENDED_OPCODE         (MAX_EXTENDED_OPCODE + 1)
-#define MAX_INTERNAL_OPCODE
-#define NUM_INTERNAL_OPCODE         (MAX_INTERNAL_OPCODE + 1)
-
-/* Used for non-assigned opcodes */
-
-#define _UNK                        0x6B
-
-/*
- * Reserved ASCII characters.  Do not use any of these for
- * internal opcodes, since they are used to differentiate
- * name strings from AML opcodes
- */
-#define _ASC                        0x6C
-#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
- * master opcode table (in psopcode.c).
- */
-#define ARGP_ACCESSFIELD_OP             ARGP_LIST1 (ARGP_NAMESTRING)
-#define ARGP_ACQUIRE_OP                 ARGP_LIST2 (ARGP_SUPERNAME,  ARGP_WORDDATA)
-#define ARGP_ADD_OP                     ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_ALIAS_OP                   ARGP_LIST2 (ARGP_NAMESTRING, ARGP_NAME)
-#define ARGP_ARG0                       ARG_NONE
-#define ARGP_ARG1                       ARG_NONE
-#define ARGP_ARG2                       ARG_NONE
-#define ARGP_ARG3                       ARG_NONE
-#define ARGP_ARG4                       ARG_NONE
-#define ARGP_ARG5                       ARG_NONE
-#define ARGP_ARG6                       ARG_NONE
-#define ARGP_BANK_FIELD_OP              ARGP_LIST6 (ARGP_PKGLENGTH,  ARGP_NAMESTRING,    ARGP_NAMESTRING,ARGP_TERMARG,   ARGP_BYTEDATA,  ARGP_FIELDLIST)
-#define ARGP_BIT_AND_OP                 ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_BIT_NAND_OP                ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_BIT_NOR_OP                 ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_BIT_NOT_OP                 ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_BIT_OR_OP                  ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_BIT_XOR_OP                 ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_BREAK_OP                   ARG_NONE
-#define ARGP_BREAK_POINT_OP             ARG_NONE
-#define ARGP_BUFFER_OP                  ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_TERMARG,       ARGP_BYTELIST)
-#define ARGP_BYTE_OP                    ARGP_LIST1 (ARGP_BYTEDATA)
-#define ARGP_BYTELIST_OP                ARGP_LIST1 (ARGP_NAMESTRING)
-#define ARGP_CONCAT_OP                  ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_CONCAT_RES_OP              ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_COND_REF_OF_OP             ARGP_LIST2 (ARGP_SUPERNAME,  ARGP_SUPERNAME)
-#define ARGP_CONTINUE_OP                ARG_NONE
-#define ARGP_COPY_OP                    ARGP_LIST2 (ARGP_TERMARG,    ARGP_SIMPLENAME)
-#define ARGP_CREATE_BIT_FIELD_OP        ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
-#define ARGP_CREATE_BYTE_FIELD_OP       ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
-#define ARGP_CREATE_DWORD_FIELD_OP      ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
-#define ARGP_CREATE_FIELD_OP            ARGP_LIST4 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TERMARG,   ARGP_NAME)
-#define ARGP_CREATE_QWORD_FIELD_OP      ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
-#define ARGP_CREATE_WORD_FIELD_OP       ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
-#define ARGP_DATA_REGION_OP             ARGP_LIST4 (ARGP_NAME,       ARGP_TERMARG,       ARGP_TERMARG,   ARGP_TERMARG)
-#define ARGP_DEBUG_OP                   ARG_NONE
-#define ARGP_DECREMENT_OP               ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_DEREF_OF_OP                ARGP_LIST1 (ARGP_TERMARG)
-#define ARGP_DEVICE_OP                  ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_NAME,          ARGP_OBJLIST)
-#define ARGP_DIVIDE_OP                  ARGP_LIST4 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET,    ARGP_TARGET)
-#define ARGP_DWORD_OP                   ARGP_LIST1 (ARGP_DWORDDATA)
-#define ARGP_ELSE_OP                    ARGP_LIST2 (ARGP_PKGLENGTH,  ARGP_TERMLIST)
-#define ARGP_EVENT_OP                   ARGP_LIST1 (ARGP_NAME)
-#define ARGP_FATAL_OP                   ARGP_LIST3 (ARGP_BYTEDATA,   ARGP_DWORDDATA,     ARGP_TERMARG)
-#define ARGP_FIELD_OP                   ARGP_LIST4 (ARGP_PKGLENGTH,  ARGP_NAMESTRING,    ARGP_BYTEDATA,  ARGP_FIELDLIST)
-#define ARGP_FIND_SET_LEFT_BIT_OP       ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_FIND_SET_RIGHT_BIT_OP      ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_FROM_BCD_OP                ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_IF_OP                      ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_TERMARG,       ARGP_TERMLIST)
-#define ARGP_INCREMENT_OP               ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_INDEX_FIELD_OP             ARGP_LIST5 (ARGP_PKGLENGTH,  ARGP_NAMESTRING,    ARGP_NAMESTRING,ARGP_BYTEDATA,  ARGP_FIELDLIST)
-#define ARGP_INDEX_OP                   ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_LAND_OP                    ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_LEQUAL_OP                  ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_LGREATER_OP                ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_LGREATEREQUAL_OP           ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_LLESS_OP                   ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_LLESSEQUAL_OP              ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_LNOT_OP                    ARGP_LIST1 (ARGP_TERMARG)
-#define ARGP_LNOTEQUAL_OP               ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_LOAD_OP                    ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME)
-#define ARGP_LOAD_TABLE_OP              ARGP_LIST6 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TERMARG,   ARGP_TERMARG,  ARGP_TERMARG,   ARGP_TERMARG)
-#define ARGP_LOCAL0                     ARG_NONE
-#define ARGP_LOCAL1                     ARG_NONE
-#define ARGP_LOCAL2                     ARG_NONE
-#define ARGP_LOCAL3                     ARG_NONE
-#define ARGP_LOCAL4                     ARG_NONE
-#define ARGP_LOCAL5                     ARG_NONE
-#define ARGP_LOCAL6                     ARG_NONE
-#define ARGP_LOCAL7                     ARG_NONE
-#define ARGP_LOR_OP                     ARGP_LIST2 (ARGP_TERMARG,    ARGP_TERMARG)
-#define ARGP_MATCH_OP                   ARGP_LIST6 (ARGP_TERMARG,    ARGP_BYTEDATA,      ARGP_TERMARG,   ARGP_BYTEDATA,  ARGP_TERMARG,   ARGP_TERMARG)
-#define ARGP_METHOD_OP                  ARGP_LIST4 (ARGP_PKGLENGTH,  ARGP_NAME,          ARGP_BYTEDATA,  ARGP_TERMLIST)
-#define ARGP_METHODCALL_OP              ARGP_LIST1 (ARGP_NAMESTRING)
-#define ARGP_MID_OP                     ARGP_LIST4 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TERMARG,   ARGP_TARGET)
-#define ARGP_MOD_OP                     ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_MULTIPLY_OP                ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_MUTEX_OP                   ARGP_LIST2 (ARGP_NAME,       ARGP_BYTEDATA)
-#define ARGP_NAME_OP                    ARGP_LIST2 (ARGP_NAME,       ARGP_DATAOBJ)
-#define ARGP_NAMEDFIELD_OP              ARGP_LIST1 (ARGP_NAMESTRING)
-#define ARGP_NAMEPATH_OP                ARGP_LIST1 (ARGP_NAMESTRING)
-#define ARGP_NOOP_OP                    ARG_NONE
-#define ARGP_NOTIFY_OP                  ARGP_LIST2 (ARGP_SUPERNAME,  ARGP_TERMARG)
-#define ARGP_ONE_OP                     ARG_NONE
-#define ARGP_ONES_OP                    ARG_NONE
-#define ARGP_PACKAGE_OP                 ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_BYTEDATA,      ARGP_DATAOBJLIST)
-#define ARGP_POWER_RES_OP               ARGP_LIST5 (ARGP_PKGLENGTH,  ARGP_NAME,          ARGP_BYTEDATA,  ARGP_WORDDATA,  ARGP_OBJLIST)
-#define ARGP_PROCESSOR_OP               ARGP_LIST6 (ARGP_PKGLENGTH,  ARGP_NAME,          ARGP_BYTEDATA,  ARGP_DWORDDATA, ARGP_BYTEDATA,  ARGP_OBJLIST)
-#define ARGP_QWORD_OP                   ARGP_LIST1 (ARGP_QWORDDATA)
-#define ARGP_REF_OF_OP                  ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_REGION_OP                  ARGP_LIST4 (ARGP_NAME,       ARGP_BYTEDATA,      ARGP_TERMARG,   ARGP_TERMARG)
-#define ARGP_RELEASE_OP                 ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_RESERVEDFIELD_OP           ARGP_LIST1 (ARGP_NAMESTRING)
-#define ARGP_RESET_OP                   ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_RETURN_OP                  ARGP_LIST1 (ARGP_TERMARG)
-#define ARGP_REVISION_OP                ARG_NONE
-#define ARGP_SCOPE_OP                   ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_NAME,          ARGP_TERMLIST)
-#define ARGP_SHIFT_LEFT_OP              ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_SHIFT_RIGHT_OP             ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_SIGNAL_OP                  ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_SIZE_OF_OP                 ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_SLEEP_OP                   ARGP_LIST1 (ARGP_TERMARG)
-#define ARGP_STALL_OP                   ARGP_LIST1 (ARGP_TERMARG)
-#define ARGP_STATICSTRING_OP            ARGP_LIST1 (ARGP_NAMESTRING)
-#define ARGP_STORE_OP                   ARGP_LIST2 (ARGP_TERMARG,    ARGP_SUPERNAME)
-#define ARGP_STRING_OP                  ARGP_LIST1 (ARGP_CHARLIST)
-#define ARGP_SUBTRACT_OP                ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_THERMAL_ZONE_OP            ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_NAME,          ARGP_OBJLIST)
-#define ARGP_TIMER_OP                   ARG_NONE
-#define ARGP_TO_BCD_OP                  ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_TO_BUFFER_OP               ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_TO_DEC_STR_OP              ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_TO_HEX_STR_OP              ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_TO_INTEGER_OP              ARGP_LIST2 (ARGP_TERMARG,    ARGP_TARGET)
-#define ARGP_TO_STRING_OP               ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
-#define ARGP_TYPE_OP                    ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_UNLOAD_OP                  ARGP_LIST1 (ARGP_SUPERNAME)
-#define ARGP_VAR_PACKAGE_OP             ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_TERMARG,       ARGP_DATAOBJLIST)
-#define ARGP_WAIT_OP                    ARGP_LIST2 (ARGP_SUPERNAME,  ARGP_TERMARG)
-#define ARGP_WHILE_OP                   ARGP_LIST3 (ARGP_PKGLENGTH,  ARGP_TERMARG,       ARGP_TERMLIST)
-#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
- * in the master opcode table (in psopcode.c).
- *
- * (Used by prep_operands procedure and the ASL Compiler)
- */
-#define ARGI_ACCESSFIELD_OP             ARGI_INVALID_OPCODE
-#define ARGI_ACQUIRE_OP                 ARGI_LIST2 (ARGI_MUTEX,      ARGI_INTEGER)
-#define ARGI_ADD_OP                     ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_ALIAS_OP                   ARGI_INVALID_OPCODE
-#define ARGI_ARG0                       ARG_NONE
-#define ARGI_ARG1                       ARG_NONE
-#define ARGI_ARG2                       ARG_NONE
-#define ARGI_ARG3                       ARG_NONE
-#define ARGI_ARG4                       ARG_NONE
-#define ARGI_ARG5                       ARG_NONE
-#define ARGI_ARG6                       ARG_NONE
-#define ARGI_BANK_FIELD_OP              ARGI_INVALID_OPCODE
-#define ARGI_BIT_AND_OP                 ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_BIT_NAND_OP                ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_BIT_NOR_OP                 ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_BIT_NOT_OP                 ARGI_LIST2 (ARGI_INTEGER,    ARGI_TARGETREF)
-#define ARGI_BIT_OR_OP                  ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_BIT_XOR_OP                 ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_BREAK_OP                   ARG_NONE
-#define ARGI_BREAK_POINT_OP             ARG_NONE
-#define ARGI_BUFFER_OP                  ARGI_LIST1 (ARGI_INTEGER)
-#define ARGI_BYTE_OP                    ARGI_INVALID_OPCODE
-#define ARGI_BYTELIST_OP                ARGI_INVALID_OPCODE
-#define ARGI_CONCAT_OP                  ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA,   ARGI_TARGETREF)
-#define ARGI_CONCAT_RES_OP              ARGI_LIST3 (ARGI_BUFFER,     ARGI_BUFFER,        ARGI_TARGETREF)
-#define ARGI_COND_REF_OF_OP             ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
-#define ARGI_CONTINUE_OP                ARGI_INVALID_OPCODE
-#define ARGI_COPY_OP                    ARGI_LIST2 (ARGI_ANYTYPE,    ARGI_SIMPLE_TARGET)
-#define ARGI_CREATE_BIT_FIELD_OP        ARGI_LIST3 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_REFERENCE)
-#define ARGI_CREATE_BYTE_FIELD_OP       ARGI_LIST3 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_REFERENCE)
-#define ARGI_CREATE_DWORD_FIELD_OP      ARGI_LIST3 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_REFERENCE)
-#define ARGI_CREATE_FIELD_OP            ARGI_LIST4 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_INTEGER,      ARGI_REFERENCE)
-#define ARGI_CREATE_QWORD_FIELD_OP      ARGI_LIST3 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_REFERENCE)
-#define ARGI_CREATE_WORD_FIELD_OP       ARGI_LIST3 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_REFERENCE)
-#define ARGI_DATA_REGION_OP             ARGI_LIST3 (ARGI_STRING,     ARGI_STRING,        ARGI_STRING)
-#define ARGI_DEBUG_OP                   ARG_NONE
-#define ARGI_DECREMENT_OP               ARGI_LIST1 (ARGI_INTEGER_REF)
-#define ARGI_DEREF_OF_OP                ARGI_LIST1 (ARGI_REF_OR_STRING)
-#define ARGI_DEVICE_OP                  ARGI_INVALID_OPCODE
-#define ARGI_DIVIDE_OP                  ARGI_LIST4 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF,    ARGI_TARGETREF)
-#define ARGI_DWORD_OP                   ARGI_INVALID_OPCODE
-#define ARGI_ELSE_OP                    ARGI_INVALID_OPCODE
-#define ARGI_EVENT_OP                   ARGI_INVALID_OPCODE
-#define ARGI_FATAL_OP                   ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_INTEGER)
-#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_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
-#define ARGI_INDEX_OP                   ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_LAND_OP                    ARGI_LIST2 (ARGI_INTEGER,    ARGI_INTEGER)
-#define ARGI_LEQUAL_OP                  ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
-#define ARGI_LGREATER_OP                ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
-#define ARGI_LGREATEREQUAL_OP           ARGI_INVALID_OPCODE
-#define ARGI_LLESS_OP                   ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA)
-#define ARGI_LLESSEQUAL_OP              ARGI_INVALID_OPCODE
-#define ARGI_LNOT_OP                    ARGI_LIST1 (ARGI_INTEGER)
-#define ARGI_LNOTEQUAL_OP               ARGI_INVALID_OPCODE
-#define ARGI_LOAD_OP                    ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF)
-#define ARGI_LOAD_TABLE_OP              ARGI_LIST6 (ARGI_STRING,     ARGI_STRING,        ARGI_STRING,       ARGI_STRING,    ARGI_STRING, ARGI_ANYTYPE)
-#define ARGI_LOCAL0                     ARG_NONE
-#define ARGI_LOCAL1                     ARG_NONE
-#define ARGI_LOCAL2                     ARG_NONE
-#define ARGI_LOCAL3                     ARG_NONE
-#define ARGI_LOCAL4                     ARG_NONE
-#define ARGI_LOCAL5                     ARG_NONE
-#define ARGI_LOCAL6                     ARG_NONE
-#define ARGI_LOCAL7                     ARG_NONE
-#define ARGI_LOR_OP                     ARGI_LIST2 (ARGI_INTEGER,    ARGI_INTEGER)
-#define ARGI_MATCH_OP                   ARGI_LIST6 (ARGI_PACKAGE,    ARGI_INTEGER,   ARGI_COMPUTEDATA,      ARGI_INTEGER,ARGI_COMPUTEDATA,ARGI_INTEGER)
-#define ARGI_METHOD_OP                  ARGI_INVALID_OPCODE
-#define ARGI_METHODCALL_OP              ARGI_INVALID_OPCODE
-#define ARGI_MID_OP                     ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER,  ARGI_INTEGER,      ARGI_TARGETREF)
-#define ARGI_MOD_OP                     ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_MULTIPLY_OP                ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_MUTEX_OP                   ARGI_INVALID_OPCODE
-#define ARGI_NAME_OP                    ARGI_INVALID_OPCODE
-#define ARGI_NAMEDFIELD_OP              ARGI_INVALID_OPCODE
-#define ARGI_NAMEPATH_OP                ARGI_INVALID_OPCODE
-#define ARGI_NOOP_OP                    ARG_NONE
-#define ARGI_NOTIFY_OP                  ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
-#define ARGI_ONE_OP                     ARG_NONE
-#define ARGI_ONES_OP                    ARG_NONE
-#define ARGI_PACKAGE_OP                 ARGI_LIST1 (ARGI_INTEGER)
-#define ARGI_POWER_RES_OP               ARGI_INVALID_OPCODE
-#define ARGI_PROCESSOR_OP               ARGI_INVALID_OPCODE
-#define ARGI_QWORD_OP                   ARGI_INVALID_OPCODE
-#define ARGI_REF_OF_OP                  ARGI_LIST1 (ARGI_OBJECT_REF)
-#define ARGI_REGION_OP                  ARGI_LIST2 (ARGI_INTEGER,    ARGI_INTEGER)
-#define ARGI_RELEASE_OP                 ARGI_LIST1 (ARGI_MUTEX)
-#define ARGI_RESERVEDFIELD_OP           ARGI_INVALID_OPCODE
-#define ARGI_RESET_OP                   ARGI_LIST1 (ARGI_EVENT)
-#define ARGI_RETURN_OP                  ARGI_INVALID_OPCODE
-#define ARGI_REVISION_OP                ARG_NONE
-#define ARGI_SCOPE_OP                   ARGI_INVALID_OPCODE
-#define ARGI_SHIFT_LEFT_OP              ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_SHIFT_RIGHT_OP             ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_SIGNAL_OP                  ARGI_LIST1 (ARGI_EVENT)
-#define ARGI_SIZE_OF_OP                 ARGI_LIST1 (ARGI_DATAOBJECT)
-#define ARGI_SLEEP_OP                   ARGI_LIST1 (ARGI_INTEGER)
-#define ARGI_STALL_OP                   ARGI_LIST1 (ARGI_INTEGER)
-#define ARGI_STATICSTRING_OP            ARGI_INVALID_OPCODE
-#define ARGI_STORE_OP                   ARGI_LIST2 (ARGI_DATAREFOBJ, ARGI_TARGETREF)
-#define ARGI_STRING_OP                  ARGI_INVALID_OPCODE
-#define ARGI_SUBTRACT_OP                ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
-#define ARGI_THERMAL_ZONE_OP            ARGI_INVALID_OPCODE
-#define ARGI_TIMER_OP                   ARG_NONE
-#define ARGI_TO_BCD_OP                  ARGI_LIST2 (ARGI_INTEGER,    ARGI_FIXED_TARGET)
-#define ARGI_TO_BUFFER_OP               ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
-#define ARGI_TO_DEC_STR_OP              ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
-#define ARGI_TO_HEX_STR_OP              ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
-#define ARGI_TO_INTEGER_OP              ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
-#define ARGI_TO_STRING_OP               ARGI_LIST3 (ARGI_BUFFER,     ARGI_INTEGER,       ARGI_FIXED_TARGET)
-#define ARGI_TYPE_OP                    ARGI_LIST1 (ARGI_ANYTYPE)
-#define ARGI_UNLOAD_OP                  ARGI_LIST1 (ARGI_DDBHANDLE)
-#define ARGI_VAR_PACKAGE_OP             ARGI_LIST1 (ARGI_INTEGER)
-#define ARGI_WAIT_OP                    ARGI_LIST2 (ARGI_EVENT,      ARGI_INTEGER)
-#define ARGI_WHILE_OP                   ARGI_INVALID_OPCODE
-#define ARGI_WORD_OP                    ARGI_INVALID_OPCODE
-#define ARGI_ZERO_OP                    ARG_NONE
-
-#endif                         /* __ACOPCODE_H__ */
diff --git a/kitten/include/acpi/acoutput.h b/kitten/include/acpi/acoutput.h
deleted file mode 100644 (file)
index 8d5039d..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/******************************************************************************
- *
- * Name: acoutput.h -- debug output
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACOUTPUT_H__
-#define __ACOUTPUT_H__
-
-/*
- * Debug levels and component IDs.  These are used to control the
- * granularity of the output of the DEBUG_PRINT macro -- on a per-
- * component basis and a per-exception-type basis.
- */
-
-/* Component IDs are used in the global "DebugLayer" */
-
-#define ACPI_UTILITIES              0x00000001
-#define ACPI_HARDWARE               0x00000002
-#define ACPI_EVENTS                 0x00000004
-#define ACPI_TABLES                 0x00000008
-#define ACPI_NAMESPACE              0x00000010
-#define ACPI_PARSER                 0x00000020
-#define ACPI_DISPATCHER             0x00000040
-#define ACPI_EXECUTER               0x00000080
-#define ACPI_RESOURCES              0x00000100
-#define ACPI_CA_DEBUGGER            0x00000200
-#define ACPI_OS_SERVICES            0x00000400
-#define ACPI_CA_DISASSEMBLER        0x00000800
-
-/* Component IDs for ACPI tools and utilities */
-
-#define ACPI_COMPILER               0x00001000
-#define ACPI_TOOLS                  0x00002000
-
-#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
- */
-#define ACPI_LV_ERROR               0x00000001
-#define ACPI_LV_WARN                0x00000002
-#define ACPI_LV_INIT                0x00000004
-#define ACPI_LV_DEBUG_OBJECT        0x00000008
-#define ACPI_LV_INFO                0x00000010
-#define ACPI_LV_ALL_EXCEPTIONS      0x0000001F
-
-/* Trace verbosity level 1 [Standard Trace Level] */
-
-#define ACPI_LV_INIT_NAMES          0x00000020
-#define ACPI_LV_PARSE               0x00000040
-#define ACPI_LV_LOAD                0x00000080
-#define ACPI_LV_DISPATCH            0x00000100
-#define ACPI_LV_EXEC                0x00000200
-#define ACPI_LV_NAMES               0x00000400
-#define ACPI_LV_OPREGION            0x00000800
-#define ACPI_LV_BFIELD              0x00001000
-#define ACPI_LV_TABLES              0x00002000
-#define ACPI_LV_VALUES              0x00004000
-#define ACPI_LV_OBJECTS             0x00008000
-#define ACPI_LV_RESOURCES           0x00010000
-#define ACPI_LV_USER_REQUESTS       0x00020000
-#define ACPI_LV_PACKAGE             0x00040000
-#define ACPI_LV_VERBOSITY1          0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS
-
-/* Trace verbosity level 2 [Function tracing and memory allocation] */
-
-#define ACPI_LV_ALLOCATIONS         0x00100000
-#define ACPI_LV_FUNCTIONS           0x00200000
-#define ACPI_LV_OPTIMIZATIONS       0x00400000
-#define ACPI_LV_VERBOSITY2          0x00700000 | ACPI_LV_VERBOSITY1
-#define ACPI_LV_ALL                 ACPI_LV_VERBOSITY2
-
-/* Trace verbosity level 3 [Threading, I/O, and Interrupts] */
-
-#define ACPI_LV_MUTEX               0x01000000
-#define ACPI_LV_THREADS             0x02000000
-#define ACPI_LV_IO                  0x04000000
-#define ACPI_LV_INTERRUPTS          0x08000000
-#define ACPI_LV_VERBOSITY3          0x0F000000 | ACPI_LV_VERBOSITY2
-
-/* Exceptionally verbose output -- also used in the global "DebugLevel"  */
-
-#define ACPI_LV_AML_DISASSEMBLE     0x10000000
-#define ACPI_LV_VERBOSE_INFO        0x20000000
-#define ACPI_LV_FULL_TABLES         0x40000000
-#define ACPI_LV_EVENTS              0x80000000
-
-#define ACPI_LV_VERBOSE             0xF0000000
-
-/*
- * Debug level macros that are used in the DEBUG_PRINT macros
- */
-#define ACPI_DEBUG_LEVEL(dl)        (u32) dl,ACPI_DEBUG_PARAMETERS
-
-/* Exception level -- used in the global "DebugLevel" */
-
-#define ACPI_DB_INIT                ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
-#define ACPI_DB_DEBUG_OBJECT        ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
-#define ACPI_DB_INFO                ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
-#define ACPI_DB_ALL_EXCEPTIONS      ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
-
-/*
- * These two levels are essentially obsolete, all instances in the
- * ACPICA core code have been replaced by ACPI_ERROR and ACPI_WARNING
- * (Kept here because some drivers may still use them)
- */
-#define ACPI_DB_ERROR               ACPI_DEBUG_LEVEL (ACPI_LV_ERROR)
-#define ACPI_DB_WARN                ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
-
-/* Trace level -- also used in the global "DebugLevel" */
-
-#define ACPI_DB_INIT_NAMES          ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
-#define ACPI_DB_THREADS             ACPI_DEBUG_LEVEL (ACPI_LV_THREADS)
-#define ACPI_DB_PARSE               ACPI_DEBUG_LEVEL (ACPI_LV_PARSE)
-#define ACPI_DB_DISPATCH            ACPI_DEBUG_LEVEL (ACPI_LV_DISPATCH)
-#define ACPI_DB_LOAD                ACPI_DEBUG_LEVEL (ACPI_LV_LOAD)
-#define ACPI_DB_EXEC                ACPI_DEBUG_LEVEL (ACPI_LV_EXEC)
-#define ACPI_DB_NAMES               ACPI_DEBUG_LEVEL (ACPI_LV_NAMES)
-#define ACPI_DB_OPREGION            ACPI_DEBUG_LEVEL (ACPI_LV_OPREGION)
-#define ACPI_DB_BFIELD              ACPI_DEBUG_LEVEL (ACPI_LV_BFIELD)
-#define ACPI_DB_TABLES              ACPI_DEBUG_LEVEL (ACPI_LV_TABLES)
-#define ACPI_DB_FUNCTIONS           ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS)
-#define ACPI_DB_OPTIMIZATIONS       ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS)
-#define ACPI_DB_VALUES              ACPI_DEBUG_LEVEL (ACPI_LV_VALUES)
-#define ACPI_DB_OBJECTS             ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS)
-#define ACPI_DB_ALLOCATIONS         ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS)
-#define ACPI_DB_RESOURCES           ACPI_DEBUG_LEVEL (ACPI_LV_RESOURCES)
-#define ACPI_DB_IO                  ACPI_DEBUG_LEVEL (ACPI_LV_IO)
-#define ACPI_DB_INTERRUPTS          ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS)
-#define ACPI_DB_USER_REQUESTS       ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
-#define ACPI_DB_PACKAGE             ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
-#define ACPI_DB_MUTEX               ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
-
-#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__ */
diff --git a/kitten/include/acpi/acparser.h b/kitten/include/acpi/acparser.h
deleted file mode 100644 (file)
index 9d49d3c..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/******************************************************************************
- *
- * Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACPARSER_H__
-#define __ACPARSER_H__
-
-#define OP_HAS_RETURN_VALUE             1
-
-/* Variable number of arguments. This field must be 32 bits */
-
-#define ACPI_VAR_ARGS                   ACPI_UINT32_MAX
-
-#define ACPI_PARSE_DELETE_TREE          0x0001
-#define ACPI_PARSE_NO_TREE_DELETE       0x0000
-#define ACPI_PARSE_TREE_MASK            0x0001
-
-#define ACPI_PARSE_LOAD_PASS1           0x0010
-#define ACPI_PARSE_LOAD_PASS2           0x0020
-#define ACPI_PARSE_EXECUTE              0x0030
-#define ACPI_PARSE_MODE_MASK            0x0030
-
-#define ACPI_PARSE_DEFERRED_OP          0x0100
-#define ACPI_PARSE_DISASSEMBLE          0x0200
-
-/******************************************************************************
- *
- * Parser interfaces
- *
- *****************************************************************************/
-
-/*
- * psxface - Parser external interfaces
- */
-acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info);
-
-/*
- * psargs - Parse AML opcode arguments
- */
-u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state);
-
-char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state);
-
-void
-acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
-                           u32 arg_type, union acpi_parse_object *arg);
-
-acpi_status
-acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
-                         struct acpi_parse_state *parser_state,
-                         union acpi_parse_object *arg, u8 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);
-
-/*
- * 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);
-
-/*
- * psopcode - AML Opcode information
- */
-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_complete_this_op(struct acpi_walk_state *walk_state,
-                        union acpi_parse_object *op);
-
-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);
-
-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);
-
-void
-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);
-
-/*
- * pstree - parse tree manipulation routines
- */
-void
-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_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 */
-
-/*
- * 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_status
-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);
-
-/*
- * psutils - parser utilities
- */
-union acpi_parse_object *acpi_ps_create_scope_op(void);
-
-void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode);
-
-union acpi_parse_object *acpi_ps_alloc_op(u16 opcode);
-
-void acpi_ps_free_op(union acpi_parse_object *op);
-
-u8 acpi_ps_is_leading_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);
-
-/*
- * psdump - display parser tree
- */
-u32
-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);
-
-void acpi_ps_show(union acpi_parse_object *op);
-
-#endif                         /* __ACPARSER_H__ */
diff --git a/kitten/include/acpi/acpi.h b/kitten/include/acpi/acpi.h
deleted file mode 100644 (file)
index b9a39d1..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/******************************************************************************
- *
- * Name: acpi.h - Master include file, Publics and external data.
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACPI_H__
-#define __ACPI_H__
-
-/*
- * Common includes for all ACPI driver files
- * 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 */
-
-#endif                         /* __ACPI_H__ */
diff --git a/kitten/include/acpi/acpi_bus.h b/kitten/include/acpi/acpi_bus.h
deleted file mode 100644 (file)
index f338e40..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- *  acpi_bus.h - ACPI Bus Driver ($Revision: 22 $)
- *
- *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
- *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.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.
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- */
-
-#ifndef __ACPI_BUS_H__
-#define __ACPI_BUS_H__
-
-#include <linux/device.h>
-
-#include <acpi/acpi.h>
-
-#define PREFIX                 "ACPI: "
-
-/* TBD: Make dynamic */
-#define ACPI_MAX_HANDLES       10
-struct acpi_handle_list {
-       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_status
-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);
-
-#ifdef CONFIG_ACPI
-
-#include <linux/proc_fs.h>
-
-#define ACPI_BUS_FILE_ROOT     "acpi"
-extern struct proc_dir_entry *acpi_root_dir;
-extern struct fadt_descriptor acpi_fadt;
-
-enum acpi_bus_removal_type {
-       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_POWER,
-       ACPI_BUS_TYPE_PROCESSOR,
-       ACPI_BUS_TYPE_THERMAL,
-       ACPI_BUS_TYPE_SYSTEM,
-       ACPI_BUS_TYPE_POWER_BUTTON,
-       ACPI_BUS_TYPE_SLEEP_BUTTON,
-       ACPI_BUS_DEVICE_TYPE_COUNT
-};
-
-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);
-
-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;
-};
-
-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;
-};
-
-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;
-};
-
-/*
- * ACPI Device
- * -----------
- */
-
-/* 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;
-};
-
-/* 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 force_power_state:1;
-       u32 reserved:19;
-};
-
-/* File System */
-
-struct acpi_device_dir {
-       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];
-
-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; /*        "          */
-};
-
-#define acpi_device_bid(d)     ((d)->pnp.bus_id)
-#define acpi_device_adr(d)     ((d)->pnp.bus_address)
-#define acpi_device_hid(d)     ((d)->pnp.hardware_id)
-#define acpi_device_uid(d)     ((d)->pnp.unique_id)
-#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;
-};
-
-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 */
-};
-
-struct acpi_device_power {
-       int state;              /* Current state */
-       struct acpi_device_power_flags flags;
-       struct acpi_device_power_state states[4];       /* Power states (D0-D3) */
-};
-
-/* Performance Management */
-
-struct acpi_device_perf_flags {
-       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) */
-};
-
-struct acpi_device_perf {
-       int state;
-       struct acpi_device_perf_flags flags;
-       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 */
-};
-
-struct acpi_device_wakeup_state {
-       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;
-};
-
-/* 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;
-       struct acpi_device_status status;
-       struct acpi_device_flags flags;
-       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 device dev;
-};
-
-#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;
-};
-
-extern struct subsystem acpi_subsys;
-
-/*
- * External Functions
- */
-
-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);
-void acpi_bus_unregister_driver(struct acpi_driver *driver);
-int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
-                acpi_handle handle, int type);
-int acpi_bus_trim(struct acpi_device *start, int rmdevice);
-int acpi_bus_start(struct acpi_device *device);
-acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd);
-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 *);
-       /* For bridges, such as PCI root bridge, IDE controller */
-       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 *);
-struct device *acpi_get_physical_device(acpi_handle);
-/* helper */
-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 */
-
-#endif /*__ACPI_BUS_H__*/
diff --git a/kitten/include/acpi/acpi_drivers.h b/kitten/include/acpi/acpi_drivers.h
deleted file mode 100644 (file)
index 6a5bdce..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- *  acpi_drivers.h  ($Revision: 31 $)
- *
- *  Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
- *  Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.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.
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- */
-
-#ifndef __ACPI_DRIVERS_H__
-#define __ACPI_DRIVERS_H__
-
-#include <linux/acpi.h>
-#include <acpi/acpi_bus.h>
-
-#define ACPI_MAX_STRING                        80
-
-#define ACPI_BUS_COMPONENT             0x00010000
-#define ACPI_SYSTEM_COMPONENT          0x02000000
-
-/* _HID definitions */
-
-#define ACPI_POWER_HID                 "ACPI_PWR"
-#define ACPI_PROCESSOR_HID             "ACPI_CPU"
-#define ACPI_SYSTEM_HID                        "ACPI_SYS"
-#define ACPI_THERMAL_HID               "ACPI_THM"
-#define ACPI_BUTTON_HID_POWERF         "ACPI_FPB"
-#define ACPI_BUTTON_HID_SLEEPF         "ACPI_FSB"
-
-/* --------------------------------------------------------------------------
-                                       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 *triggering,
-                              int *polarity, 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);
-
-/* 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);
-
-/* 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);
-
-/* --------------------------------------------------------------------------
-                                  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);
-#endif
-
-/* --------------------------------------------------------------------------
-                                  Embedded Controller
-   -------------------------------------------------------------------------- */
-#ifdef CONFIG_ACPI_EC
-int acpi_ec_ecdt_probe(void);
-#endif
-
-/* --------------------------------------------------------------------------
-                                    Processor
-   -------------------------------------------------------------------------- */
-
-#define ACPI_PROCESSOR_LIMIT_NONE      0x00
-#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01
-#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02
-
-int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
-
-/* --------------------------------------------------------------------------
-                                    Hot Keys
-   -------------------------------------------------------------------------- */
-
-extern int acpi_specific_hotkey_enabled;
-
-/*--------------------------------------------------------------------------
-                                  Dock Station
-  -------------------------------------------------------------------------- */
-#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
-extern int is_dock_device(acpi_handle handle);
-extern int register_dock_notifier(struct notifier_block *nb);
-extern void unregister_dock_notifier(struct notifier_block *nb);
-extern int register_hotplug_dock_device(acpi_handle handle,
-       acpi_notify_handler handler, void *context);
-extern void unregister_hotplug_dock_device(acpi_handle handle);
-#else
-#define is_dock_device(h)                      (0)
-#define register_dock_notifier(nb)             (-ENODEV)
-#define unregister_dock_notifier(nb)                   do { } while(0)
-#define register_hotplug_dock_device(h1, h2, c)        (-ENODEV)
-#define unregister_hotplug_dock_device(h)       do { } while(0)
-#endif
-#endif /*__ACPI_DRIVERS_H__*/
diff --git a/kitten/include/acpi/acpi_numa.h b/kitten/include/acpi/acpi_numa.h
deleted file mode 100644 (file)
index 1049f2a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __ACPI_NUMA_H
-#define __ACPI_NUMA_H
-
-#ifdef CONFIG_ACPI_NUMA
-#include <linux/kernel.h>
-
-/* Proximity bitmap length */
-#if MAX_NUMNODES > 256
-#define MAX_PXM_DOMAINS MAX_NUMNODES
-#else
-#define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */
-#endif
-
-extern int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS];
-extern int __cpuinitdata node_to_pxm_map[MAX_NUMNODES];
-
-extern int __cpuinit pxm_to_node(int);
-extern int __cpuinit node_to_pxm(int);
-extern int __cpuinit acpi_map_pxm_to_node(int);
-extern void __cpuinit acpi_unmap_pxm_to_node(int);
-
-#endif                         /* CONFIG_ACPI_NUMA */
-#endif                         /* __ACP_NUMA_H */
diff --git a/kitten/include/acpi/acpiosxf.h b/kitten/include/acpi/acpiosxf.h
deleted file mode 100644 (file)
index 0cd63bc..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-
-/******************************************************************************
- *
- * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL).  These
- *                    interfaces must be implemented by OSL to interface the
- *                    ACPI components to the host operating system.
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACPIOSXF_H__
-#define __ACPIOSXF_H__
-
-#include "platform/acenv.h"
-#include "actypes.h"
-
-/* Types for acpi_os_execute */
-
-typedef enum {
-       OSL_GLOBAL_LOCK_HANDLER,
-       OSL_NOTIFY_HANDLER,
-       OSL_GPE_HANDLER,
-       OSL_DEBUGGER_THREAD,
-       OSL_EC_POLL_HANDLER,
-       OSL_EC_BURST_HANDLER
-} acpi_execute_type;
-
-#define ACPI_NO_UNIT_LIMIT          ((u32) -1)
-#define ACPI_MUTEX_SEM              1
-
-/* 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;
-};
-
-/*
- * OSL Initialization and shutdown primitives
- */
-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_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);
-
-/*
- * Spinlock primitives
- */
-acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
-
-void acpi_os_delete_lock(acpi_spinlock handle);
-
-acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
-
-void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags);
-
-/*
- * Semaphore primitives
- */
-acpi_status
-acpi_os_create_semaphore(u32 max_units,
-                        u32 initial_units, acpi_semaphore * out_handle);
-
-acpi_status acpi_os_delete_semaphore(acpi_semaphore handle);
-
-acpi_status
-acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout);
-
-acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);
-
-/*
- * Mutex primitives
- */
-acpi_status acpi_os_create_mutex(acpi_mutex * out_handle);
-
-void acpi_os_delete_mutex(acpi_mutex handle);
-
-acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout);
-
-void acpi_os_release_mutex(acpi_mutex handle);
-
-/* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */
-
-#define acpi_os_create_mutex(out_handle)    acpi_os_create_semaphore (1, 1, out_handle)
-#define acpi_os_delete_mutex(handle)        (void) acpi_os_delete_semaphore (handle)
-#define acpi_os_acquire_mutex(handle,time)  acpi_os_wait_semaphore (handle, 1, time)
-#define acpi_os_release_mutex(handle)       (void) acpi_os_signal_semaphore (handle, 1)
-
-/*
- * Memory allocation and mapping
- */
-void *acpi_os_allocate(acpi_size size);
-
-acpi_status
-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);
-
-#ifdef ACPI_FUTURE_USAGE
-acpi_status
-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_status
-acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
-
-/*
- * Threads and Scheduling
- */
-acpi_thread_id acpi_os_get_thread_id(void);
-
-acpi_status
-acpi_os_execute(acpi_execute_type type,
-               acpi_osd_exec_callback function, void *context);
-
-void acpi_os_wait_events_complete(void *context);
-
-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);
-
-/*
- * Platform and hardware-independent physical memory interfaces
- */
-acpi_status
-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);
-
-/*
- * Platform and hardware-independent PCI configuration space access
- * Note: Can't use "Register" as a parameter, changed to "Reg" --
- * certain compilers complain.
- */
-acpi_status
-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);
-
-/*
- * 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);
-
-/*
- * Miscellaneous
- */
-acpi_status acpi_os_validate_interface(char *interface);
-
-acpi_status
-acpi_os_validate_address(u8 space_id,
-                        acpi_physical_address address, acpi_size length);
-
-u8 acpi_os_readable(void *pointer, acpi_size length);
-
-#ifdef ACPI_FUTURE_USAGE
-u8 acpi_os_writable(void *pointer, acpi_size length);
-#endif
-
-u64 acpi_os_get_timer(void);
-
-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_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);
-#endif
-
-/*
- * Directory manipulation
- */
-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);
-
-void acpi_os_close_directory(void *dir_handle);
-
-#endif                         /* __ACPIOSXF_H__ */
diff --git a/kitten/include/acpi/acpixf.h b/kitten/include/acpi/acpixf.h
deleted file mode 100644 (file)
index 049e9aa..0000000
+++ /dev/null
@@ -1,333 +0,0 @@
-
-/******************************************************************************
- *
- * Name: acpixf.h - External interfaces to the ACPI subsystem
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACXFACE_H__
-#define __ACXFACE_H__
-
-#include "actypes.h"
-#include "actbl.h"
-
-/*
- * Global interfaces
- */
-acpi_status acpi_initialize_subsystem(void);
-
-acpi_status acpi_enable_subsystem(u32 flags);
-
-acpi_status acpi_initialize_objects(u32 flags);
-
-acpi_status acpi_terminate(void);
-
-#ifdef ACPI_FUTURE_USAGE
-acpi_status acpi_subsystem_status(void);
-#endif
-
-acpi_status acpi_enable(void);
-
-acpi_status acpi_disable(void);
-
-#ifdef ACPI_FUTURE_USAGE
-acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
-#endif
-
-const char *acpi_format_exception(acpi_status exception);
-
-acpi_status acpi_purge_cached_objects(void);
-
-#ifdef ACPI_FUTURE_USAGE
-acpi_status
-acpi_install_initialization_handler(acpi_init_handler handler, u32 function);
-#endif
-
-/*
- * ACPI Memory managment
- */
-void *acpi_allocate(u32 size);
-
-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_status acpi_load_tables(void);
-
-#ifdef ACPI_FUTURE_USAGE
-acpi_status acpi_load_table(struct acpi_table_header *table_ptr);
-
-acpi_status acpi_unload_table(acpi_table_type table_type);
-
-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_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);
-
-/*
- * 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_status
-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_status
-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_status
-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_status
-acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags);
-
-/*
- * 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);
-
-#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);
-#endif
-
-acpi_status
-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_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_status
-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_status
-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_status
-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);
-
-#ifdef ACPI_FUTURE_USAGE
-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_release_global_lock(u32 handle);
-
-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_disable_event(u32 event, u32 flags);
-
-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_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_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_get_vendor_resource(acpi_handle device_handle,
-                        char *name,
-                        struct acpi_vendor_uuid *uuid,
-                        struct acpi_buffer *ret_buffer);
-
-acpi_status
-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);
-#endif
-
-acpi_status
-acpi_walk_resources(acpi_handle device_handle,
-                   char *name,
-                   acpi_walk_resource_callback user_function, void *context);
-
-acpi_status
-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_status
-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_set_register(u32 register_id, u32 value, u32 flags);
-
-acpi_status
-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);
-#endif
-
-acpi_status
-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 asmlinkage acpi_enter_sleep_state(u8 sleep_state);
-
-acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void);
-
-acpi_status acpi_leave_sleep_state(u8 sleep_state);
-
-#endif                         /* __ACXFACE_H__ */
diff --git a/kitten/include/acpi/acresrc.h b/kitten/include/acpi/acresrc.h
deleted file mode 100644 (file)
index 80a3b33..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/******************************************************************************
- *
- * Name: acresrc.h - Resource Manager function prototypes
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACRESRC_H__
-#define __ACRESRC_H__
-
-/* Need the AML resource descriptor structs */
-
-#include "amlresrc.h"
-
-/*
- * If possible, pack the following structures to byte alignment, since we
- * don't care about performance for debug output. Two cases where we cannot
- * pack the structures:
- *
- * 1) Hardware does not support misaligned memory transfers
- * 2) Compiler does not support pointers within packed structures
- */
-#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
-#pragma pack(1)
-#endif
-
-/*
- * Individual entry for the resource conversion tables
- */
-typedef const struct acpi_rsconvert_info {
-       u8 opcode;
-       u8 resource_offset;
-       u8 aml_offset;
-       u8 value;
-
-} acpi_rsconvert_info;
-
-/* Resource conversion opcodes */
-
-#define ACPI_RSC_INITGET                0
-#define ACPI_RSC_INITSET                1
-#define ACPI_RSC_FLAGINIT               2
-#define ACPI_RSC_1BITFLAG               3
-#define ACPI_RSC_2BITFLAG               4
-#define ACPI_RSC_COUNT                  5
-#define ACPI_RSC_COUNT16                6
-#define ACPI_RSC_LENGTH                 7
-#define ACPI_RSC_MOVE8                  8
-#define ACPI_RSC_MOVE16                 9
-#define ACPI_RSC_MOVE32                 10
-#define ACPI_RSC_MOVE64                 11
-#define ACPI_RSC_SET8                   12
-#define ACPI_RSC_DATA8                  13
-#define ACPI_RSC_ADDRESS                14
-#define ACPI_RSC_SOURCE                 15
-#define ACPI_RSC_SOURCEX                16
-#define ACPI_RSC_BITMASK                17
-#define ACPI_RSC_BITMASK16              18
-#define ACPI_RSC_EXIT_NE                19
-#define ACPI_RSC_EXIT_LE                20
-
-/* Resource Conversion sub-opcodes */
-
-#define ACPI_RSC_COMPARE_AML_LENGTH     0
-#define ACPI_RSC_COMPARE_VALUE          1
-
-#define ACPI_RSC_TABLE_SIZE(d)          (sizeof (d) / sizeof (struct acpi_rsconvert_info))
-
-#define ACPI_RS_OFFSET(f)               (u8) ACPI_OFFSET (struct acpi_resource,f)
-#define AML_OFFSET(f)                   (u8) ACPI_OFFSET (union aml_resource,f)
-
-typedef const struct acpi_rsdump_info {
-       u8 opcode;
-       u8 offset;
-       char *name;
-       const char **pointer;
-
-} acpi_rsdump_info;
-
-/* Values for the Opcode field above */
-
-#define ACPI_RSD_TITLE                  0
-#define ACPI_RSD_LITERAL                1
-#define ACPI_RSD_STRING                 2
-#define ACPI_RSD_UINT8                  3
-#define ACPI_RSD_UINT16                 4
-#define ACPI_RSD_UINT32                 5
-#define ACPI_RSD_UINT64                 6
-#define ACPI_RSD_1BITFLAG               7
-#define ACPI_RSD_2BITFLAG               8
-#define ACPI_RSD_SHORTLIST              9
-#define ACPI_RSD_LONGLIST               10
-#define ACPI_RSD_DWORDLIST              11
-#define ACPI_RSD_ADDRESS                12
-#define ACPI_RSD_SOURCE                 13
-
-/* restore default alignment */
-
-#pragma pack()
-
-/* Resource tables indexed by internal resource type */
-
-extern const u8 acpi_gbl_aml_resource_sizes[];
-extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[];
-
-/* Resource tables indexed by raw AML resource descriptor type */
-
-extern const u8 acpi_gbl_resource_struct_sizes[];
-extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[];
-
-struct acpi_vendor_walk_info {
-       struct acpi_vendor_uuid *uuid;
-       struct acpi_buffer *buffer;
-       acpi_status status;
-};
-
-/*
- * rscreate
- */
-acpi_status
-acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer,
-                            struct acpi_buffer *output_buffer);
-
-acpi_status
-acpi_rs_create_aml_resources(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);
-
-/*
- * rsutils
- */
-
-acpi_status
-acpi_rs_get_prt_method_data(struct acpi_namespace_node *node,
-                           struct acpi_buffer *ret_buffer);
-
-acpi_status
-acpi_rs_get_crs_method_data(struct acpi_namespace_node *node,
-                           struct acpi_buffer *ret_buffer);
-
-acpi_status
-acpi_rs_get_prs_method_data(struct acpi_namespace_node *node,
-                           struct acpi_buffer *ret_buffer);
-
-acpi_status
-acpi_rs_get_method_data(acpi_handle handle,
-                       char *path, struct acpi_buffer *ret_buffer);
-
-acpi_status
-acpi_rs_set_srs_method_data(struct acpi_namespace_node *node,
-                           struct acpi_buffer *ret_buffer);
-
-/*
- * rscalc
- */
-acpi_status
-acpi_rs_get_list_length(u8 * aml_buffer,
-                       u32 aml_buffer_length, acpi_size * size_needed);
-
-acpi_status
-acpi_rs_get_aml_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_status
-acpi_rs_convert_aml_to_resources(u8 * aml,
-                                u32 length,
-                                u32 offset, u8 resource_index, void **context);
-
-acpi_status
-acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
-                                acpi_size aml_size_needed, u8 * output_buffer);
-
-/*
- * rsaddr
- */
-void
-acpi_rs_set_address_common(union aml_resource *aml,
-                          struct acpi_resource *resource);
-
-u8
-acpi_rs_get_address_common(struct acpi_resource *resource,
-                          union aml_resource *aml);
-
-/*
- * rsmisc
- */
-acpi_status
-acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
-                               union aml_resource *aml,
-                               struct acpi_rsconvert_info *info);
-
-acpi_status
-acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
-                               union aml_resource *aml,
-                               struct acpi_rsconvert_info *info);
-
-/*
- * rsutils
- */
-void
-acpi_rs_move_data(void *destination,
-                 void *source, u16 item_count, u8 move_type);
-
-u8 acpi_rs_decode_bitmask(u16 mask, u8 * list);
-
-u16 acpi_rs_encode_bitmask(u8 * list, u8 count);
-
-acpi_rs_length
-acpi_rs_get_resource_source(acpi_rs_length resource_length,
-                           acpi_rs_length minimum_length,
-                           struct acpi_resource_source *resource_source,
-                           union aml_resource *aml, char *string_ptr);
-
-acpi_rsdesc_size
-acpi_rs_set_resource_source(union aml_resource *aml,
-                           acpi_rs_length minimum_length,
-                           struct acpi_resource_source *resource_source);
-
-void
-acpi_rs_set_resource_header(u8 descriptor_type,
-                           acpi_rsdesc_size total_length,
-                           union aml_resource *aml);
-
-void
-acpi_rs_set_resource_length(acpi_rsdesc_size total_length,
-                           union aml_resource *aml);
-
-/*
- * rsdump
- */
-void acpi_rs_dump_resource_list(struct acpi_resource *resource);
-
-void acpi_rs_dump_irq_list(u8 * route_table);
-
-/*
- * Resource conversion tables
- */
-extern struct acpi_rsconvert_info acpi_rs_convert_dma[];
-extern struct acpi_rsconvert_info acpi_rs_convert_end_dpf[];
-extern struct acpi_rsconvert_info acpi_rs_convert_io[];
-extern struct acpi_rsconvert_info acpi_rs_convert_fixed_io[];
-extern struct acpi_rsconvert_info acpi_rs_convert_end_tag[];
-extern struct acpi_rsconvert_info acpi_rs_convert_memory24[];
-extern struct acpi_rsconvert_info acpi_rs_convert_generic_reg[];
-extern struct acpi_rsconvert_info acpi_rs_convert_memory32[];
-extern struct acpi_rsconvert_info acpi_rs_convert_fixed_memory32[];
-extern struct acpi_rsconvert_info acpi_rs_convert_address32[];
-extern struct acpi_rsconvert_info acpi_rs_convert_address16[];
-extern struct acpi_rsconvert_info acpi_rs_convert_ext_irq[];
-extern struct acpi_rsconvert_info acpi_rs_convert_address64[];
-extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[];
-
-/* These resources require separate get/set tables */
-
-extern struct acpi_rsconvert_info acpi_rs_get_irq[];
-extern struct acpi_rsconvert_info acpi_rs_get_start_dpf[];
-extern struct acpi_rsconvert_info acpi_rs_get_vendor_small[];
-extern struct acpi_rsconvert_info acpi_rs_get_vendor_large[];
-
-extern struct acpi_rsconvert_info acpi_rs_set_irq[];
-extern struct acpi_rsconvert_info acpi_rs_set_start_dpf[];
-extern struct acpi_rsconvert_info acpi_rs_set_vendor[];
-
-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
-/*
- * rsinfo
- */
-extern struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[];
-
-/*
- * rsdump
- */
-extern struct acpi_rsdump_info acpi_rs_dump_irq[];
-extern struct acpi_rsdump_info acpi_rs_dump_dma[];
-extern struct acpi_rsdump_info acpi_rs_dump_start_dpf[];
-extern struct acpi_rsdump_info acpi_rs_dump_end_dpf[];
-extern struct acpi_rsdump_info acpi_rs_dump_io[];
-extern struct acpi_rsdump_info acpi_rs_dump_fixed_io[];
-extern struct acpi_rsdump_info acpi_rs_dump_vendor[];
-extern struct acpi_rsdump_info acpi_rs_dump_end_tag[];
-extern struct acpi_rsdump_info acpi_rs_dump_memory24[];
-extern struct acpi_rsdump_info acpi_rs_dump_memory32[];
-extern struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[];
-extern struct acpi_rsdump_info acpi_rs_dump_address16[];
-extern struct acpi_rsdump_info acpi_rs_dump_address32[];
-extern struct acpi_rsdump_info acpi_rs_dump_address64[];
-extern struct acpi_rsdump_info acpi_rs_dump_ext_address64[];
-extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[];
-extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[];
-#endif
-
-#endif                         /* __ACRESRC_H__ */
diff --git a/kitten/include/acpi/acstruct.h b/kitten/include/acpi/acstruct.h
deleted file mode 100644 (file)
index 5e8095f..0000000
+++ /dev/null
@@ -1,230 +0,0 @@
-/******************************************************************************
- *
- * Name: acstruct.h - Internal structs
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACSTRUCT_H__
-#define __ACSTRUCT_H__
-
-/* acpisrc:struct_defs -- for acpisrc conversion */
-
-/*****************************************************************************
- *
- * 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.
- */
-#define ACPI_NEXT_OP_DOWNWARD       1
-#define ACPI_NEXT_OP_UPWARD         2
-
-/*
- * Groups of definitions for walk_type used for different implementations of
- * walkers (never simultaneously) - flags for interpreter:
- */
-#define ACPI_WALK_NON_METHOD        0
-#define ACPI_WALK_METHOD            0x01
-#define ACPI_WALK_METHOD_RESTART    0x02
-
-/* Flags for i_aSL compiler only */
-
-#define ACPI_WALK_CONST_REQUIRED    0x10
-#define ACPI_WALK_CONST_OPTIONAL    0x20
-
-struct acpi_walk_state {
-       struct acpi_walk_state *next;   /* Next walk_state in list */
-       u8 descriptor_type;     /* To differentiate various internal objs */
-       u8 walk_type;
-       u16 opcode;             /* Current AML opcode */
-       u8 next_op_info;        /* Info about next_op */
-       u8 num_operands;        /* Stack pointer for Operands[] array */
-       acpi_owner_id owner_id; /* Owner of objects created during the walk */
-       u8 last_predicate;      /* Result of last predicate */
-       u8 current_result;
-       u8 return_used;
-       u8 scope_depth;
-       u8 pass_number;         /* Parse pass during table load */
-       u32 aml_offset;
-       u32 arg_types;
-       u32 method_breakpoint;  /* For single stepping */
-       u32 user_breakpoint;    /* User AML breakpoint */
-       u32 parse_flags;
-
-       struct acpi_parse_state parser_state;   /* Current state of parser */
-       u32 prev_arg_types;
-       u32 arg_count;          /* push for fixed or var args */
-
-       struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS];     /* Control method arguments */
-       struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS];     /* Control method locals */
-       union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
-       union acpi_operand_object **params;
-
-       u8 *aml_last_while;
-       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 *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 */
-       const struct acpi_opcode_info *op_info; /* Info on current opcode */
-       union acpi_parse_object *origin;        /* Start of walk [Obsolete] */
-       union acpi_operand_object *result_obj;
-       union acpi_generic_state *results;      /* Stack of accumulated results */
-       union acpi_operand_object *return_desc; /* Return object, if any */
-       union acpi_generic_state *scope_info;   /* Stack of nested scopes */
-       union acpi_parse_object *prev_op;       /* Last op that was processed */
-       union acpi_parse_object *next_op;       /* next op to be processed */
-       struct acpi_thread_state *thread;
-       acpi_parse_downwards descending_callback;
-       acpi_parse_upwards ascending_callback;
-};
-
-/* 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_get_devices_info {
-       acpi_walk_callback user_function;
-       void *context;
-       char *hid;
-};
-
-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;
-
-       } fatal;
-
-       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;
-
-       } mid;
-};
-
-/*
- * Structure used to pass object evaluation parameters.
- * Purpose is to reduce CPU stack use.
- */
-struct acpi_evaluate_info {
-       struct acpi_namespace_node *prefix_node;
-       char *pathname;
-       union acpi_operand_object *obj_desc;
-       union acpi_operand_object **parameters;
-       struct acpi_namespace_node *resolved_node;
-       union acpi_operand_object *return_object;
-       u8 pass_number;
-       u8 parameter_type;
-       u8 return_object_type;
-       u8 flags;
-};
-
-/* Types for parameter_type above */
-
-#define ACPI_PARAM_ARGS                 0
-#define ACPI_PARAM_GPE                  1
-
-/* Values for Flags above */
-
-#define ACPI_IGNORE_RETURN_VALUE        1
-
-/* Info used by acpi_ns_initialize_devices */
-
-struct acpi_device_walk_info {
-       u16 device_count;
-       u16 num_STA;
-       u16 num_INI;
-       struct acpi_table_desc *table_desc;
-       struct acpi_evaluate_info *evaluate_info;
-};
-
-/* TBD: [Restructure] Merge with struct above */
-
-struct acpi_walk_info {
-       u32 debug_level;
-       u32 count;
-       acpi_owner_id owner_id;
-       u8 display_type;
-};
-
-/* Display Types */
-
-#define ACPI_DISPLAY_SUMMARY        (u8) 0
-#define ACPI_DISPLAY_OBJECTS        (u8) 1
-#define ACPI_DISPLAY_MASK           (u8) 1
-
-#define ACPI_DISPLAY_SHORT          (u8) 2
-
-#endif
diff --git a/kitten/include/acpi/actables.h b/kitten/include/acpi/actables.h
deleted file mode 100644 (file)
index 4dbaf02..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/******************************************************************************
- *
- * Name: actables.h - ACPI table management
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#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_table_fadt(void);
-
-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);
-
-/*
- * tbget - Table "get" routines
- */
-acpi_status
-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_status
-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_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);
-
-/*
- * tbgetall - get multiple required tables
- */
-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_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);
-
-/*
- * tbremove - Table removal and deletion
- */
-void acpi_tb_delete_all_tables(void);
-
-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);
-
-/*
- * 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_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_is_table_installed(struct acpi_table_desc *new_table_desc);
-
-acpi_status
-acpi_tb_verify_table_checksum(struct acpi_table_header *table_header);
-
-u8 acpi_tb_sum_table(void *buffer, u32 length);
-
-u8 acpi_tb_generate_checksum(struct acpi_table_header *table);
-
-void acpi_tb_set_checksum(struct acpi_table_header *table);
-
-acpi_status
-acpi_tb_validate_table_header(struct acpi_table_header *table_header);
-
-#endif                         /* __ACTABLES_H__ */
diff --git a/kitten/include/acpi/actbl.h b/kitten/include/acpi/actbl.h
deleted file mode 100644 (file)
index b125cee..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-/******************************************************************************
- *
- * Name: actbl.h - Basic ACPI Table Definitions
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACTBL_H__
-#define __ACTBL_H__
-
-/*
- * Values for description table header signatures. Useful because they make
- * it more difficult to inadvertently type in the wrong signature.
- */
-#define DSDT_SIG                "DSDT" /* Differentiated System Description Table */
-#define FADT_SIG                "FACP" /* Fixed ACPI Description Table */
-#define FACS_SIG                "FACS" /* Firmware ACPI Control Structure */
-#define PSDT_SIG                "PSDT" /* Persistent System Description Table */
-#define RSDP_SIG                "RSD PTR "     /* Root System Description Pointer */
-#define RSDT_SIG                "RSDT" /* Root System Description Table */
-#define XSDT_SIG                "XSDT" /* Extended  System Description Table */
-#define SSDT_SIG                "SSDT" /* Secondary System Description Table */
-#define RSDP_NAME               "RSDP"
-
-/*
- * All tables and structures must be byte-packed to match the ACPI
- * specification, since the tables are provided by the system BIOS
- */
-#pragma pack(1)
-
-/*
- * These are the ACPI tables that are directly consumed by the subsystem.
- *
- * The RSDP and FACS do not use the common ACPI table header. All other ACPI
- * tables use the header.
- *
- * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
- * This is the only type that is even remotely portable. Anything else is not
- * portable, so do not use any other bitfield types.
- */
-
-/*******************************************************************************
- *
- * ACPI Table Header. This common header is used by all tables except the
- * RSDP and FACS. The define is used for direct inclusion of header into
- * other ACPI tables
- *
- ******************************************************************************/
-
-#define ACPI_TABLE_HEADER_DEF \
-       char                            signature[4];           /* ASCII table signature */\
-       u32                             length;                 /* Length of table in bytes, including this header */\
-       u8                              revision;               /* ACPI Specification minor version # */\
-       u8                              checksum;               /* To make sum of entire table == 0 */\
-       char                            oem_id[6];              /* ASCII OEM identification */\
-       char                            oem_table_id[8];        /* ASCII OEM table identification */\
-       u32                             oem_revision;           /* OEM revision number */\
-       char                            asl_compiler_id[4];     /* ASCII ASL compiler vendor ID */\
-       u32                             asl_compiler_revision;  /* ASL compiler version */
-
-struct acpi_table_header {
-ACPI_TABLE_HEADER_DEF};
-
-/*
- * GAS - Generic Address Structure (ACPI 2.0+)
- */
-struct acpi_generic_address {
-       u8 address_space_id;    /* Address space where struct or register exists */
-       u8 register_bit_width;  /* Size in bits of given register */
-       u8 register_bit_offset; /* Bit offset within the register */
-       u8 access_width;        /* Minimum Access size (ACPI 3.0) */
-       u64 address;            /* 64-bit address of struct or register */
-};
-
-/*******************************************************************************
- *
- * RSDP - Root System Description Pointer (Signature is "RSD PTR ")
- *
- ******************************************************************************/
-
-struct rsdp_descriptor {
-       char signature[8];      /* ACPI signature, contains "RSD PTR " */
-       u8 checksum;            /* ACPI 1.0 checksum */
-       char oem_id[6];         /* OEM identification */
-       u8 revision;            /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */
-       u32 rsdt_physical_address;      /* 32-bit physical address of the RSDT */
-       u32 length;             /* Table length in bytes, including header (ACPI 2.0+) */
-       u64 xsdt_physical_address;      /* 64-bit physical address of the XSDT (ACPI 2.0+) */
-       u8 extended_checksum;   /* Checksum of entire table (ACPI 2.0+) */
-       u8 reserved[3];         /* Reserved, must be zero */
-};
-
-#define ACPI_RSDP_REV0_SIZE     20     /* Size of original ACPI 1.0 RSDP */
-
-/*******************************************************************************
- *
- * RSDT/XSDT - Root System Description Tables
- *
- ******************************************************************************/
-
-struct rsdt_descriptor {
-       ACPI_TABLE_HEADER_DEF u32 table_offset_entry[1];        /* Array of pointers to ACPI tables */
-};
-
-struct xsdt_descriptor {
-       ACPI_TABLE_HEADER_DEF u64 table_offset_entry[1];        /* Array of pointers to ACPI tables */
-};
-
-/*******************************************************************************
- *
- * FACS - Firmware ACPI Control Structure (FACS)
- *
- ******************************************************************************/
-
-struct facs_descriptor {
-       char signature[4];      /* ASCII table signature */
-       u32 length;             /* Length of structure, in bytes */
-       u32 hardware_signature; /* Hardware configuration signature */
-       u32 firmware_waking_vector;     /* 32-bit physical address of the Firmware Waking Vector */
-       u32 global_lock;        /* Global Lock for shared hardware resources */
-
-       /* Flags (32 bits) */
-
-       u8 S4bios_f:1;          /* 00:    S4BIOS support is present */
-        u8:7;                  /* 01-07: Reserved, must be zero */
-       u8 reserved1[3];        /* 08-31: Reserved, must be zero */
-
-       u64 xfirmware_waking_vector;    /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */
-       u8 version;             /* Version of this table (ACPI 2.0+) */
-       u8 reserved[31];        /* Reserved, must be zero */
-};
-
-#define ACPI_GLOCK_PENDING      0x01   /* 00: Pending global lock ownership */
-#define ACPI_GLOCK_OWNED        0x02   /* 01: Global lock is owned */
-
-/*
- * Common FACS - This is a version-independent FACS structure used for internal use only
- */
-struct acpi_common_facs {
-       u32 *global_lock;
-       u64 *firmware_waking_vector;
-       u8 vector_width;
-};
-
-/*******************************************************************************
- *
- * FADT - Fixed ACPI Description Table (Signature "FACP")
- *
- ******************************************************************************/
-
-/* Fields common to all versions of the FADT */
-
-#define ACPI_FADT_COMMON \
-       ACPI_TABLE_HEADER_DEF \
-       u32                             V1_firmware_ctrl;   /* 32-bit physical address of FACS */ \
-       u32                             V1_dsdt;            /* 32-bit physical address of DSDT */ \
-       u8                              reserved1;          /* System Interrupt Model isn't used in ACPI 2.0*/ \
-       u8                              prefer_PM_profile;  /* Conveys preferred power management profile to OSPM. */ \
-       u16                             sci_int;            /* System vector of SCI interrupt */ \
-       u32                             smi_cmd;            /* Port address of SMI command port */ \
-       u8                              acpi_enable;        /* Value to write to smi_cmd to enable ACPI */ \
-       u8                              acpi_disable;       /* Value to write to smi_cmd to disable ACPI */ \
-       u8                              S4bios_req;         /* Value to write to SMI CMD to enter S4BIOS state */ \
-       u8                              pstate_cnt;         /* Processor performance state control*/ \
-       u32                             V1_pm1a_evt_blk;    /* Port address of Power Mgt 1a Event Reg Blk */ \
-       u32                             V1_pm1b_evt_blk;    /* Port address of Power Mgt 1b Event Reg Blk */ \
-       u32                             V1_pm1a_cnt_blk;    /* Port address of Power Mgt 1a Control Reg Blk */ \
-       u32                             V1_pm1b_cnt_blk;    /* Port address of Power Mgt 1b Control Reg Blk */ \
-       u32                             V1_pm2_cnt_blk;     /* Port address of Power Mgt 2 Control Reg Blk */ \
-       u32                             V1_pm_tmr_blk;      /* Port address of Power Mgt Timer Ctrl Reg Blk */ \
-       u32                             V1_gpe0_blk;        /* Port addr of General Purpose acpi_event 0 Reg Blk */ \
-       u32                             V1_gpe1_blk;        /* Port addr of General Purpose acpi_event 1 Reg Blk */ \
-       u8                              pm1_evt_len;        /* Byte Length of ports at pm1_x_evt_blk */ \
-       u8                              pm1_cnt_len;        /* Byte Length of ports at pm1_x_cnt_blk */ \
-       u8                              pm2_cnt_len;        /* Byte Length of ports at pm2_cnt_blk */ \
-       u8                              pm_tm_len;          /* Byte Length of ports at pm_tm_blk */ \
-       u8                              gpe0_blk_len;       /* Byte Length of ports at gpe0_blk */ \
-       u8                              gpe1_blk_len;       /* Byte Length of ports at gpe1_blk */ \
-       u8                              gpe1_base;          /* Offset in gpe model where gpe1 events start */ \
-       u8                              cst_cnt;            /* Support for the _CST object and C States change notification.*/ \
-       u16                             plvl2_lat;          /* Worst case HW latency to enter/exit C2 state */ \
-       u16                             plvl3_lat;          /* Worst case HW latency to enter/exit C3 state */ \
-       u16                             flush_size;         /* Processor's memory cache line width, in bytes */ \
-       u16                             flush_stride;       /* Number of flush strides that need to be read */ \
-       u8                              duty_offset;        /* Processor's duty cycle index in processor's P_CNT reg*/ \
-       u8                              duty_width;         /* Processor's duty cycle value bit width in P_CNT register.*/ \
-       u8                              day_alrm;           /* Index to day-of-month alarm in RTC CMOS RAM */ \
-       u8                              mon_alrm;           /* Index to month-of-year alarm in RTC CMOS RAM */ \
-       u8                              century;            /* Index to century in RTC CMOS RAM */ \
-       u16                             iapc_boot_arch;     /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ \
-       u8                              reserved2;          /* Reserved, must be zero */
-
-/*
- * ACPI 2.0+ FADT
- */
-struct fadt_descriptor {
-       ACPI_FADT_COMMON
-           /* Flags (32 bits) */
-       u8 wb_invd:1;           /* 00:    The wbinvd instruction works properly */
-       u8 wb_invd_flush:1;     /* 01:    The wbinvd flushes but does not invalidate */
-       u8 proc_c1:1;           /* 02:    All processors support C1 state */
-       u8 plvl2_up:1;          /* 03:    C2 state works on MP system */
-       u8 pwr_button:1;        /* 04:    Power button is handled as a generic feature */
-       u8 sleep_button:1;      /* 05:    Sleep button is handled as a generic feature, or not present */
-       u8 fixed_rTC:1;         /* 06:    RTC wakeup stat not in fixed register space */
-       u8 rtcs4:1;             /* 07:    RTC wakeup stat not possible from S4 */
-       u8 tmr_val_ext:1;       /* 08:    tmr_val is 32 bits 0=24-bits */
-       u8 dock_cap:1;          /* 09:    Docking supported */
-       u8 reset_reg_sup:1;     /* 10:    System reset via the FADT RESET_REG supported */
-       u8 sealed_case:1;       /* 11:    No internal expansion capabilities and case is sealed */
-       u8 headless:1;          /* 12:    No local video capabilities or local input devices */
-       u8 cpu_sw_sleep:1;      /* 13:    Must execute native instruction after writing SLP_TYPx register */
-
-       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
- * Defined here to allow compiler to generate the length of the struct
- */
-struct fadt_descriptor_rev2_minus {
-       ACPI_FADT_COMMON u32 flags;
-       struct acpi_generic_address reset_register;     /* Reset register address in GAS format */
-       u8 reset_value;         /* Value to write to the reset_register port to reset the system. */
-       u8 reserved7[3];        /* Reserved, must be zero */
-};
-
-/*
- * ACPI 1.0 FADT
- * Defined here to allow compiler to generate the length of the struct
- */
-struct fadt_descriptor_rev1 {
-       ACPI_FADT_COMMON u32 flags;
-};
-
-/* FADT: Prefered Power Management Profiles */
-
-#define PM_UNSPECIFIED                  0
-#define PM_DESKTOP                      1
-#define PM_MOBILE                       2
-#define PM_WORKSTATION                  3
-#define PM_ENTERPRISE_SERVER            4
-#define PM_SOHO_SERVER                  5
-#define PM_APPLIANCE_PC                 6
-
-/* FADT: Boot Arch Flags */
-
-#define BAF_LEGACY_DEVICES              0x0001
-#define BAF_8042_KEYBOARD_CONTROLLER    0x0002
-
-#define FADT2_REVISION_ID               3
-#define FADT2_MINUS_REVISION_ID         2
-
-/* Reset to default packing */
-
-#pragma pack()
-
-/*
- * This macro is temporary until the table bitfield flag definitions
- * are removed and replaced by a Flags field.
- */
-#define ACPI_FLAG_OFFSET(d,f,o)         (u8) (ACPI_OFFSET (d,f) + \
-                         sizeof(((d *)0)->f) + o)
-/*
- * Get the remaining ACPI tables
- */
-#include "actbl1.h"
-
-/*
- * ACPI Table information.  We save the table address, length,
- * and type of memory allocation (mapped or allocated) for each
- * table for 1) when we exit, and 2) if a new table is installed
- */
-#define ACPI_MEM_NOT_ALLOCATED  0
-#define ACPI_MEM_ALLOCATED      1
-#define ACPI_MEM_MAPPED         2
-
-/* Definitions for the Flags bitfield member of struct acpi_table_support */
-
-#define ACPI_TABLE_SINGLE       0x00
-#define ACPI_TABLE_MULTIPLE     0x01
-#define ACPI_TABLE_EXECUTABLE   0x02
-
-#define ACPI_TABLE_ROOT         0x00
-#define ACPI_TABLE_PRIMARY      0x10
-#define ACPI_TABLE_SECONDARY    0x20
-#define ACPI_TABLE_ALL          0x30
-#define ACPI_TABLE_TYPE_MASK    0x30
-
-/* Data about each known table type */
-
-struct acpi_table_support {
-       char *name;
-       char *signature;
-       void **global_ptr;
-       u8 sig_length;
-       u8 flags;
-};
-
-extern u8 acpi_fadt_is_v1;     /* is set to 1 if FADT is revision 1,
-                                * needed for certain workarounds */
-/* Macros used to generate offsets to specific table fields */
-
-#define ACPI_FACS_OFFSET(f)             (u8) ACPI_OFFSET (struct facs_descriptor,f)
-#define ACPI_FADT_OFFSET(f)             (u8) ACPI_OFFSET (struct fadt_descriptor, f)
-#define ACPI_GAS_OFFSET(f)              (u8) ACPI_OFFSET (struct acpi_generic_address,f)
-#define ACPI_HDR_OFFSET(f)              (u8) ACPI_OFFSET (struct acpi_table_header,f)
-#define ACPI_RSDP_OFFSET(f)             (u8) ACPI_OFFSET (struct rsdp_descriptor,f)
-
-#define ACPI_FADT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (struct fadt_descriptor,f,o)
-#define ACPI_FACS_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (struct facs_descriptor,f,o)
-
-#endif                         /* __ACTBL_H__ */
diff --git a/kitten/include/acpi/actbl1.h b/kitten/include/acpi/actbl1.h
deleted file mode 100644 (file)
index 745a644..0000000
+++ /dev/null
@@ -1,642 +0,0 @@
-/******************************************************************************
- *
- * Name: actbl1.h - Additional ACPI table definitions
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACTBL1_H__
-#define __ACTBL1_H__
-
-/*******************************************************************************
- *
- * Additional ACPI Tables
- *
- * These tables are not consumed directly by the ACPICA subsystem, but are
- * included here to support device drivers and the AML disassembler.
- *
- ******************************************************************************/
-
-/*
- * Values for description table header signatures. Useful because they make
- * it more difficult to inadvertently type in the wrong signature.
- */
-#define ACPI_SIG_ASF            "ASF!" /* Alert Standard Format table */
-#define ACPI_SIG_BOOT           "BOOT" /* Simple Boot Flag Table */
-#define ACPI_SIG_CPEP           "CPEP" /* Corrected Platform Error Polling table */
-#define ACPI_SIG_DBGP           "DBGP" /* Debug Port table */
-#define ACPI_SIG_ECDT           "ECDT" /* Embedded Controller Boot Resources Table */
-#define ACPI_SIG_HPET           "HPET" /* High Precision Event Timer table */
-#define ACPI_SIG_MADT           "APIC" /* Multiple APIC Description Table */
-#define ACPI_SIG_MCFG           "MCFG" /* PCI Memory Mapped Configuration table */
-#define ACPI_SIG_SBST           "SBST" /* Smart Battery Specification Table */
-#define ACPI_SIG_SLIT           "SLIT" /* System Locality Distance Information Table */
-#define ACPI_SIG_SPCR           "SPCR" /* Serial Port Console Redirection table */
-#define ACPI_SIG_SPMI           "SPMI" /* Server Platform Management Interface table */
-#define ACPI_SIG_SRAT           "SRAT" /* System Resource Affinity Table */
-#define ACPI_SIG_TCPA           "TCPA" /* Trusted Computing Platform Alliance table */
-#define ACPI_SIG_WDRT           "WDRT" /* Watchdog Resource Table */
-
-/* Legacy names */
-
-#define APIC_SIG                "APIC" /* Multiple APIC Description Table */
-#define BOOT_SIG                "BOOT" /* Simple Boot Flag Table */
-#define SBST_SIG                "SBST" /* Smart Battery Specification Table */
-
-/*
- * All tables must be byte-packed to match the ACPI specification, since
- * the tables are provided by the system BIOS.
- */
-#pragma pack(1)
-
-/*
- * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
- * This is the only type that is even remotely portable. Anything else is not
- * portable, so do not use any other bitfield types.
- */
-
-/*******************************************************************************
- *
- * ASF - Alert Standard Format table (Signature "ASF!")
- *
- ******************************************************************************/
-
-struct acpi_table_asf {
-ACPI_TABLE_HEADER_DEF};
-
-#define ACPI_ASF_HEADER_DEF \
-       u8                              type; \
-       u8                              reserved; \
-       u16                             length;
-
-struct acpi_asf_header {
-ACPI_ASF_HEADER_DEF};
-
-/* Values for Type field */
-
-#define ASF_INFO                0
-#define ASF_ALERT               1
-#define ASF_CONTROL             2
-#define ASF_BOOT                3
-#define ASF_ADDRESS             4
-#define ASF_RESERVED            5
-
-/*
- * ASF subtables
- */
-
-/* 0: ASF Information */
-
-struct acpi_asf_info {
-       ACPI_ASF_HEADER_DEF u8 min_reset_value;
-       u8 min_poll_interval;
-       u16 system_id;
-       u32 mfg_id;
-       u8 flags;
-       u8 reserved2[3];
-};
-
-/* 1: ASF Alerts */
-
-struct acpi_asf_alert {
-       ACPI_ASF_HEADER_DEF u8 assert_mask;
-       u8 deassert_mask;
-       u8 alerts;
-       u8 data_length;
-       u8 array[1];
-};
-
-/* 2: ASF Remote Control */
-
-struct acpi_asf_remote {
-       ACPI_ASF_HEADER_DEF u8 controls;
-       u8 data_length;
-       u16 reserved2;
-       u8 array[1];
-};
-
-/* 3: ASF RMCP Boot Options */
-
-struct acpi_asf_rmcp {
-       ACPI_ASF_HEADER_DEF u8 capabilities[7];
-       u8 completion_code;
-       u32 enterprise_id;
-       u8 command;
-       u16 parameter;
-       u16 boot_options;
-       u16 oem_parameters;
-};
-
-/* 4: ASF Address */
-
-struct acpi_asf_address {
-       ACPI_ASF_HEADER_DEF u8 eprom_address;
-       u8 devices;
-       u8 smbus_addresses[1];
-};
-
-/*******************************************************************************
- *
- * BOOT - Simple Boot Flag Table
- *
- ******************************************************************************/
-
-struct acpi_table_boot {
-       ACPI_TABLE_HEADER_DEF u8 cmos_index;    /* Index in CMOS RAM for the boot register */
-       u8 reserved[3];
-};
-
-/*******************************************************************************
- *
- * CPEP - Corrected Platform Error Polling table
- *
- ******************************************************************************/
-
-struct acpi_table_cpep {
-       ACPI_TABLE_HEADER_DEF u64 reserved;
-};
-
-/* Subtable */
-
-struct acpi_cpep_polling {
-       u8 type;
-       u8 length;
-       u8 processor_id;        /* Processor ID */
-       u8 processor_eid;       /* Processor EID */
-       u32 polling_interval;   /* Polling interval (msec) */
-};
-
-/*******************************************************************************
- *
- * DBGP - Debug Port table
- *
- ******************************************************************************/
-
-struct acpi_table_dbgp {
-       ACPI_TABLE_HEADER_DEF u8 interface_type;        /* 0=full 16550, 1=subset of 16550 */
-       u8 reserved[3];
-       struct acpi_generic_address debug_port;
-};
-
-/*******************************************************************************
- *
- * 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 */
-};
-
-/*******************************************************************************
- *
- * HPET - High Precision Event Timer table
- *
- ******************************************************************************/
-
-struct acpi_hpet_table {
-       ACPI_TABLE_HEADER_DEF u32 hardware_id;  /* Hardware ID of event timer block */
-       struct acpi_generic_address base_address;       /* Address of event timer block */
-       u8 hpet_number;         /* HPET sequence number */
-       u16 clock_tick;         /* Main counter min tick, periodic mode */
-       u8 attributes;
-};
-
-#if 0                          /* HPET flags to be converted to macros */
-struct {                       /* Flags (8 bits) */
-       u8 page_protect:1;      /* 00:    No page protection */
-       u8 page_protect4:1;     /* 01:    4_kB page protected */
-       u8 page_protect64:1;    /* 02:    64_kB page protected */
-        u8:5;                  /* 03-07: Reserved, must be zero */
-} flags;
-#endif
-
-/*******************************************************************************
- *
- * MADT - Multiple APIC Description Table
- *
- ******************************************************************************/
-
-struct multiple_apic_table {
-       ACPI_TABLE_HEADER_DEF 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 MADT PCATCompat */
-
-#define DUAL_PIC                0
-#define MULTIPLE_APIC           1
-
-/* Common MADT Sub-table header */
-
-#define APIC_HEADER_DEF \
-       u8                              type; \
-       u8                              length;
-
-struct apic_header {
-APIC_HEADER_DEF};
-
-/* Values for Type in struct apic_header */
-
-#define APIC_PROCESSOR          0
-#define APIC_IO                 1
-#define APIC_XRUPT_OVERRIDE     2
-#define APIC_NMI                3
-#define APIC_LOCAL_NMI          4
-#define APIC_ADDRESS_OVERRIDE   5
-#define APIC_IO_SAPIC           6
-#define APIC_LOCAL_SAPIC        7
-#define APIC_XRUPT_SOURCE       8
-#define APIC_RESERVED           9      /* 9 and greater are reserved */
-
-/* Flag definitions for MADT sub-tables */
-
-#define ACPI_MADT_IFLAGS /* INTI flags (16 bits) */ \
-       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 ACPI_MADT_LFLAGS /* Local Sapic flags (32 bits) */ \
-       u8                              processor_enabled: 1;   /* 00:    Processor is usable if set */\
-       u8                                              : 7;    /* 01-07: Reserved, must be zero */\
-       u8                              reserved2[3];   /* 08-31: Reserved, must be zero */
-
-/* Values for MPS INTI flags */
-
-#define POLARITY_CONFORMS       0
-#define POLARITY_ACTIVE_HIGH    1
-#define POLARITY_RESERVED       2
-#define POLARITY_ACTIVE_LOW     3
-
-#define TRIGGER_CONFORMS        0
-#define TRIGGER_EDGE            1
-#define TRIGGER_RESERVED        2
-#define TRIGGER_LEVEL           3
-
-/*
- * MADT Sub-tables, correspond to Type in struct apic_header
- */
-
-/* 0: processor APIC */
-
-struct madt_processor_apic {
-       APIC_HEADER_DEF u8 processor_id;        /* ACPI processor id */
-       u8 local_apic_id;       /* Processor's local APIC id */
- ACPI_MADT_LFLAGS};
-
-/* 1: IO APIC */
-
-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 */
-};
-
-/* 2: Interrupt Override */
-
-struct madt_interrupt_override {
-       APIC_HEADER_DEF u8 bus; /* 0 - ISA */
-       u8 source;              /* Interrupt source (IRQ) */
-       u32 interrupt;          /* Global system interrupt */
- ACPI_MADT_IFLAGS};
-
-/* 3: NMI Sources */
-
-struct madt_nmi_source {
-       APIC_HEADER_DEF ACPI_MADT_IFLAGS u32 interrupt; /* Global system interrupt */
-};
-
-/* 4: Local APIC NMI */
-
-struct madt_local_apic_nmi {
-       APIC_HEADER_DEF u8 processor_id;        /* ACPI processor id */
-       ACPI_MADT_IFLAGS u8 lint;       /* LINTn to which NMI is connected */
-};
-
-/* 5: Address Override */
-
-struct madt_address_override {
-       APIC_HEADER_DEF u16 reserved;   /* Reserved, must be zero */
-       u64 address;            /* APIC physical address */
-};
-
-/* 6: I/O Sapic */
-
-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 */
-};
-
-/* 7: Local Sapic */
-
-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 */
-        ACPI_MADT_LFLAGS u32 processor_uID;    /* Numeric UID - ACPI 3.0 */
-       char processor_uIDstring[1];    /* String UID  - ACPI 3.0 */
-};
-
-/* 8: Platform Interrupt Source */
-
-struct madt_interrupt_source {
-       APIC_HEADER_DEF ACPI_MADT_IFLAGS 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 */
-};
-
-#ifdef DUPLICATE_DEFINITION_WITH_LINUX_ACPI_H
-/*******************************************************************************
- *
- * MCFG - PCI Memory Mapped Configuration table and sub-table
- *
- ******************************************************************************/
-
-struct acpi_table_mcfg {
-       ACPI_TABLE_HEADER_DEF u8 reserved[8];
-};
-
-struct acpi_mcfg_allocation {
-       u64 base_address;       /* Base address, processor-relative */
-       u16 pci_segment;        /* PCI segment group number */
-       u8 start_bus_number;    /* Starting PCI Bus number */
-       u8 end_bus_number;      /* Final PCI Bus number */
-       u32 reserved;
-};
-#endif
-
-/*******************************************************************************
- *
- * SBST - Smart Battery Specification Table
- *
- ******************************************************************************/
-
-struct smart_battery_table {
-       ACPI_TABLE_HEADER_DEF u32 warning_level;
-       u32 low_level;
-       u32 critical_level;
-};
-
-/*******************************************************************************
- *
- * SLIT - System Locality Distance Information Table
- *
- ******************************************************************************/
-
-struct system_locality_info {
-       ACPI_TABLE_HEADER_DEF u64 locality_count;
-       u8 entry[1][1];
-};
-
-/*******************************************************************************
- *
- * SPCR - Serial Port Console Redirection table
- *
- ******************************************************************************/
-
-struct acpi_table_spcr {
-       ACPI_TABLE_HEADER_DEF u8 interface_type;        /* 0=full 16550, 1=subset of 16550 */
-       u8 reserved[3];
-       struct acpi_generic_address serial_port;
-       u8 interrupt_type;
-       u8 pc_interrupt;
-       u32 interrupt;
-       u8 baud_rate;
-       u8 parity;
-       u8 stop_bits;
-       u8 flow_control;
-       u8 terminal_type;
-       u8 reserved2;
-       u16 pci_device_id;
-       u16 pci_vendor_id;
-       u8 pci_bus;
-       u8 pci_device;
-       u8 pci_function;
-       u32 pci_flags;
-       u8 pci_segment;
-       u32 reserved3;
-};
-
-/*******************************************************************************
- *
- * SPMI - Server Platform Management Interface table
- *
- ******************************************************************************/
-
-struct acpi_table_spmi {
-       ACPI_TABLE_HEADER_DEF u8 reserved;
-       u8 interface_type;
-       u16 spec_revision;      /* Version of IPMI */
-       u8 interrupt_type;
-       u8 gpe_number;          /* GPE assigned */
-       u8 reserved2;
-       u8 pci_device_flag;
-       u32 interrupt;
-       struct acpi_generic_address ipmi_register;
-       u8 pci_segment;
-       u8 pci_bus;
-       u8 pci_device;
-       u8 pci_function;
-};
-
-/*******************************************************************************
- *
- * SRAT - System Resource Affinity Table
- *
- ******************************************************************************/
-
-struct system_resource_affinity {
-       ACPI_TABLE_HEADER_DEF u32 reserved1;    /* Must be value '1' */
-       u64 reserved2;          /* Reserved, must be zero */
-};
-
-/* SRAT common sub-table header */
-
-#define SRAT_SUBTABLE_HEADER \
-       u8                              type; \
-       u8                              length;
-
-/* Values for Type above */
-
-#define SRAT_CPU_AFFINITY       0
-#define SRAT_MEMORY_AFFINITY    1
-#define SRAT_RESERVED           2
-
-/* SRAT sub-tables */
-
-struct static_resource_alloc {
-       SRAT_SUBTABLE_HEADER 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 {
-       SRAT_SUBTABLE_HEADER 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 */
-};
-
-/*******************************************************************************
- *
- * TCPA - Trusted Computing Platform Alliance table
- *
- ******************************************************************************/
-
-struct acpi_table_tcpa {
-       ACPI_TABLE_HEADER_DEF u16 reserved;
-       u32 max_log_length;     /* Maximum length for the event log area */
-       u64 log_address;        /* Address of the event log area */
-};
-
-/*******************************************************************************
- *
- * WDRT - Watchdog Resource Table
- *
- ******************************************************************************/
-
-struct acpi_table_wdrt {
-       ACPI_TABLE_HEADER_DEF u32 header_length;        /* Watchdog Header Length */
-       u8 pci_segment;         /* PCI Segment number */
-       u8 pci_bus;             /* PCI Bus number */
-       u8 pci_device;          /* PCI Device number */
-       u8 pci_function;        /* PCI Function number */
-       u32 timer_period;       /* Period of one timer count (msec) */
-       u32 max_count;          /* Maximum counter value supported */
-       u32 min_count;          /* Minimum counter value */
-       u8 flags;
-       u8 reserved[3];
-       u32 entries;            /* Number of watchdog entries that follow */
-};
-
-#if 0                          /* Flags, will be converted to macros */
-u8 enabled:1;                  /* 00:    Timer enabled */
-u8:6;                          /* 01-06: Reserved */
-u8 sleep_stop:1;               /* 07:    Timer stopped in sleep state */
-#endif
-
-/* Macros used to generate offsets to specific table fields */
-
-#define ACPI_ASF0_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_asf_info,f)
-#define ACPI_ASF1_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_asf_alert,f)
-#define ACPI_ASF2_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_asf_remote,f)
-#define ACPI_ASF3_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_asf_rmcp,f)
-#define ACPI_ASF4_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_asf_address,f)
-#define ACPI_BOOT_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_boot,f)
-#define ACPI_CPEP_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_cpep,f)
-#define ACPI_CPEP0_OFFSET(f)            (u8) ACPI_OFFSET (struct acpi_cpep_polling,f)
-#define ACPI_DBGP_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_dbgp,f)
-#define ACPI_ECDT_OFFSET(f)             (u8) ACPI_OFFSET (struct ec_boot_resources,f)
-#define ACPI_HPET_OFFSET(f)             (u8) ACPI_OFFSET (struct hpet_table,f)
-#define ACPI_MADT_OFFSET(f)             (u8) ACPI_OFFSET (struct multiple_apic_table,f)
-#define ACPI_MADT0_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_processor_apic,f)
-#define ACPI_MADT1_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_io_apic,f)
-#define ACPI_MADT2_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_interrupt_override,f)
-#define ACPI_MADT3_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_nmi_source,f)
-#define ACPI_MADT4_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_local_apic_nmi,f)
-#define ACPI_MADT5_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_address_override,f)
-#define ACPI_MADT6_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_io_sapic,f)
-#define ACPI_MADT7_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_local_sapic,f)
-#define ACPI_MADT8_OFFSET(f)            (u8) ACPI_OFFSET (struct madt_interrupt_source,f)
-#define ACPI_MADTH_OFFSET(f)            (u8) ACPI_OFFSET (struct apic_header,f)
-#define ACPI_MCFG_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_mcfg,f)
-#define ACPI_MCFG0_OFFSET(f)            (u8) ACPI_OFFSET (struct acpi_mcfg_allocation,f)
-#define ACPI_SBST_OFFSET(f)             (u8) ACPI_OFFSET (struct smart_battery_table,f)
-#define ACPI_SLIT_OFFSET(f)             (u8) ACPI_OFFSET (struct system_locality_info,f)
-#define ACPI_SPCR_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_spcr,f)
-#define ACPI_SPMI_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_spmi,f)
-#define ACPI_SRAT_OFFSET(f)             (u8) ACPI_OFFSET (struct system_resource_affinity,f)
-#define ACPI_SRAT0_OFFSET(f)            (u8) ACPI_OFFSET (struct static_resource_alloc,f)
-#define ACPI_SRAT1_OFFSET(f)            (u8) ACPI_OFFSET (struct memory_affinity,f)
-#define ACPI_TCPA_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_tcpa,f)
-#define ACPI_WDRT_OFFSET(f)             (u8) ACPI_OFFSET (struct acpi_table_wdrt,f)
-
-#define ACPI_HPET_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (struct hpet_table,f,o)
-#define ACPI_SRAT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct static_resource_alloc,f,o)
-#define ACPI_SRAT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct memory_affinity,f,o)
-#define ACPI_MADT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (struct multiple_apic_table,f,o)
-#define ACPI_MADT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct madt_processor_apic,f,o)
-#define ACPI_MADT2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct madt_interrupt_override,f,o)
-#define ACPI_MADT3_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct madt_nmi_source,f,o)
-#define ACPI_MADT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct madt_local_apic_nmi,f,o)
-#define ACPI_MADT7_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct madt_local_sapic,f,o)
-#define ACPI_MADT8_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (struct madt_interrupt_source,f,o)
-
-/* Reset to default packing */
-
-#pragma pack()
-
-#endif                         /* __ACTBL1_H__ */
diff --git a/kitten/include/acpi/actbl2.h b/kitten/include/acpi/actbl2.h
deleted file mode 100644 (file)
index 67efe6c..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/******************************************************************************
- *
- * Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACTBL2_H__
-#define __ACTBL2_H__
-
-/* Code moved to both actbl.h and actbl1.h */
-
-#endif                         /* __ACTBL2_H__ */
diff --git a/kitten/include/acpi/actbl71.h b/kitten/include/acpi/actbl71.h
deleted file mode 100644 (file)
index 10ac05b..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/******************************************************************************
- *
- * Name: actbl71.h - IA-64 Extensions to the ACPI Spec Rev. 0.71
- *                   This file includes tables specific to this
- *                   specification revision.
- *
- *****************************************************************************/
-
-/*
- *  Copyright (C) 2000 - 2003, 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 __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 */
-
-#define SMI_CMD_ADDRESS_SPACE       0x01
-#define PM1_BLK_ADDRESS_SPACE       0x02
-#define PM2_CNT_BLK_ADDRESS_SPACE   0x04
-#define PM_TMR_BLK_ADDRESS_SPACE    0x08
-#define GPE0_BLK_ADDRESS_SPACE      0x10
-#define GPE1_BLK_ADDRESS_SPACE      0x20
-
-/* Only for clarity in declarations */
-
-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 */
-};
-
-/*****************************************/
-/* 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 */
-};
-
-/*******************************************/
-/* 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 */
-};
-
-/******************************************/
-/* 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 */
-};
-
-#pragma pack()
-
-#endif                         /* __ACTBL71_H__ */
diff --git a/kitten/include/acpi/actypes.h b/kitten/include/acpi/actypes.h
deleted file mode 100644 (file)
index 64b603c..0000000
+++ /dev/null
@@ -1,1327 +0,0 @@
-/******************************************************************************
- *
- * Name: actypes.h - Common data types for the entire ACPI subsystem
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACTYPES_H__
-#define __ACTYPES_H__
-
-/* acpisrc:struct_defs -- for acpisrc conversion */
-
-/*
- * ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header
- * and must be either 16, 32, or 64
- */
-#ifndef ACPI_MACHINE_WIDTH
-#error ACPI_MACHINE_WIDTH not defined
-#endif
-
-/*! [Begin] no source code translation */
-
-/*
- * Data type ranges
- * Note: These macros are designed to be compiler independent as well as
- * working around problems that some 32-bit compilers have with 64-bit
- * constants.
- */
-#define ACPI_UINT8_MAX                  (UINT8) (~((UINT8)  0))        /* 0xFF               */
-#define ACPI_UINT16_MAX                 (UINT16)(~((UINT16) 0))        /* 0xFFFF             */
-#define ACPI_UINT32_MAX                 (UINT32)(~((UINT32) 0))        /* 0xFFFFFFFF         */
-#define ACPI_UINT64_MAX                 (UINT64)(~((UINT64) 0))        /* 0xFFFFFFFFFFFFFFFF */
-#define ACPI_ASCII_MAX                  0x7F
-
-/*
- * Architecture-specific ACPICA Subsystem Data Types
- *
- * The goal of these types is to provide source code portability across
- * 16-bit, 32-bit, and 64-bit targets.
- *
- * 1) The following types are of fixed size for all targets (16/32/64):
- *
- * BOOLEAN      Logical boolean
- *
- * UINT8        8-bit  (1 byte) unsigned value
- * UINT16       16-bit (2 byte) unsigned value
- * UINT32       32-bit (4 byte) unsigned value
- * UINT64       64-bit (8 byte) unsigned value
- *
- * INT16        16-bit (2 byte) signed value
- * INT32        32-bit (4 byte) signed value
- * INT64        64-bit (8 byte) signed value
- *
- * COMPILER_DEPENDENT_UINT64/INT64 - These types are defined in the
- * compiler-dependent header(s) and were introduced because there is no common
- * 64-bit integer type across the various compilation models, as shown in
- * the table below.
- *
- * Datatype  LP64 ILP64 LLP64 ILP32 LP32 16bit
- * char      8    8     8     8     8    8
- * short     16   16    16    16    16   16
- * _int32         32
- * int       32   64    32    32    16   16
- * long      64   64    32    32    32   32
- * long long            64    64
- * pointer   64   64    64    32    32   32
- *
- * Note: ILP64 and LP32 are currently not supported.
- *
- *
- * 2) These types represent the native word size of the target mode of the
- * processor, and may be 16-bit, 32-bit, or 64-bit as required. They are
- * usually used for memory allocation, efficient loop counters, and array
- * indexes. The types are similar to the size_t type in the C library and are
- * required because there is no C type that consistently represents the native
- * data width.
- *
- * ACPI_SIZE        16/32/64-bit unsigned value
- * ACPI_NATIVE_UINT 16/32/64-bit unsigned value
- * ACPI_NATIVE_INT  16/32/64-bit signed value
- *
- */
-
-/*******************************************************************************
- *
- * Common types for all compilers, all targets
- *
- ******************************************************************************/
-
-typedef unsigned char BOOLEAN;
-typedef unsigned char UINT8;
-typedef unsigned short UINT16;
-typedef COMPILER_DEPENDENT_UINT64 UINT64;
-typedef COMPILER_DEPENDENT_INT64 INT64;
-
-/*! [End] no source code translation !*/
-
-/*******************************************************************************
- *
- * Types specific to 64-bit targets
- *
- ******************************************************************************/
-
-#if ACPI_MACHINE_WIDTH == 64
-
-/*! [Begin] no source code translation (keep the typedefs as-is) */
-
-typedef unsigned int UINT32;
-typedef int INT32;
-
-/*! [End] no source code translation !*/
-
-typedef u64 acpi_native_uint;
-typedef s64 acpi_native_int;
-
-typedef u64 acpi_table_ptr;
-typedef u64 acpi_io_address;
-typedef u64 acpi_physical_address;
-
-#define ACPI_MAX_PTR                    ACPI_UINT64_MAX
-#define ACPI_SIZE_MAX                   ACPI_UINT64_MAX
-
-#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */
-
-/*
- * In the case of the Itanium Processor Family (IPF), the hardware does not
- * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag
- * to indicate that special precautions must be taken to avoid alignment faults.
- * (IA64 or ia64 is currently used by existing compilers to indicate IPF.)
- *
- * Note: Em64_t and other X86-64 processors support misaligned transfers,
- * so there is no need to define this flag.
- */
-#if defined (__IA64__) || defined (__ia64__)
-#define ACPI_MISALIGNMENT_NOT_SUPPORTED
-#endif
-
-/*******************************************************************************
- *
- * Types specific to 32-bit targets
- *
- ******************************************************************************/
-
-#elif ACPI_MACHINE_WIDTH == 32
-
-/*! [Begin] no source code translation (keep the typedefs as-is) */
-
-typedef unsigned int UINT32;
-typedef int INT32;
-
-/*! [End] no source code translation !*/
-
-typedef u32 acpi_native_uint;
-typedef s32 acpi_native_int;
-
-typedef u64 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef u64 acpi_physical_address;
-
-#define ACPI_MAX_PTR                    ACPI_UINT32_MAX
-#define ACPI_SIZE_MAX                   ACPI_UINT32_MAX
-
-/*******************************************************************************
- *
- * Types specific to 16-bit targets
- *
- ******************************************************************************/
-
-#elif ACPI_MACHINE_WIDTH == 16
-
-/*! [Begin] no source code translation (keep the typedefs as-is) */
-
-typedef unsigned long UINT32;
-typedef short INT16;
-typedef long INT32;
-
-/*! [End] no source code translation !*/
-
-typedef u16 acpi_native_uint;
-typedef s16 acpi_native_int;
-
-typedef u32 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef char *acpi_physical_address;
-
-#define ACPI_MAX_PTR                    ACPI_UINT16_MAX
-#define ACPI_SIZE_MAX                   ACPI_UINT16_MAX
-
-#define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */
-
-/* 64-bit integers cannot be supported */
-
-#define ACPI_NO_INTEGER64_SUPPORT
-
-#else
-
-/* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */
-
-#error unknown ACPI_MACHINE_WIDTH
-#endif
-
-/* Variable-width type, used instead of clib size_t */
-
-typedef acpi_native_uint acpi_size;
-
-/*******************************************************************************
- *
- * OS-dependent and compiler-dependent types
- *
- * If the defaults below are not appropriate for the host system, they can
- * be defined in the compiler-specific or OS-specific header, and this will
- * take precedence.
- *
- ******************************************************************************/
-
-/* Value returned by acpi_os_get_thread_id */
-
-#ifndef acpi_thread_id
-#define acpi_thread_id                  acpi_native_uint
-#endif
-
-/* Object returned from acpi_os_create_lock */
-
-#ifndef acpi_spinlock
-#define acpi_spinlock                   void *
-#endif
-
-/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */
-
-#ifndef acpi_cpu_flags
-#define acpi_cpu_flags                  acpi_native_uint
-#endif
-
-/* Object returned from acpi_os_create_cache */
-
-#ifndef acpi_cache_t
-#define acpi_cache_t                    struct acpi_memory_list
-#endif
-
-/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
-
-#ifndef acpi_uintptr_t
-#define acpi_uintptr_t                  void *
-#endif
-
-/*
- * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because
- * some compilers can catch printf format string problems
- */
-#ifndef ACPI_PRINTF_LIKE
-#define ACPI_PRINTF_LIKE(c)
-#endif
-
-/*
- * Some compilers complain about unused variables. Sometimes we don't want to
- * use all the variables (for example, _acpi_module_name). This allows us
- * to to tell the compiler in a per-variable manner that a variable
- * is unused
- */
-#ifndef ACPI_UNUSED_VAR
-#define ACPI_UNUSED_VAR
-#endif
-
-/*
- * All ACPICA functions that are available to the rest of the kernel are
- * tagged with this macro which can be defined as appropriate for the host.
- */
-#ifndef ACPI_EXPORT_SYMBOL
-#define ACPI_EXPORT_SYMBOL(symbol)
-#endif
-
-/*******************************************************************************
- *
- * Independent types
- *
- ******************************************************************************/
-
-/*
- * Pointer overlays to avoid lots of typecasting for
- * code that accepts both physical and logical pointers.
- */
-union acpi_pointers {
-       acpi_physical_address physical;
-       void *logical;
-       acpi_table_ptr value;
-};
-
-struct acpi_pointer {
-       u32 pointer_type;
-       union acpi_pointers pointer;
-};
-
-/* pointer_types for above */
-
-#define ACPI_PHYSICAL_POINTER           0x01
-#define ACPI_LOGICAL_POINTER            0x02
-
-/* Processor mode */
-
-#define ACPI_PHYSICAL_ADDRESSING        0x04
-#define ACPI_LOGICAL_ADDRESSING         0x08
-#define ACPI_MEMORY_MODE                0x0C
-
-#define ACPI_PHYSMODE_PHYSPTR           ACPI_PHYSICAL_ADDRESSING | ACPI_PHYSICAL_POINTER
-#define ACPI_LOGMODE_PHYSPTR            ACPI_LOGICAL_ADDRESSING  | ACPI_PHYSICAL_POINTER
-#define ACPI_LOGMODE_LOGPTR             ACPI_LOGICAL_ADDRESSING  | ACPI_LOGICAL_POINTER
-
-/* Logical defines and NULL */
-
-#ifdef FALSE
-#undef FALSE
-#endif
-#define FALSE                           (1 == 0)
-
-#ifdef TRUE
-#undef TRUE
-#endif
-#define TRUE                            (1 == 1)
-
-#ifndef NULL
-#define NULL                            (void *) 0
-#endif
-
-/*
- * Mescellaneous types
- */
-typedef u32 acpi_status;       /* All ACPI Exceptions */
-typedef u32 acpi_name;         /* 4-byte ACPI name */
-typedef char *acpi_string;     /* Null terminated ASCII string */
-typedef void *acpi_handle;     /* Actually a ptr to a NS Node */
-
-struct uint64_struct {
-       u32 lo;
-       u32 hi;
-};
-
-union uint64_overlay {
-       u64 full;
-       struct uint64_struct part;
-};
-
-struct uint32_struct {
-       u32 lo;
-       u32 hi;
-};
-
-/* Synchronization objects */
-
-#define acpi_mutex                      void *
-#define acpi_semaphore                  void *
-
-/*
- * Acpi integer width. In ACPI version 1, integers are
- * 32 bits.  In ACPI version 2, integers are 64 bits.
- * Note that this pertains to the ACPI integer type only, not
- * other integers used in the implementation of the ACPI CA
- * subsystem.
- */
-#ifdef ACPI_NO_INTEGER64_SUPPORT
-
-/* 32-bit integers only, no 64-bit support */
-
-typedef u32 acpi_integer;
-#define ACPI_INTEGER_MAX                ACPI_UINT32_MAX
-#define ACPI_INTEGER_BIT_SIZE           32
-#define ACPI_MAX_DECIMAL_DIGITS         10     /* 2^32 = 4,294,967,296 */
-
-#define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 32-bit divide */
-
-#else
-
-/* 64-bit integers */
-
-typedef u64 acpi_integer;
-#define ACPI_INTEGER_MAX                ACPI_UINT64_MAX
-#define ACPI_INTEGER_BIT_SIZE           64
-#define ACPI_MAX_DECIMAL_DIGITS         20     /* 2^64 = 18,446,744,073,709,551,616 */
-
-#if ACPI_MACHINE_WIDTH == 64
-#define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 64-bit divide */
-#endif
-#endif
-
-#define ACPI_MAX64_DECIMAL_DIGITS       20
-#define ACPI_MAX32_DECIMAL_DIGITS       10
-#define ACPI_MAX16_DECIMAL_DIGITS        5
-#define ACPI_MAX8_DECIMAL_DIGITS         3
-
-/*
- * Constants with special meanings
- */
-#define ACPI_ROOT_OBJECT                ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR)
-
-/*
- * Initialization sequence
- */
-#define ACPI_FULL_INITIALIZATION        0x00
-#define ACPI_NO_ADDRESS_SPACE_INIT      0x01
-#define ACPI_NO_HARDWARE_INIT           0x02
-#define ACPI_NO_EVENT_INIT              0x04
-#define ACPI_NO_HANDLER_INIT            0x08
-#define ACPI_NO_ACPI_ENABLE             0x10
-#define ACPI_NO_DEVICE_INIT             0x20
-#define ACPI_NO_OBJECT_INIT             0x40
-
-/*
- * Initialization state
- */
-#define ACPI_INITIALIZED_OK             0x01
-
-/*
- * Power state values
- */
-#define ACPI_STATE_UNKNOWN              (u8) 0xFF
-
-#define ACPI_STATE_S0                   (u8) 0
-#define ACPI_STATE_S1                   (u8) 1
-#define ACPI_STATE_S2                   (u8) 2
-#define ACPI_STATE_S3                   (u8) 3
-#define ACPI_STATE_S4                   (u8) 4
-#define ACPI_STATE_S5                   (u8) 5
-#define ACPI_S_STATES_MAX               ACPI_STATE_S5
-#define ACPI_S_STATE_COUNT              6
-
-#define ACPI_STATE_D0                   (u8) 0
-#define ACPI_STATE_D1                   (u8) 1
-#define ACPI_STATE_D2                   (u8) 2
-#define ACPI_STATE_D3                   (u8) 3
-#define ACPI_D_STATES_MAX               ACPI_STATE_D3
-#define ACPI_D_STATE_COUNT              4
-
-#define ACPI_STATE_C0                   (u8) 0
-#define ACPI_STATE_C1                   (u8) 1
-#define ACPI_STATE_C2                   (u8) 2
-#define ACPI_STATE_C3                   (u8) 3
-#define ACPI_C_STATES_MAX               ACPI_STATE_C3
-#define ACPI_C_STATE_COUNT              4
-
-/*
- * Sleep type invalid value
- */
-#define ACPI_SLEEP_TYPE_MAX             0x7
-#define ACPI_SLEEP_TYPE_INVALID         0xFF
-
-/*
- * Standard notify values
- */
-#define ACPI_NOTIFY_BUS_CHECK           (u8) 0
-#define ACPI_NOTIFY_DEVICE_CHECK        (u8) 1
-#define ACPI_NOTIFY_DEVICE_WAKE         (u8) 2
-#define ACPI_NOTIFY_EJECT_REQUEST       (u8) 3
-#define ACPI_NOTIFY_DEVICE_CHECK_LIGHT  (u8) 4
-#define ACPI_NOTIFY_FREQUENCY_MISMATCH  (u8) 5
-#define ACPI_NOTIFY_BUS_MODE_MISMATCH   (u8) 6
-#define ACPI_NOTIFY_POWER_FAULT         (u8) 7
-
-/*
- *  Table types.  These values are passed to the table related APIs
- */
-typedef u32 acpi_table_type;
-
-#define ACPI_TABLE_ID_RSDP              (acpi_table_type) 0
-#define ACPI_TABLE_ID_DSDT              (acpi_table_type) 1
-#define ACPI_TABLE_ID_FADT              (acpi_table_type) 2
-#define ACPI_TABLE_ID_FACS              (acpi_table_type) 3
-#define ACPI_TABLE_ID_PSDT              (acpi_table_type) 4
-#define ACPI_TABLE_ID_SSDT              (acpi_table_type) 5
-#define ACPI_TABLE_ID_XSDT              (acpi_table_type) 6
-#define ACPI_TABLE_ID_MAX               6
-#define ACPI_NUM_TABLE_TYPES            (ACPI_TABLE_ID_MAX+1)
-
-/*
- * Types associated with ACPI names and objects.  The first group of
- * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition
- * of the ACPI object_type() operator (See the ACPI Spec). Therefore,
- * only add to the first group if the spec changes.
- *
- * NOTE: Types must be kept in sync with the global acpi_ns_properties
- * and acpi_ns_type_names arrays.
- */
-typedef u32 acpi_object_type;
-
-#define ACPI_TYPE_ANY                   0x00
-#define ACPI_TYPE_INTEGER               0x01   /* Byte/Word/Dword/Zero/One/Ones */
-#define ACPI_TYPE_STRING                0x02
-#define ACPI_TYPE_BUFFER                0x03
-#define ACPI_TYPE_PACKAGE               0x04   /* byte_const, multiple data_term/Constant/super_name */
-#define ACPI_TYPE_FIELD_UNIT            0x05
-#define ACPI_TYPE_DEVICE                0x06   /* Name, multiple Node */
-#define ACPI_TYPE_EVENT                 0x07
-#define ACPI_TYPE_METHOD                0x08   /* Name, byte_const, multiple Code */
-#define ACPI_TYPE_MUTEX                 0x09
-#define ACPI_TYPE_REGION                0x0A
-#define ACPI_TYPE_POWER                 0x0B   /* Name,byte_const,word_const,multi Node */
-#define ACPI_TYPE_PROCESSOR             0x0C   /* Name,byte_const,Dword_const,byte_const,multi nm_o */
-#define ACPI_TYPE_THERMAL               0x0D   /* Name, multiple Node */
-#define ACPI_TYPE_BUFFER_FIELD          0x0E
-#define ACPI_TYPE_DDB_HANDLE            0x0F
-#define ACPI_TYPE_DEBUG_OBJECT          0x10
-
-#define ACPI_TYPE_EXTERNAL_MAX          0x10
-
-/*
- * These are object types that do not map directly to the ACPI
- * object_type() operator. They are used for various internal purposes only.
- * If new predefined ACPI_TYPEs are added (via the ACPI specification), these
- * internal types must move upwards. (There is code that depends on these
- * values being contiguous with the external types above.)
- */
-#define ACPI_TYPE_LOCAL_REGION_FIELD    0x11
-#define ACPI_TYPE_LOCAL_BANK_FIELD      0x12
-#define ACPI_TYPE_LOCAL_INDEX_FIELD     0x13
-#define ACPI_TYPE_LOCAL_REFERENCE       0x14   /* Arg#, Local#, Name, Debug, ref_of, Index */
-#define ACPI_TYPE_LOCAL_ALIAS           0x15
-#define ACPI_TYPE_LOCAL_METHOD_ALIAS    0x16
-#define ACPI_TYPE_LOCAL_NOTIFY          0x17
-#define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x18
-#define ACPI_TYPE_LOCAL_RESOURCE        0x19
-#define ACPI_TYPE_LOCAL_RESOURCE_FIELD  0x1A
-#define ACPI_TYPE_LOCAL_SCOPE           0x1B   /* 1 Name, multiple object_list Nodes */
-
-#define ACPI_TYPE_NS_NODE_MAX           0x1B   /* Last typecode used within a NS Node */
-
-/*
- * These are special object types that never appear in
- * a Namespace node, only in an union acpi_operand_object
- */
-#define ACPI_TYPE_LOCAL_EXTRA           0x1C
-#define ACPI_TYPE_LOCAL_DATA            0x1D
-
-#define ACPI_TYPE_LOCAL_MAX             0x1D
-
-/* All types above here are invalid */
-
-#define ACPI_TYPE_INVALID               0x1E
-#define ACPI_TYPE_NOT_FOUND             0xFF
-
-/*
- * All I/O
- */
-#define ACPI_READ                       0
-#define ACPI_WRITE                      1
-#define ACPI_IO_MASK                    1
-
-/*
- * Event Types: Fixed & General Purpose
- */
-typedef u32 acpi_event_type;
-
-/*
- * Fixed events
- */
-#define ACPI_EVENT_PMTIMER              0
-#define ACPI_EVENT_GLOBAL               1
-#define ACPI_EVENT_POWER_BUTTON         2
-#define ACPI_EVENT_SLEEP_BUTTON         3
-#define ACPI_EVENT_RTC                  4
-#define ACPI_EVENT_MAX                  4
-#define ACPI_NUM_FIXED_EVENTS           ACPI_EVENT_MAX + 1
-
-/*
- * Event Status - Per event
- * -------------
- * The encoding of acpi_event_status is illustrated below.
- * Note that a set bit (1) indicates the property is TRUE
- * (e.g. if bit 0 is set then the event is enabled).
- * +-------------+-+-+-+
- * |   Bits 31:3 |2|1|0|
- * +-------------+-+-+-+
- *          |     | | |
- *          |     | | +- Enabled?
- *          |     | +--- Enabled for wake?
- *          |     +----- Set?
- *          +----------- <Reserved>
- */
-typedef u32 acpi_event_status;
-
-#define ACPI_EVENT_FLAG_DISABLED        (acpi_event_status) 0x00
-#define ACPI_EVENT_FLAG_ENABLED         (acpi_event_status) 0x01
-#define ACPI_EVENT_FLAG_WAKE_ENABLED    (acpi_event_status) 0x02
-#define ACPI_EVENT_FLAG_SET             (acpi_event_status) 0x04
-
-/*
- * General Purpose Events (GPE)
- */
-#define ACPI_GPE_INVALID                0xFF
-#define ACPI_GPE_MAX                    0xFF
-#define ACPI_NUM_GPE                    256
-
-#define ACPI_GPE_ENABLE                 0
-#define ACPI_GPE_DISABLE                1
-
-/*
- * GPE info flags - Per GPE
- * +-+-+-+---+---+-+
- * |7|6|5|4:3|2:1|0|
- * +-+-+-+---+---+-+
- *  | | |  |   |  |
- *  | | |  |   |  +--- Interrupt type: Edge or Level Triggered
- *  | | |  |   +--- Type: Wake-only, Runtime-only, or wake/runtime
- *  | | |  +--- Type of dispatch -- to method, handler, or none
- *  | | +--- Enabled for runtime?
- *  | +--- Enabled for wake?
- *  +--- System state when GPE ocurred (running/waking)
- */
-#define ACPI_GPE_XRUPT_TYPE_MASK        (u8) 0x01
-#define ACPI_GPE_LEVEL_TRIGGERED        (u8) 0x01
-#define ACPI_GPE_EDGE_TRIGGERED         (u8) 0x00
-
-#define ACPI_GPE_TYPE_MASK              (u8) 0x06
-#define ACPI_GPE_TYPE_WAKE_RUN          (u8) 0x06
-#define ACPI_GPE_TYPE_WAKE              (u8) 0x02
-#define ACPI_GPE_TYPE_RUNTIME           (u8) 0x04      /* Default */
-
-#define ACPI_GPE_DISPATCH_MASK          (u8) 0x18
-#define ACPI_GPE_DISPATCH_HANDLER       (u8) 0x08
-#define ACPI_GPE_DISPATCH_METHOD        (u8) 0x10
-#define ACPI_GPE_DISPATCH_NOT_USED      (u8) 0x00      /* Default */
-
-#define ACPI_GPE_RUN_ENABLE_MASK        (u8) 0x20
-#define ACPI_GPE_RUN_ENABLED            (u8) 0x20
-#define ACPI_GPE_RUN_DISABLED           (u8) 0x00      /* Default */
-
-#define ACPI_GPE_WAKE_ENABLE_MASK       (u8) 0x40
-#define ACPI_GPE_WAKE_ENABLED           (u8) 0x40
-#define ACPI_GPE_WAKE_DISABLED          (u8) 0x00      /* Default */
-
-#define ACPI_GPE_ENABLE_MASK            (u8) 0x60      /* Both run/wake */
-
-#define ACPI_GPE_SYSTEM_MASK            (u8) 0x80
-#define ACPI_GPE_SYSTEM_RUNNING         (u8) 0x80
-#define ACPI_GPE_SYSTEM_WAKING          (u8) 0x00
-
-/*
- * Flags for GPE and Lock interfaces
- */
-#define ACPI_EVENT_WAKE_ENABLE          0x2    /* acpi_gpe_enable */
-#define ACPI_EVENT_WAKE_DISABLE         0x2    /* acpi_gpe_disable */
-
-#define ACPI_NOT_ISR                    0x1
-#define ACPI_ISR                        0x0
-
-/* Notify types */
-
-#define ACPI_SYSTEM_NOTIFY              0x1
-#define ACPI_DEVICE_NOTIFY              0x2
-#define ACPI_ALL_NOTIFY                 0x3
-#define ACPI_MAX_NOTIFY_HANDLER_TYPE    0x3
-
-#define ACPI_MAX_SYS_NOTIFY             0x7f
-
-/* Address Space (Operation Region) Types */
-
-typedef u8 acpi_adr_space_type;
-
-#define ACPI_ADR_SPACE_SYSTEM_MEMORY    (acpi_adr_space_type) 0
-#define ACPI_ADR_SPACE_SYSTEM_IO        (acpi_adr_space_type) 1
-#define ACPI_ADR_SPACE_PCI_CONFIG       (acpi_adr_space_type) 2
-#define ACPI_ADR_SPACE_EC               (acpi_adr_space_type) 3
-#define ACPI_ADR_SPACE_SMBUS            (acpi_adr_space_type) 4
-#define ACPI_ADR_SPACE_CMOS             (acpi_adr_space_type) 5
-#define ACPI_ADR_SPACE_PCI_BAR_TARGET   (acpi_adr_space_type) 6
-#define ACPI_ADR_SPACE_DATA_TABLE       (acpi_adr_space_type) 7
-#define ACPI_ADR_SPACE_FIXED_HARDWARE   (acpi_adr_space_type) 127
-
-/*
- * bit_register IDs
- * These are bitfields defined within the full ACPI registers
- */
-#define ACPI_BITREG_TIMER_STATUS                0x00
-#define ACPI_BITREG_BUS_MASTER_STATUS           0x01
-#define ACPI_BITREG_GLOBAL_LOCK_STATUS          0x02
-#define ACPI_BITREG_POWER_BUTTON_STATUS         0x03
-#define ACPI_BITREG_SLEEP_BUTTON_STATUS         0x04
-#define ACPI_BITREG_RT_CLOCK_STATUS             0x05
-#define ACPI_BITREG_WAKE_STATUS                 0x06
-#define ACPI_BITREG_PCIEXP_WAKE_STATUS          0x07
-
-#define ACPI_BITREG_TIMER_ENABLE                0x08
-#define ACPI_BITREG_GLOBAL_LOCK_ENABLE          0x09
-#define ACPI_BITREG_POWER_BUTTON_ENABLE         0x0A
-#define ACPI_BITREG_SLEEP_BUTTON_ENABLE         0x0B
-#define ACPI_BITREG_RT_CLOCK_ENABLE             0x0C
-#define ACPI_BITREG_WAKE_ENABLE                 0x0D
-#define ACPI_BITREG_PCIEXP_WAKE_DISABLE         0x0E
-
-#define ACPI_BITREG_SCI_ENABLE                  0x0F
-#define ACPI_BITREG_BUS_MASTER_RLD              0x10
-#define ACPI_BITREG_GLOBAL_LOCK_RELEASE         0x11
-#define ACPI_BITREG_SLEEP_TYPE_A                0x12
-#define ACPI_BITREG_SLEEP_TYPE_B                0x13
-#define ACPI_BITREG_SLEEP_ENABLE                0x14
-
-#define ACPI_BITREG_ARB_DISABLE                 0x15
-
-#define ACPI_BITREG_MAX                         0x15
-#define ACPI_NUM_BITREG                         ACPI_BITREG_MAX + 1
-
-/*
- * External ACPI object definition
- */
-union acpi_object {
-       acpi_object_type type;  /* See definition of acpi_ns_type for values */
-       struct {
-               acpi_object_type type;
-               acpi_integer value;     /* The actual number */
-       } integer;
-
-       struct {
-               acpi_object_type type;
-               u32 length;     /* # of bytes in string, excluding trailing null */
-               char *pointer;  /* points to the string value */
-       } string;
-
-       struct {
-               acpi_object_type type;
-               u32 length;     /* # of bytes in buffer */
-               u8 *pointer;    /* points to the buffer */
-       } buffer;
-
-       struct {
-               acpi_object_type type;
-               u32 fill1;
-               acpi_handle handle;     /* object reference */
-       } reference;
-
-       struct {
-               acpi_object_type type;
-               u32 count;      /* # of elements in package */
-               union acpi_object *elements;    /* Pointer to an array of ACPI_OBJECTs */
-       } package;
-
-       struct {
-               acpi_object_type type;
-               u32 proc_id;
-               acpi_io_address pblk_address;
-               u32 pblk_length;
-       } processor;
-
-       struct {
-               acpi_object_type type;
-               u32 system_level;
-               u32 resource_order;
-       } power_resource;
-};
-
-/*
- * List of objects, used as a parameter list for control method evaluation
- */
-struct acpi_object_list {
-       u32 count;
-       union acpi_object *pointer;
-};
-
-/*
- * Miscellaneous common Data Structures used by the interfaces
- */
-#define ACPI_NO_BUFFER              0
-#define ACPI_ALLOCATE_BUFFER        (acpi_size) (-1)
-#define ACPI_ALLOCATE_LOCAL_BUFFER  (acpi_size) (-2)
-
-struct acpi_buffer {
-       acpi_size length;       /* Length in bytes of the buffer */
-       void *pointer;          /* pointer to buffer */
-};
-
-/*
- * name_type for acpi_get_name
- */
-#define ACPI_FULL_PATHNAME              0
-#define ACPI_SINGLE_NAME                1
-#define ACPI_NAME_TYPE_MAX              1
-
-/*
- * Structure and flags for acpi_get_system_info
- */
-#define ACPI_SYS_MODE_UNKNOWN           0x0000
-#define ACPI_SYS_MODE_ACPI              0x0001
-#define ACPI_SYS_MODE_LEGACY            0x0002
-#define ACPI_SYS_MODES_MASK             0x0003
-
-/*
- * ACPI Table Info.  One per ACPI table _type_
- */
-struct acpi_table_info {
-       u32 count;
-};
-
-/*
- * System info returned by acpi_get_system_info()
- */
-struct acpi_system_info {
-       u32 acpi_ca_version;
-       u32 flags;
-       u32 timer_resolution;
-       u32 reserved1;
-       u32 reserved2;
-       u32 debug_level;
-       u32 debug_layer;
-       u32 num_table_types;
-       struct acpi_table_info table_info[ACPI_TABLE_ID_MAX + 1];
-};
-
-/*
- * Types specific to the OS service interfaces
- */
-typedef u32(ACPI_SYSTEM_XFACE * acpi_osd_handler) (void *context);
-
-typedef void
- (ACPI_SYSTEM_XFACE * acpi_osd_exec_callback) (void *context);
-
-/*
- * Various handlers and callback procedures
- */
-typedef u32(*acpi_event_handler) (void *context);
-
-typedef
-void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context);
-
-typedef
-void (*acpi_object_handler) (acpi_handle object, u32 function, void *data);
-
-typedef acpi_status(*acpi_init_handler) (acpi_handle object, u32 function);
-
-#define ACPI_INIT_DEVICE_INI        1
-
-typedef
-acpi_status(*acpi_exception_handler) (acpi_status aml_status,
-                                     acpi_name name,
-                                     u16 opcode,
-                                     u32 aml_offset, void *context);
-
-/* Address Spaces (For Operation Regions) */
-
-typedef
-acpi_status(*acpi_adr_space_handler) (u32 function,
-                                     acpi_physical_address address,
-                                     u32 bit_width,
-                                     acpi_integer * value,
-                                     void *handler_context,
-                                     void *region_context);
-
-#define ACPI_DEFAULT_HANDLER            NULL
-
-typedef
-acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle,
-                                   u32 function,
-                                   void *handler_context,
-                                   void **region_context);
-
-#define ACPI_REGION_ACTIVATE    0
-#define ACPI_REGION_DEACTIVATE  1
-
-typedef
-acpi_status(*acpi_walk_callback) (acpi_handle obj_handle,
-                                 u32 nesting_level,
-                                 void *context, void **return_value);
-
-/* Interrupt handler return values */
-
-#define ACPI_INTERRUPT_NOT_HANDLED      0x00
-#define ACPI_INTERRUPT_HANDLED          0x01
-
-/* Common string version of device HIDs and UIDs */
-
-struct acpi_device_id {
-       char value[ACPI_DEVICE_ID_LENGTH];
-};
-
-/* Common string version of device CIDs */
-
-struct acpi_compatible_id {
-       char value[ACPI_MAX_CID_LENGTH];
-};
-
-struct acpi_compatible_id_list {
-       u32 count;
-       u32 size;
-       struct acpi_compatible_id id[1];
-};
-
-/* Structure and flags for acpi_get_object_info */
-
-#define ACPI_VALID_STA                  0x0001
-#define ACPI_VALID_ADR                  0x0002
-#define ACPI_VALID_HID                  0x0004
-#define ACPI_VALID_UID                  0x0008
-#define ACPI_VALID_CID                  0x0010
-#define ACPI_VALID_SXDS                 0x0020
-
-/* Flags for _STA method */
-
-#define ACPI_STA_DEVICE_PRESENT         0x01
-#define ACPI_STA_DEVICE_ENABLED         0x02
-#define ACPI_STA_DEVICE_UI              0x04
-#define ACPI_STA_DEVICE_FUNCTIONING     0x08
-#define ACPI_STA_DEVICE_OK              0x08   /* Synonym */
-#define ACPI_STA_BATTERY_PRESENT        0x10
-
-#define ACPI_COMMON_OBJ_INFO \
-       acpi_object_type                type;           /* ACPI object type */ \
-       acpi_name                       name    /* ACPI object Name */
-
-struct acpi_obj_info_header {
-       ACPI_COMMON_OBJ_INFO;
-};
-
-/* Structure returned from Get Object Info */
-
-struct acpi_device_info {
-       ACPI_COMMON_OBJ_INFO;
-
-       u32 valid;              /* Indicates which fields below are valid */
-       u32 current_status;     /* _STA value */
-       acpi_integer address;   /* _ADR value if any */
-       struct acpi_device_id hardware_id;      /* _HID value if any */
-       struct acpi_device_id unique_id;        /* _UID value if any */
-       u8 highest_dstates[4];  /* _sx_d values: 0xFF indicates not valid */
-       struct acpi_compatible_id_list compatibility_id;        /* List of _CIDs if any */
-};
-
-/* Context structs for address space handlers */
-
-struct acpi_pci_id {
-       u16 segment;
-       u16 bus;
-       u16 device;
-       u16 function;
-};
-
-struct acpi_mem_space_context {
-       u32 length;
-       acpi_physical_address address;
-       acpi_physical_address mapped_physical_address;
-       u8 *mapped_logical_address;
-       acpi_size mapped_length;
-};
-
-/*
- * Definitions for Resource Attributes
- */
-typedef u16 acpi_rs_length;    /* Resource Length field is fixed at 16 bits */
-typedef u32 acpi_rsdesc_size;  /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */
-
-/*
- *  Memory Attributes
- */
-#define ACPI_READ_ONLY_MEMORY           (u8) 0x00
-#define ACPI_READ_WRITE_MEMORY          (u8) 0x01
-
-#define ACPI_NON_CACHEABLE_MEMORY       (u8) 0x00
-#define ACPI_CACHABLE_MEMORY            (u8) 0x01
-#define ACPI_WRITE_COMBINING_MEMORY     (u8) 0x02
-#define ACPI_PREFETCHABLE_MEMORY        (u8) 0x03
-
-/*
- *  IO Attributes
- *  The ISA IO ranges are:     n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh.
- *  The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh.
- */
-#define ACPI_NON_ISA_ONLY_RANGES        (u8) 0x01
-#define ACPI_ISA_ONLY_RANGES            (u8) 0x02
-#define ACPI_ENTIRE_RANGE               (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
-
-/* Type of translation - 1=Sparse, 0=Dense */
-
-#define ACPI_SPARSE_TRANSLATION         (u8) 0x01
-
-/*
- *  IO Port Descriptor Decode
- */
-#define ACPI_DECODE_10                  (u8) 0x00      /* 10-bit IO address decode */
-#define ACPI_DECODE_16                  (u8) 0x01      /* 16-bit IO address decode */
-
-/*
- *  IRQ Attributes
- */
-#define ACPI_LEVEL_SENSITIVE            (u8) 0x00
-#define ACPI_EDGE_SENSITIVE             (u8) 0x01
-
-#define ACPI_ACTIVE_HIGH                (u8) 0x00
-#define ACPI_ACTIVE_LOW                 (u8) 0x01
-
-#define ACPI_EXCLUSIVE                  (u8) 0x00
-#define ACPI_SHARED                     (u8) 0x01
-
-/*
- *  DMA Attributes
- */
-#define ACPI_COMPATIBILITY              (u8) 0x00
-#define ACPI_TYPE_A                     (u8) 0x01
-#define ACPI_TYPE_B                     (u8) 0x02
-#define ACPI_TYPE_F                     (u8) 0x03
-
-#define ACPI_NOT_BUS_MASTER             (u8) 0x00
-#define ACPI_BUS_MASTER                 (u8) 0x01
-
-#define ACPI_TRANSFER_8                 (u8) 0x00
-#define ACPI_TRANSFER_8_16              (u8) 0x01
-#define ACPI_TRANSFER_16                (u8) 0x02
-
-/*
- * Start Dependent Functions Priority definitions
- */
-#define ACPI_GOOD_CONFIGURATION         (u8) 0x00
-#define ACPI_ACCEPTABLE_CONFIGURATION   (u8) 0x01
-#define ACPI_SUB_OPTIMAL_CONFIGURATION  (u8) 0x02
-
-/*
- *  16, 32 and 64-bit Address Descriptor resource types
- */
-#define ACPI_MEMORY_RANGE               (u8) 0x00
-#define ACPI_IO_RANGE                   (u8) 0x01
-#define ACPI_BUS_NUMBER_RANGE           (u8) 0x02
-
-#define ACPI_ADDRESS_NOT_FIXED          (u8) 0x00
-#define ACPI_ADDRESS_FIXED              (u8) 0x01
-
-#define ACPI_POS_DECODE                 (u8) 0x00
-#define ACPI_SUB_DECODE                 (u8) 0x01
-
-#define ACPI_PRODUCER                   (u8) 0x00
-#define ACPI_CONSUMER                   (u8) 0x01
-
-/*
- * If possible, pack the following structures to byte alignment
- */
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
-#pragma pack(1)
-#endif
-
-/* UUID data structures for use in vendor-defined resource descriptors */
-
-struct acpi_uuid {
-       u8 data[ACPI_UUID_LENGTH];
-};
-
-struct acpi_vendor_uuid {
-       u8 subtype;
-       u8 data[ACPI_UUID_LENGTH];
-};
-
-/*
- *  Structures used to describe device resources
- */
-struct acpi_resource_irq {
-       u8 triggering;
-       u8 polarity;
-       u8 sharable;
-       u8 interrupt_count;
-       u8 interrupts[1];
-};
-
-struct acpi_resource_dma {
-       u8 type;
-       u8 bus_master;
-       u8 transfer;
-       u8 channel_count;
-       u8 channels[1];
-};
-
-struct acpi_resource_start_dependent {
-       u8 compatibility_priority;
-       u8 performance_robustness;
-};
-
-/*
- * END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
- * needed because it has no fields
- */
-
-struct acpi_resource_io {
-       u8 io_decode;
-       u8 alignment;
-       u8 address_length;
-       u16 minimum;
-       u16 maximum;
-};
-
-struct acpi_resource_fixed_io {
-       u16 address;
-       u8 address_length;
-};
-
-struct acpi_resource_vendor {
-       u16 byte_length;
-       u8 byte_data[1];
-};
-
-/* Vendor resource with UUID info (introduced in ACPI 3.0) */
-
-struct acpi_resource_vendor_typed {
-       u16 byte_length;
-       u8 uuid_subtype;
-       u8 uuid[ACPI_UUID_LENGTH];
-       u8 byte_data[1];
-};
-
-struct acpi_resource_end_tag {
-       u8 checksum;
-};
-
-struct acpi_resource_memory24 {
-       u8 write_protect;
-       u16 minimum;
-       u16 maximum;
-       u16 alignment;
-       u16 address_length;
-};
-
-struct acpi_resource_memory32 {
-       u8 write_protect;
-       u32 minimum;
-       u32 maximum;
-       u32 alignment;
-       u32 address_length;
-};
-
-struct acpi_resource_fixed_memory32 {
-       u8 write_protect;
-       u32 address;
-       u32 address_length;
-};
-
-struct acpi_memory_attribute {
-       u8 write_protect;
-       u8 caching;
-       u8 range_type;
-       u8 translation;
-};
-
-struct acpi_io_attribute {
-       u8 range_type;
-       u8 translation;
-       u8 translation_type;
-       u8 reserved1;
-};
-
-union acpi_resource_attribute {
-       struct acpi_memory_attribute mem;
-       struct acpi_io_attribute io;
-
-       /* Used for the *word_space macros */
-
-       u8 type_specific;
-};
-
-struct acpi_resource_source {
-       u8 index;
-       u16 string_length;
-       char *string_ptr;
-};
-
-/* Fields common to all address descriptors, 16/32/64 bit */
-
-#define ACPI_RESOURCE_ADDRESS_COMMON \
-       u8                              resource_type; \
-       u8                              producer_consumer; \
-       u8                              decode; \
-       u8                              min_address_fixed; \
-       u8                              max_address_fixed; \
-       union acpi_resource_attribute   info;
-
-struct acpi_resource_address {
-ACPI_RESOURCE_ADDRESS_COMMON};
-
-struct acpi_resource_address16 {
-       ACPI_RESOURCE_ADDRESS_COMMON u16 granularity;
-       u16 minimum;
-       u16 maximum;
-       u16 translation_offset;
-       u16 address_length;
-       struct acpi_resource_source resource_source;
-};
-
-struct acpi_resource_address32 {
-       ACPI_RESOURCE_ADDRESS_COMMON u32 granularity;
-       u32 minimum;
-       u32 maximum;
-       u32 translation_offset;
-       u32 address_length;
-       struct acpi_resource_source resource_source;
-};
-
-struct acpi_resource_address64 {
-       ACPI_RESOURCE_ADDRESS_COMMON u64 granularity;
-       u64 minimum;
-       u64 maximum;
-       u64 translation_offset;
-       u64 address_length;
-       struct acpi_resource_source resource_source;
-};
-
-struct acpi_resource_extended_address64 {
-       ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD;
-       u64 granularity;
-       u64 minimum;
-       u64 maximum;
-       u64 translation_offset;
-       u64 address_length;
-       u64 type_specific;
-};
-
-struct acpi_resource_extended_irq {
-       u8 producer_consumer;
-       u8 triggering;
-       u8 polarity;
-       u8 sharable;
-       u8 interrupt_count;
-       struct acpi_resource_source resource_source;
-       u32 interrupts[1];
-};
-
-struct acpi_resource_generic_register {
-       u8 space_id;
-       u8 bit_width;
-       u8 bit_offset;
-       u8 access_size;
-       u64 address;
-};
-
-/* ACPI_RESOURCE_TYPEs */
-
-#define ACPI_RESOURCE_TYPE_IRQ                  0
-#define ACPI_RESOURCE_TYPE_DMA                  1
-#define ACPI_RESOURCE_TYPE_START_DEPENDENT      2
-#define ACPI_RESOURCE_TYPE_END_DEPENDENT        3
-#define ACPI_RESOURCE_TYPE_IO                   4
-#define ACPI_RESOURCE_TYPE_FIXED_IO             5
-#define ACPI_RESOURCE_TYPE_VENDOR               6
-#define ACPI_RESOURCE_TYPE_END_TAG              7
-#define ACPI_RESOURCE_TYPE_MEMORY24             8
-#define ACPI_RESOURCE_TYPE_MEMORY32             9
-#define ACPI_RESOURCE_TYPE_FIXED_MEMORY32       10
-#define ACPI_RESOURCE_TYPE_ADDRESS16            11
-#define ACPI_RESOURCE_TYPE_ADDRESS32            12
-#define ACPI_RESOURCE_TYPE_ADDRESS64            13
-#define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64   14     /* ACPI 3.0 */
-#define ACPI_RESOURCE_TYPE_EXTENDED_IRQ         15
-#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER     16
-#define ACPI_RESOURCE_TYPE_MAX                  16
-
-union acpi_resource_data {
-       struct acpi_resource_irq irq;
-       struct acpi_resource_dma dma;
-       struct acpi_resource_start_dependent start_dpf;
-       struct acpi_resource_io io;
-       struct acpi_resource_fixed_io fixed_io;
-       struct acpi_resource_vendor vendor;
-       struct acpi_resource_vendor_typed vendor_typed;
-       struct acpi_resource_end_tag end_tag;
-       struct acpi_resource_memory24 memory24;
-       struct acpi_resource_memory32 memory32;
-       struct acpi_resource_fixed_memory32 fixed_memory32;
-       struct acpi_resource_address16 address16;
-       struct acpi_resource_address32 address32;
-       struct acpi_resource_address64 address64;
-       struct acpi_resource_extended_address64 ext_address64;
-       struct acpi_resource_extended_irq extended_irq;
-       struct acpi_resource_generic_register generic_reg;
-
-       /* Common fields */
-
-       struct acpi_resource_address address;   /* Common 16/32/64 address fields */
-};
-
-struct acpi_resource {
-       u32 type;
-       u32 length;
-       union acpi_resource_data data;
-};
-
-/* restore default alignment */
-
-#pragma pack()
-
-#define ACPI_RS_SIZE_MIN                    12
-#define ACPI_RS_SIZE_NO_DATA                8  /* Id + Length fields */
-#define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
-
-#define ACPI_NEXT_RESOURCE(res)             (struct acpi_resource *)((u8 *) res + res->length)
-
-struct acpi_pci_routing_table {
-       u32 length;
-       u32 pin;
-       acpi_integer address;   /* here for 64-bit alignment */
-       u32 source_index;
-       char source[4];         /* pad to 64 bits so sizeof() works in all cases */
-};
-
-#endif                         /* __ACTYPES_H__ */
diff --git a/kitten/include/acpi/acutils.h b/kitten/include/acpi/acutils.h
deleted file mode 100644 (file)
index ba039ea..0000000
+++ /dev/null
@@ -1,568 +0,0 @@
-/******************************************************************************
- *
- * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef _ACUTILS_H
-#define _ACUTILS_H
-
-extern const u8 acpi_gbl_resource_aml_sizes[];
-
-/* Strings used by the disassembler and debugger resource dump routines */
-
-#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
-
-extern const char *acpi_gbl_bm_decode[];
-extern const char *acpi_gbl_config_decode[];
-extern const char *acpi_gbl_consume_decode[];
-extern const char *acpi_gbl_dec_decode[];
-extern const char *acpi_gbl_he_decode[];
-extern const char *acpi_gbl_io_decode[];
-extern const char *acpi_gbl_ll_decode[];
-extern const char *acpi_gbl_max_decode[];
-extern const char *acpi_gbl_mem_decode[];
-extern const char *acpi_gbl_min_decode[];
-extern const char *acpi_gbl_mtp_decode[];
-extern const char *acpi_gbl_rng_decode[];
-extern const char *acpi_gbl_rw_decode[];
-extern const char *acpi_gbl_shr_decode[];
-extern const char *acpi_gbl_siz_decode[];
-extern const char *acpi_gbl_trs_decode[];
-extern const char *acpi_gbl_ttp_decode[];
-extern const char *acpi_gbl_typ_decode[];
-#endif
-
-/* Types for Resource descriptor entries */
-
-#define ACPI_INVALID_RESOURCE           0
-#define ACPI_FIXED_LENGTH               1
-#define ACPI_VARIABLE_LENGTH            2
-#define ACPI_SMALL_VARIABLE_LENGTH      3
-
-typedef
-acpi_status(*acpi_walk_aml_callback) (u8 * aml,
-                                     u32 length,
-                                     u32 offset,
-                                     u8 resource_index, void **context);
-
-typedef
-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;
-};
-
-#define REF_INCREMENT       (u16) 0
-#define REF_DECREMENT       (u16) 1
-#define REF_FORCE_DELETE    (u16) 2
-
-/* acpi_ut_dump_buffer */
-
-#define DB_BYTE_DISPLAY     1
-#define DB_WORD_DISPLAY     2
-#define DB_DWORD_DISPLAY    4
-#define DB_QWORD_DISPLAY    8
-
-/*
- * utglobal - Global data structures and procedures
- */
-void acpi_ut_init_globals(void);
-
-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
-
-char *acpi_ut_get_mutex_name(u32 mutex_id);
-
-#endif
-
-char *acpi_ut_get_type_name(acpi_object_type type);
-
-char *acpi_ut_get_node_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_region_name(u8 space_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);
-
-/*
- * utinit - miscellaneous initialization and shutdown
- */
-acpi_status acpi_ut_hardware_initialize(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);
-
-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);
-
-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_strcmp(const char *string1, const char *string2);
-
-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);
-
-u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base);
-
-char *acpi_ut_strstr(char *string1, char *string2);
-
-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);
-
-int acpi_ut_to_upper(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_IS_DIGIT(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
-#define ACPI_IS_SPACE(c)  (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
-#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))
-
-#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_status
-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_status
-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_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);
-
-/*
- * utcreate - Object creation
- */
-acpi_status
-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_track_stack_ptr(void);
-
-void
-acpi_ut_trace(u32 line_number,
-             const char *function_name, char *module_name, u32 component_id);
-
-void
-acpi_ut_trace_ptr(u32 line_number,
-                 const char *function_name,
-                 char *module_name, u32 component_id, void *pointer);
-
-void
-acpi_ut_trace_u32(u32 line_number,
-                 const char *function_name,
-                 char *module_name, u32 component_id, u32 integer);
-
-void
-acpi_ut_trace_str(u32 line_number,
-                 const char *function_name,
-                 char *module_name, u32 component_id, char *string);
-
-void
-acpi_ut_exit(u32 line_number,
-            const char *function_name, char *module_name, u32 component_id);
-
-void
-acpi_ut_status_exit(u32 line_number,
-                   const char *function_name,
-                   char *module_name, u32 component_id, acpi_status status);
-
-void
-acpi_ut_value_exit(u32 line_number,
-                  const char *function_name,
-                  char *module_name, u32 component_id, acpi_integer value);
-
-void
-acpi_ut_ptr_exit(u32 line_number,
-                const char *function_name,
-                char *module_name, u32 component_id, u8 * ptr);
-
-void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id);
-
-void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display);
-
-void acpi_ut_report_error(char *module_name, u32 line_number);
-
-void acpi_ut_report_info(char *module_name, u32 line_number);
-
-void acpi_ut_report_warning(char *module_name, u32 line_number);
-
-/* Error and message reporting interfaces */
-
-void ACPI_INTERNAL_VAR_XFACE
-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(6);
-
-void ACPI_INTERNAL_VAR_XFACE
-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(6);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_error(char *module_name,
-             u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_exception(char *module_name,
-                 u32 line_number,
-                 acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_warning(char *module_name,
-               u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_info(char *module_name,
-            u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
-
-/*
- * utdelete - Object deletion and reference counts
- */
-void acpi_ut_add_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_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_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_status
-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_status
-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_status
-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);
-
-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 (_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);
-
-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_string_object(acpi_size string_size);
-
-acpi_status
-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);
-
-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);
-
-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_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);
-
-#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 */
-
-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_status
-acpi_ut_short_divide(acpi_integer in_dividend,
-                    u32 divisor,
-                    acpi_integer * out_quotient, u32 * out_remainder);
-
-/*
- * utmisc
- */
-u8 acpi_ut_is_aml_table(struct acpi_table_header *table);
-
-acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id);
-
-void acpi_ut_release_owner_id(acpi_owner_id * owner_id);
-
-acpi_status
-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);
-
-acpi_name acpi_ut_repair_name(acpi_name name);
-
-u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position);
-
-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
-
-u32 acpi_ut_dword_byte_swap(u32 value);
-
-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);
-#endif
-
-/*
- * utresrc
- */
-acpi_status
-acpi_ut_walk_aml_resources(u8 * aml,
-                          acpi_size aml_length,
-                          acpi_walk_aml_callback user_function, void **context);
-
-acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index);
-
-u32 acpi_ut_get_descriptor_length(void *aml);
-
-u16 acpi_ut_get_resource_length(void *aml);
-
-u8 acpi_ut_get_resource_header_length(void *aml);
-
-u8 acpi_ut_get_resource_type(void *aml);
-
-acpi_status
-acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc,
-                            u8 ** end_tag);
-
-/*
- * 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
- */
-acpi_status acpi_ut_create_caches(void);
-
-acpi_status acpi_ut_delete_caches(void);
-
-acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer);
-
-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_zeroed(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_zeroed_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);
-
-#ifdef ACPI_FUTURE_USAGE
-void acpi_ut_dump_allocation_info(void);
-#endif                         /* ACPI_FUTURE_USAGE */
-
-void acpi_ut_dump_allocations(u32 component, char *module);
-
-acpi_status
-acpi_ut_create_list(char *list_name,
-                   u16 object_size, struct acpi_memory_list **return_cache);
-
-#endif
-
-#endif                         /* _ACUTILS_H */
diff --git a/kitten/include/acpi/amlcode.h b/kitten/include/acpi/amlcode.h
deleted file mode 100644 (file)
index cf18426..0000000
+++ /dev/null
@@ -1,494 +0,0 @@
-/******************************************************************************
- *
- * Name: amlcode.h - Definitions for AML, as included in "definition blocks"
- *                   Declarations and definitions contained herein are derived
- *                   directly from the ACPI specification.
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __AMLCODE_H__
-#define __AMLCODE_H__
-
-/* primary opcodes */
-
-#define AML_NULL_CHAR               (u16) 0x00
-
-#define AML_ZERO_OP                 (u16) 0x00
-#define AML_ONE_OP                  (u16) 0x01
-#define AML_UNASSIGNED              (u16) 0x02
-#define AML_ALIAS_OP                (u16) 0x06
-#define AML_NAME_OP                 (u16) 0x08
-#define AML_BYTE_OP                 (u16) 0x0a
-#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_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_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_EXTENDED_OP_PREFIX      (u16) 0x5b
-#define AML_ROOT_PREFIX             (u16) 0x5c
-#define AML_PARENT_PREFIX           (u16) 0x5e
-#define AML_LOCAL_OP                (u16) 0x60
-#define AML_LOCAL0                  (u16) 0x60
-#define AML_LOCAL1                  (u16) 0x61
-#define AML_LOCAL2                  (u16) 0x62
-#define AML_LOCAL3                  (u16) 0x63
-#define AML_LOCAL4                  (u16) 0x64
-#define AML_LOCAL5                  (u16) 0x65
-#define AML_LOCAL6                  (u16) 0x66
-#define AML_LOCAL7                  (u16) 0x67
-#define AML_ARG_OP                  (u16) 0x68
-#define AML_ARG0                    (u16) 0x68
-#define AML_ARG1                    (u16) 0x69
-#define AML_ARG2                    (u16) 0x6a
-#define AML_ARG3                    (u16) 0x6b
-#define AML_ARG4                    (u16) 0x6c
-#define AML_ARG5                    (u16) 0x6d
-#define AML_ARG6                    (u16) 0x6e
-#define AML_STORE_OP                (u16) 0x70
-#define AML_REF_OF_OP               (u16) 0x71
-#define AML_ADD_OP                  (u16) 0x72
-#define AML_CONCAT_OP               (u16) 0x73
-#define AML_SUBTRACT_OP             (u16) 0x74
-#define AML_INCREMENT_OP            (u16) 0x75
-#define AML_DECREMENT_OP            (u16) 0x76
-#define AML_MULTIPLY_OP             (u16) 0x77
-#define AML_DIVIDE_OP               (u16) 0x78
-#define AML_SHIFT_LEFT_OP           (u16) 0x79
-#define AML_SHIFT_RIGHT_OP          (u16) 0x7a
-#define AML_BIT_AND_OP              (u16) 0x7b
-#define AML_BIT_NAND_OP             (u16) 0x7c
-#define AML_BIT_OR_OP               (u16) 0x7d
-#define AML_BIT_NOR_OP              (u16) 0x7e
-#define AML_BIT_XOR_OP              (u16) 0x7f
-#define AML_BIT_NOT_OP              (u16) 0x80
-#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_NOTIFY_OP               (u16) 0x86
-#define AML_SIZE_OF_OP              (u16) 0x87
-#define AML_INDEX_OP                (u16) 0x88
-#define AML_MATCH_OP                (u16) 0x89
-#define AML_CREATE_DWORD_FIELD_OP   (u16) 0x8a
-#define AML_CREATE_WORD_FIELD_OP    (u16) 0x8b
-#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_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_IF_OP                   (u16) 0xa0
-#define AML_ELSE_OP                 (u16) 0xa1
-#define AML_WHILE_OP                (u16) 0xa2
-#define AML_NOOP_OP                 (u16) 0xa3
-#define AML_RETURN_OP               (u16) 0xa4
-#define AML_BREAK_OP                (u16) 0xa5
-#define AML_BREAK_POINT_OP          (u16) 0xcc
-#define AML_ONES_OP                 (u16) 0xff
-
-/* prefixed opcodes */
-
-#define AML_EXTENDED_OPCODE         (u16) 0x5b00       /* prefix for 2-byte opcodes */
-
-#define AML_MUTEX_OP                (u16) 0x5b01
-#define AML_EVENT_OP                (u16) 0x5b02
-#define AML_SHIFT_RIGHT_BIT_OP      (u16) 0x5b10
-#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_OP                 (u16) 0x5b20
-#define AML_STALL_OP                (u16) 0x5b21
-#define AML_SLEEP_OP                (u16) 0x5b22
-#define AML_ACQUIRE_OP              (u16) 0x5b23
-#define AML_SIGNAL_OP               (u16) 0x5b24
-#define AML_WAIT_OP                 (u16) 0x5b25
-#define AML_RESET_OP                (u16) 0x5b26
-#define AML_RELEASE_OP              (u16) 0x5b27
-#define AML_FROM_BCD_OP             (u16) 0x5b28
-#define AML_TO_BCD_OP               (u16) 0x5b29
-#define AML_UNLOAD_OP               (u16) 0x5b2a
-#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_REGION_OP               (u16) 0x5b80
-#define AML_FIELD_OP                (u16) 0x5b81
-#define AML_DEVICE_OP               (u16) 0x5b82
-#define AML_PROCESSOR_OP            (u16) 0x5b83
-#define AML_POWER_RES_OP            (u16) 0x5b84
-#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 */
-
-/*
- * Combination opcodes (actually two one-byte opcodes)
- * Used by the disassembler and i_aSL compiler
- */
-#define AML_LGREATEREQUAL_OP        (u16) 0x9295
-#define AML_LLESSEQUAL_OP           (u16) 0x9294
-#define AML_LNOTEQUAL_OP            (u16) 0x9293
-
-/*
- * Internal opcodes
- * Use only "Unknown" AML opcodes, don't attempt to use
- * any valid ACPI ASCII values (A-Z, 0-9, '-')
- */
-#define AML_INT_NAMEPATH_OP         (u16) 0x002d
-#define AML_INT_NAMEDFIELD_OP       (u16) 0x0030
-#define AML_INT_RESERVEDFIELD_OP    (u16) 0x0031
-#define AML_INT_ACCESSFIELD_OP      (u16) 0x0032
-#define AML_INT_BYTELIST_OP         (u16) 0x0033
-#define AML_INT_STATICSTRING_OP     (u16) 0x0034
-#define AML_INT_METHODCALL_OP       (u16) 0x0035
-#define AML_INT_RETURN_VALUE_OP     (u16) 0x0036
-#define AML_INT_EVAL_SUBTREE_OP     (u16) 0x0037
-
-#define ARG_NONE                    0x0
-
-/*
- * Argument types for the AML Parser
- * Each field in the arg_types u32 is 5 bits, allowing for a maximum of 6 arguments.
- * There can be up to 31 unique argument types
- * Zero is reserved as end-of-list indicator
- */
-#define ARGP_BYTEDATA               0x01
-#define ARGP_BYTELIST               0x02
-#define ARGP_CHARLIST               0x03
-#define ARGP_DATAOBJ                0x04
-#define ARGP_DATAOBJLIST            0x05
-#define ARGP_DWORDDATA              0x06
-#define ARGP_FIELDLIST              0x07
-#define ARGP_NAME                   0x08
-#define ARGP_NAMESTRING             0x09
-#define ARGP_OBJLIST                0x0A
-#define ARGP_PKGLENGTH              0x0B
-#define ARGP_SUPERNAME              0x0C
-#define ARGP_TARGET                 0x0D
-#define ARGP_TERMARG                0x0E
-#define ARGP_TERMLIST               0x0F
-#define ARGP_WORDDATA               0x10
-#define ARGP_QWORDDATA              0x11
-#define ARGP_SIMPLENAME             0x12
-
-/*
- * Resolved argument types for the AML Interpreter
- * Each field in the arg_types u32 is 5 bits, allowing for a maximum of 6 arguments.
- * There can be up to 31 unique argument types (0 is end-of-arg-list indicator)
- *
- * Note1: These values are completely independent from the ACPI_TYPEs
- *        i.e., ARGI_INTEGER != ACPI_TYPE_INTEGER
- *
- * Note2: If and when 5 bits becomes insufficient, it would probably be best
- * to convert to a 6-byte array of argument types, allowing 8 bits per argument.
- */
-
-/* Single, simple types */
-
-#define ARGI_ANYTYPE                0x01       /* Don't care */
-#define ARGI_PACKAGE                0x02
-#define ARGI_EVENT                  0x03
-#define ARGI_MUTEX                  0x04
-#define ARGI_DDBHANDLE              0x05
-
-/* Interchangeable types (via implicit conversion) */
-
-#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 */
-
-/* Reference objects */
-
-#define ARGI_INTEGER_REF            0x0B
-#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 */
-
-/* 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_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
- */
-#define OPGRP_NAMED                 0x01
-#define OPGRP_FIELD                 0x02
-#define OPGRP_BYTELIST              0x04
-
-/*
- * Opcode information
- */
-
-/* Opcode flags */
-
-#define AML_LOGICAL                 0x0001
-#define AML_LOGICAL_NUMERIC         0x0002
-#define AML_MATH                    0x0004
-#define AML_CREATE                  0x0008
-#define AML_FIELD                   0x0010
-#define AML_DEFER                   0x0020
-#define AML_NAMED                   0x0040
-#define AML_NSNODE                  0x0080
-#define AML_NSOPCODE                0x0100
-#define AML_NSOBJECT                0x0200
-#define AML_HAS_RETVAL              0x0400
-#define AML_HAS_TARGET              0x0800
-#define AML_HAS_ARGS                0x1000
-#define AML_CONSTANT                0x2000
-#define AML_NO_OPERAND_RESOLVE      0x4000
-
-/* 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_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_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_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_2A_2T_1R      0x08
-#define AML_TYPE_EXEC_3A_0T_0R      0x09
-#define AML_TYPE_EXEC_3A_1T_1R      0x0A
-#define AML_TYPE_EXEC_6A_0T_1R      0x0B
-/* End of types used in dispatch table */
-
-#define AML_TYPE_LITERAL            0x0B
-#define AML_TYPE_CONSTANT           0x0C
-#define AML_TYPE_METHOD_ARGUMENT    0x0D
-#define AML_TYPE_LOCAL_VARIABLE     0x0E
-#define AML_TYPE_DATA_TERM          0x0F
-
-/* Generic for an op that returns a value */
-
-#define AML_TYPE_METHOD_CALL        0x10
-
-/* Misc */
-
-#define AML_TYPE_CREATE_FIELD       0x11
-#define AML_TYPE_CREATE_OBJECT      0x12
-#define AML_TYPE_CONTROL            0x13
-#define AML_TYPE_NAMED_NO_OBJ       0x14
-#define AML_TYPE_NAMED_FIELD        0x15
-#define AML_TYPE_NAMED_SIMPLE       0x16
-#define AML_TYPE_NAMED_COMPLEX      0x17
-#define AML_TYPE_RETURN             0x18
-
-#define AML_TYPE_UNDEFINED          0x19
-#define AML_TYPE_BOGUS              0x1A
-
-/* AML Package Length encodings */
-
-#define ACPI_AML_PACKAGE_TYPE1      0x40
-#define ACPI_AML_PACKAGE_TYPE2      0x4000
-#define ACPI_AML_PACKAGE_TYPE3      0x400000
-#define ACPI_AML_PACKAGE_TYPE4      0x40000000
-
-/*
- * Opcode classes
- */
-#define AML_CLASS_EXECUTE           0x00
-#define AML_CLASS_CREATE            0x01
-#define AML_CLASS_ARGUMENT          0x02
-#define AML_CLASS_NAMED_OBJECT      0x03
-#define AML_CLASS_CONTROL           0x04
-#define AML_CLASS_ASCII             0x05
-#define AML_CLASS_PREFIX            0x06
-#define AML_CLASS_INTERNAL          0x07
-#define AML_CLASS_RETURN_VALUE      0x08
-#define AML_CLASS_METHOD_CALL       0x09
-#define AML_CLASS_UNKNOWN           0x0A
-
-/* Predefined Operation Region space_iDs */
-
-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
-} 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
-} AML_MATCH_OPERATOR;
-
-#define MAX_MATCH_OPERATOR          5
-
-/*
- * field_flags
- *
- * This byte is extracted from the AML and includes three separate
- * pieces of information about the field:
- * 1) The field access type
- * 2) The field update rule
- * 3) The lock rule for the field
- *
- * Bits 00 - 03 : access_type (any_acc, byte_acc, etc.)
- *      04      : lock_rule (1 == Lock)
- *      05 - 06 : update_rule
- */
-#define AML_FIELD_ACCESS_TYPE_MASK  0x0F
-#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 */
-} AML_ACCESS_TYPE;
-
-/* 2) Field Lock Rules */
-
-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,
-       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,
-       AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D
-} AML_ACCESS_ATTRIBUTE;
-
-/* Bit fields in method_flags byte */
-
-#define AML_METHOD_ARG_COUNT        0x07
-#define AML_METHOD_SERIALIZED       0x08
-#define AML_METHOD_SYNCH_LEVEL      0xF0
-
-/* METHOD_FLAGS_ARG_COUNT is not used internally, define additional flags */
-
-#define AML_METHOD_INTERNAL_ONLY    0x01
-#define AML_METHOD_RESERVED1        0x02
-#define AML_METHOD_RESERVED2        0x04
-
-#endif                         /* __AMLCODE_H__ */
diff --git a/kitten/include/acpi/amlresrc.h b/kitten/include/acpi/amlresrc.h
deleted file mode 100644 (file)
index be03818..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-
-/******************************************************************************
- *
- * Module Name: amlresrc.h - AML resource descriptors
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-/* acpisrc:struct_defs -- for acpisrc conversion */
-
-#ifndef __AMLRESRC_H
-#define __AMLRESRC_H
-
-/*
- * Resource descriptor tags, as defined in the ACPI specification.
- * Used to symbolically reference fields within a descriptor.
- */
-#define ACPI_RESTAG_ADDRESS                     "_ADR"
-#define ACPI_RESTAG_ALIGNMENT                   "_ALN"
-#define ACPI_RESTAG_ADDRESSSPACE                "_ASI"
-#define ACPI_RESTAG_ACCESSSIZE                  "_ASZ"
-#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES      "_ATT"
-#define ACPI_RESTAG_BASEADDRESS                 "_BAS"
-#define ACPI_RESTAG_BUSMASTER                   "_BM_" /* Master(1), Slave(0) */
-#define ACPI_RESTAG_DECODE                      "_DEC"
-#define ACPI_RESTAG_DMA                         "_DMA"
-#define ACPI_RESTAG_DMATYPE                     "_TYP" /* Compatible(0), A(1), B(2), F(3) */
-#define ACPI_RESTAG_GRANULARITY                 "_GRA"
-#define ACPI_RESTAG_INTERRUPT                   "_INT"
-#define ACPI_RESTAG_INTERRUPTLEVEL              "_LL_" /* active_lo(1), active_hi(0) */
-#define ACPI_RESTAG_INTERRUPTSHARE              "_SHR" /* Shareable(1), no_share(0) */
-#define ACPI_RESTAG_INTERRUPTTYPE               "_HE_" /* Edge(1), Level(0) */
-#define ACPI_RESTAG_LENGTH                      "_LEN"
-#define ACPI_RESTAG_MEMATTRIBUTES               "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
-#define ACPI_RESTAG_MEMTYPE                     "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
-#define ACPI_RESTAG_MAXADDR                     "_MAX"
-#define ACPI_RESTAG_MINADDR                     "_MIN"
-#define ACPI_RESTAG_MAXTYPE                     "_MAF"
-#define ACPI_RESTAG_MINTYPE                     "_MIF"
-#define ACPI_RESTAG_REGISTERBITOFFSET           "_RBO"
-#define ACPI_RESTAG_REGISTERBITWIDTH            "_RBW"
-#define ACPI_RESTAG_RANGETYPE                   "_RNG"
-#define ACPI_RESTAG_READWRITETYPE               "_RW_" /* read_only(0), Writeable (1) */
-#define ACPI_RESTAG_TRANSLATION                 "_TRA"
-#define ACPI_RESTAG_TRANSTYPE                   "_TRS" /* Sparse(1), Dense(0) */
-#define ACPI_RESTAG_TYPE                        "_TTP" /* Translation(1), Static (0) */
-#define ACPI_RESTAG_XFERTYPE                    "_SIZ" /* 8(0), 8_and16(1), 16(2) */
-
-/* Default sizes for "small" resource descriptors */
-
-#define ASL_RDESC_IRQ_SIZE                      0x02
-#define ASL_RDESC_DMA_SIZE                      0x02
-#define ASL_RDESC_ST_DEPEND_SIZE                0x00
-#define ASL_RDESC_END_DEPEND_SIZE               0x00
-#define ASL_RDESC_IO_SIZE                       0x07
-#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;
-};
-
-/* Macros used to generate AML resource length fields */
-
-#define ACPI_AML_SIZE_LARGE(r)      (sizeof (r) - sizeof (struct aml_resource_large_header))
-#define ACPI_AML_SIZE_SMALL(r)      (sizeof (r) - sizeof (struct aml_resource_small_header))
-
-/*
- * Resource descriptors defined in the ACPI specification.
- *
- * Packing/alignment must be BYTE because these descriptors
- * are used to overlay the raw AML byte stream.
- */
-#pragma pack(1)
-
-/*
- * SMALL descriptors
- */
-#define AML_RESOURCE_SMALL_HEADER_COMMON \
-       u8                              descriptor_type;
-
-struct aml_resource_small_header {
-AML_RESOURCE_SMALL_HEADER_COMMON};
-
-struct aml_resource_irq {
-       AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask;
-       u8 flags;
-};
-
-struct aml_resource_irq_noflags {
-       AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask;
-};
-
-struct aml_resource_dma {
-       AML_RESOURCE_SMALL_HEADER_COMMON u8 dma_channel_mask;
-       u8 flags;
-};
-
-struct aml_resource_start_dependent {
-       AML_RESOURCE_SMALL_HEADER_COMMON u8 flags;
-};
-
-struct aml_resource_start_dependent_noprio {
-AML_RESOURCE_SMALL_HEADER_COMMON};
-
-struct aml_resource_end_dependent {
-AML_RESOURCE_SMALL_HEADER_COMMON};
-
-struct aml_resource_io {
-       AML_RESOURCE_SMALL_HEADER_COMMON u8 flags;
-       u16 minimum;
-       u16 maximum;
-       u8 alignment;
-       u8 address_length;
-};
-
-struct aml_resource_fixed_io {
-       AML_RESOURCE_SMALL_HEADER_COMMON u16 address;
-       u8 address_length;
-};
-
-struct aml_resource_vendor_small {
-AML_RESOURCE_SMALL_HEADER_COMMON};
-
-struct aml_resource_end_tag {
-       AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum;
-};
-
-/*
- * LARGE descriptors
- */
-#define AML_RESOURCE_LARGE_HEADER_COMMON \
-       u8                              descriptor_type;\
-       u16                             resource_length;
-
-struct aml_resource_large_header {
-AML_RESOURCE_LARGE_HEADER_COMMON};
-
-struct aml_resource_memory24 {
-       AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
-       u16 minimum;
-       u16 maximum;
-       u16 alignment;
-       u16 address_length;
-};
-
-struct aml_resource_vendor_large {
-AML_RESOURCE_LARGE_HEADER_COMMON};
-
-struct aml_resource_memory32 {
-       AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
-       u32 minimum;
-       u32 maximum;
-       u32 alignment;
-       u32 address_length;
-};
-
-struct aml_resource_fixed_memory32 {
-       AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
-       u32 address;
-       u32 address_length;
-};
-
-#define AML_RESOURCE_ADDRESS_COMMON \
-       u8                              resource_type; \
-       u8                              flags; \
-       u8                              specific_flags;
-
-struct aml_resource_address {
-AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON};
-
-struct aml_resource_extended_address64 {
-       AML_RESOURCE_LARGE_HEADER_COMMON
-           AML_RESOURCE_ADDRESS_COMMON u8 revision_iD;
-       u8 reserved;
-       u64 granularity;
-       u64 minimum;
-       u64 maximum;
-       u64 translation_offset;
-       u64 address_length;
-       u64 type_specific;
-};
-
-#define AML_RESOURCE_EXTENDED_ADDRESS_REVISION          1      /* ACPI 3.0 */
-
-struct aml_resource_address64 {
-       AML_RESOURCE_LARGE_HEADER_COMMON
-           AML_RESOURCE_ADDRESS_COMMON u64 granularity;
-       u64 minimum;
-       u64 maximum;
-       u64 translation_offset;
-       u64 address_length;
-};
-
-struct aml_resource_address32 {
-       AML_RESOURCE_LARGE_HEADER_COMMON
-           AML_RESOURCE_ADDRESS_COMMON u32 granularity;
-       u32 minimum;
-       u32 maximum;
-       u32 translation_offset;
-       u32 address_length;
-};
-
-struct aml_resource_address16 {
-       AML_RESOURCE_LARGE_HEADER_COMMON
-           AML_RESOURCE_ADDRESS_COMMON u16 granularity;
-       u16 minimum;
-       u16 maximum;
-       u16 translation_offset;
-       u16 address_length;
-};
-
-struct aml_resource_extended_irq {
-       AML_RESOURCE_LARGE_HEADER_COMMON u8 flags;
-       u8 interrupt_count;
-       u32 interrupts[1];
-       /* res_source_index, res_source optional fields follow */
-};
-
-struct aml_resource_generic_register {
-       AML_RESOURCE_LARGE_HEADER_COMMON u8 address_space_id;
-       u8 bit_width;
-       u8 bit_offset;
-       u8 access_size;         /* ACPI 3.0, was previously Reserved */
-       u64 address;
-};
-
-/* restore default alignment */
-
-#pragma pack()
-
-/* Union of all resource descriptors, so we can allocate the worst case */
-
-union aml_resource {
-       /* Descriptor headers */
-
-       u8 descriptor_type;
-       struct aml_resource_small_header small_header;
-       struct aml_resource_large_header large_header;
-
-       /* Small resource descriptors */
-
-       struct aml_resource_irq irq;
-       struct aml_resource_dma dma;
-       struct aml_resource_start_dependent start_dpf;
-       struct aml_resource_end_dependent end_dpf;
-       struct aml_resource_io io;
-       struct aml_resource_fixed_io fixed_io;
-       struct aml_resource_vendor_small vendor_small;
-       struct aml_resource_end_tag end_tag;
-
-       /* Large resource descriptors */
-
-       struct aml_resource_memory24 memory24;
-       struct aml_resource_generic_register generic_reg;
-       struct aml_resource_vendor_large vendor_large;
-       struct aml_resource_memory32 memory32;
-       struct aml_resource_fixed_memory32 fixed_memory32;
-       struct aml_resource_address16 address16;
-       struct aml_resource_address32 address32;
-       struct aml_resource_address64 address64;
-       struct aml_resource_extended_address64 ext_address64;
-       struct aml_resource_extended_irq extended_irq;
-
-       /* Utility overlays */
-
-       struct aml_resource_address address;
-       u32 dword_item;
-       u16 word_item;
-       u8 byte_item;
-};
-
-#endif
diff --git a/kitten/include/acpi/container.h b/kitten/include/acpi/container.h
deleted file mode 100644 (file)
index a703f14..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __ACPI_CONTAINER_H
-#define __ACPI_CONTAINER_H
-
-#include <linux/kernel.h>
-
-struct acpi_container {
-       acpi_handle handle;
-       unsigned long sun;
-       int state;
-};
-
-#endif                         /* __ACPI_CONTAINER_H */
diff --git a/kitten/include/acpi/pdc_intel.h b/kitten/include/acpi/pdc_intel.h
deleted file mode 100644 (file)
index 3fa81d5..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-
-/* _PDC bit definition for Intel processors */
-
-#ifndef __PDC_INTEL_H__
-#define __PDC_INTEL_H__
-
-#define ACPI_PDC_P_FFH                 (0x0001)
-#define ACPI_PDC_C_C1_HALT             (0x0002)
-#define ACPI_PDC_T_FFH                 (0x0004)
-#define ACPI_PDC_SMP_C1PT              (0x0008)
-#define ACPI_PDC_SMP_C2C3              (0x0010)
-#define ACPI_PDC_SMP_P_SWCOORD         (0x0020)
-#define ACPI_PDC_SMP_C_SWCOORD         (0x0040)
-#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 | \
-                                        ACPI_PDC_P_FFH)
-
-#define ACPI_PDC_C_CAPABILITY_SMP      (ACPI_PDC_SMP_C2C3 | \
-                                        ACPI_PDC_SMP_C1PT | \
-                                        ACPI_PDC_C_C1_HALT)
-
-#endif                         /* __PDC_INTEL_H__ */
diff --git a/kitten/include/acpi/platform/acenv.h b/kitten/include/acpi/platform/acenv.h
deleted file mode 100644 (file)
index 453a469..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-/******************************************************************************
- *
- * Name: acenv.h - Generation environment specific items
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACENV_H__
-#define __ACENV_H__
-
-/*
- * Configuration for ACPI tools and utilities
- */
-
-#ifdef ACPI_LIBRARY
-/*
- * Note: The non-debug version of the acpi_library does not contain any
- * debug support, for minimimal size. The debug version uses ACPI_FULL_DEBUG
- */
-#define ACPI_USE_LOCAL_CACHE
-#endif
-
-#ifdef ACPI_ASL_COMPILER
-#define ACPI_DEBUG_OUTPUT
-#define ACPI_APPLICATION
-#define ACPI_DISASSEMBLER
-#define ACPI_CONSTANT_EVAL_ONLY
-#define ACPI_LARGE_NAMESPACE_NODE
-#define ACPI_DATA_TABLE_DISASSEMBLY
-#endif
-
-#ifdef ACPI_EXEC_APP
-#undef DEBUGGER_THREADING
-#define DEBUGGER_THREADING      DEBUGGER_SINGLE_THREADED
-#define ACPI_FULL_DEBUG
-#define ACPI_APPLICATION
-#define ACPI_DEBUGGER
-#define ACPI_MUTEX_DEBUG
-#define ACPI_DBG_TRACK_ALLOCATIONS
-#endif
-
-#ifdef ACPI_DASM_APP
-#ifndef MSDOS
-#define ACPI_DEBUG_OUTPUT
-#endif
-#define ACPI_APPLICATION
-#define ACPI_DISASSEMBLER
-#define ACPI_NO_METHOD_EXECUTION
-#define ACPI_LARGE_NAMESPACE_NODE
-#define ACPI_DATA_TABLE_DISASSEMBLY
-#endif
-
-#ifdef ACPI_APPLICATION
-#define ACPI_USE_SYSTEM_CLIBRARY
-#define ACPI_USE_LOCAL_CACHE
-#endif
-
-#ifdef ACPI_FULL_DEBUG
-#define ACPI_DEBUGGER
-#define ACPI_DEBUG_OUTPUT
-#define ACPI_DISASSEMBLER
-#endif
-
-/*
- * Environment configuration.  The purpose of this file is to interface to the
- * local generation environment.
- *
- * 1) ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library.
- *      Otherwise, local versions of string/memory functions will be used.
- * 2) ACPI_USE_STANDARD_HEADERS - Define this if linking to a C library and
- *      the standard header files may be used.
- *
- * The ACPI subsystem only uses low level C library functions that do not call
- * operating system services and may therefore be inlined in the code.
- *
- * It may be necessary to tailor these include files to the target
- * generation environment.
- *
- *
- * Functions and constants used from each header:
- *
- * string.h:    memcpy
- *              memset
- *              strcat
- *              strcmp
- *              strcpy
- *              strlen
- *              strncmp
- *              strncat
- *              strncpy
- *
- * stdlib.h:    strtoul
- *
- * stdarg.h:    va_list
- *              va_arg
- *              va_start
- *              va_end
- *
- */
-
-/*! [Begin] no source code translation */
-
-#if defined(__linux__)
-#include "aclinux.h"
-
-#elif defined(_AED_EFI)
-#include "acefi.h"
-
-#elif defined(WIN32)
-#include "acwin.h"
-
-#elif defined(WIN64)
-#include "acwin64.h"
-
-#elif defined(MSDOS)           /* Must appear after WIN32 and WIN64 check */
-#include "acdos16.h"
-
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#include "acfreebsd.h"
-
-#elif defined(__NetBSD__)
-#include "acnetbsd.h"
-
-#elif defined(MODESTO)
-#include "acmodesto.h"
-
-#elif defined(NETWARE)
-#include "acnetware.h"
-
-#elif defined(__sun)
-#include "acsolaris.h"
-
-#else
-
-/* All other environments */
-
-#define ACPI_USE_STANDARD_HEADERS
-
-#define COMPILER_DEPENDENT_INT64   long long
-#define COMPILER_DEPENDENT_UINT64  unsigned long long
-
-#endif
-
-/*! [End] no source code translation !*/
-
-/*
- * Debugger threading model
- * Use single threaded if the entire subsystem is contained in an application
- * Use multiple threaded when the subsystem is running in the kernel.
- *
- * By default the model is single threaded if ACPI_APPLICATION is set,
- * multi-threaded if ACPI_APPLICATION is not set.
- */
-#define DEBUGGER_SINGLE_THREADED    0
-#define DEBUGGER_MULTI_THREADED     1
-
-#ifndef DEBUGGER_THREADING
-#ifdef ACPI_APPLICATION
-#define DEBUGGER_THREADING          DEBUGGER_SINGLE_THREADED
-
-#else
-#define DEBUGGER_THREADING          DEBUGGER_MULTI_THREADED
-#endif
-#endif                         /* !DEBUGGER_THREADING */
-
-/******************************************************************************
- *
- * C library configuration
- *
- *****************************************************************************/
-
-#define ACPI_IS_ASCII(c)  ((c) < 0x80)
-
-#ifdef ACPI_USE_SYSTEM_CLIBRARY
-/*
- * Use the standard C library headers.
- * We want to keep these to a minimum.
- */
-#ifdef ACPI_USE_STANDARD_HEADERS
-/*
- * Use the standard headers from the standard locations
- */
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#endif                         /* ACPI_USE_STANDARD_HEADERS */
-
-/*
- * We will be linking to the standard Clib functions
- */
-#define ACPI_STRSTR(s1,s2)      strstr((s1), (s2))
-#define ACPI_STRCHR(s1,c)       strchr((s1), (c))
-#define ACPI_STRLEN(s)          (acpi_size) strlen((s))
-#define ACPI_STRCPY(d,s)        (void) strcpy((d), (s))
-#define ACPI_STRNCPY(d,s,n)     (void) strncpy((d), (s), (acpi_size)(n))
-#define ACPI_STRNCMP(d,s,n)     strncmp((d), (s), (acpi_size)(n))
-#define ACPI_STRCMP(d,s)        strcmp((d), (s))
-#define ACPI_STRCAT(d,s)        (void) strcat((d), (s))
-#define ACPI_STRNCAT(d,s,n)     strncat((d), (s), (acpi_size)(n))
-#define ACPI_STRTOUL(d,s,n)     strtoul((d), (s), (acpi_size)(n))
-#define ACPI_MEMCMP(s1,s2,n)    memcmp((const char *)(s1), (const char *)(s2), (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(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))
-
-#else
-
-/******************************************************************************
- *
- * Not using native C library, use local implementations
- *
- *****************************************************************************/
-
- /*
-  * 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 */
-
-/*
- * Storage alignment properties
- */
-#define  _AUPBND                (sizeof (acpi_native_int) - 1)
-#define  _ADNBND                (sizeof (acpi_native_int) - 1)
-
-/*
- * Variable argument list macro definitions
- */
-#define _bnd(X, bnd)            (((sizeof (X)) + (bnd)) & (~(bnd)))
-#define va_arg(ap, T)           (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND))))
-#define va_end(ap)              (void) 0
-#define va_start(ap, A)         (void) ((ap) = (((char *) &(A)) + (_bnd (A,_AUPBND))))
-
-#endif                         /* va_arg */
-
-#define ACPI_STRSTR(s1,s2)      acpi_ut_strstr ((s1), (s2))
-#define ACPI_STRCHR(s1,c)       acpi_ut_strchr ((s1), (c))
-#define ACPI_STRLEN(s)          (acpi_size) acpi_ut_strlen ((s))
-#define ACPI_STRCPY(d,s)        (void) acpi_ut_strcpy ((d), (s))
-#define ACPI_STRNCPY(d,s,n)     (void) acpi_ut_strncpy ((d), (s), (acpi_size)(n))
-#define ACPI_STRNCMP(d,s,n)     acpi_ut_strncmp ((d), (s), (acpi_size)(n))
-#define ACPI_STRCMP(d,s)        acpi_ut_strcmp ((d), (s))
-#define ACPI_STRCAT(d,s)        (void) acpi_ut_strcat ((d), (s))
-#define ACPI_STRNCAT(d,s,n)     acpi_ut_strncat ((d), (s), (acpi_size)(n))
-#define ACPI_STRTOUL(d,s,n)     acpi_ut_strtoul ((d), (s), (acpi_size)(n))
-#define ACPI_MEMCMP(s1,s2,n)    acpi_ut_memcmp((const char *)(s1), (const char *)(s2), (acpi_size)(n))
-#define ACPI_MEMCPY(d,s,n)      (void) acpi_ut_memcpy ((d), (s), (acpi_size)(n))
-#define ACPI_MEMSET(d,v,n)      (void) acpi_ut_memset ((d), (v), (acpi_size)(n))
-#define ACPI_TOUPPER            acpi_ut_to_upper
-#define ACPI_TOLOWER            acpi_ut_to_lower
-
-#endif                         /* ACPI_USE_SYSTEM_CLIBRARY */
-
-/******************************************************************************
- *
- * Assembly code macros
- *
- *****************************************************************************/
-
-/*
- * Handle platform- and compiler-specific assembly language differences.
- * These should already have been defined by the platform includes above.
- *
- * Notes:
- * 1) Interrupt 3 is used to break into a debugger
- * 2) Interrupts are turned off during ACPI register setup
- */
-
-/* Unrecognized compiler, use defaults */
-
-#ifndef ACPI_ASM_MACROS
-
-/*
- * Calling conventions:
- *
- * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
- * ACPI_EXTERNAL_XFACE      - External ACPI interfaces
- * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
- * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
- */
-#define ACPI_SYSTEM_XFACE
-#define ACPI_EXTERNAL_XFACE
-#define ACPI_INTERNAL_XFACE
-#define ACPI_INTERNAL_VAR_XFACE
-
-#define ACPI_ASM_MACROS
-#define BREAKPOINT3
-#define ACPI_DISABLE_IRQS()
-#define ACPI_ENABLE_IRQS()
-#define ACPI_ACQUIRE_GLOBAL_LOCK(Glptr, acq)
-#define ACPI_RELEASE_GLOBAL_LOCK(Glptr, acq)
-
-#endif                         /* ACPI_ASM_MACROS */
-
-#ifdef ACPI_APPLICATION
-
-/* Don't want software interrupts within a ring3 application */
-
-#undef BREAKPOINT3
-#define BREAKPOINT3
-#endif
-
-/******************************************************************************
- *
- * Compiler-specific information is contained in the compiler-specific
- * headers.
- *
- *****************************************************************************/
-#endif                         /* __ACENV_H__ */
diff --git a/kitten/include/acpi/platform/acgcc.h b/kitten/include/acpi/platform/acgcc.h
deleted file mode 100644 (file)
index da80933..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/******************************************************************************
- *
- * Name: acgcc.h - GCC specific defines, etc.
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#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(c) __attribute__ ((__format__ (__printf__, c, c+1)))
-
-/*
- * Some compilers complain about unused variables. Sometimes we don't want to
- * 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__ */
diff --git a/kitten/include/acpi/platform/aclinux.h b/kitten/include/acpi/platform/aclinux.h
deleted file mode 100644 (file)
index 47faf27..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/******************************************************************************
- *
- * Name: aclinux.h - OS specific defines, etc.
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2006, R. Byron Moore
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON 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 DAMAGES.
- */
-
-#ifndef __ACLINUX_H__
-#define __ACLINUX_H__
-
-#define ACPI_USE_SYSTEM_CLIBRARY
-#define ACPI_USE_DO_WHILE_0
-
-#ifdef __KERNEL__
-
-#include <linux/string.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/ctype.h>
-#include <asm/system.h>
-#include <asm/atomic.h>
-#include <asm/div64.h>
-#include <asm/acpi.h>
-#include <linux/slab.h>
-#include <linux/spinlock_types.h>
-#include <asm/current.h>
-
-/* Host-dependent types and defines */
-
-#define ACPI_MACHINE_WIDTH          BITS_PER_LONG
-#define acpi_cache_t                        kmem_cache_t
-#define acpi_spinlock                   spinlock_t *
-#define ACPI_EXPORT_SYMBOL(symbol)  EXPORT_SYMBOL(symbol);
-#define strtoul                     simple_strtoul
-
-/* Full namespace pathname length limit - arbitrary */
-#define ACPI_PATHNAME_MAX              256
-
-#else                          /* !__KERNEL__ */
-
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-
-#if defined(__ia64__) || defined(__x86_64__)
-#define ACPI_MACHINE_WIDTH          64
-#define COMPILER_DEPENDENT_INT64    long
-#define COMPILER_DEPENDENT_UINT64   unsigned long
-#else
-#define ACPI_MACHINE_WIDTH          32
-#define COMPILER_DEPENDENT_INT64    long long
-#define COMPILER_DEPENDENT_UINT64   unsigned long long
-#define ACPI_USE_NATIVE_DIVIDE
-#endif
-
-#define __cdecl
-#define ACPI_FLUSH_CPU_CACHE()
-#endif                         /* __KERNEL__ */
-
-/* Linux uses GCC */
-
-#include "acgcc.h"
-
-#define acpi_cpu_flags unsigned long
-
-#define acpi_thread_id struct task_struct *
-
-static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; }
-
-/*
- * The irqs_disabled() check is for resume from RAM.
- * Interrupts are off during resume, just like they are for boot.
- * However, boot has  (system_state != SYSTEM_RUNNING)
- * to quiet __might_sleep() in kmalloc() and resume does not.
- */
-#include <acpi/actypes.h>
-static inline void *acpi_os_allocate(acpi_size size) {
-       return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
-}
-static inline void *acpi_os_allocate_zeroed(acpi_size size) {
-       return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
-}
-
-static inline void *acpi_os_acquire_object(acpi_cache_t * cache) {
-        return kmem_cache_zalloc(cache, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
-}
-
-#define ACPI_ALLOCATE(a)       acpi_os_allocate(a)
-#define ACPI_ALLOCATE_ZEROED(a)        acpi_os_allocate_zeroed(a)
-#define ACPI_FREE(a)           kfree(a)
-
-#endif                         /* __ACLINUX_H__ */
diff --git a/kitten/include/acpi/processor.h b/kitten/include/acpi/processor.h
deleted file mode 100644 (file)
index 3c4461d..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-#ifndef __ACPI_PROCESSOR_H
-#define __ACPI_PROCESSOR_H
-
-#include <linux/kernel.h>
-#include <linux/config.h>
-#include <linux/cpu.h>
-
-#include <asm/acpi.h>
-
-#define ACPI_PROCESSOR_BUSY_METRIC     10
-
-#define ACPI_PROCESSOR_MAX_POWER       8
-#define ACPI_PROCESSOR_MAX_C2_LATENCY  100
-#define ACPI_PROCESSOR_MAX_C3_LATENCY  1000
-
-#define ACPI_PROCESSOR_MAX_THROTTLING  16
-#define ACPI_PROCESSOR_MAX_THROTTLE    250     /* 25% */
-#define ACPI_PROCESSOR_MAX_DUTY_WIDTH  4
-
-#define ACPI_PDC_REVISION_ID           0x1
-
-#define ACPI_PSD_REV0_REVISION         0 /* Support for _PSD as in ACPI 3.0 */
-#define ACPI_PSD_REV0_ENTRIES          5
-
-/*
- * Types of coordination defined in ACPI 3.0. Same macros can be used across
- * P, C and T states
- */
-#define DOMAIN_COORD_TYPE_SW_ALL       0xfc
-#define DOMAIN_COORD_TYPE_SW_ANY       0xfd
-#define DOMAIN_COORD_TYPE_HW_ALL       0xfe
-
-/* Power Management */
-
-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;
-} __attribute__ ((packed));
-
-struct acpi_processor_cx_policy {
-       u32 count;
-       struct acpi_processor_cx *state;
-       struct {
-               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;
-       u64 time;
-       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;
-       struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
-};
-
-/* Performance Management */
-
-struct acpi_psd_package {
-       acpi_integer num_entries;
-       acpi_integer revision;
-       acpi_integer domain;
-       acpi_integer coord_type;
-       acpi_integer num_processors;
-} __attribute__ ((packed));
-
-struct acpi_pct_register {
-       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 */
-};
-
-struct acpi_processor_performance {
-       unsigned int state;
-       unsigned int platform_limit;
-       struct acpi_pct_register control_register;
-       struct acpi_pct_register status_register;
-       unsigned int state_count;
-       struct acpi_processor_px *states;
-       struct acpi_psd_package domain_info;
-       cpumask_t shared_cpu_map;
-       unsigned int shared_type;
-};
-
-/* Throttling Control */
-
-struct acpi_processor_tx {
-       u16 power;
-       u16 performance;
-};
-
-struct acpi_processor_throttling {
-       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 */
-};
-
-struct acpi_processor_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_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;
-};
-
-struct acpi_processor {
-       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;
-       struct acpi_processor_throttling throttling;
-       struct acpi_processor_limit limit;
-
-       /* the _PDC objects for this processor, if any */
-       struct acpi_object_list *pdc;
-};
-
-struct acpi_processor_errata {
-       u8 smp;
-       struct {
-               u8 throttle:1;
-               u8 fdma:1;
-               u8 reserved:6;
-               u32 bmisx;
-       } piix4;
-};
-
-extern int acpi_processor_preregister_performance(
-               struct acpi_processor_performance **performance);
-
-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_errata errata;
-
-void arch_acpi_processor_init_pdc(struct acpi_processor *pr);
-
-#ifdef ARCH_HAS_POWER_INIT
-void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
-                                       unsigned int cpu);
-#else
-static inline void acpi_processor_power_init_bm_check(struct
-                                                     acpi_processor_flags
-                                                     *flags, unsigned int cpu)
-{
-       flags->bm_check = 1;
-       return;
-}
-#endif
-
-/* in processor_perflib.c */
-
-#ifdef CONFIG_CPU_FREQ
-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 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");
-               printout = 0;
-       }
-       return 0;
-}
-#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);
-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);
-
-/* in processor_thermal.c */
-int acpi_processor_get_limit_info(struct acpi_processor *pr);
-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;
-}
-#endif
-
-#endif
diff --git a/kitten/include/arch-x86_64/acpi.h b/kitten/include/arch-x86_64/acpi.h
deleted file mode 100644 (file)
index aa1c7b2..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- *  asm-x86_64/acpi.h
- *
- *  Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
- *  Copyright (C) 2001 Patrick Mochel <mochel@osdl.org>
-  *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- *  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 _ASM_ACPI_H
-#define _ASM_ACPI_H
-
-#ifdef __KERNEL__
-
-#include <acpi/pdc_intel.h>
-
-#define COMPILER_DEPENDENT_INT64   long long
-#define COMPILER_DEPENDENT_UINT64  unsigned long long
-
-/*
- * Calling conventions:
- *
- * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
- * ACPI_EXTERNAL_XFACE      - External ACPI interfaces 
- * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
- * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
- */
-#define ACPI_SYSTEM_XFACE
-#define ACPI_EXTERNAL_XFACE
-#define ACPI_INTERNAL_XFACE
-#define ACPI_INTERNAL_VAR_XFACE
-
-/* Asm macros */
-
-#define ACPI_ASM_MACROS
-#define BREAKPOINT3
-#define ACPI_DISABLE_IRQS() local_irq_disable()
-#define ACPI_ENABLE_IRQS()  local_irq_enable()
-#define ACPI_FLUSH_CPU_CACHE() wbinvd()
-
-
-static inline int
-__acpi_acquire_global_lock (unsigned int *lock)
-{
-       unsigned int old, new, val;
-       do {
-               old = *lock;
-               new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
-               val = cmpxchg(lock, old, new);
-       } while (unlikely (val != old));
-       return (new < 3) ? -1 : 0;
-}
-
-static inline int
-__acpi_release_global_lock (unsigned int *lock)
-{
-       unsigned int old, new, val;
-       do {
-               old = *lock;
-               new = old & ~0x3;
-               val = cmpxchg(lock, old, new);
-       } while (unlikely (val != old));
-       return old & 0x1;
-}
-
-#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
-       ((Acq) = __acpi_acquire_global_lock((unsigned int *) GLptr))
-
-#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
-       ((Acq) = __acpi_release_global_lock((unsigned int *) GLptr))
-
-/*
- * Math helper asm macros
- */
-#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
-        asm("divl %2;"        \
-        :"=a"(q32), "=d"(r32) \
-        :"r"(d32),            \
-        "0"(n_lo), "1"(n_hi))
-
-
-#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
-    asm("shrl   $1,%2;"             \
-        "rcrl   $1,%3;"             \
-        :"=r"(n_hi), "=r"(n_lo)     \
-        :"0"(n_hi), "1"(n_lo))
-
-#ifdef CONFIG_ACPI
-extern int acpi_lapic;
-extern int acpi_ioapic;
-extern int acpi_noirq;
-extern int acpi_strict;
-extern int acpi_disabled;
-extern int acpi_pci_disabled;
-extern int acpi_ht;
-static inline void disable_acpi(void) 
-{ 
-       acpi_disabled = 1; 
-       acpi_ht = 0; 
-       acpi_pci_disabled = 1;
-       acpi_noirq = 1;
-}
-
-/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
-#define FIX_ACPI_PAGES 4
-
-extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
-static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
-static inline void acpi_disable_pci(void) 
-{
-       acpi_pci_disabled = 1; 
-       acpi_noirq_set();
-}
-extern int acpi_irq_balance_set(char *str);
-
-#else  /* !CONFIG_ACPI */
-
-#define acpi_lapic 0
-#define acpi_ioapic 0
-static inline void acpi_noirq_set(void) { }
-static inline void acpi_disable_pci(void) { }
-
-#endif /* !CONFIG_ACPI */
-
-extern int acpi_numa;
-extern int acpi_scan_nodes(unsigned long start, unsigned long end);
-#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
-
-#ifdef CONFIG_ACPI_SLEEP
-
-/* routines for saving/restoring kernel state */
-extern int acpi_save_state_mem(void);
-extern void acpi_restore_state_mem(void);
-
-extern unsigned long acpi_wakeup_address;
-
-/* early initialization routine */
-extern void acpi_reserve_bootmem(void);
-
-#endif /*CONFIG_ACPI_SLEEP*/
-
-#define boot_cpu_physical_apicid boot_cpu_id
-
-extern int acpi_disabled;
-extern int acpi_pci_disabled;
-
-extern u8 x86_acpiid_to_apicid[];
-
-extern int acpi_skip_timer_override;
-
-#endif /*__KERNEL__*/
-
-#endif /*_ASM_ACPI_H*/