VirtualBox

Changeset 12687 in vbox for trunk/src/VBox/VMM/PDMDevice.cpp


Ignore:
Timestamp:
Sep 24, 2008 2:07:47 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
36992
Message:

Started with VMM device heap for use with VT-x real-mode emulation. (v86 tss)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PDMDevice.cpp

    r12684 r12687  
    173173static DECLCALLBACK(int) pdmR3DevHlp_MMIO2Unmap(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys);
    174174static DECLCALLBACK(int) pdmR3DevHlp_MMHyperMapMMIO2(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb, const char *pszDesc, PRTRCPTR pRCPtr);
     175static DECLCALLBACK(int) pdmR3DevHlp_RegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize);
     176static DECLCALLBACK(int) pdmR3DevHlp_UnregisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys);
    175177
    176178static DECLCALLBACK(PVM) pdmR3DevHlp_Untrusted_GetVM(PPDMDEVINS pDevIns);
     
    212214static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_MMIO2Unmap(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys);
    213215static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_MMHyperMapMMIO2(PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb, const char *pszDesc, PRTRCPTR pRCPtr);
     216static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_RegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize);
     217static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_UnregisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys);
    214218/** @} */
    215219
     
    381385    pdmR3DevHlp_MMIO2Unmap,
    382386    pdmR3DevHlp_MMHyperMapMMIO2,
     387    pdmR3DevHlp_RegisterVMMDevHeap,
     388    pdmR3DevHlp_UnregisterVMMDevHeap,
    383389    PDM_DEVHLP_VERSION /* the end */
    384390};
     
    475481    pdmR3DevHlp_Untrusted_MMIO2Unmap,
    476482    pdmR3DevHlp_Untrusted_MMHyperMapMMIO2,
     483    pdmR3DevHlp_Untrusted_RegisterVMMDevHeap,
     484    pdmR3DevHlp_Untrusted_UnregisterVMMDevHeap,
    477485    PDM_DEVHLP_VERSION /* the end */
    478486};
     
    36433651
    36443652
    3645 
     3653/**
     3654 * @copydoc PDMDEVHLP::pfnRegisterVMMDevHeap
     3655 */
     3656static DECLCALLBACK(int) pdmR3DevHlp_RegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize)
     3657{
     3658    PDMDEV_ASSERT_DEVINS(pDevIns);
     3659    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
     3660
     3661    int rc = PDMR3RegisterVMMDevHeap(pDevIns->Internal.s.pVMHC, GCPhys, pvHeap, cbSize);
     3662    return rc;
     3663}
     3664
     3665
     3666/**
     3667 * @copydoc PDMDEVHLP::pfnUnregisterVMMDevHeap
     3668 */
     3669static DECLCALLBACK(int) pdmR3DevHlp_UnregisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     3670{
     3671    PDMDEV_ASSERT_DEVINS(pDevIns);
     3672    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
     3673
     3674    int rc = PDMR3UnregisterVMMDevHeap(pDevIns->Internal.s.pVMHC, GCPhys);
     3675    return rc;
     3676}
    36463677
    36473678
     
    39994030}
    40004031
     4032/**
     4033 * @copydoc PDMDEVHLP::pfnRegisterVMMDevHeap
     4034 */
     4035static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_RegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize)
     4036{
     4037    PDMDEV_ASSERT_DEVINS(pDevIns);
     4038    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance));
     4039    return VERR_ACCESS_DENIED;
     4040}
     4041
     4042/**
     4043 * @copydoc PDMDEVHLP::pfnUnregisterVMMDevHeap
     4044 */
     4045static DECLCALLBACK(int) pdmR3DevHlp_Untrusted_UnregisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys)
     4046{
     4047    PDMDEV_ASSERT_DEVINS(pDevIns);
     4048    AssertReleaseMsgFailed(("Untrusted device called trusted helper! '%s'/%d\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance));
     4049    return VERR_ACCESS_DENIED;
     4050}
    40014051
    40024052
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