ReactOS 0.4.15-dev-7918-g2a2556c
nsload.c File Reference
#include "acpi.h"
#include "accommon.h"
#include "acnamesp.h"
#include "acdispat.h"
#include "actables.h"
#include "acinterp.h"
Include dependency graph for nsload.c:

Go to the source code of this file.

Macros

#define _COMPONENT   ACPI_NAMESPACE
 

Functions

ACPI_STATUS AcpiNsLoadTable (UINT32 TableIndex, ACPI_NAMESPACE_NODE *Node)
 

Macro Definition Documentation

◆ _COMPONENT

#define _COMPONENT   ACPI_NAMESPACE

Definition at line 52 of file nsload.c.

Function Documentation

◆ AcpiNsLoadTable()

ACPI_STATUS AcpiNsLoadTable ( UINT32  TableIndex,
ACPI_NAMESPACE_NODE Node 
)

Definition at line 82 of file nsload.c.

85{
87
88
89 ACPI_FUNCTION_TRACE (NsLoadTable);
90
91
92 /* If table already loaded into namespace, just return */
93
94 if (AcpiTbIsTableLoaded (TableIndex))
95 {
97 goto Unlock;
98 }
99
101 "**** Loading table into namespace ****\n"));
102
103 Status = AcpiTbAllocateOwnerId (TableIndex);
104 if (ACPI_FAILURE (Status))
105 {
106 goto Unlock;
107 }
108
109 /*
110 * Parse the table and load the namespace with all named
111 * objects found within. Control methods are NOT parsed
112 * at this time. In fact, the control methods cannot be
113 * parsed until the entire namespace is loaded, because
114 * if a control method makes a forward reference (call)
115 * to another control method, we can't continue parsing
116 * because we don't know how many arguments to parse next!
117 */
118 Status = AcpiNsParseTable (TableIndex, Node);
119 if (ACPI_SUCCESS (Status))
120 {
121 AcpiTbSetTableLoadedFlag (TableIndex, TRUE);
122 }
123 else
124 {
125 /*
126 * On error, delete any namespace objects created by this table.
127 * We cannot initialize these objects, so delete them. There are
128 * a couple of especially bad cases:
129 * AE_ALREADY_EXISTS - namespace collision.
130 * AE_NOT_FOUND - the target of a Scope operator does not
131 * exist. This target of Scope must already exist in the
132 * namespace, as per the ACPI specification.
133 */
135 AcpiGbl_RootTableList.Tables[TableIndex].OwnerId);
136
137 AcpiTbReleaseOwnerId (TableIndex);
139 }
140
141Unlock:
142 if (ACPI_FAILURE (Status))
143 {
145 }
146
147 /*
148 * Now we can parse the control methods. We always parse
149 * them here for a sanity check, and if configured for
150 * just-in-time parsing, we delete the control method
151 * parse trees.
152 */
154 "**** Begin Table Object Initialization\n"));
155
157 Status = AcpiDsInitializeObjects (TableIndex, Node);
159
161 "**** Completed Table Object Initialization\n"));
162
164}
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define AE_ALREADY_EXISTS
Definition: acexcep.h:115
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
ACPI_STATUS AcpiNsParseTable(UINT32 TableIndex, ACPI_NAMESPACE_NODE *StartNode)
Definition: nsparse.c:307
void AcpiNsDeleteNamespaceByOwner(ACPI_OWNER_ID OwnerId)
Definition: nsalloc.c:497
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_DB_INFO
Definition: acoutput.h:153
void AcpiTbSetTableLoadedFlag(UINT32 TableIndex, BOOLEAN IsLoaded)
Definition: tbdata.c:1059
ACPI_STATUS AcpiTbAllocateOwnerId(UINT32 TableIndex)
Definition: tbdata.c:923
BOOLEAN AcpiTbIsTableLoaded(UINT32 TableIndex)
Definition: tbdata.c:1026
ACPI_STATUS AcpiTbReleaseOwnerId(UINT32 TableIndex)
Definition: tbdata.c:957
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define TRUE
Definition: types.h:120
ACPI_STATUS AcpiDsInitializeObjects(UINT32 TableIndex, ACPI_NAMESPACE_NODE *StartNode)
Definition: dsinit.c:204
void AcpiExExitInterpreter(void)
Definition: exutils.c:139
void AcpiExEnterInterpreter(void)
Definition: exutils.c:91
Status
Definition: gdiplustypes.h:25
@ Unlock
Definition: ntsecapi.h:294
Definition: dlist.c:348

Referenced by AcpiTbLoadNamespace(), and AcpiTbLoadTable().