Changeset 18660 in vbox for trunk/include/VBox
- Timestamp:
- Apr 2, 2009 6:23:45 PM (16 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/mm.h
r18287 r18660 43 43 * @{ 44 44 */ 45 46 #ifndef VBOX_WITH_NEW_PHYS_CODE47 /** @name RAM Page Flags48 * Since internal ranges have a byte granularity it's possible for a49 * page be flagged for several uses. The access virtualization in PGM50 * will choose the most restricted one and use EM to emulate access to51 * the less restricted areas of the page.52 *53 * Bits 0-11 only since they are fitted into the offset part of a physical memory address.54 * @{55 */56 /** Reserved - Not RAM, ROM nor MMIO2.57 * If this bit is cleared the memory is assumed to be some kind of RAM.58 * Normal MMIO may set it but that depends on whether the RAM range was59 * created specially for the MMIO or not.60 *61 * @remarks The current implementation will always reserve backing62 * memory for reserved ranges to simplify things.63 */64 #define MM_RAM_FLAGS_RESERVED RT_BIT(0)65 /** ROM - Read Only Memory.66 * The page have a HC physical address which contains the BIOS code. All write67 * access is trapped and ignored.68 *69 * HACK: Writable shadow ROM is indicated by both ROM and MMIO2 being70 * set. (We're out of bits.)71 */72 #define MM_RAM_FLAGS_ROM RT_BIT(1)73 /** MMIO - Memory Mapped I/O.74 * All access is trapped and emulated. No physical backing is required, but75 * might for various reasons be present.76 */77 #define MM_RAM_FLAGS_MMIO RT_BIT(2)78 /** MMIO2 - Memory Mapped I/O, variation 2.79 * The virtualization is performed using real memory and only catching80 * a few accesses for like keeping track for dirty pages.81 * @remark Involved in the shadow ROM hack.82 */83 #define MM_RAM_FLAGS_MMIO2 RT_BIT(3)84 85 /** Physical backing memory is allocated dynamically. Not set implies a one time static allocation. */86 #define MM_RAM_FLAGS_DYNAMIC_ALLOC RT_BIT(11)87 /** @} */88 89 /** @name MMR3PhysRegisterEx registration type90 * @{91 */92 typedef enum93 {94 /** Normal physical region (flags specify exact page type) */95 MM_PHYS_TYPE_NORMAL = 0,96 /** Allocate part of a dynamically allocated physical region */97 MM_PHYS_TYPE_DYNALLOC_CHUNK,98 99 MM_PHYS_TYPE_32BIT_HACK = 0x7fffffff100 } MMPHYSREG;101 /** @} */102 #endif /* !VBOX_WITH_NEW_PHYS_CODE */103 45 104 46 /** … … 332 274 333 275 /** @defgroup grp_mm_phys Guest Physical Memory Manager 276 * @todo retire this group, elimintating or moving MMR3PhysGetRamSize to PGMPhys. 334 277 * @ingroup grp_mm_r3 335 278 * @{ */ 336 #ifndef VBOX_WITH_NEW_PHYS_CODE337 VMMR3DECL(int) MMR3PhysRegisterEx(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, MMPHYSREG enmType, const char *pszDesc);338 VMMR3DECL(int) MMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const void *pvBinary, bool fShadow, const char *pszDesc);339 VMMR3DECL(int) MMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange);340 VMMR3DECL(int) MMR3PhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc);341 #endif342 279 VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM); 343 280 /** @} */ -
trunk/include/VBox/param.h
r18617 r18660 63 63 #define MM_RAM_MIN UINT32_C(0x00400000) 64 64 /** The maximum guest RAM size in bytes. */ 65 #if HC_ARCH_BITS == 64 && defined(VBOX_WITH_NEW_PHYS_CODE)65 #if HC_ARCH_BITS == 64 66 66 # define MM_RAM_MAX UINT64_C(0x400000000) 67 67 #else … … 71 71 #define MM_RAM_MIN_IN_MB UINT32_C(4) 72 72 /** The maximum guest RAM size in MBs. */ 73 #if HC_ARCH_BITS == 64 && defined(VBOX_WITH_NEW_PHYS_CODE)73 #if HC_ARCH_BITS == 64 74 74 # define MM_RAM_MAX_IN_MB UINT32_C(16384) 75 75 #else -
trunk/include/VBox/pdmdev.h
r18645 r18660 41 41 #include <VBox/cfgm.h> 42 42 #include <VBox/dbgf.h> 43 #ifndef VBOX_WITH_NEW_PHYS_CODE44 # include <VBox/mm.h>45 #endif46 43 #include <VBox/err.h> 47 44 #include <VBox/pci.h> -
trunk/include/VBox/pgm.h
r18291 r18660 386 386 #endif 387 387 VMMDECL(int) PGMPhysGCPtr2R3Ptr(PVM pVM, RTGCPTR GCPtr, PRTR3PTR pR3Ptr); 388 #ifdef VBOX_WITH_NEW_PHYS_CODE389 388 VMMDECL(int) PGMPhysRead(PVM pVM, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead); 390 389 VMMDECL(int) PGMPhysWrite(PVM pVM, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite); 391 #else392 VMMDECL(void) PGMPhysRead(PVM pVM, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead);393 VMMDECL(void) PGMPhysWrite(PVM pVM, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite);394 #endif395 390 VMMDECL(int) PGMPhysSimpleReadGCPhys(PVM pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb); 396 391 #ifndef IN_RC /* Only ring 0 & 3. */ … … 475 470 VMMR3DECL(int) PGMR3ChangeMode(PVM pVM, PGMMODE enmGuestMode); 476 471 477 #ifndef VBOX_WITH_NEW_PHYS_CODE478 VMMR3DECL(int) PGM3PhysGrowRange(PVM pVM, PCRTGCPHYS GCPhys);479 #endif /* !VBOX_WITH_NEW_PHYS_CODE */480 472 VMMR3DECL(int) PGMR3PhysRegisterRam(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, const char *pszDesc); 481 473 VMMR3DECL(int) PGMR3PhysMMIORegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, … … 506 498 VMMR3DECL(int) PGMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, PGMROMPROT enmProt); 507 499 VMMR3DECL(int) PGMR3PhysRegister(PVM pVM, void *pvRam, RTGCPHYS GCPhys, size_t cb, unsigned fFlags, const SUPPAGE *paPages, const char *pszDesc); 508 #ifndef VBOX_WITH_NEW_PHYS_CODE509 VMMR3DECL(int) PGMR3PhysRegisterChunk(PVM pVM, void *pvRam, RTGCPHYS GCPhys, size_t cb, unsigned fFlags, const SUPPAGE *paPages, const char *pszDesc);510 VMMR3DECL(int) PGMR3PhysSetFlags(PVM pVM, RTGCPHYS GCPhys, size_t cb, unsigned fFlags, unsigned fMask);511 #endif /* !VBOX_WITH_NEW_PHYS_CODE */512 500 VMMDECL(void) PGMR3PhysSetA20(PVM pVM, bool fEnable); 513 501 /** @name PGMR3MapPT flags. -
trunk/include/VBox/rem.h
r17538 r18660 84 84 #define REM_NOTIFY_PHYS_RAM_FLAGS_MMIO2 RT_BIT(17) 85 85 /** @} */ 86 #ifndef VBOX_WITH_NEW_PHYS_CODE87 REMR3DECL(void) REMR3NotifyPhysRamChunkRegister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb, RTHCUINTPTR pvRam, unsigned fFlags);88 #endif89 86 REMR3DECL(void) REMR3NotifyPhysRomRegister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb, void *pvCopy, bool fShadow); 90 87 REMR3DECL(void) REMR3NotifyPhysRamDeregister(PVM pVM, RTGCPHYS GCPhys, RTUINT cb); -
trunk/include/VBox/vmm.h
r17422 r18660 94 94 /** Allocates more handy pages. */ 95 95 VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES, 96 #ifndef VBOX_WITH_NEW_PHYS_CODE97 /** Dynamically allocate physical guest RAM. */98 VMMCALLHOST_PGM_RAM_GROW_RANGE,99 #endif100 96 /** Replay the REM handler notifications. */ 101 97 VMMCALLHOST_REM_REPLAY_HANDLER_NOTIFICATIONS,
Note:
See TracChangeset
for help on using the changeset viewer.