aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-01-09 00:13:17 -0500
committerLen Brown <len.brown@intel.com>2009-01-09 03:30:47 -0500
commit95b482a8d31116f3f5c2a5089569393234d06385 (patch)
treef32aec8673a285a9d188948be97af3034ee06e93 /drivers/acpi/acpica
parent6620e0c49f577454b772fb381543d60ae53eb885 (diff)
ACPICA: create acpica/ directory
also, delete sleep/ and delete ACPI_CFLAGS from Makefile Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/Makefile44
-rw-r--r--drivers/acpi/acpica/dsfield.c650
-rw-r--r--drivers/acpi/acpica/dsinit.c205
-rw-r--r--drivers/acpi/acpica/dsmethod.c629
-rw-r--r--drivers/acpi/acpica/dsmthdat.c718
-rw-r--r--drivers/acpi/acpica/dsobject.c813
-rw-r--r--drivers/acpi/acpica/dsopcode.c1469
-rw-r--r--drivers/acpi/acpica/dsutils.c869
-rw-r--r--drivers/acpi/acpica/dswexec.c746
-rw-r--r--drivers/acpi/acpica/dswload.c1203
-rw-r--r--drivers/acpi/acpica/dswscope.c214
-rw-r--r--drivers/acpi/acpica/dswstate.c753
-rw-r--r--drivers/acpi/acpica/evevent.c313
-rw-r--r--drivers/acpi/acpica/evgpe.c722
-rw-r--r--drivers/acpi/acpica/evgpeblk.c1227
-rw-r--r--drivers/acpi/acpica/evmisc.c621
-rw-r--r--drivers/acpi/acpica/evregion.c1070
-rw-r--r--drivers/acpi/acpica/evrgnini.c684
-rw-r--r--drivers/acpi/acpica/evsci.c183
-rw-r--r--drivers/acpi/acpica/evxface.c821
-rw-r--r--drivers/acpi/acpica/evxfevnt.c871
-rw-r--r--drivers/acpi/acpica/evxfregn.c254
-rw-r--r--drivers/acpi/acpica/exconfig.c536
-rw-r--r--drivers/acpi/acpica/exconvrt.c692
-rw-r--r--drivers/acpi/acpica/excreate.c522
-rw-r--r--drivers/acpi/acpica/exdump.c1060
-rw-r--r--drivers/acpi/acpica/exfield.c340
-rw-r--r--drivers/acpi/acpica/exfldio.c961
-rw-r--r--drivers/acpi/acpica/exmisc.c726
-rw-r--r--drivers/acpi/acpica/exmutex.c474
-rw-r--r--drivers/acpi/acpica/exnames.c436
-rw-r--r--drivers/acpi/acpica/exoparg1.c1050
-rw-r--r--drivers/acpi/acpica/exoparg2.c605
-rw-r--r--drivers/acpi/acpica/exoparg3.c273
-rw-r--r--drivers/acpi/acpica/exoparg6.c341
-rw-r--r--drivers/acpi/acpica/exprep.c590
-rw-r--r--drivers/acpi/acpica/exregion.c499
-rw-r--r--drivers/acpi/acpica/exresnte.c278
-rw-r--r--drivers/acpi/acpica/exresolv.c551
-rw-r--r--drivers/acpi/acpica/exresop.c701
-rw-r--r--drivers/acpi/acpica/exstore.c716
-rw-r--r--drivers/acpi/acpica/exstoren.c304
-rw-r--r--drivers/acpi/acpica/exstorob.c209
-rw-r--r--drivers/acpi/acpica/exsystem.c303
-rw-r--r--drivers/acpi/acpica/exutils.c421
-rw-r--r--drivers/acpi/acpica/hwacpi.c185
-rw-r--r--drivers/acpi/acpica/hwgpe.c469
-rw-r--r--drivers/acpi/acpica/hwregs.c353
-rw-r--r--drivers/acpi/acpica/hwsleep.c629
-rw-r--r--drivers/acpi/acpica/hwtimer.c188
-rw-r--r--drivers/acpi/acpica/hwxface.c593
-rw-r--r--drivers/acpi/acpica/nsaccess.c676
-rw-r--r--drivers/acpi/acpica/nsalloc.c497
-rw-r--r--drivers/acpi/acpica/nsdump.c709
-rw-r--r--drivers/acpi/acpica/nsdumpdv.c141
-rw-r--r--drivers/acpi/acpica/nseval.c278
-rw-r--r--drivers/acpi/acpica/nsinit.c593
-rw-r--r--drivers/acpi/acpica/nsload.c315
-rw-r--r--drivers/acpi/acpica/nsnames.c265
-rw-r--r--drivers/acpi/acpica/nsobject.c441
-rw-r--r--drivers/acpi/acpica/nsparse.c204
-rw-r--r--drivers/acpi/acpica/nspredef.c1065
-rw-r--r--drivers/acpi/acpica/nssearch.c415
-rw-r--r--drivers/acpi/acpica/nsutils.c997
-rw-r--r--drivers/acpi/acpica/nswalk.c296
-rw-r--r--drivers/acpi/acpica/nsxfeval.c812
-rw-r--r--drivers/acpi/acpica/nsxfname.c360
-rw-r--r--drivers/acpi/acpica/nsxfobj.c287
-rw-r--r--drivers/acpi/acpica/psargs.c752
-rw-r--r--drivers/acpi/acpica/psloop.c1088
-rw-r--r--drivers/acpi/acpica/psopcode.c810
-rw-r--r--drivers/acpi/acpica/psparse.c701
-rw-r--r--drivers/acpi/acpica/psscope.c265
-rw-r--r--drivers/acpi/acpica/pstree.c312
-rw-r--r--drivers/acpi/acpica/psutils.c244
-rw-r--r--drivers/acpi/acpica/pswalk.c110
-rw-r--r--drivers/acpi/acpica/psxface.c385
-rw-r--r--drivers/acpi/acpica/rsaddr.c381
-rw-r--r--drivers/acpi/acpica/rscalc.c618
-rw-r--r--drivers/acpi/acpica/rscreate.c468
-rw-r--r--drivers/acpi/acpica/rsdump.c771
-rw-r--r--drivers/acpi/acpica/rsinfo.c206
-rw-r--r--drivers/acpi/acpica/rsio.c290
-rw-r--r--drivers/acpi/acpica/rsirq.c266
-rw-r--r--drivers/acpi/acpica/rslist.c203
-rw-r--r--drivers/acpi/acpica/rsmemory.c236
-rw-r--r--drivers/acpi/acpica/rsmisc.c561
-rw-r--r--drivers/acpi/acpica/rsutils.c727
-rw-r--r--drivers/acpi/acpica/rsxface.c571
-rw-r--r--drivers/acpi/acpica/tbfadt.c610
-rw-r--r--drivers/acpi/acpica/tbfind.c140
-rw-r--r--drivers/acpi/acpica/tbinstal.c574
-rw-r--r--drivers/acpi/acpica/tbutils.c582
-rw-r--r--drivers/acpi/acpica/tbxface.c735
-rw-r--r--drivers/acpi/acpica/tbxfroot.c274
-rw-r--r--drivers/acpi/acpica/utalloc.c383
-rw-r--r--drivers/acpi/acpica/utcopy.c970
-rw-r--r--drivers/acpi/acpica/utdebug.c651
-rw-r--r--drivers/acpi/acpica/utdelete.c677
-rw-r--r--drivers/acpi/acpica/uteval.c752
-rw-r--r--drivers/acpi/acpica/utglobal.c823
-rw-r--r--drivers/acpi/acpica/utinit.c152
-rw-r--r--drivers/acpi/acpica/utmath.c312
-rw-r--r--drivers/acpi/acpica/utmisc.c1093
-rw-r--r--drivers/acpi/acpica/utmutex.c342
-rw-r--r--drivers/acpi/acpica/utobject.c677
-rw-r--r--drivers/acpi/acpica/utresrc.c616
-rw-r--r--drivers/acpi/acpica/utstate.c347
-rw-r--r--drivers/acpi/acpica/utxface.c512
109 files changed, 59622 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
new file mode 100644
index 00000000000..3f23298ee3f
--- /dev/null
+++ b/drivers/acpi/acpica/Makefile
@@ -0,0 +1,44 @@
+#
+# Makefile for ACPICA Core interpreter
+#
+
+ccflags-y := -Os
+ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
+
+obj-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \
+ dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \
+ dsinit.o
+
+obj-y += evevent.o evregion.o evsci.o evxfevnt.o \
+ evmisc.o evrgnini.o evxface.o evxfregn.o \
+ evgpe.o evgpeblk.o
+
+obj-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\
+ exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\
+ excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \
+ exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o
+
+obj-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o
+
+obj-$(ACPI_FUTURE_USAGE) += hwtimer.o
+
+obj-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \
+ nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \
+ nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \
+ nsparse.o nspredef.o
+
+obj-$(ACPI_FUTURE_USAGE) += nsdumpdv.o
+
+obj-y += psargs.o psparse.o psloop.o pstree.o pswalk.o \
+ psopcode.o psscope.o psutils.o psxface.o
+
+obj-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \
+ rscalc.o rsirq.o rsmemory.o rsutils.o
+
+obj-$(ACPI_FUTURE_USAGE) += rsdump.o
+
+obj-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o
+
+obj-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
+ utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
+ utstate.o utmutex.o utobject.o utresrc.o
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
new file mode 100644
index 00000000000..5fbc24075b4
--- /dev/null
+++ b/drivers/acpi/acpica/dsfield.c
@@ -0,0 +1,650 @@
+/******************************************************************************
+ *
+ * Module Name: dsfield - Dispatcher field routines
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2008, Intel Corp.
+ * 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.
+ */
+
+#include <acpi/acpi.h>
+#include <acpi/accommon.h>
+#include <acpi/amlcode.h>
+#include <acpi/acdispat.h>
+#include <acpi/acinterp.h>
+#include <acpi/acnamesp.h>
+#include <acpi/acparser.h>
+
+#define _COMPONENT ACPI_DISPATCHER
+ACPI_MODULE_NAME("dsfield")
+
+/* Local prototypes */
+static acpi_status
+acpi_ds_get_field_names(struct acpi_create_field_info *info,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg);
+
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_ds_create_buffer_field
+ *
+ * PARAMETERS: Op - Current parse op (create_xXField)
+ * walk_state - Current state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Execute the create_field operators:
+ * create_bit_field_op,
+ * create_byte_field_op,
+ * create_word_field_op,
+ * create_dword_field_op,
+ * create_qword_field_op,
+ * create_field_op (all of which define a field in a buffer)
+ *
+ ******************************************************************************/
+
+acpi_status
+acpi_ds_create_buffer_field(union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state)
+{
+ union acpi_parse_object *arg;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *second_desc = NULL;
+ u32 flags;
+
+ ACPI_FUNCTION_TRACE(ds_create_buffer_field);
+
+ /*
+ * Get the name_string argument (name of the new buffer_field)
+ */
+ if (op->common.aml_opcode == AML_CREATE_FIELD_OP) {
+
+ /* For create_field, name is the 4th argument */
+
+ arg = acpi_ps_get_arg(op, 3);
+ } else {
+ /* For all other create_xXXField operators, name is the 3rd argument */
+
+ arg = acpi_ps_get_arg(op, 2);
+ }
+
+ if (!arg) {
+ return_ACPI_STATUS(AE_AML_NO_OPERAND);
+ }
+
+ if (walk_state->deferred_node) {
+ node = walk_state->deferred_node;
+ status = AE_OK;
+ } else {
+ /* Execute flag should always be set when this function is entered */
+
+ if (!(walk_state->parse_flags & ACPI_PARSE_EXECUTE)) {
+ return_ACPI_STATUS(AE_AML_INTERNAL);
+ }
+
+ /* Creating new namespace node, should not already exist */
+
+ flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
+ ACPI_NS_ERROR_IF_FOUND;
+
+ /* Mark node temporary if we are executing a method */
+
+ if (walk_state->method_node) {
+ flags |= ACPI_NS_TEMPORARY;
+ }
+
+ /* Enter the name_string into the namespace */
+
+ status =
+ acpi_ns_lookup(walk_state->scope_info,
+ arg->common.value.string, ACPI_TYPE_ANY,
+ ACPI_IMODE_LOAD_PASS1, flags, walk_state,
+ &node);
+ if (ACPI_FAILURE(status)) {
+ ACPI_ERROR_NAMESPACE(arg->common.value.string, status);
+ return_ACPI_STATUS(status);
+ }
+ }
+
+ /*
+ * We could put the returned object (Node) on the object stack for later,
+ * but for now, we will put it in the "op" object that the parser uses,
+ * so we can get it again at the end of this scope.
+ */
+ op->common.node = node;
+
+ /*
+ * If there is no object a