Changeset 12545 in vbox for trunk/include
- Timestamp:
- Sep 17, 2008 3:11:37 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 36722
- Location:
- trunk/include/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/iom.h
r9293 r12545 47 47 */ 48 48 #define IOM_NO_PDMINS_CHECKS 49 50 51 52 typedef enum 53 { 54 /** MMIO mapping for a specific CPU. */ 55 MMIO_REGCTX_CPU0 = 0, 56 MMIO_REGCTX_CPU1 = 1, 57 MMIO_REGCTX_CPU2 = 2, 58 MMIO_REGCTX_CPU3 = 3, 59 MMIO_REGCTX_CPU4 = 4, 60 MMIO_REGCTX_CPU5 = 5, 61 MMIO_REGCTX_CPU6 = 6, 62 MMIO_REGCTX_CPU7 = 7, 63 MMIO_REGCTX_CPU8 = 8, 64 MMIO_REGCTX_CPU9 = 9, 65 MMIO_REGCTX_CPU10 = 10, 66 MMIO_REGCTX_CPU11 = 11, 67 MMIO_REGCTX_CPU12 = 12, 68 MMIO_REGCTX_CPU13 = 13, 69 MMIO_REGCTX_CPU14 = 14, 70 MMIO_REGCTX_CPU15 = 15, 71 MMIO_REGCTX_CPU16 = 16, 72 /* ... */ 73 74 /** MMIO mapping for all CPUs. */ 75 MMIO_REGCTX_GLOBAL = 0x100000, 76 77 /** 32bit hackishness. */ 78 MMIO_REGCTX_32BIT_HACK = 0x7fffffff 79 } MMIO_REGISTRATION_CTX; 49 80 50 81 /** … … 249 280 IOMR3DECL(int) IOMR3IOPortDeregister(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts); 250 281 251 IOMR3DECL(int) IOMR3MMIORegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser,282 IOMR3DECL(int) IOMR3MMIORegisterR3(PVM pVM, PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser, 252 283 R3PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, 253 284 R3PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 254 285 R3PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, const char *pszDesc); 255 IOMR3DECL(int) IOMR3MMIORegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser,286 IOMR3DECL(int) IOMR3MMIORegisterR0(PVM pVM, PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser, 256 287 R0PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, 257 288 R0PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 258 289 R0PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback); 259 IOMR3DECL(int) IOMR3MMIORegisterGC(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTGCPTR pvUser,290 IOMR3DECL(int) IOMR3MMIORegisterGC(PVM pVM, PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange, RTGCPTR pvUser, 260 291 RCPTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, 261 292 RCPTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 262 293 RCPTRTYPE(PFNIOMMMIOFILL) pfnFillCallback); 263 IOMR3DECL(int) IOMR3MMIODeregister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange);294 IOMR3DECL(int) IOMR3MMIODeregister(PVM pVM, PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange); 264 295 /** @} */ 265 296 #endif /* IN_RING3 */ -
trunk/include/VBox/pdmdev.h
r12375 r12545 1726 1726 * @param pDevIns The device instance to register the MMIO with. 1727 1727 * @param GCPhysStart First physical address in the range. 1728 * @param enmCtx CPU id or MMIO_REGCTX_GLOBAL if it's a global registration (applies to all CPUs) 1728 1729 * @param cbRange The size of the range (in bytes). 1729 1730 * @param pvUser User argument. … … 1733 1734 * @param pszDesc Pointer to description string. This must not be freed. 1734 1735 */ 1735 DECLR3CALLBACKMEMBER(int, pfnMMIORegister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser,1736 DECLR3CALLBACKMEMBER(int, pfnMMIORegister,(PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser, 1736 1737 PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill, 1737 1738 const char *pszDesc)); … … 1746 1747 * @returns VBox status. 1747 1748 * @param pDevIns The device instance to register the MMIO with. 1749 * @param enmCtx CPU id or MMIO_REGCTX_GLOBAL if it's a global registration (applies to all CPUs) 1748 1750 * @param GCPhysStart First physical address in the range. 1749 1751 * @param cbRange The size of the range (in bytes). … … 1755 1757 * @todo Remove pszDesc in the next major revision of PDMDEVHLP. 1756 1758 */ 1757 DECLR3CALLBACKMEMBER(int, pfnMMIORegisterGC,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTGCPTR pvUser,1759 DECLR3CALLBACKMEMBER(int, pfnMMIORegisterGC,(PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange, RTGCPTR pvUser, 1758 1760 const char *pszWrite, const char *pszRead, const char *pszFill, 1759 1761 const char *pszDesc)); … … 1767 1769 * @returns VBox status. 1768 1770 * @param pDevIns The device instance to register the MMIO with. 1771 * @param enmCtx CPU id or MMIO_REGCTX_GLOBAL if it's a global registration (applies to all CPUs) 1769 1772 * @param GCPhysStart First physical address in the range. 1770 1773 * @param cbRange The size of the range (in bytes). … … 1776 1779 * @todo Remove pszDesc in the next major revision of PDMDEVHLP. 1777 1780 */ 1778 DECLR3CALLBACKMEMBER(int, pfnMMIORegisterR0,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser,1781 DECLR3CALLBACKMEMBER(int, pfnMMIORegisterR0,(PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser, 1779 1782 const char *pszWrite, const char *pszRead, const char *pszFill, 1780 1783 const char *pszDesc)); … … 1787 1790 * @returns VBox status. 1788 1791 * @param pDevIns The device instance owning the MMIO region(s). 1792 * @param enmCtx CPU id or MMIO_REGCTX_GLOBAL if it's a global registration (applies to all CPUs) 1789 1793 * @param GCPhysStart First physical address in the range. 1790 1794 * @param cbRange The size of the range (in bytes). 1791 1795 */ 1792 DECLR3CALLBACKMEMBER(int, pfnMMIODeregister,(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange));1796 DECLR3CALLBACKMEMBER(int, pfnMMIODeregister,(PPDMDEVINS pDevIns, MMIO_REGISTRATION_CTX enmCtx, RTGCPHYS GCPhysStart, RTUINT cbRange)); 1793 1797 1794 1798 /** … … 3110 3114 const char *pszDesc) 3111 3115 { 3112 return pDevIns->pDevHlp->pfnMMIORegister(pDevIns, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc);3116 return pDevIns->pDevHlp->pfnMMIORegister(pDevIns, MMIO_REGCTX_GLOBAL, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc); 3113 3117 } 3114 3118 … … 3119 3123 const char *pszWrite, const char *pszRead, const char *pszFill) 3120 3124 { 3121 return pDevIns->pDevHlp->pfnMMIORegisterGC(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill, NULL);3125 return pDevIns->pDevHlp->pfnMMIORegisterGC(pDevIns, MMIO_REGCTX_GLOBAL, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill, NULL); 3122 3126 } 3123 3127 … … 3128 3132 const char *pszWrite, const char *pszRead, const char *pszFill) 3129 3133 { 3130 return pDevIns->pDevHlp->pfnMMIORegisterR0(pDevIns, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill, NULL); 3134 return pDevIns->pDevHlp->pfnMMIORegisterR0(pDevIns, MMIO_REGCTX_GLOBAL, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill, NULL); 3135 } 3136 3137 /** 3138 * @copydoc PDMDEVHLP::pfnMMIORegisterPerCPU 3139 */ 3140 DECLINLINE(int) PDMDevHlpMMIORegisterPerCPU(PPDMDEVINS pDevIns, int idCPU, RTGCPHYS GCPhysStart, RTUINT cbRange, RTHCPTR pvUser, 3141 PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill, 3142 const char *pszDesc) 3143 { 3144 return pDevIns->pDevHlp->pfnMMIORegister(pDevIns, (MMIO_REGISTRATION_CTX)idCPU, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc); 3145 } 3146 3147 /** 3148 * @copydoc PDMDEVHLP::pfnMMIORegisterPerCPUGC 3149 */ 3150 DECLINLINE(int) PDMDevHlpMMIORegisterPerCPUGC(PPDMDEVINS pDevIns, int idCPU, RTGCPHYS GCPhysStart, RTUINT cbRange, RTGCPTR pvUser, 3151 const char *pszWrite, const char *pszRead, const char *pszFill) 3152 { 3153 return pDevIns->pDevHlp->pfnMMIORegisterGC(pDevIns, (MMIO_REGISTRATION_CTX)idCPU, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill, NULL); 3154 } 3155 3156 /** 3157 * @copydoc PDMDEVHLP::pfnMMIORegisterPerCPUR0 3158 */ 3159 DECLINLINE(int) PDMDevHlpMMIORegisterPerCPUR0(PPDMDEVINS pDevIns, int idCPU, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser, 3160 const char *pszWrite, const char *pszRead, const char *pszFill) 3161 { 3162 return pDevIns->pDevHlp->pfnMMIORegisterR0(pDevIns, (MMIO_REGISTRATION_CTX)idCPU, GCPhysStart, cbRange, pvUser, pszWrite, pszRead, pszFill, NULL); 3131 3163 } 3132 3164 -
trunk/include/VBox/vm.h
r12532 r12545 287 287 /** The GVM VM handle. Only the GVM should modify this field. */ 288 288 uint32_t hSelf; 289 /** Reserved / padding. */ 290 uint32_t u32Reserved; 289 /** Number of virtual CPUs. */ 290 uint32_t cCPUs; 291 /** Current CPU id; @todo move to per CPU structure. */ 292 uint32_t idCPU; 293 /** Reserved; alignment. */ 294 uint32_t u32Reserved[7]; 291 295 292 296 /** @name Public VMM Switcher APIs -
trunk/include/VBox/vm.mac
r9451 r12545 56 56 .pVMGC RTGCPTR32_RES 1 57 57 .hSelf resd 1 58 .u32Reserved resd 1 58 .cCPUs resd 1 59 .idCPU resd 1 60 .u32Reserved resd 7 59 61 60 62 .pfnVMMGCGuestToHostAsmGuestCtx RTGCPTR32_RES 1
Note:
See TracChangeset
for help on using the changeset viewer.