VirtualBox

Changeset 103457 in vbox


Ignore:
Timestamp:
Feb 19, 2024 3:51:24 PM (11 months ago)
Author:
vboxsync
Message:

HGSMI: Some symbol visibility cleanup, bugref:3409

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r100690 r103457  
    727727#endif
    728728
    729 /* @return host-guest flags that were set on reset
    730  * this allows the caller to make further cleaning when needed,
    731  * e.g. reset the IRQ */
    732 uint32_t HGSMIReset(PHGSMIINSTANCE pIns);
    733 
    734729# ifdef VBOX_WITH_VIDEOHWACCEL
    735730DECLCALLBACK(int) vbvaR3VHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface,
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp

    r99775 r103457  
    290290 * @thread EMT
    291291 */
    292 void HGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)
     292DECLHIDDEN(void) HGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)
    293293{
    294294    HGSMIBufferProcess(&pIns->area, &pIns->channelInfo, offBuffer);
     
    332332
    333333/* Called from HGSMI_IO_GUEST read handler. */
    334 HGSMIOFFSET HGSMIGuestRead(PHGSMIINSTANCE pIns)
     334DECLHIDDEN(HGSMIOFFSET) HGSMIGuestRead(PHGSMIINSTANCE pIns)
    335335{
    336336    LogFlowFunc(("pIns %p\n", pIns));
     
    407407 * @thread EMT
    408408 */
    409 void HGSMIHostWrite(HGSMIINSTANCE *pIns, HGSMIOFFSET offBuffer)
     409DECLHIDDEN(void) HGSMIHostWrite(HGSMIINSTANCE *pIns, HGSMIOFFSET offBuffer)
    410410{
    411411    LogFlowFunc(("pIns %p offBuffer 0x%x\n", pIns, offBuffer));
     
    421421 * @thread EMT
    422422 */
    423 HGSMIOFFSET HGSMIHostRead(HGSMIINSTANCE *pIns)
     423DECLHIDDEN(HGSMIOFFSET) HGSMIHostRead(HGSMIINSTANCE *pIns)
    424424{
    425425    LogFlowFunc(("pIns %p\n", pIns));
     
    476476}
    477477
    478 void HGSMISetHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags)
     478DECLHIDDEN(void) HGSMISetHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags)
    479479{
    480480    AssertPtrReturnVoid(pIns->pHGFlags);
     
    482482}
    483483
    484 uint32_t HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns)
     484DECLHIDDEN(uint32_t) HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns)
    485485{
    486486    return pIns->pHGFlags ? ASMAtomicReadU32(&pIns->pHGFlags->u32HostFlags) : 0;
    487487}
    488488
    489 void HGSMIClearHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags)
     489DECLHIDDEN(void) HGSMIClearHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags)
    490490{
    491491    AssertPtrReturnVoid(pIns->pHGFlags);
     
    829829 * @param u16ChannelInfo Command parameter.
    830830 */
    831 int HGSMIHostCommandAlloc(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData,
    832                           uint8_t u8Channel, uint16_t u16ChannelInfo)
     831DECLHIDDEN(int) HGSMIHostCommandAlloc(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData,
     832                                      uint8_t u8Channel, uint16_t u16ChannelInfo)
    833833{
    834834    LogFlowFunc(("pIns = %p, cbData = %d, u8Channel %d, u16ChannelInfo 0x%04X\n",
     
    867867 *               the command could be posted without raising an irq.
    868868 */
    869 int HGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq)
     869DECLHIDDEN(int) HGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq)
    870870{
    871871    LogFlowFunc(("pIns = %p, pvData = %p, fDoIrq = %d\n", pIns, pvData, fDoIrq));
     
    891891 * @param pvData The pointer returned by 'HGSMIHostCommandAlloc'.
    892892 */
    893 int HGSMIHostCommandFree(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData)
     893DECLHIDDEN(int) HGSMIHostCommandFree(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData)
    894894{
    895895    LogFlowFunc(("pIns = %p, pvData = %p\n", pIns, pvData));
     
    928928};
    929929
    930 int HGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap)
     930DECLHIDDEN(int) HGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap)
    931931{
    932932    LogFlowFunc(("pIns %p, offHeap 0x%08X, cbHeap = 0x%08X\n", pIns, offHeap, cbHeap));
     
    11791179}
    11801180
    1181 int HGSMIHostSaveStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM)
     1181
     1182DECLHIDDEN(int) HGSMIHostSaveStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM)
    11821183{
    11831184    VBOXHGSMI_SAVE_START(pSSM);
     
    12221223}
    12231224
    1224 int HGSMIHostLoadStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version)
     1225
     1226DECLHIDDEN(int) HGSMIHostLoadStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version)
    12251227{
    12261228    if (u32Version < VGA_SAVEDSTATE_VERSION_HGSMI)
     
    13341336/* Register a new HGSMI channel by a predefined index.
    13351337 */
    1336 int HGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel,
    1337                              PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler)
     1338DECLHIDDEN(int) HGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel,
     1339                                         PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler)
    13381340{
    13391341    LogFlowFunc(("pIns %p, u8Channel %x, pfnChannelHandler %p, pvChannelHandler %p\n",
     
    14221424#endif
    14231425
    1424 void RT_UNTRUSTED_VOLATILE_GUEST *HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)
     1426DECLHIDDEN(void RT_UNTRUSTED_VOLATILE_GUEST *) HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)
    14251427{
    14261428    const HGSMIAREA  *pArea   = &pIns->area;
     
    14331435
    14341436
    1435 HGSMIOFFSET HGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv)
     1437DECLHIDDEN(HGSMIOFFSET) HGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv)
    14361438{
    14371439    const HGSMIAREA *pArea   = &pIns->area;
     
    14531455 * @param   offBuffer   The buffer offset to check.
    14541456 */
    1455 bool HGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)
     1457DECLHIDDEN(bool) HGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)
    14561458{
    14571459    return pIns
     
    14631465 * Returns the area offset for use in logging and assertion messages.
    14641466 */
    1465 HGSMIOFFSET HGSMIGetAreaOffset(PHGSMIINSTANCE pIns)
     1467DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaOffset(PHGSMIINSTANCE pIns)
    14661468{
    14671469    return pIns ? pIns->area.offBase : ~(HGSMIOFFSET)0;
     
    14721474 * Returns the area size for use in logging and assertion messages.
    14731475 */
    1474 HGSMIOFFSET HGSMIGetAreaSize(PHGSMIINSTANCE pIns)
     1476DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaSize(PHGSMIINSTANCE pIns)
    14751477{
    14761478    return pIns ? pIns->area.cbArea : 0;
     
    14781480
    14791481
    1480 void *HGSMIContext(PHGSMIINSTANCE pIns)
     1482DECLHIDDEN(void *) HGSMIContext(PHGSMIINSTANCE pIns)
    14811483{
    14821484    uint8_t *p = (uint8_t *)pIns;
     
    15231525}
    15241526
    1525 int HGSMICreate(PHGSMIINSTANCE *ppIns,
    1526                 PPDMDEVINS      pDevIns,
    1527                 const char     *pszName,
    1528                 HGSMIOFFSET     offBase,
    1529                 uint8_t        *pu8MemBase,
    1530                 HGSMISIZE       cbMem,
    1531                 PFNHGSMINOTIFYGUEST pfnNotifyGuest,
    1532                 void           *pvNotifyGuest,
    1533                 size_t          cbContext)
     1527DECLHIDDEN(int) HGSMICreate(PHGSMIINSTANCE *ppIns,
     1528                            PPDMDEVINS      pDevIns,
     1529                            const char     *pszName,
     1530                            HGSMIOFFSET     offBase,
     1531                            uint8_t        *pu8MemBase,
     1532                            HGSMISIZE       cbMem,
     1533                            PFNHGSMINOTIFYGUEST pfnNotifyGuest,
     1534                            void           *pvNotifyGuest,
     1535                            size_t          cbContext)
    15341536{
    15351537    LogFlowFunc(("ppIns = %p, pDevIns = %p, pszName = [%s], offBase = 0x%08X, pu8MemBase = %p, cbMem = 0x%08X, "
     
    15911593}
    15921594
    1593 uint32_t HGSMIReset(PHGSMIINSTANCE pIns)
     1595DECLHIDDEN(uint32_t) HGSMIReset(PHGSMIINSTANCE pIns)
    15941596{
    15951597    uint32_t flags = 0;
     
    16171619}
    16181620
    1619 void HGSMIDestroy(PHGSMIINSTANCE pIns)
     1621DECLHIDDEN(void) HGSMIDestroy(PHGSMIINSTANCE pIns)
    16201622{
    16211623    LogFlowFunc(("pIns = %p\n", pIns));
     
    16841686}
    16851687
    1686 int HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq)
     1688DECLHIDDEN(int) HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq)
    16871689{
    16881690    LogFlowFunc(("pIns = %p, pvMem = %p\n", pIns, pvMem));
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h

    r98103 r103457  
    4747 */
    4848
    49 int  HGSMICreate(PHGSMIINSTANCE *ppIns,
    50                   PPDMDEVINS      pDevIns,
    51                   const char     *pszName,
    52                   HGSMIOFFSET     offBase,
    53                   uint8_t        *pu8MemBase,
    54                   HGSMISIZE       cbMem,
    55                   PFNHGSMINOTIFYGUEST pfnNotifyGuest,
    56                   void           *pvNotifyGuest,
    57                   size_t         cbContext);
    58 void  HGSMIDestroy(PHGSMIINSTANCE pIns);
    59 void *HGSMIContext(PHGSMIINSTANCE pIns);
     49DECLHIDDEN(int) HGSMICreate(PHGSMIINSTANCE *ppIns,
     50                            PPDMDEVINS      pDevIns,
     51                            const char     *pszName,
     52                            HGSMIOFFSET     offBase,
     53                            uint8_t        *pu8MemBase,
     54                            HGSMISIZE       cbMem,
     55                            PFNHGSMINOTIFYGUEST pfnNotifyGuest,
     56                            void           *pvNotifyGuest,
     57                            size_t         cbContext);
     58DECLHIDDEN(void)   HGSMIDestroy(PHGSMIINSTANCE pIns);
     59DECLHIDDEN(void *) HGSMIContext(PHGSMIINSTANCE pIns);
    6060
    61 void RT_UNTRUSTED_VOLATILE_GUEST *HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
    62 HGSMIOFFSET HGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv);
    63 bool        HGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
    64 HGSMIOFFSET HGSMIGetAreaOffset(PHGSMIINSTANCE pIns);
    65 HGSMIOFFSET HGSMIGetAreaSize(PHGSMIINSTANCE pIns);
     61DECLHIDDEN(void RT_UNTRUSTED_VOLATILE_GUEST *) HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
     62DECLHIDDEN(HGSMIOFFSET) HGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv);
     63DECLHIDDEN(bool)        HGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
     64DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaOffset(PHGSMIINSTANCE pIns);
     65DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaSize(PHGSMIINSTANCE pIns);
    6666
    6767
    68 int  HGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel,
    69                                PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler);
     68DECLHIDDEN(int) HGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel,
     69                                         PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler);
    7070#if 0 /* unused */
    7171int HGSMIChannelRegisterName (PHGSMIINSTANCE pIns,
     
    7676#endif
    7777
    78 int HGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap);
     78DECLHIDDEN(int) HGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap);
    7979
    8080/*
     
    8383
    8484/* Guests passes a new command buffer to the host. */
    85 void HGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
     85DECLHIDDEN(void) HGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
    8686
    8787/* Guest reads information about guest buffers. */
    88 HGSMIOFFSET HGSMIGuestRead(PHGSMIINSTANCE pIns);
     88DECLHIDDEN(HGSMIOFFSET) HGSMIGuestRead(PHGSMIINSTANCE pIns);
    8989
    9090/* Guest reads the host FIFO to get a command. */
    91 HGSMIOFFSET HGSMIHostRead(PHGSMIINSTANCE pIns);
     91DECLHIDDEN(HGSMIOFFSET) HGSMIHostRead(PHGSMIINSTANCE pIns);
    9292
    9393/* Guest reports that the command at this offset has been processed.  */
    94 void HGSMIHostWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
     94DECLHIDDEN(void) HGSMIHostWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);
    9595
    96 void HGSMISetHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);
    97 uint32_t HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns);
     96DECLHIDDEN(void) HGSMISetHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);
     97DECLHIDDEN(uint32_t) HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns);
    9898
    99 void HGSMIClearHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);
     99DECLHIDDEN(void) HGSMIClearHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);
    100100
    101101/*
     
    107107
    108108/* Allocate a buffer in the host heap. */
    109 int HGSMIHostCommandAlloc(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData,
    110                           uint8_t u8Channel, uint16_t u16ChannelInfo);
    111 int HGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq);
    112 int HGSMIHostCommandFree(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData);
     109DECLHIDDEN(int) HGSMIHostCommandAlloc(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData,
     110                                      uint8_t u8Channel, uint16_t u16ChannelInfo);
     111DECLHIDDEN(int) HGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq);
     112DECLHIDDEN(int) HGSMIHostCommandFree(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData);
    113113
    114 int HGSMIHostLoadStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version);
    115 int HGSMIHostSaveStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM);
     114DECLHIDDEN(int) HGSMIHostLoadStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version);
     115DECLHIDDEN(int) HGSMIHostSaveStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM);
    116116
    117117#ifdef VBOX_WITH_WDDM
    118 int HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq);
     118DECLHIDDEN(int) HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq);
    119119#endif
     120
     121/* @return host-guest flags that were set on reset
     122 * this allows the caller to make further cleaning when needed,
     123 * e.g. reset the IRQ */
     124DECLHIDDEN(uint32_t) HGSMIReset(PHGSMIINSTANCE pIns);
    120125
    121126#endif /* !VBOX_INCLUDED_SRC_Graphics_HGSMI_HGSMIHost_h */
  • trunk/src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp

    r98103 r103457  
    585585}
    586586
    587 HGSMIOFFSET HGSMIMAPointerToOffset(const HGSMIMADATA *pMA, const void RT_UNTRUSTED_VOLATILE_GUEST *pv)
     587static HGSMIOFFSET HGSMIMAPointerToOffset(const HGSMIMADATA *pMA, const void RT_UNTRUSTED_VOLATILE_GUEST *pv)
    588588{
    589589    uintptr_t off = (uintptr_t)pv - (uintptr_t)pMA->area.pu8Base;
Note: See TracChangeset for help on using the changeset viewer.

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