Changeset 103457 in vbox
- Timestamp:
- Feb 19, 2024 3:51:24 PM (11 months ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.h
r100690 r103457 727 727 #endif 728 728 729 /* @return host-guest flags that were set on reset730 * this allows the caller to make further cleaning when needed,731 * e.g. reset the IRQ */732 uint32_t HGSMIReset(PHGSMIINSTANCE pIns);733 734 729 # ifdef VBOX_WITH_VIDEOHWACCEL 735 730 DECLCALLBACK(int) vbvaR3VHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, -
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
r99775 r103457 290 290 * @thread EMT 291 291 */ 292 voidHGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)292 DECLHIDDEN(void) HGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer) 293 293 { 294 294 HGSMIBufferProcess(&pIns->area, &pIns->channelInfo, offBuffer); … … 332 332 333 333 /* Called from HGSMI_IO_GUEST read handler. */ 334 HGSMIOFFSETHGSMIGuestRead(PHGSMIINSTANCE pIns)334 DECLHIDDEN(HGSMIOFFSET) HGSMIGuestRead(PHGSMIINSTANCE pIns) 335 335 { 336 336 LogFlowFunc(("pIns %p\n", pIns)); … … 407 407 * @thread EMT 408 408 */ 409 voidHGSMIHostWrite(HGSMIINSTANCE *pIns, HGSMIOFFSET offBuffer)409 DECLHIDDEN(void) HGSMIHostWrite(HGSMIINSTANCE *pIns, HGSMIOFFSET offBuffer) 410 410 { 411 411 LogFlowFunc(("pIns %p offBuffer 0x%x\n", pIns, offBuffer)); … … 421 421 * @thread EMT 422 422 */ 423 HGSMIOFFSETHGSMIHostRead(HGSMIINSTANCE *pIns)423 DECLHIDDEN(HGSMIOFFSET) HGSMIHostRead(HGSMIINSTANCE *pIns) 424 424 { 425 425 LogFlowFunc(("pIns %p\n", pIns)); … … 476 476 } 477 477 478 voidHGSMISetHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags)478 DECLHIDDEN(void) HGSMISetHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags) 479 479 { 480 480 AssertPtrReturnVoid(pIns->pHGFlags); … … 482 482 } 483 483 484 uint32_tHGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns)484 DECLHIDDEN(uint32_t) HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns) 485 485 { 486 486 return pIns->pHGFlags ? ASMAtomicReadU32(&pIns->pHGFlags->u32HostFlags) : 0; 487 487 } 488 488 489 voidHGSMIClearHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags)489 DECLHIDDEN(void) HGSMIClearHostGuestFlags(HGSMIINSTANCE *pIns, uint32_t flags) 490 490 { 491 491 AssertPtrReturnVoid(pIns->pHGFlags); … … 829 829 * @param u16ChannelInfo Command parameter. 830 830 */ 831 intHGSMIHostCommandAlloc(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData,832 uint8_t u8Channel, uint16_t u16ChannelInfo)831 DECLHIDDEN(int) HGSMIHostCommandAlloc(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData, 832 uint8_t u8Channel, uint16_t u16ChannelInfo) 833 833 { 834 834 LogFlowFunc(("pIns = %p, cbData = %d, u8Channel %d, u16ChannelInfo 0x%04X\n", … … 867 867 * the command could be posted without raising an irq. 868 868 */ 869 intHGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq)869 DECLHIDDEN(int) HGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq) 870 870 { 871 871 LogFlowFunc(("pIns = %p, pvData = %p, fDoIrq = %d\n", pIns, pvData, fDoIrq)); … … 891 891 * @param pvData The pointer returned by 'HGSMIHostCommandAlloc'. 892 892 */ 893 intHGSMIHostCommandFree(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData)893 DECLHIDDEN(int) HGSMIHostCommandFree(HGSMIINSTANCE *pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData) 894 894 { 895 895 LogFlowFunc(("pIns = %p, pvData = %p\n", pIns, pvData)); … … 928 928 }; 929 929 930 intHGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap)930 DECLHIDDEN(int) HGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap) 931 931 { 932 932 LogFlowFunc(("pIns %p, offHeap 0x%08X, cbHeap = 0x%08X\n", pIns, offHeap, cbHeap)); … … 1179 1179 } 1180 1180 1181 int HGSMIHostSaveStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM) 1181 1182 DECLHIDDEN(int) HGSMIHostSaveStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM) 1182 1183 { 1183 1184 VBOXHGSMI_SAVE_START(pSSM); … … 1222 1223 } 1223 1224 1224 int HGSMIHostLoadStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version) 1225 1226 DECLHIDDEN(int) HGSMIHostLoadStateExec(PCPDMDEVHLPR3 pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version) 1225 1227 { 1226 1228 if (u32Version < VGA_SAVEDSTATE_VERSION_HGSMI) … … 1334 1336 /* Register a new HGSMI channel by a predefined index. 1335 1337 */ 1336 intHGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel,1337 PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler)1338 DECLHIDDEN(int) HGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel, 1339 PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler) 1338 1340 { 1339 1341 LogFlowFunc(("pIns %p, u8Channel %x, pfnChannelHandler %p, pvChannelHandler %p\n", … … 1422 1424 #endif 1423 1425 1424 void RT_UNTRUSTED_VOLATILE_GUEST *HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)1426 DECLHIDDEN(void RT_UNTRUSTED_VOLATILE_GUEST *) HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer) 1425 1427 { 1426 1428 const HGSMIAREA *pArea = &pIns->area; … … 1433 1435 1434 1436 1435 HGSMIOFFSETHGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv)1437 DECLHIDDEN(HGSMIOFFSET) HGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv) 1436 1438 { 1437 1439 const HGSMIAREA *pArea = &pIns->area; … … 1453 1455 * @param offBuffer The buffer offset to check. 1454 1456 */ 1455 boolHGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer)1457 DECLHIDDEN(bool) HGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer) 1456 1458 { 1457 1459 return pIns … … 1463 1465 * Returns the area offset for use in logging and assertion messages. 1464 1466 */ 1465 HGSMIOFFSETHGSMIGetAreaOffset(PHGSMIINSTANCE pIns)1467 DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaOffset(PHGSMIINSTANCE pIns) 1466 1468 { 1467 1469 return pIns ? pIns->area.offBase : ~(HGSMIOFFSET)0; … … 1472 1474 * Returns the area size for use in logging and assertion messages. 1473 1475 */ 1474 HGSMIOFFSETHGSMIGetAreaSize(PHGSMIINSTANCE pIns)1476 DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaSize(PHGSMIINSTANCE pIns) 1475 1477 { 1476 1478 return pIns ? pIns->area.cbArea : 0; … … 1478 1480 1479 1481 1480 void *HGSMIContext(PHGSMIINSTANCE pIns)1482 DECLHIDDEN(void *) HGSMIContext(PHGSMIINSTANCE pIns) 1481 1483 { 1482 1484 uint8_t *p = (uint8_t *)pIns; … … 1523 1525 } 1524 1526 1525 intHGSMICreate(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)1527 DECLHIDDEN(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) 1534 1536 { 1535 1537 LogFlowFunc(("ppIns = %p, pDevIns = %p, pszName = [%s], offBase = 0x%08X, pu8MemBase = %p, cbMem = 0x%08X, " … … 1591 1593 } 1592 1594 1593 uint32_tHGSMIReset(PHGSMIINSTANCE pIns)1595 DECLHIDDEN(uint32_t) HGSMIReset(PHGSMIINSTANCE pIns) 1594 1596 { 1595 1597 uint32_t flags = 0; … … 1617 1619 } 1618 1620 1619 voidHGSMIDestroy(PHGSMIINSTANCE pIns)1621 DECLHIDDEN(void) HGSMIDestroy(PHGSMIINSTANCE pIns) 1620 1622 { 1621 1623 LogFlowFunc(("pIns = %p\n", pIns)); … … 1684 1686 } 1685 1687 1686 intHGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq)1688 DECLHIDDEN(int) HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq) 1687 1689 { 1688 1690 LogFlowFunc(("pIns = %p, pvMem = %p\n", pIns, pvMem)); -
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
r98103 r103457 47 47 */ 48 48 49 intHGSMICreate(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 voidHGSMIDestroy(PHGSMIINSTANCE pIns);59 void *HGSMIContext(PHGSMIINSTANCE pIns);49 DECLHIDDEN(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 DECLHIDDEN(void) HGSMIDestroy(PHGSMIINSTANCE pIns); 59 DECLHIDDEN(void *) HGSMIContext(PHGSMIINSTANCE pIns); 60 60 61 void RT_UNTRUSTED_VOLATILE_GUEST *HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);62 HGSMIOFFSETHGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv);63 boolHGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);64 HGSMIOFFSETHGSMIGetAreaOffset(PHGSMIINSTANCE pIns);65 HGSMIOFFSETHGSMIGetAreaSize(PHGSMIINSTANCE pIns);61 DECLHIDDEN(void RT_UNTRUSTED_VOLATILE_GUEST *) HGSMIOffsetToPointerHost(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer); 62 DECLHIDDEN(HGSMIOFFSET) HGSMIPointerToOffsetHost(PHGSMIINSTANCE pIns, const void RT_UNTRUSTED_VOLATILE_GUEST *pv); 63 DECLHIDDEN(bool) HGSMIIsOffsetValid(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer); 64 DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaOffset(PHGSMIINSTANCE pIns); 65 DECLHIDDEN(HGSMIOFFSET) HGSMIGetAreaSize(PHGSMIINSTANCE pIns); 66 66 67 67 68 intHGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel,69 PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler);68 DECLHIDDEN(int) HGSMIHostChannelRegister(PHGSMIINSTANCE pIns, uint8_t u8Channel, 69 PFNHGSMICHANNELHANDLER pfnChannelHandler, void *pvChannelHandler); 70 70 #if 0 /* unused */ 71 71 int HGSMIChannelRegisterName (PHGSMIINSTANCE pIns, … … 76 76 #endif 77 77 78 intHGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap);78 DECLHIDDEN(int) HGSMIHostHeapSetup(PHGSMIINSTANCE pIns, HGSMIOFFSET RT_UNTRUSTED_GUEST offHeap, HGSMISIZE RT_UNTRUSTED_GUEST cbHeap); 79 79 80 80 /* … … 83 83 84 84 /* Guests passes a new command buffer to the host. */ 85 voidHGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);85 DECLHIDDEN(void) HGSMIGuestWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer); 86 86 87 87 /* Guest reads information about guest buffers. */ 88 HGSMIOFFSETHGSMIGuestRead(PHGSMIINSTANCE pIns);88 DECLHIDDEN(HGSMIOFFSET) HGSMIGuestRead(PHGSMIINSTANCE pIns); 89 89 90 90 /* Guest reads the host FIFO to get a command. */ 91 HGSMIOFFSETHGSMIHostRead(PHGSMIINSTANCE pIns);91 DECLHIDDEN(HGSMIOFFSET) HGSMIHostRead(PHGSMIINSTANCE pIns); 92 92 93 93 /* Guest reports that the command at this offset has been processed. */ 94 voidHGSMIHostWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer);94 DECLHIDDEN(void) HGSMIHostWrite(PHGSMIINSTANCE pIns, HGSMIOFFSET offBuffer); 95 95 96 voidHGSMISetHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);97 uint32_tHGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns);96 DECLHIDDEN(void) HGSMISetHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags); 97 DECLHIDDEN(uint32_t) HGSMIGetHostGuestFlags(HGSMIINSTANCE *pIns); 98 98 99 voidHGSMIClearHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags);99 DECLHIDDEN(void) HGSMIClearHostGuestFlags(PHGSMIINSTANCE pIns, uint32_t flags); 100 100 101 101 /* … … 107 107 108 108 /* Allocate a buffer in the host heap. */ 109 intHGSMIHostCommandAlloc(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData,110 uint8_t u8Channel, uint16_t u16ChannelInfo);111 intHGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq);112 intHGSMIHostCommandFree(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData);109 DECLHIDDEN(int) HGSMIHostCommandAlloc(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST **ppvData, HGSMISIZE cbData, 110 uint8_t u8Channel, uint16_t u16ChannelInfo); 111 DECLHIDDEN(int) HGSMIHostCommandSubmitAndFreeAsynch(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData, bool fDoIrq); 112 DECLHIDDEN(int) HGSMIHostCommandFree(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvData); 113 113 114 intHGSMIHostLoadStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version);115 intHGSMIHostSaveStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM);114 DECLHIDDEN(int) HGSMIHostLoadStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version); 115 DECLHIDDEN(int) HGSMIHostSaveStateExec(const struct PDMDEVHLPR3 *pHlp, PHGSMIINSTANCE pIns, PSSMHANDLE pSSM); 116 116 117 117 #ifdef VBOX_WITH_WDDM 118 intHGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq);118 DECLHIDDEN(int) HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void RT_UNTRUSTED_VOLATILE_GUEST *pvMem, bool fDoIrq); 119 119 #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 */ 124 DECLHIDDEN(uint32_t) HGSMIReset(PHGSMIINSTANCE pIns); 120 125 121 126 #endif /* !VBOX_INCLUDED_SRC_Graphics_HGSMI_HGSMIHost_h */ -
trunk/src/VBox/GuestHost/HGSMI/HGSMIMemAlloc.cpp
r98103 r103457 585 585 } 586 586 587 HGSMIOFFSET HGSMIMAPointerToOffset(const HGSMIMADATA *pMA, const void RT_UNTRUSTED_VOLATILE_GUEST *pv)587 static HGSMIOFFSET HGSMIMAPointerToOffset(const HGSMIMADATA *pMA, const void RT_UNTRUSTED_VOLATILE_GUEST *pv) 588 588 { 589 589 uintptr_t off = (uintptr_t)pv - (uintptr_t)pMA->area.pu8Base;
Note:
See TracChangeset
for help on using the changeset viewer.