VirtualBox

Changeset 107063 in vbox for trunk/include


Ignore:
Timestamp:
Nov 20, 2024 5:22:16 PM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166017
Message:

Runtime/RTAcpi*: Some updates to the ACPI code generation, bugref:10733

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/acpi.h

    r107036 r107063  
    445445
    446446
     447/**
     448 * Known operation region space types.
     449 */
     450typedef enum RTACPIOPREGIONSPACE
     451{
     452    /** Invalid region space type. */
     453    kAcpiOperationRegionSpace_Invalid = 0,
     454    /** Region is in system memory space. */
     455    kAcpiOperationRegionSpace_SystemMemory,
     456    /** Region is in system I/O space. */
     457    kAcpiOperationRegionSpace_SystemIo,
     458    /** Region is in PCI config space. */
     459    kAcpiOperationRegionSpace_PciConfig,
     460    /** Region is in embedded control space. */
     461    kAcpiOperationRegionSpace_EmbeddedControl,
     462    /** Region is in SMBUS space. */
     463    kAcpiOperationRegionSpace_SmBus,
     464    /** Region is in system CMOS space. */
     465    kAcpiOperationRegionSpace_SystemCmos,
     466    /** Region is a PCI bar target. */
     467    kAcpiOperationRegionSpace_PciBarTarget,
     468    /** Region is in IPMI space. */
     469    kAcpiOperationRegionSpace_Ipmi,
     470    /** Region is in GPIO space. */
     471    kAcpiOperationRegionSpace_Gpio,
     472    /** Region is in generic serial bus space. */
     473    kAcpiOperationRegionSpace_GenericSerialBus,
     474    /** Region is in platform communications channel (PCC) space. */
     475    kAcpiOperationRegionSpace_Pcc,
     476    /** 32bit hack. */
     477    kAcpiOperationRegionSpace_32bit_Hack = 0x7fffffff
     478} RTACPIOPREGIONSPACE;
     479
     480
     481/**
     482 * Appends a new OperationRegion() to the given ACPI table.
     483 *
     484 * @returns IPRT status code.
     485 * @param   hAcpiTbl            The ACPI table handle.
     486 * @param   pszName             The name of the operation region.
     487 * @param   enmSpace            The operation region space type.
     488 * @param   offRegion           Offset of the region.
     489 * @param   cbRegion            Size of the region in bytes.
     490 */
     491RTDECL(int) RTAcpiTblOpRegionAppend(RTACPITBL hAcpiTbl, const char *pszName, RTACPIOPREGIONSPACE enmSpace,
     492                                    uint64_t offRegion, uint64_t cbRegion);
     493
     494
     495/**
     496 * Field access type.
     497 */
     498typedef enum RTACPIFIELDACC
     499{
     500    /** Invalid access type. */
     501    kAcpiFieldAcc_Invalid = 0,
     502    /** Any access width is okay. */
     503    kAcpiFieldAcc_Any,
     504    /** Byte (8-bit) access. */
     505    kAcpiFieldAcc_Byte,
     506    /** Word (16-bit) access. */
     507    kAcpiFieldAcc_Word,
     508    /** Double word (32-bit) access. */
     509    kAcpiFieldAcc_DWord,
     510    /** Quad word (64-bit) access. */
     511    kAcpiFieldAcc_QWord,
     512    /** Buffer like access. */
     513    kAcpiFieldAcc_Buffer
     514} RTACPIFIELDACC;
     515
     516
     517/**
     518 * Field update rule.
     519 */
     520typedef enum RTACPIFIELDUPDATE
     521{
     522    /** Invalid upadte rule. */
     523    kAcpiFieldUpdate_Invalid = 0,
     524    /** Preserve content not being accessed. */
     525    kAcpiFieldUpdate_Preserve,
     526    /** Write as ones. */
     527    kAcpiFieldUpdate_WriteAsOnes,
     528    /** Write as zeroes. */
     529    kAcpiFieldUpdate_WriteAsZeroes
     530} RTACPIFIELDUPDATE;
     531
     532
     533/**
     534 * Field entry.
     535 */
     536typedef struct RTACPIFIELDENTRY
     537{
     538    /** The field name. */
     539    const char              *pszName;
     540    /** Number of bits of the field. */
     541    uint64_t                cBits;
     542} RTACPIFIELDENTRY;
     543/** Pointer to a field entry. */
     544typedef RTACPIFIELDENTRY *PRTACPIFIELDENTRY;
     545/** Pointer to a const field entry. */
     546typedef const RTACPIFIELDENTRY *PCRTACPIFIELDENTRY;
     547
     548
     549/**
     550 * Appends a new field descriptor to the given ACPI table.
     551 *
     552 * @returns IPRT status code.
     553 * @param   hAcpiTbl            The ACPI table handle.
     554 * @param   pszNameRef          The region/buffer the field describes.
     555 * @param   enmAcc              The access type,
     556 * @param   fLock               Flag whether access must happen under a lock.
     557 * @param   enmUpdate           The update rule.
     558 * @param   paFields            Pointer to the field descriptors.
     559 * @param   cFields             Number of entries in the array.
     560 */
     561RTDECL(int) RTAcpiTblFieldAppend(RTACPITBL hAcpiTbl, const char *pszNameRef, RTACPIFIELDACC enmAcc,
     562                                 bool fLock, RTACPIFIELDUPDATE enmUpdate, PCRTACPIFIELDENTRY paFields,
     563                                 uint32_t cFields);
     564
     565
     566
    447567/** @name ACPI resource builder related API.
    448568 * @{ */
  • trunk/include/iprt/mangling.h

    r107036 r107063  
    401401# define RTAcpiTblElseFinalize                          RT_MANGLER(RTAcpiTblElseFinalize)
    402402# define RTAcpiTblElseStart                             RT_MANGLER(RTAcpiTblElseStart)
     403# define RTAcpiTblFieldAppend                           RT_MANGLER(RTAcpiTblFieldAppend)
    403404# define RTAcpiTblFinalize                              RT_MANGLER(RTAcpiTblFinalize)
    404405# define RTAcpiTblGetSize                               RT_MANGLER(RTAcpiTblGetSize)
     
    411412# define RTAcpiTblMethodFinalize                        RT_MANGLER(RTAcpiTblMethodFinalize)
    412413# define RTAcpiTblNameAppend                            RT_MANGLER(RTAcpiTblNameAppend)
     414# define RTAcpiTblOpRegionAppend                        RT_MANGLER(RTAcpiTblOpRegionAppend)
    413415# define RTAcpiTblPackageStart                          RT_MANGLER(RTAcpiTblPackageStart)
    414416# define RTAcpiTblPackageFinalize                       RT_MANGLER(RTAcpiTblPackageFinalize)
Note: See TracChangeset for help on using the changeset viewer.

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