Changeset 64703 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Nov 17, 2016 10:51:37 PM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingAlias.c
r62471 r64703 166 166 #if ARCH_BITS == 16 167 167 /* 168 * We can do this stuff in v8086 mode.168 * We can't do this stuff in v8086 mode, so switch to 16-bit prot mode and do it there. 169 169 */ 170 170 else -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingProtect.c
r62471 r64703 362 362 } 363 363 364 365 #undef Bs3PagingGetPte 366 BS3_CMN_DEF(void BS3_FAR *, Bs3PagingGetPte,(uint64_t uFlat, int *prc)) 367 { 368 RTCCUINTXREG const cr3 = ASMGetCR3(); 369 RTCCUINTXREG const cr4 = g_uBs3CpuDetected & BS3CPU_F_CPUID ? ASMGetCR4() : 0; 370 bool const fLegacyPTs = !(cr4 & X86_CR4_PAE); 371 bool const fUseInvlPg = (g_uBs3CpuDetected & BS3CPU_TYPE_MASK) >= BS3CPU_80486; 372 int rc; 373 if (!prc) 374 prc = &rc; 375 if (!fLegacyPTs) 376 return BS3_CMN_FAR_NM(bs3PagingGetPte)(cr3, g_bBs3CurrentMode, uFlat, fUseInvlPg, prc); 377 if (uFlat < _4G) 378 return BS3_CMN_FAR_NM(bs3PagingGetLegacyPte)(cr3, (uint32_t)uFlat, fUseInvlPg, prc); 379 *prc = VERR_OUT_OF_RANGE; 380 return NULL; 381 } 382 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c
r64694 r64703 151 151 for (i = 0; i < cEntries; i++) 152 152 { 153 const char *pszFmtStr = "Error #%u (%#x) in %s!\n"; 154 bool fSkipped = true; 153 const char *pszFmtStr = "Error #%u (%#x) in %s!\n"; 154 bool fSkipped = true; 155 bool const fOnlyPaging = RT_BOOL(paEntries[i].fFlags & BS3TESTMODEBYONEENTRY_F_ONLY_PAGING); 155 156 uint8_t bErrNo; 156 157 Bs3TestSub(paEntries[i].pszSubTest); … … 173 174 174 175 # if ARCH_BITS == 16 175 if ( true)176 if (!fOnlyPaging) 176 177 { 177 178 PRE_DO_CALL(g_szBs3ModeName_rm); … … 191 192 * Unpaged prot mode. 192 193 */ 193 if ( true)194 if (!fOnlyPaging) 194 195 { 195 196 PRE_DO_CALL(g_szBs3ModeName_pe16); … … 208 209 } 209 210 210 if ( true)211 if (!fOnlyPaging) 211 212 { 212 213 PRE_DO_CALL(g_szBs3ModeName_pe16_32); … … 219 220 } 220 221 221 if (fDoWeirdV86Modes )222 if (fDoWeirdV86Modes && !fOnlyPaging) 222 223 { 223 224 PRE_DO_CALL(g_szBs3ModeName_pe16_v86); … … 230 231 } 231 232 232 if ( true)233 if (!fOnlyPaging) 233 234 { 234 235 PRE_DO_CALL(g_szBs3ModeName_pe32); … … 241 242 } 242 243 243 if ( true)244 if (!fOnlyPaging) 244 245 { 245 246 PRE_DO_CALL(g_szBs3ModeName_pe32_16); … … 252 253 } 253 254 254 if (fDoV86Modes )255 if (fDoV86Modes && !fOnlyPaging) 255 256 { 256 257 PRE_DO_CALL(g_szBs3ModeName_pev86); -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r61389 r64703 65 65 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemMove) 66 66 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemPCpy) 67 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingGetPde) 68 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingGetPte) 67 69 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingSetupCanonicalTraps) 68 70 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabAlloc) … … 123 125 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,bs3PagingGetLegacyPte) 124 126 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,bs3PagingGetPte) 127 $(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,Bs3SwitchTo32BitAndCallC) 125 128 $(call BS3KIT_FN_GEN_MODE_NEARSTUB,bs3kit-common-16,Bs3TrapInit) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r61389 r64703 50 50 #define Bs3PagingAlias BS3_CMN_MANGLER(Bs3PagingAlias) 51 51 #define bs3PagingGetLegacyPte BS3_CMN_MANGLER(bs3PagingGetLegacyPte) 52 #define Bs3PagingGetPde BS3_CMN_MANGLER(Bs3PagingGetPde) 53 #define Bs3PagingGetPte BS3_CMN_MANGLER(Bs3PagingGetPte) 52 54 #define bs3PagingGetPte BS3_CMN_MANGLER(bs3PagingGetPte) 53 55 #define Bs3PagingInitRootForLM BS3_CMN_MANGLER(Bs3PagingInitRootForLM) … … 153 155 #ifndef BS3_CMN_ONLY 154 156 # define Bs3CpuDetect BS3_MODE_MANGLER(Bs3CpuDetect) 157 # define Bs3SwitchTo32BitAndCallC BS3_MODE_MANGLER(Bs3SwitchTo32BitAndCallC) 155 158 # define Bs3TestDoModes BS3_MODE_MANGLER(Bs3TestDoModes) 156 159 # define Bs3TestDoModesByOne BS3_MODE_MANGLER(Bs3TestDoModesByOne) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r61389 r64703 50 50 #undef Bs3PagingAlias 51 51 #undef bs3PagingGetLegacyPte 52 #undef Bs3PagingGetPde 53 #undef Bs3PagingGetPte 52 54 #undef bs3PagingGetPte 53 55 #undef Bs3PagingInitRootForLM … … 153 155 #ifndef BS3_CMN_ONLY 154 156 # undef Bs3CpuDetect 157 # undef Bs3SwitchTo32BitAndCallC 155 158 # undef Bs3TestDoModes 156 159 # undef Bs3TestDoModesByOne -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r64698 r64703 2202 2202 BS3_CMN_PROTO_STUB(int, Bs3PagingUnalias,(uint64_t uDst, uint32_t cbHowMuch)); 2203 2203 2204 /** 2205 * Get the pointer to the PTE for the given address. 2206 * 2207 * @returns Pointer to the PTE. 2208 * @param uFlat The flat address of the page which PTE we want. 2209 * @param prc Where to return additional error info. Optional. 2210 */ 2211 BS3_CMN_PROTO_STUB(void BS3_FAR *, Bs3PagingGetPte,(uint64_t uFlat, int *prc)); 2212 2213 /** 2214 * Get the pointer to the PDE for the given address. 2215 * 2216 * @returns Pointer to the PDE. 2217 * @param uFlat The flat address of the page which PDE we want. 2218 */ 2219 BS3_CMN_PROTO_STUB(void BS3_FAR *, Bs3PagingGetPde,(uint64_t uFlat)); 2220 2204 2221 2205 2222 /** The physical / flat address of the buffer backing the canonical traps. … … 3099 3116 const char * BS3_FAR pszSubTest; 3100 3117 PFNBS3TESTDOMODE pfnWorker; 3101 uint32_t u32Reserved; 3118 /** BS3TESTMODEBYONEENTRY_F_XXX. */ 3119 uint32_t fFlags; 3102 3120 } BS3TESTMODEBYONEENTRY; 3103 3121 /** Pointer to a mode-by-one sub-test entry. */ 3104 3122 typedef BS3TESTMODEBYONEENTRY const *PCBS3TESTMODEBYONEENTRY; 3123 3124 /** @name BS3TESTMODEBYONEENTRY_F_XXX - flags. 3125 * @{ */ 3126 /** Only test modes that has paging enabled. */ 3127 #define BS3TESTMODEBYONEENTRY_F_ONLY_PAGING RT_BIT_32(0) 3128 /** @} */ 3105 3129 3106 3130
Note:
See TracChangeset
for help on using the changeset viewer.