Changeset 107064 in vbox
- Timestamp:
- Nov 20, 2024 8:21:23 PM (2 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/acpi.h
r107063 r107064 261 261 */ 262 262 RTDECL(int) RTAcpiTblNameAppend(RTACPITBL hAcpiTbl, const char *pszName); 263 264 265 /** 266 * Appends a new NullName object. 267 * 268 * @returns IPRT status code. 269 * @param hAcpiTbl The ACPI table handle. 270 */ 271 RTDECL(int) RTAcpiTblNullNameAppend(RTACPITBL hAcpiTbl); 272 273 274 /** 275 * Appends a new NameString object. 276 * 277 * @returns IPRT status code. 278 * @param hAcpiTbl The ACPI table handle. 279 * @param pszName The name to append. 280 */ 281 RTDECL(int) RTAcpiTblNameStringAppend(RTACPITBL hAcpiTbl, const char *pszName); 263 282 264 283 … … 321 340 kAcpiStmt_Break, 322 341 /** Continue statement. */ 323 kAcpiStmt_Continue 342 kAcpiStmt_Continue, 343 /** Add(Operand, Operand, Target) statement. */ 344 kAcpiStmt_Add, 345 /** Subtract(Operand, Operand, Target) statement. */ 346 kAcpiStmt_Subtract, 347 /** And(Operand, Operand, Target) statement. */ 348 kAcpiStmt_And, 349 /** Nand(Operand, Operand, Target) statement. */ 350 kAcpiStmt_Nand, 351 /** Or(Operand, Operand, Target) statement. */ 352 kAcpiStmt_Or, 353 /** Xor(Operand, Operand, Target) statement. */ 354 kAcpiStmt_Xor, 355 /** Not(Operand, Target) statement. */ 356 kAcpiStmt_Not, 357 /** Store(TermArg, Supername) statement. */ 358 kAcpiStmt_Store, 359 /** Index(BuffPkgStrObj, IndexValue, Target) statement. */ 360 kAcpiStmt_Index, 361 /** DerefOf(ObjReference) statement. */ 362 kAcpiStmt_DerefOf 324 363 } RTACPISTMT; 325 364 … … 480 519 481 520 /** 521 * Appends a new OperationRegion() to the given ACPI table - extended version. 522 * 523 * @returns IPRT status code. 524 * @param hAcpiTbl The ACPI table handle. 525 * @param pszName The name of the operation region. 526 * @param enmSpace The operation region space type. 527 * 528 * @note This doesn't encode the region offset and size arguments but leaves it up to the caller 529 * to be able to encode complex stuff. 530 */ 531 RTDECL(int) RTAcpiTblOpRegionAppendEx(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOPREGIONSPACE enmSpace); 532 533 534 /** 482 535 * Appends a new OperationRegion() to the given ACPI table. 483 536 * -
trunk/include/iprt/mangling.h
r107063 r107064 412 412 # define RTAcpiTblMethodFinalize RT_MANGLER(RTAcpiTblMethodFinalize) 413 413 # define RTAcpiTblNameAppend RT_MANGLER(RTAcpiTblNameAppend) 414 # define RTAcpiTblNameStringAppend RT_MANGLER(RTAcpiTblNameStringAppend) 415 # define RTAcpiTblNullNameAppend RT_MANGLER(RTAcpiTblNullNameAppend) 414 416 # define RTAcpiTblOpRegionAppend RT_MANGLER(RTAcpiTblOpRegionAppend) 417 # define RTAcpiTblOpRegionAppendEx RT_MANGLER(RTAcpiTblOpRegionAppendEx) 415 418 # define RTAcpiTblPackageStart RT_MANGLER(RTAcpiTblPackageStart) 416 419 # define RTAcpiTblPackageFinalize RT_MANGLER(RTAcpiTblPackageFinalize) -
trunk/src/VBox/Runtime/common/misc/acpi.cpp
r107063 r107064 750 750 751 751 752 RTDECL(int) RTAcpiTblNullNameAppend(RTACPITBL hAcpiTbl) 753 { 754 PRTACPITBLINT pThis = hAcpiTbl; 755 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 756 757 rtAcpiTblAppendByte(pThis, 0x00); 758 return pThis->rcErr; 759 } 760 761 762 RTDECL(int) RTAcpiTblNameStringAppend(RTACPITBL hAcpiTbl, const char *pszName) 763 { 764 PRTACPITBLINT pThis = hAcpiTbl; 765 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 766 767 rtAcpiTblAppendNameString(pThis, pszName); 768 return pThis->rcErr; 769 } 770 771 752 772 RTDECL(int) RTAcpiTblStringAppend(RTACPITBL hAcpiTbl, const char *psz) 753 773 { … … 849 869 case kAcpiStmt_Break: bOp = ACPI_AML_BYTE_CODE_OP_BREAK; break; 850 870 case kAcpiStmt_Continue: bOp = ACPI_AML_BYTE_CODE_OP_CONTINUE; break; 871 case kAcpiStmt_Add: bOp = ACPI_AML_BYTE_CODE_OP_ADD; break; 872 case kAcpiStmt_Subtract: bOp = ACPI_AML_BYTE_CODE_OP_SUBTRACT; break; 873 case kAcpiStmt_And: bOp = ACPI_AML_BYTE_CODE_OP_AND; break; 874 case kAcpiStmt_Nand: bOp = ACPI_AML_BYTE_CODE_OP_NAND; break; 875 case kAcpiStmt_Or: bOp = ACPI_AML_BYTE_CODE_OP_OR; break; 876 case kAcpiStmt_Xor: bOp = ACPI_AML_BYTE_CODE_OP_XOR; break; 877 case kAcpiStmt_Not: bOp = ACPI_AML_BYTE_CODE_OP_NOT; break; 878 case kAcpiStmt_Store: bOp = ACPI_AML_BYTE_CODE_OP_STORE; break; 879 case kAcpiStmt_Index: bOp = ACPI_AML_BYTE_CODE_OP_INDEX; break; 880 case kAcpiStmt_DerefOf: bOp = ACPI_AML_BYTE_CODE_OP_DEREF_OF; break; 851 881 default: 852 882 AssertFailedReturn(VERR_INVALID_PARAMETER); … … 977 1007 978 1008 979 RTDECL(int) RTAcpiTblOpRegionAppend(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOPREGIONSPACE enmSpace, 980 uint64_t offRegion, uint64_t cbRegion) 1009 RTDECL(int) RTAcpiTblOpRegionAppendEx(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOPREGIONSPACE enmSpace) 981 1010 { 982 1011 PRTACPITBLINT pThis = hAcpiTbl; … … 1006 1035 } 1007 1036 rtAcpiTblAppendByte(pThis, bRegionSpace); 1037 return pThis->rcErr; 1038 } 1039 1040 1041 RTDECL(int) RTAcpiTblOpRegionAppend(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOPREGIONSPACE enmSpace, 1042 uint64_t offRegion, uint64_t cbRegion) 1043 { 1044 PRTACPITBLINT pThis = hAcpiTbl; 1045 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 1046 1047 int rc = RTAcpiTblOpRegionAppendEx(pThis, pszName, enmSpace); 1048 if (RT_FAILURE(rc)) 1049 return rc; 1050 1008 1051 RTAcpiTblIntegerAppend(pThis, offRegion); 1009 1052 RTAcpiTblIntegerAppend(pThis, cbRegion);
Note:
See TracChangeset
for help on using the changeset viewer.