Path: blob/main/sys/contrib/dev/acpica/components/executer/exconfig.c
48521 views
/******************************************************************************1*2* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)3*4*****************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY8586* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY87* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A88* PARTICULAR PURPOSE.89*90* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES91* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR92* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,93* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY94* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL95* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS96* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY97* LIMITED REMEDY.98*99* 4.3. Licensee shall not export, either directly or indirectly, any of this100* software or system incorporating such software without first obtaining any101* required license or other approval from the U. S. Department of Commerce or102* any other agency or department of the United States Government. In the103* event Licensee exports any such software from the United States or104* re-exports any such software from a foreign destination, Licensee shall105* ensure that the distribution and export/re-export of the software is in106* compliance with all laws, regulations, orders, or other restrictions of the107* U.S. Export Administration Regulations. Licensee agrees that neither it nor108* any of its subsidiaries will export/re-export any technical data, process,109* software, or service, directly or indirectly, to any country for which the110* United States government or any agency thereof requires an export license,111* other governmental approval, or letter of assurance, without first obtaining112* such license, approval or letter.113*114*****************************************************************************115*116* Alternatively, you may choose to be licensed under the terms of the117* following license:118*119* Redistribution and use in source and binary forms, with or without120* modification, are permitted provided that the following conditions121* are met:122* 1. Redistributions of source code must retain the above copyright123* notice, this list of conditions, and the following disclaimer,124* without modification.125* 2. Redistributions in binary form must reproduce at minimum a disclaimer126* substantially similar to the "NO WARRANTY" disclaimer below127* ("Disclaimer") and any redistribution must be conditioned upon128* including a substantially similar Disclaimer requirement for further129* binary redistribution.130* 3. Neither the names of the above-listed copyright holders nor the names131* of any contributors may be used to endorse or promote products derived132* from this software without specific prior written permission.133*134* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS135* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT136* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR137* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT138* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,139* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT140* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,141* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY142* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT143* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE144* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.145*146* Alternatively, you may choose to be licensed under the terms of the147* GNU General Public License ("GPL") version 2 as published by the Free148* Software Foundation.149*150*****************************************************************************/151152#include <contrib/dev/acpica/include/acpi.h>153#include <contrib/dev/acpica/include/accommon.h>154#include <contrib/dev/acpica/include/acinterp.h>155#include <contrib/dev/acpica/include/acnamesp.h>156#include <contrib/dev/acpica/include/actables.h>157#include <contrib/dev/acpica/include/acdispat.h>158#include <contrib/dev/acpica/include/acevents.h>159#include <contrib/dev/acpica/include/amlcode.h>160161162#define _COMPONENT ACPI_EXECUTER163ACPI_MODULE_NAME ("exconfig")164165/* Local prototypes */166167static ACPI_STATUS168AcpiExAddTable (169UINT32 TableIndex,170ACPI_OPERAND_OBJECT **DdbHandle);171172static ACPI_STATUS173AcpiExRegionRead (174ACPI_OPERAND_OBJECT *ObjDesc,175UINT32 Length,176UINT8 *Buffer);177178179/*******************************************************************************180*181* FUNCTION: AcpiExAddTable182*183* PARAMETERS: Table - Pointer to raw table184* ParentNode - Where to load the table (scope)185* DdbHandle - Where to return the table handle.186*187* RETURN: Status188*189* DESCRIPTION: Common function to Install and Load an ACPI table with a190* returned table handle.191*192******************************************************************************/193194static ACPI_STATUS195AcpiExAddTable (196UINT32 TableIndex,197ACPI_OPERAND_OBJECT **DdbHandle)198{199ACPI_OPERAND_OBJECT *ObjDesc;200201202ACPI_FUNCTION_TRACE (ExAddTable);203204205/* Create an object to be the table handle */206207ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_REFERENCE);208if (!ObjDesc)209{210return_ACPI_STATUS (AE_NO_MEMORY);211}212213/* Init the table handle */214215ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID;216ObjDesc->Reference.Class = ACPI_REFCLASS_TABLE;217ObjDesc->Reference.Value = TableIndex;218*DdbHandle = ObjDesc;219return_ACPI_STATUS (AE_OK);220}221222223/*******************************************************************************224*225* FUNCTION: AcpiExLoadTableOp226*227* PARAMETERS: WalkState - Current state with operands228* ReturnDesc - Where to store the return object229*230* RETURN: Status231*232* DESCRIPTION: Load an ACPI table from the RSDT/XSDT233*234******************************************************************************/235236ACPI_STATUS237AcpiExLoadTableOp (238ACPI_WALK_STATE *WalkState,239ACPI_OPERAND_OBJECT **ReturnDesc)240{241ACPI_STATUS Status;242ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];243ACPI_NAMESPACE_NODE *ParentNode;244ACPI_NAMESPACE_NODE *StartNode;245ACPI_NAMESPACE_NODE *ParameterNode = NULL;246ACPI_OPERAND_OBJECT *ReturnObj;247ACPI_OPERAND_OBJECT *DdbHandle;248UINT32 TableIndex;249250251ACPI_FUNCTION_TRACE (ExLoadTableOp);252253254/* Create the return object */255256ReturnObj = AcpiUtCreateIntegerObject ((UINT64) 0);257if (!ReturnObj)258{259return_ACPI_STATUS (AE_NO_MEMORY);260}261262*ReturnDesc = ReturnObj;263264/* Find the ACPI table in the RSDT/XSDT */265266AcpiExExitInterpreter ();267Status = AcpiTbFindTable (268Operand[0]->String.Pointer,269Operand[1]->String.Pointer,270Operand[2]->String.Pointer, &TableIndex);271AcpiExEnterInterpreter ();272if (ACPI_FAILURE (Status))273{274if (Status != AE_NOT_FOUND)275{276return_ACPI_STATUS (Status);277}278279/* Table not found, return an Integer=0 and AE_OK */280281return_ACPI_STATUS (AE_OK);282}283284/* Default nodes */285286StartNode = WalkState->ScopeInfo->Scope.Node;287ParentNode = AcpiGbl_RootNode;288289/* RootPath (optional parameter) */290291if (Operand[3]->String.Length > 0)292{293/*294* Find the node referenced by the RootPathString. This is the295* location within the namespace where the table will be loaded.296*/297Status = AcpiNsGetNodeUnlocked (StartNode,298Operand[3]->String.Pointer, ACPI_NS_SEARCH_PARENT,299&ParentNode);300if (ACPI_FAILURE (Status))301{302return_ACPI_STATUS (Status);303}304}305306/* ParameterPath (optional parameter) */307308if (Operand[4]->String.Length > 0)309{310if ((Operand[4]->String.Pointer[0] != AML_ROOT_PREFIX) &&311(Operand[4]->String.Pointer[0] != AML_PARENT_PREFIX))312{313/*314* Path is not absolute, so it will be relative to the node315* referenced by the RootPathString (or the NS root if omitted)316*/317StartNode = ParentNode;318}319320/* Find the node referenced by the ParameterPathString */321322Status = AcpiNsGetNodeUnlocked (StartNode,323Operand[4]->String.Pointer, ACPI_NS_SEARCH_PARENT,324&ParameterNode);325if (ACPI_FAILURE (Status))326{327return_ACPI_STATUS (Status);328}329}330331/* Load the table into the namespace */332333ACPI_INFO (("Dynamic OEM Table Load:"));334AcpiExExitInterpreter ();335Status = AcpiTbLoadTable (TableIndex, ParentNode);336AcpiExEnterInterpreter ();337if (ACPI_FAILURE (Status))338{339return_ACPI_STATUS (Status);340}341342Status = AcpiExAddTable (TableIndex, &DdbHandle);343if (ACPI_FAILURE (Status))344{345return_ACPI_STATUS (Status);346}347348/* Complete the initialization/resolution of new objects */349350AcpiExExitInterpreter();351AcpiNsInitializeObjects();352AcpiExEnterInterpreter();353354/* Parameter Data (optional) */355356if (ParameterNode)357{358/* Store the parameter data into the optional parameter object */359360Status = AcpiExStore (Operand[5],361ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, ParameterNode), WalkState);362if (ACPI_FAILURE (Status))363{364(void) AcpiExUnloadTable (DdbHandle);365366AcpiUtRemoveReference (DdbHandle);367return_ACPI_STATUS (Status);368}369}370371/* Remove the reference to DdbHandle created by AcpiExAddTable above */372373AcpiUtRemoveReference (DdbHandle);374375/* Return -1 (non-zero) indicates success */376377ReturnObj->Integer.Value = 0xFFFFFFFFFFFFFFFF;378return_ACPI_STATUS (Status);379}380381382/*******************************************************************************383*384* FUNCTION: AcpiExRegionRead385*386* PARAMETERS: ObjDesc - Region descriptor387* Length - Number of bytes to read388* Buffer - Pointer to where to put the data389*390* RETURN: Status391*392* DESCRIPTION: Read data from an operation region. The read starts from the393* beginning of the region.394*395******************************************************************************/396397static ACPI_STATUS398AcpiExRegionRead (399ACPI_OPERAND_OBJECT *ObjDesc,400UINT32 Length,401UINT8 *Buffer)402{403ACPI_STATUS Status;404UINT64 Value;405UINT32 RegionOffset = 0;406UINT32 i;407408409/* Bytewise reads */410411for (i = 0; i < Length; i++)412{413Status = AcpiEvAddressSpaceDispatch (ObjDesc, NULL, ACPI_READ,414RegionOffset, 8, &Value);415if (ACPI_FAILURE (Status))416{417return (Status);418}419420*Buffer = (UINT8) Value;421Buffer++;422RegionOffset++;423}424425return (AE_OK);426}427428429/*******************************************************************************430*431* FUNCTION: AcpiExLoadOp432*433* PARAMETERS: ObjDesc - Region or Buffer/Field where the table will be434* obtained435* Target - Where the status of the load will be stored436* WalkState - Current state437*438* RETURN: Status439*440* DESCRIPTION: Load an ACPI table from a field or operation region441*442* NOTE: Region Fields (Field, BankField, IndexFields) are resolved to buffer443* objects before this code is reached.444*445* If source is an operation region, it must refer to SystemMemory, as446* per the ACPI specification.447*448******************************************************************************/449450ACPI_STATUS451AcpiExLoadOp (452ACPI_OPERAND_OBJECT *ObjDesc,453ACPI_OPERAND_OBJECT *Target,454ACPI_WALK_STATE *WalkState)455{456ACPI_OPERAND_OBJECT *DdbHandle;457ACPI_TABLE_HEADER *TableHeader;458ACPI_TABLE_HEADER *Table;459UINT32 TableIndex;460ACPI_STATUS Status;461UINT32 Length;462463464ACPI_FUNCTION_TRACE (ExLoadOp);465466467if (Target->Common.DescriptorType == ACPI_DESC_TYPE_NAMED)468{469Target = AcpiNsGetAttachedObject (ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Target));470}471if (Target->Common.Type != ACPI_TYPE_INTEGER)472{473ACPI_ERROR ((AE_INFO, "Type not integer: %X", Target->Common.Type));474return_ACPI_STATUS (AE_AML_OPERAND_TYPE);475}476477Target->Integer.Value = 0;478479/* Source Object can be either an OpRegion or a Buffer/Field */480481switch (ObjDesc->Common.Type)482{483case ACPI_TYPE_REGION:484485ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,486"Load table from Region %p\n", ObjDesc));487488/* Region must be SystemMemory (from ACPI spec) */489490if (ObjDesc->Region.SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY)491{492return_ACPI_STATUS (AE_AML_OPERAND_TYPE);493}494495/*496* If the Region Address and Length have not been previously497* evaluated, evaluate them now and save the results.498*/499if (!(ObjDesc->Common.Flags & AOPOBJ_DATA_VALID))500{501Status = AcpiDsGetRegionArguments (ObjDesc);502if (ACPI_FAILURE (Status))503{504return_ACPI_STATUS (Status);505}506}507508/* Get the table header first so we can get the table length */509510TableHeader = ACPI_ALLOCATE (sizeof (ACPI_TABLE_HEADER));511if (!TableHeader)512{513return_ACPI_STATUS (AE_NO_MEMORY);514}515516Status = AcpiExRegionRead (ObjDesc, sizeof (ACPI_TABLE_HEADER),517ACPI_CAST_PTR (UINT8, TableHeader));518Length = TableHeader->Length;519ACPI_FREE (TableHeader);520521if (ACPI_FAILURE (Status))522{523return_ACPI_STATUS (Status);524}525526/* Must have at least an ACPI table header */527528if (Length < sizeof (ACPI_TABLE_HEADER))529{530return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);531}532533/*534* The original implementation simply mapped the table, with no copy.535* However, the memory region is not guaranteed to remain stable and536* we must copy the table to a local buffer. For example, the memory537* region is corrupted after suspend on some machines. Dynamically538* loaded tables are usually small, so this overhead is minimal.539*540* The latest implementation (5/2009) does not use a mapping at all.541* We use the low-level operation region interface to read the table542* instead of the obvious optimization of using a direct mapping.543* This maintains a consistent use of operation regions across the544* entire subsystem. This is important if additional processing must545* be performed in the (possibly user-installed) operation region546* handler. For example, AcpiExec and ASLTS depend on this.547*/548549/* Allocate a buffer for the table */550551Table = ACPI_ALLOCATE (Length);552if (!Table)553{554return_ACPI_STATUS (AE_NO_MEMORY);555}556557/* Read the entire table */558559Status = AcpiExRegionRead (ObjDesc, Length,560ACPI_CAST_PTR (UINT8, Table));561if (ACPI_FAILURE (Status))562{563ACPI_FREE (Table);564return_ACPI_STATUS (Status);565}566break;567568case ACPI_TYPE_BUFFER: /* Buffer or resolved RegionField */569570ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,571"Load table from Buffer or Field %p\n", ObjDesc));572573/* Must have at least an ACPI table header */574575if (ObjDesc->Buffer.Length < sizeof (ACPI_TABLE_HEADER))576{577return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);578}579580/* Get the actual table length from the table header */581582TableHeader = ACPI_CAST_PTR (583ACPI_TABLE_HEADER, ObjDesc->Buffer.Pointer);584Length = TableHeader->Length;585586/* Table cannot extend beyond the buffer */587588if (Length > ObjDesc->Buffer.Length)589{590return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);591}592if (Length < sizeof (ACPI_TABLE_HEADER))593{594return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);595}596597/*598* Copy the table from the buffer because the buffer could be599* modified or even deleted in the future600*/601Table = ACPI_ALLOCATE (Length);602if (!Table)603{604return_ACPI_STATUS (AE_NO_MEMORY);605}606607memcpy (Table, TableHeader, Length);608break;609610default:611612return_ACPI_STATUS (AE_AML_OPERAND_TYPE);613}614615/* Install the new table into the local data structures */616617ACPI_INFO (("Dynamic OEM Table Load:"));618AcpiExExitInterpreter ();619Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),620ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table, TRUE, &TableIndex);621AcpiExEnterInterpreter ();622if (ACPI_FAILURE (Status))623{624/* Delete allocated table buffer */625626ACPI_FREE (Table);627return_ACPI_STATUS (Status);628}629630/*631* Add the table to the namespace.632*633* Note: Load the table objects relative to the root of the namespace.634* This appears to go against the ACPI specification, but we do it for635* compatibility with other ACPI implementations.636*/637Status = AcpiExAddTable (TableIndex, &DdbHandle);638if (ACPI_FAILURE (Status))639{640return_ACPI_STATUS (Status);641}642643/* Complete the initialization/resolution of new objects */644645AcpiExExitInterpreter ();646AcpiNsInitializeObjects ();647AcpiExEnterInterpreter ();648649/* Remove the reference to DdbHandle created by AcpiExAddTable above */650651AcpiUtRemoveReference (DdbHandle);652653/* Return -1 (non-zero) indicates success */654655Target->Integer.Value = 0xFFFFFFFFFFFFFFFF;656return_ACPI_STATUS (Status);657}658659660/*******************************************************************************661*662* FUNCTION: AcpiExUnloadTable663*664* PARAMETERS: DdbHandle - Handle to a previously loaded table665*666* RETURN: Status667*668* DESCRIPTION: Unload an ACPI table669*670******************************************************************************/671672ACPI_STATUS673AcpiExUnloadTable (674ACPI_OPERAND_OBJECT *DdbHandle)675{676ACPI_STATUS Status = AE_OK;677ACPI_OPERAND_OBJECT *TableDesc = DdbHandle;678UINT32 TableIndex;679680681ACPI_FUNCTION_TRACE (ExUnloadTable);682683684/*685* Temporarily emit a warning so that the ASL for the machine can be686* hopefully obtained. This is to say that the Unload() operator is687* extremely rare if not completely unused.688*/689ACPI_WARNING ((AE_INFO,690"Received request to unload an ACPI table"));691692/*693* May 2018: Unload is no longer supported for the following reasons:694* 1) A correct implementation on some hosts may not be possible.695* 2) Other ACPI implementations do not correctly/fully support it.696* 3) It requires host device driver support which does not exist.697* (To properly support namespace unload out from underneath.)698* 4) This AML operator has never been seen in the field.699*/700ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,701"AML Unload operator is not supported"));702703/*704* Validate the handle705* Although the handle is partially validated in AcpiExReconfiguration()706* when it calls AcpiExResolveOperands(), the handle is more completely707* validated here.708*709* Handle must be a valid operand object of type reference. Also, the710* DdbHandle must still be marked valid (table has not been previously711* unloaded)712*/713if ((!DdbHandle) ||714(ACPI_GET_DESCRIPTOR_TYPE (DdbHandle) != ACPI_DESC_TYPE_OPERAND) ||715(DdbHandle->Common.Type != ACPI_TYPE_LOCAL_REFERENCE) ||716(!(DdbHandle->Common.Flags & AOPOBJ_DATA_VALID)))717{718return_ACPI_STATUS (AE_AML_OPERAND_TYPE);719}720721/* Get the table index from the DdbHandle */722723TableIndex = TableDesc->Reference.Value;724725/*726* Release the interpreter lock so that the table lock won't have727* strict order requirement against it.728*/729AcpiExExitInterpreter ();730Status = AcpiTbUnloadTable (TableIndex);731AcpiExEnterInterpreter ();732733/*734* Invalidate the handle. We do this because the handle may be stored735* in a named object and may not be actually deleted until much later.736*/737if (ACPI_SUCCESS (Status))738{739DdbHandle->Common.Flags &= ~AOPOBJ_DATA_VALID;740}741return_ACPI_STATUS (Status);742}743744745