Changeset 92529 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- Nov 21, 2021 2:46:44 AM (3 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r92262 r92529 195 195 bs3-cmn-TestIsVmmDevTestingPresent.asm \ 196 196 bs3-cmn-TestCheckRegCtxEx.c \ 197 bs3-cmn-TestQueryCfgU8.asm \ 198 bs3-cmn-TestQueryCfgU32.asm \ 197 199 bs3-cmn-TestHostPrintf.c \ 198 200 bs3-cmn-TestPrintf.c \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestQueryCfgU32.asm
r92524 r92529 32 32 33 33 ;; 34 ; @cproto BS3_DECL( void) bs3TestSendCmdWithU32_c16(uint32_t uCmd, uint32_t uValue);34 ; @cproto BS3_DECL(uint32_t) Bs3TestQueryCfgU32(uint16_t uCfg); 35 35 ; 36 BS3_PROC_BEGIN_CMN bs3TestSendCmdWithU32, BS3_PBC_HYBRID37 BS3_CALL_CONV_PROLOG 236 BS3_PROC_BEGIN_CMN Bs3TestQueryCfgU8, BS3_PBC_HYBRID 37 BS3_CALL_CONV_PROLOG 1 38 38 push xBP 39 39 mov xBP, xSP 40 push xAX 41 push xDX 42 push xSI 40 TNOT16 push xDX 43 41 44 42 cmp byte [BS3_DATA16_WRT(g_fbBs3VMMDevTesting)], 0 45 43 je .no_vmmdev 46 44 47 ; The command (uCmd) -45 ; Issue the query command. 48 46 mov dx, VMMDEV_TESTING_IOPORT_CMD 49 47 %if TMPL_BITS == 16 50 mov ax, [xBP + xCB + cbCurRetAddr] ; We ignore the top bits in 16-bit mode.48 mov ax, VMMDEV_TESTING_CMD_QUERY_CFG - VMMDEV_TESTING_CMD_MAGIC_HI_WORD 51 49 out dx, ax 52 50 %else 53 mov eax, [xBP + xCB*2]51 mov eax, VMMDEV_TESTING_CMD_QUERY_CFG 54 52 out dx, eax 55 53 %endif 56 54 55 ; Write what we wish to query. 56 mov ax, [xBP + xCB + cbCurRetAddr] 57 mov dx, VMMDEV_TESTING_IOPORT_DATA 58 out dx, ax 57 59 58 ; The value (uValue). 59 mov dx, VMMDEV_TESTING_IOPORT_DATA 60 ; Read back the result. 60 61 %if TMPL_BITS == 16 61 mov ax, [xBP + xCB + cbCurRetAddr + sCB] 62 out dx, ax 63 mov ax, [xBP + xCB + cbCurRetAddr + sCB + 2] 64 out dx, ax 62 in ax, dx 63 push ax 64 in ax, dx 65 mov dx, ax 66 pop ax 65 67 %else 66 mov eax, [xBP + xCB*2 + sCB] 67 out dx, eax 68 in eax, dx 68 69 %endif 69 70 71 .return: 72 TNOT16 pop xDX 73 pop xBP 74 BS3_CALL_CONV_EPILOG 1 75 BS3_HYBRID_RET 70 76 .no_vmmdev: 71 pop xSI 72 pop xDX 73 pop xAX 74 pop xBP 75 BS3_CALL_CONV_EPILOG 2 76 BS3_HYBRID_RET 77 BS3_PROC_END_CMN bs3TestSendCmdWithU32 77 xor xAX, xAX 78 %if TMPL_BITS == 16 79 xor xDX, xDX 80 %endif 81 jmp .return 82 BS3_PROC_END_CMN Bs3TestQueryCfgU32 78 83 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestQueryCfgU8.asm
r92524 r92529 32 32 33 33 ;; 34 ; @cproto BS3_DECL(void) bs3TestSendCmdWithU32_c16(uint32_t uCmd, uint32_t uValue); 34 ; @cproto BS3_DECL(uint8_t) Bs3TestQueryCfgU8(uint16_t uCfg); 35 ; @cproto BS3_DECL(bool) Bs3TestQueryCfgBool(uint16_t uCfg); 35 36 ; 36 BS3_PROC_BEGIN_CMN bs3TestSendCmdWithU32, BS3_PBC_HYBRID 37 BS3_CALL_CONV_PROLOG 2 37 BS3_GLOBAL_NAME_EX BS3_CMN_NM(Bs3TestQueryCfgBool), function, 3 38 BS3_PROC_BEGIN_CMN Bs3TestQueryCfgU8, BS3_PBC_HYBRID 39 BS3_CALL_CONV_PROLOG 1 38 40 push xBP 39 41 mov xBP, xSP 40 push xAX41 42 push xDX 42 push xSI43 43 44 xor al, al 44 45 cmp byte [BS3_DATA16_WRT(g_fbBs3VMMDevTesting)], 0 45 46 je .no_vmmdev 46 47 47 ; The command (uCmd) -48 ; Issue the query command. 48 49 mov dx, VMMDEV_TESTING_IOPORT_CMD 49 50 %if TMPL_BITS == 16 50 mov ax, [xBP + xCB + cbCurRetAddr] ; We ignore the top bits in 16-bit mode.51 mov ax, VMMDEV_TESTING_CMD_QUERY_CFG - VMMDEV_TESTING_CMD_MAGIC_HI_WORD 51 52 out dx, ax 52 53 %else 53 mov eax, [xBP + xCB*2]54 mov eax, VMMDEV_TESTING_CMD_QUERY_CFG 54 55 out dx, eax 55 56 %endif 56 57 58 ; Write what we wish to query. 59 mov ax, [xBP + xCB + cbCurRetAddr] 60 mov dx, VMMDEV_TESTING_IOPORT_DATA 61 out dx, ax 57 62 58 ; The value (uValue). 59 mov dx, VMMDEV_TESTING_IOPORT_DATA 60 %if TMPL_BITS == 16 61 mov ax, [xBP + xCB + cbCurRetAddr + sCB] 62 out dx, ax 63 mov ax, [xBP + xCB + cbCurRetAddr + sCB + 2] 64 out dx, ax 65 %else 66 mov eax, [xBP + xCB*2 + sCB] 67 out dx, eax 68 %endif 63 ; Read back the result. 64 in al, dx 69 65 70 66 .no_vmmdev: 71 pop xSI72 67 pop xDX 73 pop xAX74 68 pop xBP 75 BS3_CALL_CONV_EPILOG 269 BS3_CALL_CONV_EPILOG 1 76 70 BS3_HYBRID_RET 77 BS3_PROC_END_CMN bs3TestSendCmdWithU3271 BS3_PROC_END_CMN Bs3TestQueryCfgU8 78 72 73 %if TMPL_BITS == 16 74 BS3_GLOBAL_NAME_EX BS3_CMN_NM_FAR(Bs3TestQueryCfgBool), function, 3 75 jmp BS3_CMN_NM_FAR(Bs3TestQueryCfgU8) 76 %endif -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r92262 r92529 32 32 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelRealModeDataToFlat,4) 33 33 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelRealModeDataToProtFar16,4) 34 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelLnkPtrToCurPtr,4)35 34 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3ExtCtxRestore,4) 36 35 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3ExtCtxSave,4) 36 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelLnkPtrToCurPtr,4) 37 37 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3SelFar32ToFlat32NoClobber,6) 38 38 $(call BS3KIT_FN_GEN_CMN_FARSTUB,bs3kit-common-16,Bs3RegCtxSaveEx,8) … … 41 41 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestFailedF) 42 42 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestFailedV) 43 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestQueryCfgBool) 43 44 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3GetCpuVendor) 44 45 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3StrCpy) 46 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3GetModeNameShortLower) 45 47 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3GetModeName) 46 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3GetModeNameShortLower)47 48 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingAlias) 48 49 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingInitRootForLM) … … 50 51 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingInitRootForPP) 51 52 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingMapRamAbove4GForLM) 53 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtectPtr) 52 54 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtect) 53 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingProtectPtr)54 55 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingQueryAddressInfo) 55 56 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingUnalias) … … 72 73 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelFar32ToFlat32) 73 74 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SelProtFar32ToFlat32) 75 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestQueryCfgU32) 74 76 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestNow) 77 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestQueryCfgU8) 75 78 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapSetDpl) 79 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxFree) 76 80 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemAlloc) 77 81 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemAllocZ) … … 83 87 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingGetPte) 84 88 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3PagingSetupCanonicalTraps) 89 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabAllocEx) 85 90 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabAlloc) 86 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Slab AllocEx)91 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAllocEx) 87 92 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAlloc) 88 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabListAllocEx)89 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxFree)90 93 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemFree) 91 94 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3MemGuardedTestPageFree) … … 124 127 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestTerm) 125 128 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestValue) 129 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16InitEx) 126 130 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16Init) 127 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16InitEx)128 131 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap16SetGate) 129 132 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3Trap32Init) … … 134 137 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapPrintFrame) 135 138 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapReInit) 139 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86InitEx) 136 140 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86Init) 137 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86InitEx)138 141 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapRmV86SetGate) 139 142 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TrapSetHandlerEx) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r92262 r92529 165 165 #define Bs3TestPrintf BS3_CMN_MANGLER(Bs3TestPrintf) 166 166 #define Bs3TestPrintfV BS3_CMN_MANGLER(Bs3TestPrintfV) 167 #define Bs3TestQueryCfgBool BS3_CMN_MANGLER(Bs3TestQueryCfgBool) 168 #define Bs3TestQueryCfgU32 BS3_CMN_MANGLER(Bs3TestQueryCfgU32) 169 #define Bs3TestQueryCfgU8 BS3_CMN_MANGLER(Bs3TestQueryCfgU8) 167 170 #define Bs3TestSkipped BS3_CMN_MANGLER(Bs3TestSkipped) 168 171 #define Bs3TestSkippedF BS3_CMN_MANGLER(Bs3TestSkippedF) … … 191 194 #define Bs3TrapSetHandler BS3_CMN_MANGLER(Bs3TrapSetHandler) 192 195 #define Bs3TrapSetHandlerEx BS3_CMN_MANGLER(Bs3TrapSetHandlerEx) 196 #define Bs3TrapSetJmpAndRestore BS3_CMN_MANGLER(Bs3TrapSetJmpAndRestore) 193 197 #define Bs3TrapSetJmp BS3_CMN_MANGLER(Bs3TrapSetJmp) 194 #define Bs3TrapSetJmpAndRestore BS3_CMN_MANGLER(Bs3TrapSetJmpAndRestore)195 198 #define Bs3TrapUnsetJmp BS3_CMN_MANGLER(Bs3TrapUnsetJmp) 196 199 #define Bs3UInt32Div BS3_CMN_MANGLER(Bs3UInt32Div) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r92262 r92529 165 165 #undef Bs3TestPrintf 166 166 #undef Bs3TestPrintfV 167 #undef Bs3TestQueryCfgBool 168 #undef Bs3TestQueryCfgU32 169 #undef Bs3TestQueryCfgU8 167 170 #undef Bs3TestSkipped 168 171 #undef Bs3TestSkippedF … … 191 194 #undef Bs3TrapSetHandler 192 195 #undef Bs3TrapSetHandlerEx 196 #undef Bs3TrapSetJmpAndRestore 193 197 #undef Bs3TrapSetJmp 194 #undef Bs3TrapSetJmpAndRestore195 198 #undef Bs3TrapUnsetJmp 196 199 #undef Bs3UInt32Div -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r92524 r92529 3256 3256 BS3_CMN_PROTO_STUB(uint64_t, Bs3TestNow,(void)); 3257 3257 3258 3259 /** 3260 * Queries an unsigned 8-bit configuration value. 3261 * 3262 * @returns Value. 3263 * @param uCfg A VMMDEV_TESTING_CFG_XXX value. 3264 */ 3265 BS3_CMN_PROTO_STUB(uint8_t, Bs3TestQueryCfgU8,(uint16_t uCfg)); 3266 3267 /** 3268 * Queries an unsigned 8-bit configuration value. 3269 * 3270 * @returns Value. 3271 * @param uCfg A VMMDEV_TESTING_CFG_XXX value. 3272 */ 3273 BS3_CMN_PROTO_STUB(bool, Bs3TestQueryCfgBool,(uint16_t uCfg)); 3274 3275 /** 3276 * Queries an unsigned 32-bit configuration value. 3277 * 3278 * @returns Value. 3279 * @param uCfg A VMMDEV_TESTING_CFG_XXX value. 3280 */ 3281 BS3_CMN_PROTO_STUB(uint32_t, Bs3TestQueryCfgU32,(uint16_t uCfg)); 3282 3258 3283 /** 3259 3284 * Equivalent to RTTestIPrintf with RTTESTLVL_ALWAYS.
Note:
See TracChangeset
for help on using the changeset viewer.