Changeset 108150 in vbox
- Timestamp:
- Feb 11, 2025 9:45:04 AM (10 days ago)
- svn:sync-xref-src-repo-rev:
- 167461
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/acpi.h
r108141 r108150 903 903 904 904 /** 905 * Returns the offset where the next resource added to the template would be. 906 * 907 * @returns Offset into the resource buffer where the next resource will be appended 908 * @retval UINT32_MAX if the handle is invalid or the resource is in an error state. 909 * @param hAcpiRes The ACPI resource handle. 910 */ 911 RTDECL(uint32_t) RTAcpiResourceGetOffset(RTACPIRES hAcpiRes); 912 913 914 /** 905 915 * Seals the given ACPI resource against further changes and adds any 906 916 * missing data required to complete the resource buffer. -
trunk/include/iprt/mangling.h
r108141 r108150 385 385 # define RTAcpiResourceCreate RT_MANGLER(RTAcpiResourceCreate) 386 386 # define RTAcpiResourceDestroy RT_MANGLER(RTAcpiResourceDestroy) 387 # define RTAcpiResourceGetOffset RT_MANGLER(RTAcpiResourceGetOffset) 387 388 # define RTAcpiResourceQueryBuffer RT_MANGLER(RTAcpiResourceQueryBuffer) 388 389 # define RTAcpiResourceReset RT_MANGLER(RTAcpiResourceReset) -
trunk/src/VBox/Runtime/Makefile.kmk
r108029 r108150 399 399 common/acpi/acpi-compiler.cpp \ 400 400 common/acpi/acpi-decompiler.cpp \ 401 common/acpi/acpi-ns.cpp \ 401 402 common/alloc/alloc.cpp \ 402 403 common/alloc/heapsimple.cpp \ -
trunk/src/VBox/Runtime/common/acpi/acpi-compiler.cpp
r108114 r108150 155 155 /** List of AST nodes for the DefinitionBlock() scope. */ 156 156 RTLISTANCHOR LstStmts; 157 /** The ACPI namespace. */ 158 PRTACPINSROOT pNs; 157 159 } RTACPIASLCU; 158 160 /** Pointer to an ACPI ASL compilation unit state. */ … … 907 909 908 910 RTACPIASL_PARSE_PUNCTUATOR(RTACPIASLTERMINAL_PUNCTUATOR_CLOSE_BRACKET, ')'); 911 912 int rc = rtAcpiNsAddEntryAstNode(pThis->pNs, pAstNd->aArgs[0].u.pszNameString, pAstNd, true /*fSwitchTo*/); 913 if (RT_FAILURE(rc)) 914 return RTErrInfoSetF(pThis->pErrInfo, rc, "Failed to add External(%s,,,) to namespace", pAstNd->aArgs[0].u.pszNameString); 915 909 916 return VINF_SUCCESS; 910 917 } … … 1003 1010 1004 1011 RTACPIASL_PARSE_PUNCTUATOR(RTACPIASLTERMINAL_PUNCTUATOR_CLOSE_BRACKET, ')'); 1012 1013 int rc = rtAcpiNsAddEntryAstNode(pThis->pNs, pAstNd->aArgs[0].u.pszNameString, pAstNd, true /*fSwitchTo*/); 1014 if (RT_FAILURE(rc)) 1015 return RTErrInfoSetF(pThis->pErrInfo, rc, "Failed to add Method(%s,,,) to namespace", pAstNd->aArgs[0].u.pszNameString); 1016 1005 1017 return VINF_SUCCESS; 1006 1018 } … … 1449 1461 /* kAcpiAstNodeOp_StringLiteral */ RTACPI_ASL_KEYWORD_DEFINE_INVALID, 1450 1462 /* kAcpiAstNodeOp_Number */ RTACPI_ASL_KEYWORD_DEFINE_INVALID, 1451 /* kAcpiAstNodeOp_Scope */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("Scope", RTACPI_AST_NODE_F_NEW_SCOPE ,kAcpiAstArgType_NameString),1463 /* kAcpiAstNodeOp_Scope */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("Scope", RTACPI_AST_NODE_F_NEW_SCOPE | RTACPI_AST_NODE_F_NS_ENTRY, kAcpiAstArgType_NameString), 1452 1464 /* kAcpiAstNodeOp_Processor */ { 1453 "Processor", NULL, 2, 2, RTACPI_AST_NODE_F_NEW_SCOPE ,1465 "Processor", NULL, 2, 2, RTACPI_AST_NODE_F_NEW_SCOPE | RTACPI_AST_NODE_F_NS_ENTRY, 1454 1466 { 1455 1467 kAcpiAstArgType_NameString, … … 1467 1479 /* kAcpiAstNodeOp_External */ RTACPI_ASL_KEYWORD_DEFINE_HANDLER( "External", rtAcpiTblAslParseExternal, 1, 2, RTACPI_AST_NODE_F_DEFAULT), 1468 1480 /* kAcpiAstNodeOp_Method */ RTACPI_ASL_KEYWORD_DEFINE_HANDLER( "Method", rtAcpiTblAslParseMethod, 1, 3, RTACPI_AST_NODE_F_NEW_SCOPE), 1469 /* kAcpiAstNodeOp_Device */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("Device", RTACPI_AST_NODE_F_NEW_SCOPE ,kAcpiAstArgType_NameString),1470 /* kAcpiAstNodeOp_If */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("If", RTACPI_AST_NODE_F_NEW_SCOPE, kAcpiAstArgType_AstNode),1481 /* kAcpiAstNodeOp_Device */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("Device", RTACPI_AST_NODE_F_NEW_SCOPE | RTACPI_AST_NODE_F_NS_ENTRY, kAcpiAstArgType_NameString), 1482 /* kAcpiAstNodeOp_If */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("If", RTACPI_AST_NODE_F_NEW_SCOPE, kAcpiAstArgType_AstNode), 1471 1483 /* kAcpiAstNodeOp_Else */ RTACPI_ASL_KEYWORD_DEFINE_0REQ_0OPT("Else", RTACPI_AST_NODE_F_NEW_SCOPE), 1472 /* kAcpiAstNodeOp_LAnd */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LAnd", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1473 /* kAcpiAstNodeOp_LEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1474 /* kAcpiAstNodeOp_LGreater */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LGreater", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1475 /* kAcpiAstNodeOp_LGreaterEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LGreaterEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1476 /* kAcpiAstNodeOp_LLess */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LLess", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1477 /* kAcpiAstNodeOp_LLessEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LLessEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1478 /* kAcpiAstNodeOp_LNot */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("LNot", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode),1479 /* kAcpiAstNodeOp_LNotEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LNotEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1484 /* kAcpiAstNodeOp_LAnd */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LAnd", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1485 /* kAcpiAstNodeOp_LEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1486 /* kAcpiAstNodeOp_LGreater */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LGreater", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1487 /* kAcpiAstNodeOp_LGreaterEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LGreaterEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1488 /* kAcpiAstNodeOp_LLess */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LLess", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1489 /* kAcpiAstNodeOp_LLessEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LLessEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1490 /* kAcpiAstNodeOp_LNot */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("LNot", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode), 1491 /* kAcpiAstNodeOp_LNotEqual */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("LNotEqual", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1480 1492 /* kAcpiAstNodeOp_Zero */ RTACPI_ASL_KEYWORD_DEFINE_0REQ_0OPT("Zero", RTACPI_AST_NODE_F_DEFAULT), 1481 1493 /* kAcpiAstNodeOp_One */ RTACPI_ASL_KEYWORD_DEFINE_0REQ_0OPT("One", RTACPI_AST_NODE_F_DEFAULT), 1482 1494 /* kAcpiAstNodeOp_Ones */ RTACPI_ASL_KEYWORD_DEFINE_0REQ_0OPT("Ones", RTACPI_AST_NODE_F_DEFAULT), 1483 1495 /* kAcpiAstNodeOp_Return */ RTACPI_ASL_KEYWORD_DEFINE_HANDLER( "Return", rtAcpiTblAslParseReturn, 0, 1, RTACPI_AST_NODE_F_DEFAULT), 1484 /* kAcpiAstNodeOp_Unicode */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("Unicode", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode), /* Actually only String allowed here */1485 /* kAcpiAstNodeOp_OperationRegion */ RTACPI_ASL_KEYWORD_DEFINE_4REQ_0OPT("OperationRegion", RTACPI_AST_NODE_F_DEFAULT ,kAcpiAstArgType_NameString, kAcpiAstArgType_RegionSpace, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode),1496 /* kAcpiAstNodeOp_Unicode */ RTACPI_ASL_KEYWORD_DEFINE_1REQ_0OPT("Unicode", RTACPI_AST_NODE_F_DEFAULT, kAcpiAstArgType_AstNode), /* Actually only String allowed here */ 1497 /* kAcpiAstNodeOp_OperationRegion */ RTACPI_ASL_KEYWORD_DEFINE_4REQ_0OPT("OperationRegion", RTACPI_AST_NODE_F_DEFAULT | RTACPI_AST_NODE_F_NS_ENTRY, kAcpiAstArgType_NameString, kAcpiAstArgType_RegionSpace, kAcpiAstArgType_AstNode, kAcpiAstArgType_AstNode), 1486 1498 /* kAcpiAstNodeOp_Field */ RTACPI_ASL_KEYWORD_DEFINE_HANDLER( "Field", rtAcpiTblAslParseFieldOrIndexField, 4, 0, RTACPI_AST_NODE_F_DEFAULT), 1487 /* kAcpiAstNodeOp_Name */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("Name", RTACPI_AST_NODE_F_ DEFAULT,kAcpiAstArgType_NameString, kAcpiAstArgType_AstNode),1499 /* kAcpiAstNodeOp_Name */ RTACPI_ASL_KEYWORD_DEFINE_2REQ_0OPT("Name", RTACPI_AST_NODE_F_NS_ENTRY, kAcpiAstArgType_NameString, kAcpiAstArgType_AstNode), 1488 1500 /* kAcpiAstNodeOp_ResourceTemplate */ RTACPI_ASL_KEYWORD_DEFINE_HANDLER( "ResourceTemplate", rtAcpiTblAslParseResourceTemplate, 0, 0, RTACPI_AST_NODE_F_DEFAULT), 1489 1501 /* kAcpiAstNodeOp_Arg0 */ RTACPI_ASL_KEYWORD_DEFINE_0REQ_0OPT("Arg0", RTACPI_AST_NODE_F_DEFAULT), … … 1714 1726 /* Now there must be a closing ) */ 1715 1727 RTACPIASL_PARSE_PUNCTUATOR(RTACPIASLTERMINAL_PUNCTUATOR_CLOSE_BRACKET, ')'); 1728 1729 if (pAslKeyword->fFlags & RTACPI_AST_NODE_F_NS_ENTRY) 1730 { 1731 /* 1732 * Create a new namespace entry, we currently assume that the first argument is a namestring 1733 * which gives the path. 1734 */ 1735 AssertReturn(pAstNd->aArgs[0].enmType == kAcpiAstArgType_NameString, VERR_NOT_SUPPORTED); 1736 1737 bool fSwitchTo = RT_BOOL(pAslKeyword->fFlags & RTACPI_AST_NODE_F_NEW_SCOPE); 1738 rc = rtAcpiNsAddEntryAstNode(pThis->pNs, pAstNd->aArgs[0].u.pszNameString, pAstNd, fSwitchTo); 1739 if (RT_FAILURE(rc)) 1740 return rc; 1741 } 1716 1742 } 1717 1743 … … 1723 1749 if (RT_SUCCESS(rc)) 1724 1750 RTACPIASL_PARSE_PUNCTUATOR(RTACPIASLTERMINAL_PUNCTUATOR_CLOSE_CURLY_BRACKET, '}'); 1751 1752 if (pAslKeyword->fFlags & RTACPI_AST_NODE_F_NS_ENTRY) 1753 rtAcpiNsPop(pThis->pNs); 1725 1754 } 1726 1755 … … 1950 1979 RTListInit(&pThis->LstStmts); 1951 1980 1952 rc = RTScriptLexCreateFromReader(&pThis->hLexSource, rtAcpiAslLexerRead,1953 NULL /*pfnDtor*/, pThis /*pvUser*/, 0 /*cchBuf*/,1954 NULL /*phStrCacheId*/, NULL /*phStrCacheStringLit*/,1955 &s_AslLexCfg);1956 if (RT_SUCCESS(rc))1957 {1958 rc = rtAcpiTblAslParserParse(pThis);1981 pThis->pNs = rtAcpiNsCreate(); 1982 if (pThis->pNs) 1983 { 1984 rc = RTScriptLexCreateFromReader(&pThis->hLexSource, rtAcpiAslLexerRead, 1985 NULL /*pfnDtor*/, pThis /*pvUser*/, 0 /*cchBuf*/, 1986 NULL /*phStrCacheId*/, NULL /*phStrCacheStringLit*/, 1987 &s_AslLexCfg); 1959 1988 if (RT_SUCCESS(rc)) 1960 1989 { 1961 /* 2. - Optimize AST (constant folding, etc). */ 1962 1963 /* 3. - Traverse AST and output table. */ 1964 PRTACPIASTNODE pIt; 1965 RTListForEach(&pThis->LstStmts, pIt, RTACPIASTNODE, NdAst) 1966 { 1967 rc = rtAcpiAstNodeTransform(pIt, pErrInfo); 1968 if (RT_FAILURE(rc)) 1969 break; 1970 1971 rc = rtAcpiAstDumpToTbl(pIt, pThis->hAcpiTbl); 1972 if (RT_FAILURE(rc)) 1973 break; 1974 } 1975 1976 /* Finalize and write to the VFS I/O stream. */ 1990 rc = rtAcpiTblAslParserParse(pThis); 1977 1991 if (RT_SUCCESS(rc)) 1978 1992 { 1979 rc = RTAcpiTblFinalize(pThis->hAcpiTbl); 1993 /* 2. - Optimize AST (constant folding, etc). */ 1994 1995 /* 3. - Traverse AST and output table. */ 1996 PRTACPIASTNODE pIt; 1997 RTListForEach(&pThis->LstStmts, pIt, RTACPIASTNODE, NdAst) 1998 { 1999 rc = rtAcpiAstNodeTransform(pIt, pErrInfo); 2000 if (RT_FAILURE(rc)) 2001 break; 2002 2003 rc = rtAcpiAstDumpToTbl(pIt, pThis->hAcpiTbl); 2004 if (RT_FAILURE(rc)) 2005 break; 2006 } 2007 2008 /* Finalize and write to the VFS I/O stream. */ 1980 2009 if (RT_SUCCESS(rc)) 1981 2010 { 1982 rc = RTAcpiTblDumpToVfsIoStrm(pThis->hAcpiTbl, RTACPITBLTYPE_AML, hVfsIosOut); 1983 if (RT_FAILURE(rc)) 1984 rc = RTErrInfoSetF(pErrInfo, rc, "Writing the ACPI table failed with %Rrc", rc); 2011 rc = RTAcpiTblFinalize(pThis->hAcpiTbl); 2012 if (RT_SUCCESS(rc)) 2013 { 2014 rc = RTAcpiTblDumpToVfsIoStrm(pThis->hAcpiTbl, RTACPITBLTYPE_AML, hVfsIosOut); 2015 if (RT_FAILURE(rc)) 2016 rc = RTErrInfoSetF(pErrInfo, rc, "Writing the ACPI table failed with %Rrc", rc); 2017 } 2018 else 2019 rc = RTErrInfoSetF(pErrInfo, rc, "Finalizing the ACPI table failed with %Rrc", rc); 1985 2020 } 1986 2021 else 1987 rc = RTErrInfoSetF(pErrInfo, rc, " Finalizing theACPI table failed with %Rrc", rc);2022 rc = RTErrInfoSetF(pErrInfo, rc, "Dumping AST to ACPI table failed with %Rrc", rc); 1988 2023 } 1989 else 1990 rc = RTErrInfoSetF(pErrInfo, rc, "Dumping AST to ACPI table failed with %Rrc", rc);2024 2025 RTScriptLexDestroy(pThis->hLexSource); 1991 2026 } 1992 1993 RTScriptLexDestroy(pThis->hLexSource); 2027 else 2028 rc = RTErrInfoSetF(pErrInfo, rc, "Creating the ASL lexer failed with %Rrc", rc); 2029 2030 /* Destroy the AST nodes. */ 2031 PRTACPIASTNODE pIt, pItNext; 2032 RTListForEachSafe(&pThis->LstStmts, pIt, pItNext, RTACPIASTNODE, NdAst) 2033 { 2034 RTListNodeRemove(&pIt->NdAst); 2035 rtAcpiAstNodeFree(pIt); 2036 } 2037 2038 rtAcpiNsDestroy(pThis->pNs); 1994 2039 } 1995 2040 else 1996 rc = RTErrInfoSetF(pErrInfo, rc, "Creating the ASL lexer failed with %Rrc", rc); 1997 1998 /* Destroy the AST nodes. */ 1999 PRTACPIASTNODE pIt, pItNext; 2000 RTListForEachSafe(&pThis->LstStmts, pIt, pItNext, RTACPIASTNODE, NdAst) 2001 { 2002 RTListNodeRemove(&pIt->NdAst); 2003 rtAcpiAstNodeFree(pIt); 2004 } 2041 rc = RTErrInfoSetF(pErrInfo, VERR_NO_MEMORY, "Out of memory allocating the ACPI namespace state"); 2005 2042 2006 2043 RTMemFree(pThis); -
trunk/src/VBox/Runtime/common/acpi/acpi.cpp
r108141 r108150 1616 1616 1617 1617 1618 RTDECL(uint32_t) RTAcpiResourceGetOffset(RTACPIRES hAcpiRes) 1619 { 1620 PRTACPIRESINT pThis = hAcpiRes; 1621 AssertReturn(pThis, UINT32_MAX); 1622 AssertRCReturn(pThis->rcErr, UINT32_MAX); 1623 1624 return pThis->offResBuf; 1625 } 1626 1627 1618 1628 RTDECL(int) RTAcpiResourceSeal(RTACPIRES hAcpiRes) 1619 1629 { -
trunk/src/VBox/Runtime/include/internal/acpi.h
r108095 r108150 220 220 /** The AST node opens a new scope. */ 221 221 #define RTACPI_AST_NODE_F_NEW_SCOPE RT_BIT_32(0) 222 /** The AST node has an associated namespace entry. */ 223 #define RTACPI_AST_NODE_F_NS_ENTRY RT_BIT_32(1) 224 225 226 /** Pointer to an ACPI namespace entry. */ 227 typedef struct RTACPINSENTRY *PRTACPINSENTRY; 228 229 230 /** 231 * An ACPI namespace entry. 232 */ 233 typedef struct RTACPINSENTRY 234 { 235 /** Node for the namespace list. */ 236 RTLISTNODE NdNs; 237 /** Pointer to the parent in the namespace, NULL if this is the root. */ 238 PRTACPINSENTRY pParent; 239 /** The name segment identifying the entry. */ 240 char achNameSeg[4]; 241 /** Flag whether the name space entry points to a node or just has some 242 * integer data attached. */ 243 bool fAstNode; 244 /** Type dependent data. */ 245 union 246 { 247 PCRTACPIASTNODE pAstNd; 248 uint64_t u64Val; 249 } u; 250 /** List of namespace entries below this entry. */ 251 RTLISTANCHOR LstNsEntries; 252 } RTACPINSENTRY; 253 /** Pointer to a const ACPI namespace entry. */ 254 typedef const RTACPINSENTRY *PCRTACPINSENTRY; 255 256 257 /** 258 * An ACPI namespace root 259 */ 260 typedef struct RTACPINSROOT 261 { 262 /** Root namespace entry. */ 263 RTACPINSENTRY RootEntry; 264 /** Current top of the stack. */ 265 uint8_t idxNsStack; 266 /** Stack of name space entries for navigation - 255 entries 267 * is enough because a path name can only be encoded with 255 entries. */ 268 PRTACPINSENTRY aNsStack[255]; 269 } RTACPINSROOT; 270 /** Pointer to an ACPI namespace root. */ 271 typedef RTACPINSROOT *PRTACPINSROOT; 272 /** Pointer to a const ACPI namespace root. */ 273 typedef const RTACPINSROOT *PCRTACPINSROOT; 222 274 223 275 … … 255 307 256 308 /** 309 * Creates a new namespace and returns the root. 310 * 311 * @returns Pointer to the namespace root or NULL if out of memory. 312 */ 313 DECLHIDDEN(PRTACPINSROOT) rtAcpiNsCreate(void); 314 315 316 /** 317 * Destroys the given namespace, freeing all allocated resources, 318 * including all namespace entries int it. 319 * 320 * @param pNsRoot The namespace root to destroy. 321 */ 322 DECLHIDDEN(void) rtAcpiNsDestroy(PRTACPINSROOT pNsRoot); 323 324 325 /** 326 * Adds a new namespace entry to the given name space - AST node variant. 327 * 328 * @returns IPRT status code. 329 * @param pNsRoot The namespace root to add the entry to. 330 * @param pszNameString An ACPI NameString (either segment or path). 331 * @param pAstNd The AST node to associate with the entry. 332 * @param fSwitchTo Flag whether to switch the current point for the namespace to this entry. 333 */ 334 DECLHIDDEN(int) rtAcpiNsAddEntryAstNode(PRTACPINSROOT pNsRoot, const char *pszNameString, PCRTACPIASTNODE pAstNd, bool fSwitchTo); 335 336 337 /** 338 * Adds a new namespace entry to the given name space - 64-bit value variant. 339 * 340 * @returns IPRT status code. 341 * @param pNsRoot The namespace root to add the entry to. 342 * @param pszNameString An ACPI NameString (either segment or path). 343 * @param u64Val The 64-bit value to associate with the entry. 344 * @param fSwitchTo Flag whether to switch the current point for the namespace to this entry. 345 */ 346 DECLHIDDEN(int) rtAcpiNsAddEntryU64(PRTACPINSROOT pNsRoot, const char *pszNameString, uint64_t u64Val, bool fSwitchTo); 347 348 349 /** 350 * Pops the current name space entry from the stack and returns to the previous one. 351 * 352 * @returns IPRT status code. 353 * @param pNsRoot The namespace root. 354 */ 355 DECLHIDDEN(int) rtAcpiNsPop(PRTACPINSROOT pNsRoot); 356 357 358 /** 359 * Looks up the given name string and returns the namespace entry if found. 360 * 361 * @returns Pointer to the namespace entry or NULL if not found. 362 * @param pNsRoot The namespace root. 363 * @param pszNameString The ACPI NameString (either segment or path) to lookup. 364 */ 365 DECLHIDDEN(PCRTACPINSENTRY) rtAcpiNsLookup(PRTACPINSROOT pNsRoot, const char *pszNameString); 366 367 368 /** 257 369 * Dumps the given AST node and everything it references to the given ACPI table. 258 370 *
Note:
See TracChangeset
for help on using the changeset viewer.