Changeset 92262 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Nov 8, 2021 11:12:17 AM (3 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r92256 r92262 290 290 bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE 291 291 bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \ 292 bs3-cmn-PagingMapRamAbove4GForLM.c \ 292 293 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \ 293 294 bs3-cmn-UInt64Div.c \ … … 307 308 bs3kit-common-64_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE 308 309 bs3kit-common-64_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \ 310 bs3-cmn-PagingMapRamAbove4GForLM.c \ 309 311 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \ 310 312 bs3-c64-Trap64Generic.asm \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitMemory.c
r92256 r92262 94 94 95 95 96 /** The lastRAM address below 4GB (approximately). */96 /** The end RAM address below 4GB (approximately). */ 97 97 uint32_t g_uBs3EndOfRamBelow4G = 0; 98 98 /** The end RAM address above 4GB, zero if no memory above 4GB. */ 99 uint64_t g_uBs3EndOfRamAbove4G = 0; 99 100 100 101 … … 241 242 { 242 243 if (Entry.uType == INT15E820_TYPE_USABLE) 244 { 243 245 if (!(Entry.uBaseAddr >> 32)) 244 246 /* Convert from 64-bit to 32-bit value and record it. */ 245 247 bs3InitMemoryAddRange32((uint32_t)Entry.uBaseAddr, 246 248 (Entry.cbRange >> 32) ? UINT32_C(0xfffff000) : (uint32_t)Entry.cbRange); 249 else 250 { 251 uint64_t uEnd = Entry.uBaseAddr + Entry.cbRange; 252 if (uEnd > g_uBs3EndOfRamAbove4G) 253 g_uBs3EndOfRamAbove4G = uEnd; 254 } 255 } 247 256 248 257 /* next */ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r92256 r92262 49 49 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingInitRootForPAE) 50 50 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingInitRootForPP) 51 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingMapRamAbove4GForLM) 51 52 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtect) 52 53 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtectPtr) … … 143 144 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,bs3PagingGetLegacyPte) 144 145 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,bs3PagingGetPaePte) 146 $(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,Bs3BiosInt15hE820) 145 147 $(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,Bs3SwitchTo32BitAndCallC) 146 148 $(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,Bs3BiosInt15h88) 147 $(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,Bs3BiosInt15hE820)148 149 $(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,Bs3TrapInit) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r92256 r92262 65 65 #define Bs3PagingInitRootForPAE BS3_CMN_MANGLER(Bs3PagingInitRootForPAE) 66 66 #define Bs3PagingInitRootForPP BS3_CMN_MANGLER(Bs3PagingInitRootForPP) 67 #define Bs3PagingMapRamAbove4GForLM BS3_CMN_MANGLER(Bs3PagingMapRamAbove4GForLM) 67 68 #define Bs3PagingProtect BS3_CMN_MANGLER(Bs3PagingProtect) 68 69 #define Bs3PagingProtectPtr BS3_CMN_MANGLER(Bs3PagingProtectPtr) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r92256 r92262 65 65 #undef Bs3PagingInitRootForPAE 66 66 #undef Bs3PagingInitRootForPP 67 #undef Bs3PagingMapRamAbove4GForLM 67 68 #undef Bs3PagingProtect 68 69 #undef Bs3PagingProtectPtr -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r92256 r92262 2186 2186 BS3_CMN_PROTO_STUB(void, Bs3MemPrintInfo, (void)); 2187 2187 2188 /** Highes RAM byte below 4G. */2188 /** The end RAM address below 4GB (approximately). */ 2189 2189 extern uint32_t g_uBs3EndOfRamBelow4G; 2190 /** The end RAM address above 4GB, zero if no memory above 4GB. */ 2191 extern uint64_t g_uBs3EndOfRamAbove4G; 2190 2192 2191 2193 … … 2246 2248 */ 2247 2249 BS3_CMN_PROTO_STUB(int, Bs3PagingInitRootForLM,(void)); 2250 2251 /** 2252 * Maps all RAM above 4GB into the long mode page tables. 2253 * 2254 * This requires Bs3PagingInitRootForLM to have been called first. 2255 * 2256 * @returns IPRT status code. 2257 * @retval VERR_WRONG_ORDER if Bs3PagingInitRootForLM wasn't called. 2258 * @retval VINF_ALREADY_INITIALIZED if already called or someone mapped 2259 * something else above 4GiB already. 2260 * @retval VERR_OUT_OF_RANGE if too much RAM (more than 2^47 bytes). 2261 * @retval VERR_NO_MEMORY if no more memory for paging structures. 2262 * @retval VERR_UNSUPPORTED_ALIGNMENT if the bs3kit allocator malfunctioned and 2263 * didn't give us page aligned memory as it should. 2264 * 2265 * @param puFailurePoint Where to return the address where we encountered 2266 * a failure. Optional. 2267 * 2268 * @remarks Must be called in 32-bit or 64-bit mode as paging structures will be 2269 * allocated using BS3MEMKIND_FLAT32, as there might not be sufficient 2270 * BS3MEMKIND_TILED memory around. (Also, too it's simply too much of 2271 * a bother to deal with 16-bit for something that's long-mode only.) 2272 */ 2273 BS3_CMN_PROTO_STUB(int, Bs3PagingMapRamAbove4GForLM,(uint64_t *puFailurePoint)); 2248 2274 2249 2275 /**
Note:
See TracChangeset
for help on using the changeset viewer.