VirtualBox

source: vbox/trunk/include/iprt/acpi.h@ 108168

Last change on this file since 108168 was 108168, checked in by vboxsync, 3 months ago

Runtime/RTAcpi*: Continue with resource template parsing, bugref:10733

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 41.6 KB
Line 
1/** @file
2 * IPRT - Advanced Configuration and Power Interface (ACPI) Table generation API.
3 */
4
5/*
6 * Copyright (C) 2024 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.215389.xyz.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
24 * The contents of this file may alternatively be used under the terms
25 * of the Common Development and Distribution License Version 1.0
26 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
27 * in the VirtualBox distribution, in which case the provisions of the
28 * CDDL are applicable instead of those of the GPL.
29 *
30 * You may elect to license modified versions of this file under the
31 * terms and conditions of either the GPL or the CDDL or both.
32 *
33 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
34 */
35
36#ifndef IPRT_INCLUDED_acpi_h
37#define IPRT_INCLUDED_acpi_h
38#ifndef RT_WITHOUT_PRAGMA_ONCE
39# pragma once
40#endif
41
42#include <iprt/cdefs.h>
43#include <iprt/types.h>
44#include <iprt/vfs.h>
45
46#include <iprt/formats/acpi-tables.h>
47
48
49RT_C_DECLS_BEGIN
50
51/** @defgroup grp_rt_acpi RTAcpi - Advanced Configuration and Power Interface (ACPI) Table generation API.
52 * @ingroup grp_rt
53 * @{
54 */
55
56#ifdef IN_RING3
57
58/**
59 * ACPI table type.
60 */
61typedef enum RTACPITBLTYPE
62{
63 /** The invalid output type. */
64 RTACPITBLTYPE_INVALID = 0,
65 /** Type is an UTF-8 ASL source. */
66 RTACPITBLTYPE_ASL,
67 /** Type is the AML bytecode. */
68 RTACPITBLTYPE_AML,
69 /** Usual 32-bit hack. */
70 RTACPITBLTYPE_32BIT_HACK = 0x7fffffff
71} RTACPITBLTYPE;
72
73
74/**
75 * Regenerates the ACPI checksum for the given data.
76 *
77 * @returns The checksum for the given data.
78 * @param pvData The data to check sum.
79 * @param cbData Number of bytes to check sum.
80 */
81RTDECL(uint8_t) RTAcpiChecksumGenerate(const void *pvData, size_t cbData);
82
83
84/**
85 * Generates and writes the table header checksum for the given ACPI table.
86 *
87 * @param pTbl Pointer to the ACPI table to set the checksum for.
88 * @param cbTbl Size of the table in bytes, including the ACPI table header.
89 */
90RTDECL(void) RTAcpiTblHdrChecksumGenerate(PACPITBLHDR pTbl, size_t cbTbl);
91
92
93/**
94 * Creates an ACPI table from the given VFS file.
95 *
96 * @returns IPRT status code.
97 * @param phAcpiTbl Where to store the ACPI table handle on success.
98 * @param hVfsIos The VFS I/O stream handle to read the ACPI table from.
99 * @param enmInType The input type of the ACPI table.
100 * @param pErrInfo Where to return additional error information.
101 */
102RTDECL(int) RTAcpiTblCreateFromVfsIoStrm(PRTACPITBL phAcpiTbl, RTVFSIOSTREAM hVfsIos, RTACPITBLTYPE enmInType, PRTERRINFO pErrInfo);
103
104
105/**
106 * Converts a given ACPI table input stream to the given output type.
107 *
108 * @returns IPRT status code.
109 * @param hVfsIosOut The VFS I/O stream handle to output the result to.
110 * @param enmOutType The output type.
111 * @param hVfsIosIn The VFS I/O stream handle to read the ACPI table from.
112 * @param enmInType The input type of the ACPI table.
113 * @param pErrInfo Where to return additional error information.
114 */
115RTDECL(int) RTAcpiTblConvertFromVfsIoStrm(RTVFSIOSTREAM hVfsIosOut, RTACPITBLTYPE enmOutType,
116 RTVFSIOSTREAM hVfsIosIn, RTACPITBLTYPE enmInType, PRTERRINFO pErrInfo);
117
118
119/**
120 * Creates an ACPI table from the given filename.
121 *
122 * @returns IPRT status code.
123 * @param phAcpiTbl Where to store the ACPI table handle on success.
124 * @param pszFilename The filename to read the ACPI table from.
125 * @param enmInType The input type of the ACPI table.
126 * @param pErrInfo Where to return additional error information.
127 */
128RTDECL(int) RTAcpiTblCreateFromFile(PRTACPITBL phAcpiTbl, const char *pszFilename, RTACPITBLTYPE enmInType, PRTERRINFO pErrInfo);
129
130
131/**
132 * Creates a new empty ACPI table.
133 *
134 * @returns IPRT status code.
135 * @param phAcpiTbl Where to store the ACPI table handle on success.
136 * @param u32TblSig The signature of the table to use.
137 * @param bRevision The revision of the table.
138 * @param pszOemId The OEM supplied string identifiying the OEM, maximum of 6 characters.
139 * @param pszOemTblId The OEM supplied string identifiying the OEM table, maximum of 8 characters.
140 * @param u32OemRevision The OEM supplied revision number.
141 * @param pszCreatorId Vendor ID of the utility that created the table, maximum of 4 characters.
142 * @param u32CreatorRevision Revision of the utility that created the table.
143 */
144RTDECL(int) RTAcpiTblCreate(PRTACPITBL phAcpiTbl, uint32_t u32TblSig, uint8_t bRevision, const char *pszOemId,
145 const char *pszOemTblId, uint32_t u32OemRevision, const char *pszCreatorId,
146 uint32_t u32CreatorRevision);
147
148
149/**
150 * Destroys the given ACPI table, freeing all resources.
151 *
152 * @param hAcpiTbl The ACPI table handle to destroy.
153 */
154RTDECL(void) RTAcpiTblDestroy(RTACPITBL hAcpiTbl);
155
156
157/**
158 * Finalizes the given ACPI table, setting the header and generating checksums.
159 *
160 * @returns IPRT status code.
161 * @param hAcpiTbl The ACPI table handle to finalize.
162 *
163 * @note Nothing can be added to the table after this was called.
164 */
165RTDECL(int) RTAcpiTblFinalize(RTACPITBL hAcpiTbl);
166
167
168/**
169 * Returns the size of the given ACPI table.
170 *
171 * @returns Size of the given ACPI table in bytes, 0 on error.
172 * @param hAcpiTbl The ACPI table handle.
173 *
174 * @note This can only be called after RTAcpiTblFinalize() was called successfully.
175 */
176RTDECL(uint32_t) RTAcpiTblGetSize(RTACPITBL hAcpiTbl);
177
178
179/**
180 * Dumps the given ACPI table to the given VFS I/O stream.
181 *
182 * @returns IPRT status code.
183 * @param hAcpiTbl The ACPI table handle.
184 * @param enmOutType The output type.
185 * @param hVfsIos The VFS I/O stream handle to dump the table to.
186 */
187RTDECL(int) RTAcpiTblDumpToVfsIoStrm(RTACPITBL hAcpiTbl, RTACPITBLTYPE enmOutType, RTVFSIOSTREAM hVfsIos);
188
189
190/**
191 * Dumps the given ACPI table to the given file.
192 *
193 * @returns IPRT status code.
194 * @param hAcpiTbl The ACPI table handle.
195 * @param enmOutType The output type.
196 * @param pszFilename The file path to dump the table to.
197 */
198RTDECL(int) RTAcpiTblDumpToFile(RTACPITBL hAcpiTbl, RTACPITBLTYPE enmOutType, const char *pszFilename);
199
200
201/**
202 * Dumps the given ACPI table to a memory buffer allocated with RTMemAlloc() and returns the pointer
203 * to the allocated memory.
204 *
205 * @returns IPRT status code.
206 * @param hAcpiTbl The ACPI table handle.
207 * @param enmOutType The output type.
208 * @param ppbAcpiTbl Where to store the pointer to the ACPI table on success.
209 * @param pcbAcpiTbl Where to store the size of the ACPI table in bytes on success.
210 *
211 * @note The caller has to free the buffer with RTMemFree().
212 */
213RTDECL(int) RTAcpiTblDumpToBufferA(RTACPITBL hAcpiTbl, RTACPITBLTYPE enmOutType, uint8_t **ppbAcpiTbl, size_t *pcbAcpiTbl);
214
215
216/**
217 * Starts a new DefScope object.
218 *
219 * @returns IPRT status code.
220 * @param hAcpiTbl The ACPI table handle.
221 * @param pszName Name of the scope, can have a root (\) specifier optionally.
222 */
223RTDECL(int) RTAcpiTblScopeStart(RTACPITBL hAcpiTbl, const char *pszName);
224
225
226/**
227 * Finalizes the current scope object, nothing can be added to the scope afterwards.
228 *
229 * @returns IPRT status code.
230 * @param hAcpiTbl The ACPI table handle.
231 */
232RTDECL(int) RTAcpiTblScopeFinalize(RTACPITBL hAcpiTbl);
233
234
235/**
236 * Starts a new DefPackage object.
237 *
238 * @returns IPRT status code.
239 * @param hAcpiTbl The ACPI table handle.
240 * @param cElements Number of element which will be inside the package,
241 * only supports up to 255 elements, use DefVarPackage if more is required.
242 */
243RTDECL(int) RTAcpiTblPackageStart(RTACPITBL hAcpiTbl, uint8_t cElements);
244
245
246/**
247 * Finalizes the current DefPackage object, and return to the enclosing object's scope.
248 *
249 * @returns IPRT status code.
250 * @param hAcpiTbl The ACPI table handle.
251 */
252RTDECL(int) RTAcpiTblPackageFinalize(RTACPITBL hAcpiTbl);
253
254
255/**
256 * Starts a new device object for the given ACPI table in the current scope.
257 *
258 * @returns IPRT status code.
259 * @param hAcpiTbl The ACPI table handle.
260 * @param pszName Name of the device object, must be <= 4 characters long.
261 */
262RTDECL(int) RTAcpiTblDeviceStart(RTACPITBL hAcpiTbl, const char *pszName);
263
264
265/**
266 * Starts a new device object for the given ACPI table in the current scope.
267 *
268 * @returns IPRT status code.
269 * @param hAcpiTbl The ACPI table handle.
270 * @param pszNameFmt The name of the device as a format string.
271 * @param ... The format arguments.
272 */
273RTDECL(int) RTAcpiTblDeviceStartF(RTACPITBL hAcpiTbl, const char *pszNameFmt, ...) RT_IPRT_FORMAT_ATTR(2, 3);
274
275
276/**
277 * Starts a new device object for the given ACPI table in the current scope.
278 *
279 * @returns IPRT status code.
280 * @param hAcpiTbl The ACPI table handle.
281 * @param pszNameFmt The name of the device as a format string.
282 * @param va The format arguments.
283 */
284RTDECL(int) RTAcpiTblDeviceStartV(RTACPITBL hAcpiTbl, const char *pszNameFmt, va_list va) RT_IPRT_FORMAT_ATTR(2, 0);
285
286
287/**
288 * Finalizes the current scope object, nothing can be added to the scope afterwards.
289 *
290 * @returns IPRT status code.
291 * @param hAcpiTbl The ACPI table handle.
292 */
293RTDECL(int) RTAcpiTblDeviceFinalize(RTACPITBL hAcpiTbl);
294
295
296/**
297 * Starts a new processor object for the given ACPI table in the current scope.
298 *
299 * @returns IPRT status code.
300 * @param hAcpiTbl The ACPI table handle.
301 * @param pszName Name of the device object, must be <= 4 characters long.
302 * @param bProcId The processor ID.
303 * @param u32PBlkAddr Address of the processor register block.
304 * @param cbPBlk Size of the processor register block in bytes.
305 */
306RTDECL(int) RTAcpiTblProcessorStart(RTACPITBL hAcpiTbl, const char *pszName, uint8_t bProcId, uint32_t u32PBlkAddr,
307 uint8_t cbPBlk);
308
309
310/**
311 * Starts a new processor object for the given ACPI table in the current scope.
312 *
313 * @returns IPRT status code.
314 * @param hAcpiTbl The ACPI table handle.
315 * @param bProcId The processor ID.
316 * @param u32PBlkAddr Address of the processor register block.
317 * @param cbPBlk Size of the processor register block in bytes.
318 * @param pszNameFmt The name of the device as a format string.
319 * @param ... The format arguments.
320 */
321RTDECL(int) RTAcpiTblProcessorStartF(RTACPITBL hAcpiTbl, uint8_t bProcId, uint32_t u32PBlkAddr, uint8_t cbPBlk,
322 const char *pszNameFmt, ...) RT_IPRT_FORMAT_ATTR(5, 6);
323
324
325/**
326 * Starts a new processor object for the given ACPI table in the current scope.
327 *
328 * @returns IPRT status code.
329 * @param hAcpiTbl The ACPI table handle.
330 * @param bProcId The processor ID.
331 * @param u32PBlkAddr Address of the processor register block.
332 * @param cbPBlk Size of the processor register block in bytes.
333 * @param pszNameFmt The name of the device as a format string.
334 * @param va The format arguments.
335 */
336RTDECL(int) RTAcpiTblProcessorStartV(RTACPITBL hAcpiTbl, uint8_t bProcId, uint32_t u32PBlkAddr, uint8_t cbPBlk,
337 const char *pszNameFmt, va_list va) RT_IPRT_FORMAT_ATTR(5, 0);
338
339
340/**
341 * Finalizes the current scope object, nothing can be added to the scope afterwards.
342 *
343 * @returns IPRT status code.
344 * @param hAcpiTbl The ACPI table handle.
345 */
346RTDECL(int) RTAcpiTblProcessorFinalize(RTACPITBL hAcpiTbl);
347
348
349/**
350 * Starts a new method object for the given ACPI table in the current scope.
351 *
352 * @returns IPRT status code.
353 * @param hAcpiTbl The ACPI table handle.
354 * @param pszName The method name.
355 * @param fFlags AML method flags, see RTACPI_METHOD_F_XXX.
356 * @param cArgs Number of arguments this method takes.
357 * @param uSyncLvl The sync level.
358 */
359RTDECL(int) RTAcpiTblMethodStart(RTACPITBL hAcpiTbl, const char *pszName, uint8_t cArgs, uint32_t fFlags, uint8_t uSyncLvl);
360
361
362/** ACPI method is not serialized. */
363#define RTACPI_METHOD_F_NOT_SERIALIZED 0
364/** ACPI method call needs to be serialized in the ACPI interpreter. */
365#define RTACPI_METHOD_F_SERIALIZED RT_BIT_32(0)
366
367
368/**
369 * Finalizes the current method object, nothing can be added to the method afterwards.
370 *
371 * @returns IPRT status code.
372 * @param hAcpiTbl The ACPI table handle.
373 */
374RTDECL(int) RTAcpiTblMethodFinalize(RTACPITBL hAcpiTbl);
375
376
377/**
378 * Appends a new DefName object (only the NameOp NameString part, DataRefObject is left for the caller
379 * to append).
380 *
381 * @returns IPRT status code.
382 * @param hAcpiTbl The ACPI table handle.
383 * @param pszName The name to append.
384 */
385RTDECL(int) RTAcpiTblNameAppend(RTACPITBL hAcpiTbl, const char *pszName);
386
387
388/**
389 * Appends a new NullName object.
390 *
391 * @returns IPRT status code.
392 * @param hAcpiTbl The ACPI table handle.
393 */
394RTDECL(int) RTAcpiTblNullNameAppend(RTACPITBL hAcpiTbl);
395
396
397/**
398 * Appends a new NameString object.
399 *
400 * @returns IPRT status code.
401 * @param hAcpiTbl The ACPI table handle.
402 * @param pszName The name to append.
403 */
404RTDECL(int) RTAcpiTblNameStringAppend(RTACPITBL hAcpiTbl, const char *pszName);
405
406
407/**
408 * Appends a new String object - format string variant.
409 *
410 * @returns IPRT status code.
411 * @param hAcpiTbl The ACPI table handle.
412 * @param pszNameFmt The format string to build the name string from.
413 * @param ... Arguments for the format string.
414 */
415RTDECL(int) RTAcpiTblNameStringAppendF(RTACPITBL hAcpiTbl, const char *pszNameFmt, ...) RT_IPRT_FORMAT_ATTR(2, 3);
416
417
418/**
419 * Appends a new String object - format string variant.
420 *
421 * @returns IPRT status code.
422 * @param hAcpiTbl The ACPI table handle.
423 * @param pszNameFmt The format string to build the name string from.
424 * @param va The format arguments.
425 */
426RTDECL(int) RTAcpiTblNameStringAppendV(RTACPITBL hAcpiTbl, const char *pszNameFmt, va_list va) RT_IPRT_FORMAT_ATTR(2, 0);
427
428
429/**
430 * Appends a new String object.
431 *
432 * @returns IPRT status code.
433 * @param hAcpiTbl The ACPI table handle.
434 * @param psz The string to append.
435 */
436RTDECL(int) RTAcpiTblStringAppend(RTACPITBL hAcpiTbl, const char *psz);
437
438
439/**
440 * Appends a new String object - format string variant.
441 *
442 * @returns IPRT status code.
443 * @param hAcpiTbl The ACPI table handle.
444 * @param pszFmt The format string to build the string from.
445 * @param ... Arguments for the format string.
446 */
447RTDECL(int) RTAcpiTblStringAppendF(RTACPITBL hAcpiTbl, const char *pszFmt, ...) RT_IPRT_FORMAT_ATTR(2, 3);
448
449
450/**
451 * Appends a new String object - format string variant.
452 *
453 * @returns IPRT status code.
454 * @param hAcpiTbl The ACPI table handle.
455 * @param pszFmt The format string to build the string from.
456 * @param va The format arguments.
457 */
458RTDECL(int) RTAcpiTblStringAppendV(RTACPITBL hAcpiTbl, const char *pszFmt, va_list va) RT_IPRT_FORMAT_ATTR(2, 0);
459
460
461/**
462 * Appends a given UTF-8 string as UTF-16 using a buffer object (Unicode() equivalent).
463 *
464 * @returns IPRT status code.
465 * @param hAcpiTbl The ACPI table handle.
466 * @param psz The string to append.
467 */
468RTDECL(int) RTAcpiTblStringAppendAsUtf16(RTACPITBL hAcpiTbl, const char *psz);
469
470
471/**
472 * Appends a new integer object (depending on the value ZeroOp, OneOp,
473 * BytePrefix, WordPrefix, DWordPrefix or QWordPrefix is used).
474 *
475 * @returns IPRT status code.
476 * @param hAcpiTbl The ACPI table handle.
477 * @param u64 The 64-bit value to append.
478 */
479RTDECL(int) RTAcpiTblIntegerAppend(RTACPITBL hAcpiTbl, uint64_t u64);
480
481
482/**
483 * Appends a new DefBuffer object under the current scope.
484 *
485 * @returns IPRT status code.
486 * @param hAcpiTbl The ACPI table handle.
487 * @param pvBuf The buffer data.
488 * @param cbBuf Size of the buffer in bytes.
489 */
490RTDECL(int) RTAcpiTblBufferAppend(RTACPITBL hAcpiTbl, const void *pvBuf, size_t cbBuf);
491
492
493/**
494 * Appends the given resource as a DefBuffer under the current scope.
495 *
496 * @returns IPRT status code.
497 * @param hAcpiTbl The ACPI table handle.
498 * @param hAcpiRes The ACPI resource handle.
499 */
500RTDECL(int) RTAcpiTblResourceAppend(RTACPITBL hAcpiTbl, RTACPIRES hAcpiRes);
501
502
503/**
504 * List of statements.
505 */
506typedef enum RTACPISTMT
507{
508 /** Invalid statement. */
509 kAcpiStmt_Invalid = 0,
510 /** Return statement. */
511 kAcpiStmt_Return,
512 /** Breakpoint statement. */
513 kAcpiStmt_Breakpoint,
514 /** No operation statement. */
515 kAcpiStmt_Nop,
516 /** Break statement. */
517 kAcpiStmt_Break,
518 /** Continue statement. */
519 kAcpiStmt_Continue,
520 /** Add(Operand, Operand, Target) statement. */
521 kAcpiStmt_Add,
522 /** Subtract(Operand, Operand, Target) statement. */
523 kAcpiStmt_Subtract,
524 /** And(Operand, Operand, Target) statement. */
525 kAcpiStmt_And,
526 /** Nand(Operand, Operand, Target) statement. */
527 kAcpiStmt_Nand,
528 /** Or(Operand, Operand, Target) statement. */
529 kAcpiStmt_Or,
530 /** Xor(Operand, Operand, Target) statement. */
531 kAcpiStmt_Xor,
532 /** Not(Operand, Target) statement. */
533 kAcpiStmt_Not,
534 /** Store(TermArg, Supername) statement. */
535 kAcpiStmt_Store,
536 /** Index(BuffPkgStrObj, IndexValue, Target) statement. */
537 kAcpiStmt_Index,
538 /** DerefOf(ObjReference) statement. */
539 kAcpiStmt_DerefOf,
540 /** Store(SuperName, TermArg => Integer) statement. */
541 kAcpiStmt_Notify,
542 /** SizeOf(SuperName) statement. */
543 kAcpiStmt_SizeOf,
544 /** Increment(TermArg) statement. */
545 kAcpiStmt_Increment,
546 /** Decrement(TermArg) statement. */
547 kAcpiStmt_Decrement,
548 /** CondRefOf(TermArg, Target) statement. */
549 kAcpiStmt_CondRefOf
550} RTACPISTMT;
551
552
553/**
554 * Appends the given simple statement to the given ACPI table in the current scope.
555 *
556 * @returns IPRT status code.
557 * @param hAcpiTbl The ACPI table handle.
558 * @param enmStmt The statement to add.
559 */
560RTDECL(int) RTAcpiTblStmtSimpleAppend(RTACPITBL hAcpiTbl, RTACPISTMT enmStmt);
561
562
563/**
564 * Starts a new If statement operation.
565 *
566 * @returns IPRT status code.
567 * @param hAcpiTbl The ACPI table handle.
568 */
569RTDECL(int) RTAcpiTblIfStart(RTACPITBL hAcpiTbl);
570
571
572/**
573 * Finalizes the current If statement operation.
574 *
575 * @returns IPRT status code.
576 * @param hAcpiTbl The ACPI table handle.
577 */
578RTDECL(int) RTAcpiTblIfFinalize(RTACPITBL hAcpiTbl);
579
580
581/**
582 * Starts a new Else operation (only valid if currently inside an If oepration).
583 *
584 * @returns IPRT status code.
585 * @param hAcpiTbl The ACPI table handle.
586 */
587RTDECL(int) RTAcpiTblElseStart(RTACPITBL hAcpiTbl);
588
589
590/**
591 * Finalizes the current Else statement operation.
592 *
593 * @returns IPRT status code.
594 * @param hAcpiTbl The ACPI table handle.
595 */
596RTDECL(int) RTAcpiTblElseFinalize(RTACPITBL hAcpiTbl);
597
598
599/**
600 * Starts a new While statement operation.
601 *
602 * @returns IPRT status code.
603 * @param hAcpiTbl The ACPI table handle.
604 */
605RTDECL(int) RTAcpiTblWhileStart(RTACPITBL hAcpiTbl);
606
607
608/**
609 * Finalizes the current While statement operation.
610 *
611 * @returns IPRT status code.
612 * @param hAcpiTbl The ACPI table handle.
613 */
614RTDECL(int) RTAcpiTblWhileFinalize(RTACPITBL hAcpiTbl);
615
616
617/**
618 * List of binary operations.
619 */
620typedef enum RTACPIBINARYOP
621{
622 /** Invalid binary operation. */
623 kAcpiBinaryOp_Invalid = 0,
624 /** LAnd(Operand, Operand). */
625 kAcpiBinaryOp_LAnd,
626 /** LEqual(Operand, Operand). */
627 kAcpiBinaryOp_LEqual,
628 /** LGreater(Operand, Operand). */
629 kAcpiBinaryOp_LGreater,
630 /** LGreaterEqual(Operand, Operand). */
631 kAcpiBinaryOp_LGreaterEqual,
632 /** LLess(Operand, Operand). */
633 kAcpiBinaryOp_LLess,
634 /** LLessEqual(Operand, Operand). */
635 kAcpiBinaryOp_LLessEqual,
636 /** LNotEqual(Operand, Operand). */
637 kAcpiBinaryOp_LNotEqual
638} RTACPIBINARYOP;
639
640
641/**
642 * Appends the given binary operand.
643 *
644 * @returns IPRT status code.
645 * @param hAcpiTbl The ACPI table handle.
646 * @param enmBinaryOp The binary operation to append.
647 */
648RTDECL(int) RTAcpiTblBinaryOpAppend(RTACPITBL hAcpiTbl, RTACPIBINARYOP enmBinaryOp);
649
650
651/**
652 * Appends the given Arg<idArg> operand.
653 *
654 * @returns IPRT status code.
655 * @param hAcpiTbl The ACPI table handle.
656 * @param idArg The argument ID to append [0..6].
657 */
658RTDECL(int) RTAcpiTblArgOpAppend(RTACPITBL hAcpiTbl, uint8_t idArg);
659
660
661/**
662 * Appends the given Local<idLocal> operand.
663 *
664 * @returns IPRT status code.
665 * @param hAcpiTbl The ACPI table handle.
666 * @param idLocal The local ID to append [0..7].
667 */
668RTDECL(int) RTAcpiTblLocalOpAppend(RTACPITBL hAcpiTbl, uint8_t idLocal);
669
670
671/**
672 * Appends the given UUID as a buffer object.
673 *
674 * @returns IPRT status code.
675 * @param hAcpiTbl The ACPI table handle.
676 * @param pUuid The UUID to append.
677 */
678RTDECL(int) RTAcpiTblUuidAppend(RTACPITBL hAcpiTbl, PCRTUUID pUuid);
679
680
681/**
682 * Appends the given UUID string as a UUID buffer object.
683 *
684 * @returns IPRT status code.
685 * @param hAcpiTbl The ACPI table handle.
686 * @param pszUuid The UUID string to append as a buffer.
687 */
688RTDECL(int) RTAcpiTblUuidAppendFromStr(RTACPITBL hAcpiTbl, const char *pszUuid);
689
690
691/**
692 * Known operation region space types.
693 */
694typedef enum RTACPIOPREGIONSPACE
695{
696 /** Invalid region space type. */
697 kAcpiOperationRegionSpace_Invalid = 0,
698 /** Region is in system memory space. */
699 kAcpiOperationRegionSpace_SystemMemory,
700 /** Region is in system I/O space. */
701 kAcpiOperationRegionSpace_SystemIo,
702 /** Region is in PCI config space. */
703 kAcpiOperationRegionSpace_PciConfig,
704 /** Region is in embedded control space. */
705 kAcpiOperationRegionSpace_EmbeddedControl,
706 /** Region is in SMBUS space. */
707 kAcpiOperationRegionSpace_SmBus,
708 /** Region is in system CMOS space. */
709 kAcpiOperationRegionSpace_SystemCmos,
710 /** Region is a PCI bar target. */
711 kAcpiOperationRegionSpace_PciBarTarget,
712 /** Region is in IPMI space. */
713 kAcpiOperationRegionSpace_Ipmi,
714 /** Region is in GPIO space. */
715 kAcpiOperationRegionSpace_Gpio,
716 /** Region is in generic serial bus space. */
717 kAcpiOperationRegionSpace_GenericSerialBus,
718 /** Region is in platform communications channel (PCC) space. */
719 kAcpiOperationRegionSpace_Pcc,
720 /** 32bit hack. */
721 kAcpiOperationRegionSpace_32bit_Hack = 0x7fffffff
722} RTACPIOPREGIONSPACE;
723
724
725/**
726 * Appends a new OperationRegion() to the given ACPI table - extended version.
727 *
728 * @returns IPRT status code.
729 * @param hAcpiTbl The ACPI table handle.
730 * @param pszName The name of the operation region.
731 * @param enmSpace The operation region space type.
732 *
733 * @note This doesn't encode the region offset and size arguments but leaves it up to the caller
734 * to be able to encode complex stuff.
735 */
736RTDECL(int) RTAcpiTblOpRegionAppendEx(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOPREGIONSPACE enmSpace);
737
738
739/**
740 * Appends a new OperationRegion() to the given ACPI table.
741 *
742 * @returns IPRT status code.
743 * @param hAcpiTbl The ACPI table handle.
744 * @param pszName The name of the operation region.
745 * @param enmSpace The operation region space type.
746 * @param offRegion Offset of the region.
747 * @param cbRegion Size of the region in bytes.
748 */
749RTDECL(int) RTAcpiTblOpRegionAppend(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOPREGIONSPACE enmSpace,
750 uint64_t offRegion, uint64_t cbRegion);
751
752
753/**
754 * Field access type.
755 */
756typedef enum RTACPIFIELDACC
757{
758 /** Invalid access type. */
759 kAcpiFieldAcc_Invalid = 0,
760 /** Any access width is okay. */
761 kAcpiFieldAcc_Any,
762 /** Byte (8-bit) access. */
763 kAcpiFieldAcc_Byte,
764 /** Word (16-bit) access. */
765 kAcpiFieldAcc_Word,
766 /** Double word (32-bit) access. */
767 kAcpiFieldAcc_DWord,
768 /** Quad word (64-bit) access. */
769 kAcpiFieldAcc_QWord,
770 /** Buffer like access. */
771 kAcpiFieldAcc_Buffer
772} RTACPIFIELDACC;
773
774
775/**
776 * Field update rule.
777 */
778typedef enum RTACPIFIELDUPDATE
779{
780 /** Invalid upadte rule. */
781 kAcpiFieldUpdate_Invalid = 0,
782 /** Preserve content not being accessed. */
783 kAcpiFieldUpdate_Preserve,
784 /** Write as ones. */
785 kAcpiFieldUpdate_WriteAsOnes,
786 /** Write as zeroes. */
787 kAcpiFieldUpdate_WriteAsZeroes
788} RTACPIFIELDUPDATE;
789
790
791/**
792 * Field entry.
793 */
794typedef struct RTACPIFIELDENTRY
795{
796 /** The field name - NULL means the NullName. */
797 const char *pszName;
798 /** Number of bits of the field. */
799 uint64_t cBits;
800} RTACPIFIELDENTRY;
801/** Pointer to a field entry. */
802typedef RTACPIFIELDENTRY *PRTACPIFIELDENTRY;
803/** Pointer to a const field entry. */
804typedef const RTACPIFIELDENTRY *PCRTACPIFIELDENTRY;
805
806
807/**
808 * Appends a new field descriptor to the given ACPI table.
809 *
810 * @returns IPRT status code.
811 * @param hAcpiTbl The ACPI table handle.
812 * @param pszNameRef The region/buffer the field describes.
813 * @param enmAcc The access type,
814 * @param fLock Flag whether access must happen under a lock.
815 * @param enmUpdate The update rule.
816 * @param paFields Pointer to the field descriptors.
817 * @param cFields Number of entries in the array.
818 */
819RTDECL(int) RTAcpiTblFieldAppend(RTACPITBL hAcpiTbl, const char *pszNameRef, RTACPIFIELDACC enmAcc,
820 bool fLock, RTACPIFIELDUPDATE enmUpdate, PCRTACPIFIELDENTRY paFields,
821 uint32_t cFields);
822
823
824/**
825 * Object type.
826 */
827typedef enum RTACPIOBJTYPE
828{
829 /** Invalid object type. */
830 kAcpiObjType_Invalid = 0,
831 /** Unknown object - UnknownObj */
832 kAcpiObjType_Unknown,
833 /** Integer object - IntObj */
834 kAcpiObjType_Int,
835 /** String object - StrObj */
836 kAcpiObjType_Str,
837 /** Buffer object - BuffObj */
838 kAcpiObjType_Buff,
839 /** Package object - PkgObj */
840 kAcpiObjType_Pkg,
841 /** Field unit object - FieldUnitObj */
842 kAcpiObjType_FieldUnit,
843 /** Device object - DeviceObj */
844 kAcpiObjType_Device,
845 /** Event object - EventObj */
846 kAcpiObjType_Event,
847 /** Method object - MethodObj */
848 kAcpiObjType_Method,
849 /** Mutex object - MutexObj */
850 kAcpiObjType_MutexObj,
851 /** OpRegion object - OpRegionObj */
852 kAcpiObjType_OpRegion,
853 /** Power resource object - PowerResObj */
854 kAcpiObjType_PowerRes,
855 /** Thermal zone object - ThermalZoneObj */
856 kAcpiObjType_ThermalZone,
857 /** Buffer field object - BuffFieldObj */
858 kAcpiObjType_BuffField,
859 /** Processor object - ProcessorObj */
860 kAcpiObjType_Processor
861} RTACPIOBJTYPE;
862
863
864/**
865 * Appends a new External declaration to the given ACPI table.
866 *
867 * @returns IPRT status code.
868 * @param hAcpiTbl The ACPI table handle.
869 * @param pszName The name stirng of the external object.
870 * @param enmObjType The object type.
871 * @param cArgs Number of arguments for the object (mostly method), valid is [0..7].
872 */
873RTDECL(int) RTAcpiTblExternalAppend(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOBJTYPE enmObjType, uint8_t cArgs);
874
875
876/** @name ACPI resource builder related API.
877 * @{ */
878
879/**
880 * Creates a new empty resource template.
881 *
882 * @returns IPRT status code.
883 * @param phAcpiRes Where to store the handle to the ACPI resource on success.
884 */
885RTDECL(int) RTAcpiResourceCreate(PRTACPIRES phAcpiRes);
886
887
888/**
889 * Destroys the given ACPI resource, freeing all allocated resources.
890 *
891 * @param hAcpiRes The ACPI resource handle to destroy.
892 */
893RTDECL(void) RTAcpiResourceDestroy(RTACPIRES hAcpiRes);
894
895
896/**
897 * Resets the given ACPI resource handle to create a new empty template.
898 *
899 * @param hAcpiRes The ACPI resource handle.
900 */
901RTDECL(void) RTAcpiResourceReset(RTACPIRES hAcpiRes);
902
903
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 */
911RTDECL(uint32_t) RTAcpiResourceGetOffset(RTACPIRES hAcpiRes);
912
913
914/**
915 * Seals the given ACPI resource against further changes and adds any
916 * missing data required to complete the resource buffer.
917 *
918 * @returns IPRT status code.
919 * @param hAcpiRes The ACPI resource handle.
920 *
921 * @note After a call to this method completed successfully it is not possible
922 * to add new resources until RTAcpiResourceReset() was called.
923 */
924RTDECL(int) RTAcpiResourceSeal(RTACPIRES hAcpiRes);
925
926
927/**
928 * Queries the pointer to the buffer holding the encoded data.
929 *
930 * @returns IPRT status code.
931 * @param hAcpiRes The ACPI resource handle.
932 * @param ppvRes Where to store the pointer to the buffer holding the encoded resource template on success.
933 * @param pcbRes Where to store the size of the encoded data in bytes on success.
934 *
935 * @note The ACPI resource must be successfully sealed with RTAcpiResourceSeal() for this function to succeed.
936 * Also the buffer pointer will only be valid until a call to any other RTAcpiResource* method.
937 */
938RTDECL(int) RTAcpiResourceQueryBuffer(RTACPIRES hAcpiRes, const void **ppvRes, size_t *pcbRes);
939
940
941/**
942 * Adds a fixed memory range with the given start address and size to the given ACPI resource.
943 *
944 * @returns IPRT status code.
945 * @param hAcpiRes The ACPI resource handle.
946 * @param u32AddrBase The base address to encode.
947 * @param cbRange The range length in bytes to encode.
948 * @param fRw Flag whether this address range is read-write or read-only.
949 */
950RTDECL(int) RTAcpiResourceAdd32BitFixedMemoryRange(RTACPIRES hAcpiRes, uint32_t u32AddrBase, uint32_t cbRange,
951 bool fRw);
952
953
954/**
955 * Adds an extended interrupt descriptor with the given configuration to the given ACPI resource.
956 *
957 * @returns IPRT status code.
958 * @param hAcpiRes The ACPI resource handle.
959 * @param fConsumer Flag whether the entity this resource is assigned to consumes the interrupt (true) or produces it (false).
960 * @param fEdgeTriggered Flag whether the interrupt is edged (true) or level (false) triggered.
961 * @param fActiveLow Flag whether the interrupt polarity is active low (true) or active high (false).
962 * @param fShared Flag whether the interrupt is shared between different entities (true) or exclusive to the assigned entity (false).
963 * @param fWakeCapable Flag whether the interrupt can wake the system (true) or not (false).
964 * @param cIntrs Number of interrupts following.
965 * @param pau32Intrs Pointer to the array of interrupt numbers.
966 */
967RTDECL(int) RTAcpiResourceAddExtendedInterrupt(RTACPIRES hAcpiRes, bool fConsumer, bool fEdgeTriggered, bool fActiveLow, bool fShared,
968 bool fWakeCapable, uint8_t cIntrs, uint32_t *pau32Intrs);
969
970
971/** @name Generic address space flags.
972 * @{ */
973#define RTACPI_RESOURCE_ADDR_RANGE_F_DECODE_TYPE_SUB RT_BIT_32(0)
974#define RTACPI_RESOURCE_ADDR_RANGE_F_DECODE_TYPE_POS 0
975
976#define RTACPI_RESOURCE_ADDR_RANGE_F_MIN_ADDR_FIXED RT_BIT_32(1)
977#define RTACPI_RESOURCE_ADDR_RANGE_F_MIN_ADDR_CHANGEABLE 0
978
979#define RTACPI_RESOURCE_ADDR_RANGE_F_MAX_ADDR_FIXED RT_BIT_32(2)
980#define RTACPI_RESOURCE_ADDR_RANGE_F_MAX_ADDR_CHANGEABLE 0
981
982#define RTACPI_RESOURCE_ADDR_RANGE_F_VALID_MASK UINT32_C(0x00000007)
983/** @} */
984
985/**
986 * Memory range cacheability
987 */
988typedef enum RTACPIRESMEMRANGECACHEABILITY
989{
990 /** Usual invalid value. */
991 kAcpiResMemRangeCacheability_Invalid = 0,
992 /** Memory range is non cacheable (like MMIO, etc.). */
993 kAcpiResMemRangeCacheability_NonCacheable,
994 /** Memory is cacheable. */
995 kAcpiResMemRangeCacheability_Cacheable,
996 /** Memory is cacheable and supports write comining. */
997 kAcpiResMemRangeCacheability_CacheableWriteCombining,
998 /** Memory is cacheable and supports prefetching. */
999 kAcpiResMemRangeCacheability_CacheablePrefetchable,
1000 /** 32-bit blow up hack. */
1001 kAcpiResMemRangeCacheability_32BitHack = 0x7fffffff
1002} RTACPIRESMEMRANGECACHEABILITY;
1003
1004
1005/**
1006 * Memory attribute.
1007 */
1008typedef enum RTACPIRESMEMRANGETYPE
1009{
1010 /** Invalid memory range type. */
1011 kAcpiResMemType_Invalid = 0,
1012 /** Memory range is actual memory. */
1013 kAcpiResMemType_Memory,
1014 /** Memory range is reserved. */
1015 kAcpiResMemType_Reserved,
1016 /** Memory range is reserved to ACPI. */
1017 kAcpiResMemType_Acpi,
1018 /** Memory range is no volatile storage. */
1019 kAcpiResMemType_Nvs,
1020 /** 32-bit blow up hack. */
1021 kAcpiResMemType_32BitHack = 0x7fffffff
1022} RTACPIRESMEMRANGETYPE;
1023
1024
1025/**
1026 * Adds a quad word (64-bit) memory range to the given ACPI resource.
1027 *
1028 * @returns IPRT status code.
1029 * @param hAcpiRes The ACPI resource handle.
1030 * @param enmCacheability The cacheability of the memory range.
1031 * @param enmType Memory range type.
1032 * @param fRw Flag whether the memory range is read/write (true) or readonly (false).
1033 * @param fAddrSpace Additional address space flags (combination of RTACPI_RESOURCE_ADDR_RANGE_F_XXX).
1034 * @param u64AddrMin The start address of the memory range.
1035 * @param u64AddrMax Last valid address of the range.
1036 * @param u64OffTrans Translation offset being applied to the address (for a PCIe bridge or IOMMU for example).
1037 * @param u64Granularity The access granularity of the range in bytes.
1038 * @param u64Length Length of the memory range in bytes.
1039 */
1040RTDECL(int) RTAcpiResourceAddQWordMemoryRange(RTACPIRES hAcpiRes, RTACPIRESMEMRANGECACHEABILITY enmCacheability,
1041 RTACPIRESMEMRANGETYPE enmType, bool fRw, uint32_t fAddrSpace,
1042 uint64_t u64AddrMin, uint64_t u64AddrMax, uint64_t u64OffTrans,
1043 uint64_t u64Granularity, uint64_t u64Length);
1044
1045
1046/**
1047 * Adds a double word (32-bit) memory range to the given ACPI resource.
1048 *
1049 * @returns IPRT status code.
1050 * @param hAcpiRes The ACPI resource handle.
1051 * @param enmCacheability The cacheability of the memory range.
1052 * @param enmType Memory range type.
1053 * @param fRw Flag whether the memory range is read/write (true) or readonly (false).
1054 * @param fAddrSpace Additional address space flags (combination of RTACPI_RESOURCE_ADDR_RANGE_F_XXX).
1055 * @param u32AddrMin The start address of the memory range.
1056 * @param u32AddrMax Last valid address of the range.
1057 * @param u32OffTrans Translation offset being applied to the address (for a PCIe bridge or IOMMU for example).
1058 * @param u32Granularity The access granularity of the range in bytes.
1059 * @param u32Length Length of the memory range in bytes.
1060 */
1061RTDECL(int) RTAcpiResourceAddDWordMemoryRange(RTACPIRES hAcpiRes, RTACPIRESMEMRANGECACHEABILITY enmCacheability,
1062 RTACPIRESMEMRANGETYPE enmType, bool fRw, uint32_t fAddrSpace,
1063 uint32_t u32AddrMin, uint32_t u32AddrMax, uint32_t u32OffTrans,
1064 uint32_t u32Granularity, uint32_t u32Length);
1065
1066
1067/**
1068 * I/O range coverage.
1069 */
1070typedef enum RTACPIRESIORANGE
1071{
1072 /** Invalid range. */
1073 kAcpiResIoRange_Invalid = 0,
1074 /** Range covers only non ISA I/O ports. */
1075 kAcpiResIoRange_NonIsaOnly,
1076 /** Range covers only ISA I/O ports. */
1077 kAcpiResIoRange_IsaOnly,
1078 /** Range covers the whole I/O port range. */
1079 kAcpiResIoRange_Whole,
1080 /** 32-bit blow up hack. */
1081 kAcpiResIoRange_32BitHack = 0x7fffffff
1082} RTACPIRESIORANGE;
1083
1084
1085/**
1086 * I/O range type.
1087 */
1088typedef enum RTACPIRESIORANGETYPE
1089{
1090 /** Invalid value. */
1091 kAcpiResIoRangeType_Invalid = 0,
1092 /** Resource is I/O on the primary and secondary side of the bridge. */
1093 kAcpiResIoRangeType_Static,
1094 /** Resource is memory on the primary and I/O on the secondary side of the bridge,
1095 * primary side memory address for a given I/O port is calculated with
1096 * address = (((Port & 0xfffc) << 10) || (Port & 0xfff)) + AddrMin. */
1097 kAcpiResIoRangeType_Translation_Sparse,
1098 /** Resource is memory on the primary and I/O on the secondary side of the bridge,
1099 * primary side memory address for a given I/O port is calculated with
1100 * address = AddrMin + Port. */
1101 kAcpiResIoRangeType_Translation_Dense,
1102 /** 32-bit blowup hack. */
1103 kAcpiResIoRangeType_32BitHack = 0x7fffffff
1104} RTACPIRESIORANGETYPE;
1105
1106
1107/**
1108 * Adds a quad word (64-bit) I/O range to the given ACPI resource.
1109 *
1110 * @returns IPRT status code.
1111 * @param hAcpiRes The ACPI resource handle.
1112 * @param enmIoType The I/O range type.
1113 * @param enmIoRange The I/O range coverage.
1114 * @param fAddrSpace Additional address space flags (combination of RTACPI_RESOURCE_ADDR_RANGE_F_XXX).
1115 * @param u64AddrMin The start address of the memory range.
1116 * @param u64AddrMax Last valid address of the range.
1117 * @param u64OffTrans Translation offset being applied to the address (for a PCIe bridge or IOMMU for example).
1118 * @param u64Granularity The access granularity of the range in bytes.
1119 * @param u64Length Length of the memory range in bytes.
1120 */
1121RTDECL(int) RTAcpiResourceAddQWordIoRange(RTACPIRES hAcpiRes, RTACPIRESIORANGETYPE enmIoType, RTACPIRESIORANGE enmIoRange,
1122 uint32_t fAddrSpace, uint64_t u64AddrMin, uint64_t u64AddrMax, uint64_t u64OffTrans,
1123 uint64_t u64Granularity, uint64_t u64Length);
1124
1125
1126/**
1127 * Adds a word (16-bit) bus number to the given ACPI resource.
1128 *
1129 * @returns IPRT status code.
1130 * @param hAcpiRes The ACPI resource handle.
1131 * @param fAddrSpace Additional address space flags (combination of RTACPI_RESOURCE_ADDR_RANGE_F_XXX).
1132 * @param u16BusMin Starting bus number.
1133 * @param u16BusMax Last valid bus number.
1134 * @param u16OffTrans Translation offset being applied to the bus number.
1135 * @param u16Granularity The access granularity of the bus number.
1136 * @param u16Length Length of the bus range.
1137 */
1138RTDECL(int) RTAcpiResourceAddWordBusNumber(RTACPIRES hAcpiRes, uint32_t fAddrSpace, uint16_t u16BusMin, uint16_t u16BusMax,
1139 uint16_t u16OffTrans, uint16_t u16Granularity, uint16_t u16Length);
1140
1141
1142/**
1143 * I/O decode type.
1144 */
1145typedef enum RTACPIRESIODECODETYPE
1146{
1147 /** Invalid value. */
1148 kAcpiResIoDecodeType_Invalid = 0,
1149 /** 10-bit decoding. */
1150 kAcpiResIoDecodeType_Decode10,
1151 /** 16-bit decoding. */
1152 kAcpiResIoDecodeType_Decode16,
1153 /** 32-bit blowup hack. */
1154 kAcpiResIoDecodeType_32BitHack = 0x7fffffff
1155} RTACPIRESIODECODETYPE;
1156
1157
1158/**
1159 * Adds an I/O port descriptor to the given ACPI resource.
1160 *
1161 * @returns IPRT status code.
1162 * @param hAcpiRes The ACPI resource handle.
1163 * @param enmDecode The decoding type of the range.
1164 * @param u16AddrMin Minimum base I/O address the range might be configured for.
1165 * @param u16AddrMax Maximum base I/O address the range might be configured for.
1166 * @param u8AddrAlignment Alignment of the minimum base address.
1167 * @param u8RangeLength Number of contiguous I/O ports requested.
1168 */
1169RTDECL(int) RTAcpiResourceAddIo(RTACPIRES hAcpiRes, RTACPIRESIODECODETYPE enmDecode, uint16_t u16AddrMin, uint16_t u16AddrMax,
1170 uint8_t u8AddrAlignment, uint8_t u8RangeLength);
1171
1172
1173/**
1174 * Adds an IRQ descriptor with the given configuration to the given ACPI resource.
1175 *
1176 * @returns IPRT status code.
1177 * @param hAcpiRes The ACPI resource handle.
1178 * @param fEdgeTriggered Flag whether the interrupt is edged (true) or level (false) triggered.
1179 * @param fActiveLow Flag whether the interrupt polarity is active low (true) or active high (false).
1180 * @param fShared Flag whether the interrupt is shared between different entities (true) or exclusive to the assigned entity (false).
1181 * @param fWakeCapable Flag whether the interrupt can wake the system (true) or not (false).
1182 * @param bmIntrs Bitmap of interrupts (0..15) requested.
1183 */
1184RTDECL(int) RTAcpiResourceAddIrq(RTACPIRES hAcpiRes, bool fEdgeTriggered, bool fActiveLow, bool fShared,
1185 bool fWakeCapable, uint16_t bmIntrs);
1186
1187/** @} */
1188
1189#endif /* IN_RING3 */
1190
1191/** @} */
1192
1193RT_C_DECLS_END
1194
1195#endif /* !IPRT_INCLUDED_acpi_h */
1196
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette