/******************************************************************************1*2* Module Name: dsobject - Dispatcher object management routines3*4*****************************************************************************/56/*7* Copyright (C) 2000 - 2011, Intel Corp.8* All rights reserved.9*10* Redistribution and use in source and binary forms, with or without11* modification, are permitted provided that the following conditions12* are met:13* 1. Redistributions of source code must retain the above copyright14* notice, this list of conditions, and the following disclaimer,15* without modification.16* 2. Redistributions in binary form must reproduce at minimum a disclaimer17* substantially similar to the "NO WARRANTY" disclaimer below18* ("Disclaimer") and any redistribution must be conditioned upon19* including a substantially similar Disclaimer requirement for further20* binary redistribution.21* 3. Neither the names of the above-listed copyright holders nor the names22* of any contributors may be used to endorse or promote products derived23* from this software without specific prior written permission.24*25* Alternatively, this software may be distributed under the terms of the26* GNU General Public License ("GPL") version 2 as published by the Free27* Software Foundation.28*29* NO WARRANTY30* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS31* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT32* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR33* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT34* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL35* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS36* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)37* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,38* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING39* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE40* POSSIBILITY OF SUCH DAMAGES.41*/4243#include <acpi/acpi.h>44#include "accommon.h"45#include "acparser.h"46#include "amlcode.h"47#include "acdispat.h"48#include "acnamesp.h"49#include "acinterp.h"5051#define _COMPONENT ACPI_DISPATCHER52ACPI_MODULE_NAME("dsobject")5354/* Local prototypes */55static acpi_status56acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,57union acpi_parse_object *op,58union acpi_operand_object **obj_desc_ptr);5960#ifndef ACPI_NO_METHOD_EXECUTION61/*******************************************************************************62*63* FUNCTION: acpi_ds_build_internal_object64*65* PARAMETERS: walk_state - Current walk state66* Op - Parser object to be translated67* obj_desc_ptr - Where the ACPI internal object is returned68*69* RETURN: Status70*71* DESCRIPTION: Translate a parser Op object to the equivalent namespace object72* Simple objects are any objects other than a package object!73*74******************************************************************************/7576static acpi_status77acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,78union acpi_parse_object *op,79union acpi_operand_object **obj_desc_ptr)80{81union acpi_operand_object *obj_desc;82acpi_status status;83acpi_object_type type;8485ACPI_FUNCTION_TRACE(ds_build_internal_object);8687*obj_desc_ptr = NULL;88if (op->common.aml_opcode == AML_INT_NAMEPATH_OP) {89/*90* This is a named object reference. If this name was91* previously looked up in the namespace, it was stored in this op.92* Otherwise, go ahead and look it up now93*/94if (!op->common.node) {95status = acpi_ns_lookup(walk_state->scope_info,96op->common.value.string,97ACPI_TYPE_ANY,98ACPI_IMODE_EXECUTE,99ACPI_NS_SEARCH_PARENT |100ACPI_NS_DONT_OPEN_SCOPE, NULL,101ACPI_CAST_INDIRECT_PTR(struct102acpi_namespace_node,103&(op->104common.105node)));106if (ACPI_FAILURE(status)) {107108/* Check if we are resolving a named reference within a package */109110if ((status == AE_NOT_FOUND)111&& (acpi_gbl_enable_interpreter_slack)112&&113((op->common.parent->common.aml_opcode ==114AML_PACKAGE_OP)115|| (op->common.parent->common.aml_opcode ==116AML_VAR_PACKAGE_OP))) {117/*118* We didn't find the target and we are populating elements119* of a package - ignore if slack enabled. Some ASL code120* contains dangling invalid references in packages and121* expects that no exception will be issued. Leave the122* element as a null element. It cannot be used, but it123* can be overwritten by subsequent ASL code - this is124* typically the case.125*/126ACPI_DEBUG_PRINT((ACPI_DB_INFO,127"Ignoring unresolved reference in package [%4.4s]\n",128walk_state->129scope_info->scope.130node->name.ascii));131132return_ACPI_STATUS(AE_OK);133} else {134ACPI_ERROR_NAMESPACE(op->common.value.135string, status);136}137138return_ACPI_STATUS(status);139}140}141142/* Special object resolution for elements of a package */143144if ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) ||145(op->common.parent->common.aml_opcode ==146AML_VAR_PACKAGE_OP)) {147/*148* Attempt to resolve the node to a value before we insert it into149* the package. If this is a reference to a common data type,150* resolve it immediately. According to the ACPI spec, package151* elements can only be "data objects" or method references.152* Attempt to resolve to an Integer, Buffer, String or Package.153* If cannot, return the named reference (for things like Devices,154* Methods, etc.) Buffer Fields and Fields will resolve to simple155* objects (int/buf/str/pkg).156*157* NOTE: References to things like Devices, Methods, Mutexes, etc.158* will remain as named references. This behavior is not described159* in the ACPI spec, but it appears to be an oversight.160*/161obj_desc =162ACPI_CAST_PTR(union acpi_operand_object,163op->common.node);164165status =166acpi_ex_resolve_node_to_value(ACPI_CAST_INDIRECT_PTR167(struct168acpi_namespace_node,169&obj_desc),170walk_state);171if (ACPI_FAILURE(status)) {172return_ACPI_STATUS(status);173}174175/*176* Special handling for Alias objects. We need to setup the type177* and the Op->Common.Node to point to the Alias target. Note,178* Alias has at most one level of indirection internally.179*/180type = op->common.node->type;181if (type == ACPI_TYPE_LOCAL_ALIAS) {182type = obj_desc->common.type;183op->common.node =184ACPI_CAST_PTR(struct acpi_namespace_node,185op->common.node->object);186}187188switch (type) {189/*190* For these types, we need the actual node, not the subobject.191* However, the subobject did not get an extra reference count above.192*193* TBD: should ex_resolve_node_to_value be changed to fix this?194*/195case ACPI_TYPE_DEVICE:196case ACPI_TYPE_THERMAL:197198acpi_ut_add_reference(op->common.node->object);199200/*lint -fallthrough */201/*202* For these types, we need the actual node, not the subobject.203* The subobject got an extra reference count in ex_resolve_node_to_value.204*/205case ACPI_TYPE_MUTEX:206case ACPI_TYPE_METHOD:207case ACPI_TYPE_POWER:208case ACPI_TYPE_PROCESSOR:209case ACPI_TYPE_EVENT:210case ACPI_TYPE_REGION:211212/* We will create a reference object for these types below */213break;214215default:216/*217* All other types - the node was resolved to an actual218* object, we are done.219*/220goto exit;221}222}223}224225/* Create and init a new internal ACPI object */226227obj_desc = acpi_ut_create_internal_object((acpi_ps_get_opcode_info228(op->common.aml_opcode))->229object_type);230if (!obj_desc) {231return_ACPI_STATUS(AE_NO_MEMORY);232}233234status =235acpi_ds_init_object_from_op(walk_state, op, op->common.aml_opcode,236&obj_desc);237if (ACPI_FAILURE(status)) {238acpi_ut_remove_reference(obj_desc);239return_ACPI_STATUS(status);240}241242exit:243*obj_desc_ptr = obj_desc;244return_ACPI_STATUS(status);245}246247/*******************************************************************************248*249* FUNCTION: acpi_ds_build_internal_buffer_obj250*251* PARAMETERS: walk_state - Current walk state252* Op - Parser object to be translated253* buffer_length - Length of the buffer254* obj_desc_ptr - Where the ACPI internal object is returned255*256* RETURN: Status257*258* DESCRIPTION: Translate a parser Op package object to the equivalent259* namespace object260*261******************************************************************************/262263acpi_status264acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,265union acpi_parse_object *op,266u32 buffer_length,267union acpi_operand_object **obj_desc_ptr)268{269union acpi_parse_object *arg;270union acpi_operand_object *obj_desc;271union acpi_parse_object *byte_list;272u32 byte_list_length = 0;273274ACPI_FUNCTION_TRACE(ds_build_internal_buffer_obj);275276/*277* If we are evaluating a Named buffer object "Name (xxxx, Buffer)".278* The buffer object already exists (from the NS node), otherwise it must279* be created.280*/281obj_desc = *obj_desc_ptr;282if (!obj_desc) {283284/* Create a new buffer object */285286obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER);287*obj_desc_ptr = obj_desc;288if (!obj_desc) {289return_ACPI_STATUS(AE_NO_MEMORY);290}291}292293/*294* Second arg is the buffer data (optional) byte_list can be either295* individual bytes or a string initializer. In either case, a296* byte_list appears in the AML.297*/298arg = op->common.value.arg; /* skip first arg */299300byte_list = arg->named.next;301if (byte_list) {302if (byte_list->common.aml_opcode != AML_INT_BYTELIST_OP) {303ACPI_ERROR((AE_INFO,304"Expecting bytelist, found AML opcode 0x%X in op %p",305byte_list->common.aml_opcode, byte_list));306307acpi_ut_remove_reference(obj_desc);308return (AE_TYPE);309}310311byte_list_length = (u32) byte_list->common.value.integer;312}313314/*315* The buffer length (number of bytes) will be the larger of:316* 1) The specified buffer length and317* 2) The length of the initializer byte list318*/319obj_desc->buffer.length = buffer_length;320if (byte_list_length > buffer_length) {321obj_desc->buffer.length = byte_list_length;322}323324/* Allocate the buffer */325326if (obj_desc->buffer.length == 0) {327obj_desc->buffer.pointer = NULL;328ACPI_DEBUG_PRINT((ACPI_DB_EXEC,329"Buffer defined with zero length in AML, creating\n"));330} else {331obj_desc->buffer.pointer =332ACPI_ALLOCATE_ZEROED(obj_desc->buffer.length);333if (!obj_desc->buffer.pointer) {334acpi_ut_delete_object_desc(obj_desc);335return_ACPI_STATUS(AE_NO_MEMORY);336}337338/* Initialize buffer from the byte_list (if present) */339340if (byte_list) {341ACPI_MEMCPY(obj_desc->buffer.pointer,342byte_list->named.data, byte_list_length);343}344}345346obj_desc->buffer.flags |= AOPOBJ_DATA_VALID;347op->common.node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_desc);348return_ACPI_STATUS(AE_OK);349}350351/*******************************************************************************352*353* FUNCTION: acpi_ds_build_internal_package_obj354*355* PARAMETERS: walk_state - Current walk state356* Op - Parser object to be translated357* element_count - Number of elements in the package - this is358* the num_elements argument to Package()359* obj_desc_ptr - Where the ACPI internal object is returned360*361* RETURN: Status362*363* DESCRIPTION: Translate a parser Op package object to the equivalent364* namespace object365*366* NOTE: The number of elements in the package will be always be the num_elements367* count, regardless of the number of elements in the package list. If368* num_elements is smaller, only that many package list elements are used.369* if num_elements is larger, the Package object is padded out with370* objects of type Uninitialized (as per ACPI spec.)371*372* Even though the ASL compilers do not allow num_elements to be smaller373* than the Package list length (for the fixed length package opcode), some374* BIOS code modifies the AML on the fly to adjust the num_elements, and375* this code compensates for that. This also provides compatibility with376* other AML interpreters.377*378******************************************************************************/379380acpi_status381acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,382union acpi_parse_object *op,383u32 element_count,384union acpi_operand_object **obj_desc_ptr)385{386union acpi_parse_object *arg;387union acpi_parse_object *parent;388union acpi_operand_object *obj_desc = NULL;389acpi_status status = AE_OK;390unsigned i;391u16 index;392u16 reference_count;393394ACPI_FUNCTION_TRACE(ds_build_internal_package_obj);395396/* Find the parent of a possibly nested package */397398parent = op->common.parent;399while ((parent->common.aml_opcode == AML_PACKAGE_OP) ||400(parent->common.aml_opcode == AML_VAR_PACKAGE_OP)) {401parent = parent->common.parent;402}403404/*405* If we are evaluating a Named package object "Name (xxxx, Package)",406* the package object already exists, otherwise it must be created.407*/408obj_desc = *obj_desc_ptr;409if (!obj_desc) {410obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE);411*obj_desc_ptr = obj_desc;412if (!obj_desc) {413return_ACPI_STATUS(AE_NO_MEMORY);414}415416obj_desc->package.node = parent->common.node;417}418419/*420* Allocate the element array (array of pointers to the individual421* objects) based on the num_elements parameter. Add an extra pointer slot422* so that the list is always null terminated.423*/424obj_desc->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size)425element_count +4261) * sizeof(void *));427428if (!obj_desc->package.elements) {429acpi_ut_delete_object_desc(obj_desc);430return_ACPI_STATUS(AE_NO_MEMORY);431}432433obj_desc->package.count = element_count;434435/*436* Initialize the elements of the package, up to the num_elements count.437* Package is automatically padded with uninitialized (NULL) elements438* if num_elements is greater than the package list length. Likewise,439* Package is truncated if num_elements is less than the list length.440*/441arg = op->common.value.arg;442arg = arg->common.next;443for (i = 0; arg && (i < element_count); i++) {444if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {445if (arg->common.node->type == ACPI_TYPE_METHOD) {446/*447* A method reference "looks" to the parser to be a method448* invocation, so we special case it here449*/450arg->common.aml_opcode = AML_INT_NAMEPATH_OP;451status =452acpi_ds_build_internal_object(walk_state,453arg,454&obj_desc->455package.456elements[i]);457} else {458/* This package element is already built, just get it */459460obj_desc->package.elements[i] =461ACPI_CAST_PTR(union acpi_operand_object,462arg->common.node);463}464} else {465status = acpi_ds_build_internal_object(walk_state, arg,466&obj_desc->467package.468elements[i]);469}470471if (*obj_desc_ptr) {472473/* Existing package, get existing reference count */474475reference_count =476(*obj_desc_ptr)->common.reference_count;477if (reference_count > 1) {478479/* Make new element ref count match original ref count */480481for (index = 0; index < (reference_count - 1);482index++) {483acpi_ut_add_reference((obj_desc->484package.485elements[i]));486}487}488}489490arg = arg->common.next;491}492493/* Check for match between num_elements and actual length of package_list */494495if (arg) {496/*497* num_elements was exhausted, but there are remaining elements in the498* package_list. Truncate the package to num_elements.499*500* Note: technically, this is an error, from ACPI spec: "It is an error501* for NumElements to be less than the number of elements in the502* PackageList". However, we just print a message and503* no exception is returned. This provides Windows compatibility. Some504* BIOSs will alter the num_elements on the fly, creating this type505* of ill-formed package object.506*/507while (arg) {508/*509* We must delete any package elements that were created earlier510* and are not going to be used because of the package truncation.511*/512if (arg->common.node) {513acpi_ut_remove_reference(ACPI_CAST_PTR514(union515acpi_operand_object,516arg->common.node));517arg->common.node = NULL;518}519520/* Find out how many elements there really are */521522i++;523arg = arg->common.next;524}525526ACPI_INFO((AE_INFO,527"Actual Package length (%u) is larger than NumElements field (%u), truncated\n",528i, element_count));529} else if (i < element_count) {530/*531* Arg list (elements) was exhausted, but we did not reach num_elements count.532* Note: this is not an error, the package is padded out with NULLs.533*/534ACPI_DEBUG_PRINT((ACPI_DB_INFO,535"Package List length (%u) smaller than NumElements count (%u), padded with null elements\n",536i, element_count));537}538539obj_desc->package.flags |= AOPOBJ_DATA_VALID;540op->common.node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_desc);541return_ACPI_STATUS(status);542}543544/*******************************************************************************545*546* FUNCTION: acpi_ds_create_node547*548* PARAMETERS: walk_state - Current walk state549* Node - NS Node to be initialized550* Op - Parser object to be translated551*552* RETURN: Status553*554* DESCRIPTION: Create the object to be associated with a namespace node555*556******************************************************************************/557558acpi_status559acpi_ds_create_node(struct acpi_walk_state *walk_state,560struct acpi_namespace_node *node,561union acpi_parse_object *op)562{563acpi_status status;564union acpi_operand_object *obj_desc;565566ACPI_FUNCTION_TRACE_PTR(ds_create_node, op);567568/*569* Because of the execution pass through the non-control-method570* parts of the table, we can arrive here twice. Only init571* the named object node the first time through572*/573if (acpi_ns_get_attached_object(node)) {574return_ACPI_STATUS(AE_OK);575}576577if (!op->common.value.arg) {578579/* No arguments, there is nothing to do */580581return_ACPI_STATUS(AE_OK);582}583584/* Build an internal object for the argument(s) */585586status = acpi_ds_build_internal_object(walk_state, op->common.value.arg,587&obj_desc);588if (ACPI_FAILURE(status)) {589return_ACPI_STATUS(status);590}591592/* Re-type the object according to its argument */593594node->type = obj_desc->common.type;595596/* Attach obj to node */597598status = acpi_ns_attach_object(node, obj_desc, node->type);599600/* Remove local reference to the object */601602acpi_ut_remove_reference(obj_desc);603return_ACPI_STATUS(status);604}605606#endif /* ACPI_NO_METHOD_EXECUTION */607608/*******************************************************************************609*610* FUNCTION: acpi_ds_init_object_from_op611*612* PARAMETERS: walk_state - Current walk state613* Op - Parser op used to init the internal object614* Opcode - AML opcode associated with the object615* ret_obj_desc - Namespace object to be initialized616*617* RETURN: Status618*619* DESCRIPTION: Initialize a namespace object from a parser Op and its620* associated arguments. The namespace object is a more compact621* representation of the Op and its arguments.622*623******************************************************************************/624625acpi_status626acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,627union acpi_parse_object *op,628u16 opcode,629union acpi_operand_object **ret_obj_desc)630{631const struct acpi_opcode_info *op_info;632union acpi_operand_object *obj_desc;633acpi_status status = AE_OK;634635ACPI_FUNCTION_TRACE(ds_init_object_from_op);636637obj_desc = *ret_obj_desc;638op_info = acpi_ps_get_opcode_info(opcode);639if (op_info->class == AML_CLASS_UNKNOWN) {640641/* Unknown opcode */642643return_ACPI_STATUS(AE_TYPE);644}645646/* Perform per-object initialization */647648switch (obj_desc->common.type) {649case ACPI_TYPE_BUFFER:650651/*652* Defer evaluation of Buffer term_arg operand653*/654obj_desc->buffer.node =655ACPI_CAST_PTR(struct acpi_namespace_node,656walk_state->operands[0]);657obj_desc->buffer.aml_start = op->named.data;658obj_desc->buffer.aml_length = op->named.length;659break;660661case ACPI_TYPE_PACKAGE:662663/*664* Defer evaluation of Package term_arg operand665*/666obj_desc->package.node =667ACPI_CAST_PTR(struct acpi_namespace_node,668walk_state->operands[0]);669obj_desc->package.aml_start = op->named.data;670obj_desc->package.aml_length = op->named.length;671break;672673case ACPI_TYPE_INTEGER:674675switch (op_info->type) {676case AML_TYPE_CONSTANT:677/*678* Resolve AML Constants here - AND ONLY HERE!679* All constants are integers.680* We mark the integer with a flag that indicates that it started681* life as a constant -- so that stores to constants will perform682* as expected (noop). zero_op is used as a placeholder for optional683* target operands.684*/685obj_desc->common.flags = AOPOBJ_AML_CONSTANT;686687switch (opcode) {688case AML_ZERO_OP:689690obj_desc->integer.value = 0;691break;692693case AML_ONE_OP:694695obj_desc->integer.value = 1;696break;697698case AML_ONES_OP:699700obj_desc->integer.value = ACPI_UINT64_MAX;701702/* Truncate value if we are executing from a 32-bit ACPI table */703704#ifndef ACPI_NO_METHOD_EXECUTION705acpi_ex_truncate_for32bit_table(obj_desc);706#endif707break;708709case AML_REVISION_OP:710711obj_desc->integer.value = ACPI_CA_VERSION;712break;713714default:715716ACPI_ERROR((AE_INFO,717"Unknown constant opcode 0x%X",718opcode));719status = AE_AML_OPERAND_TYPE;720break;721}722break;723724case AML_TYPE_LITERAL:725726obj_desc->integer.value = op->common.value.integer;727#ifndef ACPI_NO_METHOD_EXECUTION728acpi_ex_truncate_for32bit_table(obj_desc);729#endif730break;731732default:733ACPI_ERROR((AE_INFO, "Unknown Integer type 0x%X",734op_info->type));735status = AE_AML_OPERAND_TYPE;736break;737}738break;739740case ACPI_TYPE_STRING:741742obj_desc->string.pointer = op->common.value.string;743obj_desc->string.length =744(u32) ACPI_STRLEN(op->common.value.string);745746/*747* The string is contained in the ACPI table, don't ever try748* to delete it749*/750obj_desc->common.flags |= AOPOBJ_STATIC_POINTER;751break;752753case ACPI_TYPE_METHOD:754break;755756case ACPI_TYPE_LOCAL_REFERENCE:757758switch (op_info->type) {759case AML_TYPE_LOCAL_VARIABLE:760761/* Local ID (0-7) is (AML opcode - base AML_LOCAL_OP) */762763obj_desc->reference.value =764((u32)opcode) - AML_LOCAL_OP;765obj_desc->reference.class = ACPI_REFCLASS_LOCAL;766767#ifndef ACPI_NO_METHOD_EXECUTION768status =769acpi_ds_method_data_get_node(ACPI_REFCLASS_LOCAL,770obj_desc->reference.771value, walk_state,772ACPI_CAST_INDIRECT_PTR773(struct774acpi_namespace_node,775&obj_desc->reference.776object));777#endif778break;779780case AML_TYPE_METHOD_ARGUMENT:781782/* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */783784obj_desc->reference.value = ((u32)opcode) - AML_ARG_OP;785obj_desc->reference.class = ACPI_REFCLASS_ARG;786787#ifndef ACPI_NO_METHOD_EXECUTION788status = acpi_ds_method_data_get_node(ACPI_REFCLASS_ARG,789obj_desc->790reference.value,791walk_state,792ACPI_CAST_INDIRECT_PTR793(struct794acpi_namespace_node,795&obj_desc->796reference.797object));798#endif799break;800801default: /* Object name or Debug object */802803switch (op->common.aml_opcode) {804case AML_INT_NAMEPATH_OP:805806/* Node was saved in Op */807808obj_desc->reference.node = op->common.node;809obj_desc->reference.object =810op->common.node->object;811obj_desc->reference.class = ACPI_REFCLASS_NAME;812break;813814case AML_DEBUG_OP:815816obj_desc->reference.class = ACPI_REFCLASS_DEBUG;817break;818819default:820821ACPI_ERROR((AE_INFO,822"Unimplemented reference type for AML opcode: 0x%4.4X",823opcode));824return_ACPI_STATUS(AE_AML_OPERAND_TYPE);825}826break;827}828break;829830default:831832ACPI_ERROR((AE_INFO, "Unimplemented data type: 0x%X",833obj_desc->common.type));834835status = AE_AML_OPERAND_TYPE;836break;837}838839return_ACPI_STATUS(status);840}841842843