Changeset 63660 in vbox
- Timestamp:
- Aug 30, 2016 1:38:04 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 110403
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/mm.h
r62476 r63660 294 294 * @{ */ 295 295 VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM); 296 VMMR3DECL(uint32_t) MMR3PhysGetRamSizeBelow4GB(PVM pVM); 297 VMMR3DECL(uint64_t) MMR3PhysGetRamSizeAbove4GB(PVM pVM); 298 VMMR3DECL(uint32_t) MMR3PhysGet4GBRamHoleSize(PVM pVM); 296 299 /** @} */ 297 300 -
trunk/src/VBox/VMM/VMMR3/MM.cpp
r62478 r63660 418 418 * Setup the base ram (PGM). 419 419 */ 420 pVM->mm.s.cbRamHole = cbRamHole; 420 421 if (cbRam > offRamHole) 421 422 { 423 pVM->mm.s.cbRamBelow4GB = offRamHole; 422 424 rc = PGMR3PhysRegisterRam(pVM, 0, offRamHole, "Base RAM"); 423 425 if (RT_SUCCESS(rc)) 426 { 427 pVM->mm.s.cbRamAbove4GB = cbRam - offRamHole; 424 428 rc = PGMR3PhysRegisterRam(pVM, _4G, cbRam - offRamHole, "Above 4GB Base RAM"); 429 } 425 430 } 426 431 else 427 rc = PGMR3PhysRegisterRam(pVM, 0, RT_MIN(cbRam, offRamHole), "Base RAM"); 432 { 433 pVM->mm.s.cbRamBelow4GB = cbRam; 434 pVM->mm.s.cbRamAbove4GB = 0; 435 rc = PGMR3PhysRegisterRam(pVM, 0, cbRam, "Base RAM"); 436 } 428 437 429 438 /* … … 804 813 } 805 814 815 816 /** 817 * Get the size of RAM below 4GB (starts at address 0x00000000). 818 * 819 * @returns The amount of RAM below 4GB in bytes. 820 * @param pVM The cross context VM structure. 821 * @thread Any. 822 */ 823 VMMR3DECL(uint32_t) MMR3PhysGetRamSizeBelow4GB(PVM pVM) 824 { 825 VM_ASSERT_VALID_EXT_RETURN(pVM, UINT32_MAX); 826 return pVM->mm.s.cbRamBelow4GB; 827 } 828 829 830 /** 831 * Get the size of RAM above 4GB (starts at address 0x000100000000). 832 * 833 * @returns The amount of RAM above 4GB in bytes. 834 * @param pVM The cross context VM structure. 835 * @thread Any. 836 */ 837 VMMR3DECL(uint64_t) MMR3PhysGetRamSizeAbove4GB(PVM pVM) 838 { 839 VM_ASSERT_VALID_EXT_RETURN(pVM, UINT64_MAX); 840 return pVM->mm.s.cbRamBelow4GB; 841 } 842 843 844 /** 845 * Get the size of the RAM hole below 4GB. 846 * 847 * @returns Size in bytes. 848 * @param pVM The cross context VM structure. 849 * @thread Any. 850 */ 851 VMMR3DECL(uint32_t) MMR3PhysGet4GBRamHoleSize(PVM pVM) 852 { 853 VM_ASSERT_VALID_EXT_RETURN(pVM, UINT32_MAX); 854 return pVM->mm.s.cbRamHole; 855 } 856 857 -
trunk/src/VBox/VMM/include/MMInternal.h
r62478 r63660 761 761 /** Size of the base RAM in bytes. (The CFGM RamSize value.) */ 762 762 uint64_t cbRamBase; 763 /** Number of bytes of RAM above 4GB, starting at address 4GB. */ 764 uint64_t cbRamAbove4GB; 765 /** Size of the below 4GB RAM hole. */ 766 uint32_t cbRamHole; 767 /** Number of bytes of RAM below 4GB, starting at address 0. */ 768 uint32_t cbRamBelow4GB; 763 769 /** The number of base RAM pages that PGM has reserved (GMM). 764 770 * @remarks Shadow ROMs will be counted twice (RAM+ROM), so it won't be 1:1 with
Note:
See TracChangeset
for help on using the changeset viewer.