Changeset 66175 in vbox
- Timestamp:
- Mar 21, 2017 11:05:19 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 114087
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModes.c
r65959 r66175 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - Bs3TestDoMode Tests3 * BS3Kit - Bs3TestDoModes 4 4 */ 5 5 … … 37 37 # include "bs3-cmn-test.h" 38 38 #endif 39 40 41 /********************************************************************************************************************************* 42 * Defined Constants And Macros * 43 *********************************************************************************************************************************/ 44 /** @def CONV_TO_FLAT 45 * Get flat address. In 16-bit the parameter is a real mode far address, while 46 * in 32-bit and 64-bit modes it is already flat. 47 */ 48 /** @def CONV_TO_PROT_FAR16 49 * Get a 32-bit value that makes a protected mode far 16:16 address. 50 */ 51 /** @def CONV_TO_RM_FAR16 52 * Get a 32-bit value that makes a real mode far 16:16 address. In 16-bit mode 53 * this is already what we've got, except must be converted to uint32_t. 54 */ 55 #if ARCH_BITS == 16 56 # define CONV_TO_FLAT(a_fpfn) (((uint32_t)BS3_FP_SEG(a_fpfn) << 4) + BS3_FP_OFF(a_fpfn)) 57 # define CONV_TO_PROT_FAR16(a_fpfn) RT_MAKE_U32(BS3_FP_OFF(a_fpfn), Bs3SelRealModeCodeToProtMode(BS3_FP_SEG(a_fpfn))) 58 # define CONV_TO_RM_FAR16(a_fpfn) RT_MAKE_U32(BS3_FP_OFF(a_fpfn), BS3_FP_SEG(a_fpfn)) 59 #else 60 # define CONV_TO_FLAT(a_fpfn) ((uint32_t)(uintptr_t)(a_fpfn)) 61 # define CONV_TO_PROT_FAR16(a_fpfn) Bs3SelFlatCodeToProtFar16((uint32_t)(uintptr_t)(a_fpfn)) 62 # define CONV_TO_RM_FAR16(a_fpfn) Bs3SelFlatCodeToRealMode( (uint32_t)(uintptr_t)(a_fpfn)) 63 #endif 64 65 66 /********************************************************************************************************************************* 67 * Assembly Symbols * 68 *********************************************************************************************************************************/ 69 /* These are in the same code segment as this code, so no FAR necessary. */ 70 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInRM)(uint32_t uCallbackFarPtr); 71 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16)(uint32_t uCallbackFarPtr); 72 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16_32)(uint32_t uFlatAddrCallback); 73 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16_V86)(uint32_t uCallbackFarPtr); 74 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE32)(uint32_t uFlatAddrCallback); 75 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE32_16)(uint32_t uCallbackFarPtr); 76 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPEV86)(uint32_t uCallbackFarPtr); 77 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16)(uint32_t uCallbackFarPtr); 78 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16_32)(uint32_t uFlatAddrCallback); 79 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16_V86)(uint32_t uCallbackFarPtr); 80 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP32)(uint32_t uFlatAddrCallback); 81 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP32_16)(uint32_t uCallbackFarPtr); 82 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPPV86)(uint32_t uCallbackFarPtr); 83 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16)(uint32_t uCallbackFarPtr); 84 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16_32)(uint32_t uFlatAddrCallback); 85 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16_V86)(uint32_t uCallbackFarPtr); 86 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE32)(uint32_t uFlatAddrCallback); 87 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE32_16)(uint32_t uCallbackFarPtr); 88 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAEV86)(uint32_t uCallbackFarPtr); 89 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM16)(uint32_t uCallbackFarPtr); 90 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM32)(uint32_t uFlatAddrCallback); 91 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM64)(uint32_t uFlatAddrCallback); 39 #include "bs3-mode-TestDoModes.h" 92 40 93 41 … … 255 203 { 256 204 PRE_DO_CALL(g_szBs3ModeName_pe16_32); 257 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPE16_32) );205 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPE16_32), BS3_MODE_PE16_32); 258 206 CHECK_RESULT(g_szBs3ModeName_pe16_32); 259 207 } … … 269 217 { 270 218 PRE_DO_CALL(g_szBs3ModeName_pe32); 271 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(paEntries[i].pfnDoPE32) );219 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(paEntries[i].pfnDoPE32), BS3_MODE_PE32); 272 220 CHECK_RESULT(g_szBs3ModeName_pe32); 273 221 } … … 300 248 { 301 249 PRE_DO_CALL(g_szBs3ModeName_pp16_32); 302 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPP16_32) );250 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPP16_32), BS3_MODE_PP16_32); 303 251 CHECK_RESULT(g_szBs3ModeName_pp16_32); 304 252 } … … 314 262 { 315 263 PRE_DO_CALL(g_szBs3ModeName_pp32); 316 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(paEntries[i].pfnDoPP32) );264 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(paEntries[i].pfnDoPP32), BS3_MODE_PP32); 317 265 CHECK_RESULT(g_szBs3ModeName_pp32); 318 266 } … … 352 300 { 353 301 PRE_DO_CALL(g_szBs3ModeName_pae16_32); 354 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE16_32) );302 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE16_32), BS3_MODE_PAE16_32); 355 303 CHECK_RESULT(g_szBs3ModeName_pae16_32); 356 304 } … … 366 314 { 367 315 PRE_DO_CALL(g_szBs3ModeName_pae32); 368 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE32) );316 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE32), BS3_MODE_PAE32); 369 317 CHECK_RESULT(g_szBs3ModeName_pae32); 370 318 } … … 411 359 { 412 360 PRE_DO_CALL(g_szBs3ModeName_lm64); 413 bErrNo = TMPL_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(paEntries[i].pfnDoLM64) );361 bErrNo = TMPL_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(paEntries[i].pfnDoLM64), BS3_MODE_LM64); 414 362 CHECK_RESULT(g_szBs3ModeName_lm64); 415 363 } -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c
r64703 r66175 37 37 # include "bs3-cmn-test.h" 38 38 #endif 39 40 41 /********************************************************************************************************************************* 42 * Defined Constants And Macros * 43 *********************************************************************************************************************************/ 44 /** @def CONV_TO_FLAT 45 * Get flat address. In 16-bit the parameter is a real mode far address, while 46 * in 32-bit and 64-bit modes it is already flat. 47 */ 48 /** @def CONV_TO_PROT_FAR16 49 * Get a 32-bit value that makes a protected mode far 16:16 address. 50 */ 51 /** @def CONV_TO_RM_FAR16 52 * Get a 32-bit value that makes a real mode far 16:16 address. In 16-bit mode 53 * this is already what we've got, except must be converted to uint32_t. 54 */ 55 #if ARCH_BITS == 16 56 # define CONV_TO_FLAT(a_fpfn) (((uint32_t)BS3_FP_SEG(a_fpfn) << 4) + BS3_FP_OFF(a_fpfn)) 57 # define CONV_TO_PROT_FAR16(a_fpfn) RT_MAKE_U32(BS3_FP_OFF(a_fpfn), Bs3SelRealModeCodeToProtMode(BS3_FP_SEG(a_fpfn))) 58 # define CONV_TO_RM_FAR16(a_fpfn) RT_MAKE_U32(BS3_FP_OFF(a_fpfn), BS3_FP_SEG(a_fpfn)) 59 #else 60 # define CONV_TO_FLAT(a_fpfn) ((uint32_t)(uintptr_t)(a_fpfn)) 61 # define CONV_TO_PROT_FAR16(a_fpfn) Bs3SelFlatCodeToProtFar16((uint32_t)(uintptr_t)(a_fpfn)) 62 # define CONV_TO_RM_FAR16(a_fpfn) Bs3SelFlatCodeToRealMode( (uint32_t)(uintptr_t)(a_fpfn)) 63 #endif 39 #include "bs3-mode-TestDoModes.h" 64 40 65 41 … … 67 43 * Assembly Symbols * 68 44 *********************************************************************************************************************************/ 69 /* These are in the same code segment as this code, so no FAR necessary. */70 #if ARCH_BITS != 6471 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInRM)(uint32_t uCallbackFarPtr);72 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16)(uint32_t uCallbackFarPtr);73 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16_32)(uint32_t uFlatAddrCallback);74 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16_V86)(uint32_t uCallbackFarPtr);75 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE32)(uint32_t uFlatAddrCallback);76 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE32_16)(uint32_t uCallbackFarPtr);77 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPEV86)(uint32_t uCallbackFarPtr);78 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16)(uint32_t uCallbackFarPtr);79 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16_32)(uint32_t uFlatAddrCallback);80 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16_V86)(uint32_t uCallbackFarPtr);81 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP32)(uint32_t uFlatAddrCallback);82 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP32_16)(uint32_t uCallbackFarPtr);83 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPPV86)(uint32_t uCallbackFarPtr);84 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16)(uint32_t uCallbackFarPtr);85 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16_32)(uint32_t uFlatAddrCallback);86 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16_V86)(uint32_t uCallbackFarPtr);87 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE32)(uint32_t uFlatAddrCallback);88 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE32_16)(uint32_t uCallbackFarPtr);89 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAEV86)(uint32_t uCallbackFarPtr);90 #endif91 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM16)(uint32_t uCallbackFarPtr);92 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM32)(uint32_t uFlatAddrCallback);93 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM64)(uint32_t uFlatAddrCallback);94 95 96 45 /* Assembly helpers for switching to the work bitcount and calling it. */ 97 46 BS3_DECL_FAR(uint8_t) Bs3TestCallDoerTo16_f16(uint8_t bMode); … … 213 162 PRE_DO_CALL(g_szBs3ModeName_pe16_32); 214 163 # if ARCH_BITS == 32 215 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker) );216 # else 217 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)) );164 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PE16_32); 165 # else 166 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PE16_32); 218 167 # endif 219 168 CHECK_RESULT(g_szBs3ModeName_pe16_32); … … 235 184 PRE_DO_CALL(g_szBs3ModeName_pe32); 236 185 # if ARCH_BITS == 32 237 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(paEntries[i].pfnWorker) );238 # else 239 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)) );186 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PE32); 187 # else 188 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PE32); 240 189 # endif 241 190 CHECK_RESULT(g_szBs3ModeName_pe32); … … 282 231 PRE_DO_CALL(g_szBs3ModeName_pp16_32); 283 232 # if ARCH_BITS == 32 284 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker) );285 # else 286 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)) );233 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PP16_32); 234 # else 235 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PP16_32); 287 236 # endif 288 237 CHECK_RESULT(g_szBs3ModeName_pp16_32); … … 304 253 PRE_DO_CALL(g_szBs3ModeName_pp32); 305 254 # if ARCH_BITS == 32 306 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(paEntries[i].pfnWorker) );307 # else 308 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)) );255 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PP32); 256 # else 257 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PP32); 309 258 # endif 310 259 CHECK_RESULT(g_szBs3ModeName_pp32); … … 352 301 PRE_DO_CALL(g_szBs3ModeName_pae16_32); 353 302 # if ARCH_BITS == 32 354 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker) );355 # else 356 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)) );303 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PAE16_32); 304 # else 305 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PAE16_32); 357 306 # endif 358 307 CHECK_RESULT(g_szBs3ModeName_pae16_32); … … 374 323 PRE_DO_CALL(g_szBs3ModeName_pae32); 375 324 # if ARCH_BITS == 32 376 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(paEntries[i].pfnWorker) );377 # else 378 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)) );325 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_PAE32); 326 # else 327 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c32)), BS3_MODE_PAE32); 379 328 # endif 380 329 CHECK_RESULT(g_szBs3ModeName_pae32); … … 441 390 PRE_DO_CALL(g_szBs3ModeName_lm64); 442 391 #if ARCH_BITS == 64 443 bErrNo = TMPL_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(paEntries[i].pfnWorker) );392 bErrNo = TMPL_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(paEntries[i].pfnWorker), BS3_MODE_LM64); 444 393 #else 445 bErrNo = TMPL_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c64)) );394 bErrNo = TMPL_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(RT_CONCAT3(Bs3TestCallDoerTo,ARCH_BITS,_c64)), BS3_MODE_LM64); 446 395 #endif 447 396 CHECK_RESULT(g_szBs3ModeName_lm64); -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesHlp.asm
r64694 r66175 366 366 367 367 ;; 368 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE16_32(uint 16_t offBs3Text16);368 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE16_32(uint32_t FlatWorkerAddr, uint8_t bMode); 369 369 ; @uses rax 370 370 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16_32, BS3_PBC_NEAR … … 373 373 .doit: 374 374 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 375 movzx edx, byte [xBP + xCB + cbCurRetAddr + sCB] ; bMode 375 376 376 377 ; Mode switch, make the call, switch back. … … 384 385 STRICT_CHECK_REGS 385 386 386 push BS3_MODE_PE16_32387 push edx ; bMode 387 388 call eax 388 389 … … 437 438 438 439 ;; 439 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE32(uint 16_t offBs3Text16);440 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE32(uint32_t FlatWorkerAddr, uint8_t bMode); 440 441 ; @uses rax 441 442 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE32, BS3_PBC_NEAR … … 444 445 .doit: 445 446 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 447 movzx edx, byte [xBP + xCB + cbCurRetAddr + sCB] ; bMode 446 448 447 449 ; Mode switch, make the call, switch back. … … 455 457 STRICT_CHECK_REGS 456 458 457 push BS3_MODE_PE32459 push edx ; bMode 458 460 call eax 459 461 … … 598 600 599 601 ;; 600 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP16_32(uint 16_t offBs3Text16);602 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP16_32(uint32_t uFlatWorkerAddr, uint8_t bMode); 601 603 ; @uses rax 602 604 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16_32, BS3_PBC_NEAR … … 605 607 .doit: 606 608 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 609 movzx edx, byte [xBP + xCB + cbCurRetAddr + sCB] ; bMode 607 610 608 611 ; Mode switch, make the call, switch back. … … 616 619 STRICT_CHECK_REGS 617 620 618 push BS3_MODE_PP16_32621 push edx 619 622 call eax 620 623 … … 669 672 670 673 ;; 671 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP32(uint 16_t offBs3Text16);674 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP32(uint32_t uFlatWorkerAddr, uint8_t bMode); 672 675 ; @uses rax 673 676 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP32, BS3_PBC_NEAR … … 676 679 .doit: 677 680 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 681 movzx edx, byte [xBP + xCB + cbCurRetAddr + sCB] ; bMode 678 682 679 683 ; Mode switch, make the call, switch back. … … 687 691 STRICT_CHECK_REGS 688 692 689 push BS3_MODE_PP32693 push edx ; bMode 690 694 call eax 691 695 … … 829 833 830 834 ;; 831 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE16_32(uint 16_t offBs3Text16);835 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE16_32(uint32_t uFlatWorkerAddr, uint8_t bMode); 832 836 ; @uses rax 833 837 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16_32, BS3_PBC_NEAR … … 836 840 .doit: 837 841 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 842 movzx edx, byte [xBP + xCB + cbCurRetAddr + sCB] ; bMode 838 843 839 844 ; Mode switch, make the call, switch back. … … 847 852 STRICT_CHECK_REGS 848 853 849 push BS3_MODE_PAE16_32854 push edx ; bMode 850 855 call eax 851 856 … … 900 905 901 906 ;; 902 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE32(uint 16_t offBs3Text16);907 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE32(uint32_t uFlatWorkerAddr, uint8_t bMode); 903 908 ; @uses rax 904 909 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE32, BS3_PBC_NEAR … … 907 912 .doit: 908 913 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 914 movzx edx, byte [xBP + xCB + cbCurRetAddr + sCB] ; bMode 909 915 910 916 ; Mode switch, make the call, switch back. … … 918 924 STRICT_CHECK_REGS 919 925 920 push BS3_MODE_PAE32926 push edx ; bMode 921 927 call eax 922 928 … … 1091 1097 1092 1098 ;; 1093 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInLM64(uint 16_t offBs3Text16);1099 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInLM64(uint32_t uFlatWorkerAddr, uint8_t bMode); 1094 1100 ; @uses rax 1095 1101 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM64, BS3_PBC_NEAR … … 1097 1103 jmp TMPL_NM(bs3TestCallDoerPrologue) 1098 1104 .doit: 1099 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 1105 mov eax, [xBP + xCB + cbCurRetAddr] ; Load function pointer. 1106 movzx edx, byte [xBP + xCB + cbCurRetAddr + sCB] ; bMode 1100 1107 1101 1108 ; Mode switch, make the call, switch back. … … 1111 1118 and rsp, ~0fh 1112 1119 sub rsp, 18h 1113 push BS3_MODE_LM641120 push rdx ; bMode 1114 1121 BS3_CALL rax, 1 1115 1122
Note:
See TracChangeset
for help on using the changeset viewer.