Changeset 64115 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Sep 30, 2016 8:14:27 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 111072
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/PGMInternal.h
r63640 r64115 1539 1539 /** Ad hoc RAM range for an MMIO mapping. */ 1540 1540 #define PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO RT_BIT(22) 1541 /** Ad hoc RAM range for an MMIO2 mapping. */1542 #define PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO 2RT_BIT(23)1541 /** Ad hoc RAM range for an MMIO2 or pre-registered MMIO mapping. */ 1542 #define PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO_EX RT_BIT(23) 1543 1543 /** @} */ 1544 1544 … … 1548 1548 */ 1549 1549 #define PGM_RAM_RANGE_IS_AD_HOC(pRam) \ 1550 (!!( (pRam)->fFlags & (PGM_RAM_RANGE_FLAGS_AD_HOC_ROM | PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO | PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO 2) ) )1550 (!!( (pRam)->fFlags & (PGM_RAM_RANGE_FLAGS_AD_HOC_ROM | PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO | PGM_RAM_RANGE_FLAGS_AD_HOC_MMIO_EX) ) ) 1551 1551 1552 1552 /** The number of entries in the RAM range TLBs (there is one for each … … 1688 1688 1689 1689 /** 1690 * A registered MMIO2 (= Device RAM) range.1691 * 1692 * There are a few reason why we need to keep track of these 1693 * registrations. One of them is the deregistration & cleanup stuff,1694 * while another is that the PGMRAMRANGE associated with such a region may1695 * have to be removed from the ramrange list.1696 * 1697 * Overlapping with a RAM range has to be 100% or none at all. The pages 1698 * in the existing RAM range must not be ROM nor MMIO. A guru meditation1699 * will be raised if a partial overlap or an overlap of ROM pages is1700 * encountered. On an overlap we will free all the existing RAM pages and1701 * p ut in the ram range pages instead.1702 */ 1703 typedef struct PGM MMIO2RANGE1690 * A registered MMIO2 (= Device RAM) or pre-registered MMIO range. 1691 * 1692 * There are a few reason why we need to keep track of these registrations. One 1693 * of them is the deregistration & cleanup stuff, while another is that the 1694 * PGMRAMRANGE associated with such a region may have to be removed from the ram 1695 * range list. 1696 * 1697 * Overlapping with a RAM range has to be 100% or none at all. The pages in the 1698 * existing RAM range must not be ROM nor MMIO. A guru meditation will be 1699 * raised if a partial overlap or an overlap of ROM pages is encountered. On an 1700 * overlap we will free all the existing RAM pages and put in the ram range 1701 * pages instead. 1702 */ 1703 typedef struct PGMREGMMIORANGE 1704 1704 { 1705 1705 /** The owner of the range. (a device) */ 1706 1706 PPDMDEVINSR3 pDevInsR3; 1707 /** Pointer to the ring-3 mapping of the allocation . */1707 /** Pointer to the ring-3 mapping of the allocation, if MMIO2. */ 1708 1708 RTR3PTR pvR3; 1709 1709 /** Pointer to the next range - R3. */ 1710 R3PTRTYPE(struct PGMMMIO2RANGE *) pNextR3; 1710 R3PTRTYPE(struct PGMREGMMIORANGE *) pNextR3; 1711 /** Whether this is MMIO2 or plain MMIO. */ 1712 bool fMmio2; 1711 1713 /** Whether it's mapped or not. */ 1712 1714 bool fMapped; … … 1722 1724 uint8_t idMmio2; 1723 1725 /** Alignment padding for putting the ram range on a PGMPAGE alignment boundary. */ 1724 uint8_t abAlignment[HC_ARCH_BITS == 32 ? 11 : 11]; 1725 /** Live save per page tracking data. */ 1726 uint8_t abAlignment[HC_ARCH_BITS == 32 ? 6 : 2]; 1727 /** Pointer to the physical handler for MMIO. */ 1728 R3PTRTYPE(PPGMPHYSHANDLER) pPhysHandlerR3; 1729 /** Live save per page tracking data for MMIO2. */ 1726 1730 R3PTRTYPE(PPGMLIVESAVEMMIO2PAGE) paLSPages; 1727 1731 /** The associated RAM range. */ 1728 1732 PGMRAMRANGE RamRange; 1729 } PGMMMIO2RANGE; 1730 /** Pointer to a MMIO2 range. */ 1731 typedef PGMMMIO2RANGE *PPGMMMIO2RANGE; 1733 } PGMREGMMIORANGE; 1734 AssertCompileMemberAlignment(PGMREGMMIORANGE, RamRange, 16); 1735 /** Pointer to a MMIO2 or pre-registered MMIO range. */ 1736 typedef PGMREGMMIORANGE *PPGMREGMMIORANGE; 1732 1737 1733 1738 /** @name Internal MMIO2 constants. … … 1736 1741 #define PGM_MMIO2_MAX_RANGES 8 1737 1742 /** The maximum number of pages in a MMIO2 range. */ 1738 #define PGM_MMIO2_MAX_PAGE_COUNT UINT32_C(0x0 0ffffff)1743 #define PGM_MMIO2_MAX_PAGE_COUNT UINT32_C(0x01000000) 1739 1744 /** Makes a MMIO2 page ID out of a MMIO2 range ID and page index number. */ 1740 1745 #define PGM_MMIO2_PAGEID_MAKE(a_idMmio2, a_iPage) ( ((uint32_t)(a_idMmio2) << 24) | (uint32_t)(a_iPage) ) … … 3308 3313 /** Pointer to the list of MMIO2 ranges - for R3. 3309 3314 * Registration order. */ 3310 R3PTRTYPE(PPGM MMIO2RANGE) pMmio2RangesR3;3315 R3PTRTYPE(PPGMREGMMIORANGE) pRegMmioRangesR3; 3311 3316 /** Pointer to SHW+GST mode data (function pointers). 3312 3317 * The index into this table is made up from */ … … 3314 3319 RTR3PTR R3PtrAlignment0; 3315 3320 /** MMIO2 lookup array for ring-3. Indexed by idMmio2 minus 1. */ 3316 R3PTRTYPE(PPGM MMIO2RANGE)apMmio2RangesR3[PGM_MMIO2_MAX_RANGES];3321 R3PTRTYPE(PPGMREGMMIORANGE) apMmio2RangesR3[PGM_MMIO2_MAX_RANGES]; 3317 3322 3318 3323 /** RAM range TLB for R0. */ … … 3334 3339 R0PTRTYPE(PPGMROMRANGE) pRomRangesR0; 3335 3340 RTR0PTR R0PtrAlignment0; 3336 /** MMIO2 lookup array for ring- 3. Indexed by idMmio2 minus 1. */3337 R0PTRTYPE(PPGM MMIO2RANGE)apMmio2RangesR0[PGM_MMIO2_MAX_RANGES];3341 /** MMIO2 lookup array for ring-0. Indexed by idMmio2 minus 1. */ 3342 R0PTRTYPE(PPGMREGMMIORANGE) apMmio2RangesR0[PGM_MMIO2_MAX_RANGES]; 3338 3343 3339 3344 /** RAM range TLB for RC. */ … … 4139 4144 DECLCALLBACK(void) pgmR3MapInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 4140 4145 4146 int pgmHandlerPhysicalExCreate(PVM pVM, PGMPHYSHANDLERTYPE hType, RTR3PTR pvUserR3, RTR0PTR pvUserR0, 4147 RTRCPTR pvUserRC, R3PTRTYPE(const char *) pszDesc, PPGMPHYSHANDLER *ppPhysHandler); 4148 int pgmHandlerPhysicalExRegister(PVM pVM, PPGMPHYSHANDLER pPhysHandler, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast); 4149 int pgmHandlerPhysicalExDeregister(PVM pVM, PPGMPHYSHANDLER pPhysHandler); 4150 int pgmHandlerPhysicalExDestroy(PVM pVM, PPGMPHYSHANDLER pHandler); 4141 4151 void pgmR3HandlerPhysicalUpdateAll(PVM pVM); 4142 4152 bool pgmHandlerPhysicalIsAll(PVM pVM, RTGCPHYS GCPhys);
Note:
See TracChangeset
for help on using the changeset viewer.