- Timestamp:
- Mar 26, 2024 8:20:34 PM (10 months ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 9 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-fpustate-1-template.c
r98103 r104071 186 186 BS3PTRUNION MmioReg; 187 187 BS3CPUVENDOR const enmCpuVendor = Bs3GetCpuVendor(); 188 bool const fSkipStorIdt = Bs3TestQueryCfgBool(VMMDEV_TESTING_CFG_IS_NEM_LINUX );189 bool const fMayHaveZeroStEnvSels = Bs3TestQueryCfgBool(VMMDEV_TESTING_CFG_IS_NEM_LINUX );188 bool const fSkipStorIdt = Bs3TestQueryCfgBool(VMMDEV_TESTING_CFG_IS_NEM_LINUX, false); 189 bool const fMayHaveZeroStEnvSels = Bs3TestQueryCfgBool(VMMDEV_TESTING_CFG_IS_NEM_LINUX, false); 190 190 bool const fFastFxSaveRestore = RT_BOOL(ASMCpuId_EDX(0x80000001) & X86_CPUID_AMD_FEATURE_EDX_FFXSR); 191 191 //bool const fFdpXcptOnly = (ASMCpuIdEx_EBX(7, 0) & X86_CPUID_STEXT_FEATURE_EBX_FDP_EXCPTN_ONLY) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r103262 r104071 241 241 bs3-cmn-TestCheckExtCtx.c \ 242 242 bs3-cmn-TestQueryCfgU8.asm \ 243 bs3-cmn-TestQueryCfgU16.asm \ 243 244 bs3-cmn-TestQueryCfgU32.asm \ 244 245 bs3-cmn-TestHostPrintf.c \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestInit.c
r104066 r104071 66 66 if (g_fbBs3VMMDevTesting) 67 67 { 68 uint16_t uValue; 69 #if ARCH_BITS == 16 70 ASMOutU16(VMMDEV_TESTING_IOPORT_CMD, (uint16_t)VMMDEV_TESTING_CMD_QUERY_CFG); 71 #else 72 ASMOutU32(VMMDEV_TESTING_IOPORT_CMD, VMMDEV_TESTING_CMD_QUERY_CFG); 73 #endif 74 ASMOutU16(VMMDEV_TESTING_IOPORT_DATA, VMMDEV_TESTING_CFG_THRESHOLD_NATIVE_RECOMPILER); 75 uValue = ASMInU16(VMMDEV_TESTING_IOPORT_DATA); 76 Bs3TestPrintf("VMMDEV_TESTING_CFG_THRESHOLD_NATIVE_RECOMPILER=%RU16\n", uValue); 68 uint16_t uValue = Bs3TestQueryCfgU16(VMMDEV_TESTING_CFG_THRESHOLD_NATIVE_RECOMPILER, 0); 77 69 if (uValue > 0 && uValue < 1024) 78 70 g_cBs3ThresholdNativeRecompiler = uValue; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestQueryCfgU16.asm
r104069 r104071 1 1 ; $Id$ 2 2 ;; @file 3 ; BS3Kit - Bs3TestQueryCfgU 8.3 ; BS3Kit - Bs3TestQueryCfgU16. 4 4 ; 5 5 … … 42 42 43 43 ;; 44 ; @cproto BS3_DECL(uint 32_t) Bs3TestQueryCfgU32(uint16_t uCfg);44 ; @cproto BS3_DECL(uint16_t) Bs3TestQueryCfgU16(uint16_t uCfg, uint16_t uDefault); 45 45 ; 46 BS3_PROC_BEGIN_CMN Bs3TestQueryCfgU 32, BS3_PBC_HYBRID47 BS3_CALL_CONV_PROLOG 146 BS3_PROC_BEGIN_CMN Bs3TestQueryCfgU16, BS3_PBC_HYBRID 47 BS3_CALL_CONV_PROLOG 2 48 48 push xBP 49 49 mov xBP, xSP 50 TNOT16 push xDX 50 push xDX 51 push xCX 51 52 52 53 cmp byte [BS3_DATA16_WRT(g_fbBs3VMMDevTesting)], 0 … … 69 70 70 71 ; Read back the result. 72 in ax, dx 71 73 %if TMPL_BITS == 16 72 in ax, dx 73 push ax 74 in ax, dx 75 mov dx, ax 76 pop ax 74 mov cx, ax 75 in ax, dx ; read okay magic. 76 cmp ax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL & 0xffff 77 mov ax, cx 77 78 %else 78 in eax, dx 79 movzx ecx, ax 80 in eax, dx ; read okay magic. 81 cmp eax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL 82 mov eax, ecx 79 83 %endif 84 jne .no_vmmdev 80 85 81 86 .return: 82 TNOT16 pop xDX 87 pop xCX 88 pop xDX 83 89 pop xBP 84 BS3_CALL_CONV_EPILOG 190 BS3_CALL_CONV_EPILOG 2 85 91 BS3_HYBRID_RET 86 92 87 93 .no_vmmdev: 88 xor xAX, xAX89 94 %if TMPL_BITS == 16 90 xor xDX, xDX 95 mov ax, [xBP + xCB + cbCurRetAddr + xCB] 96 %else 97 movzx eax, word [xBP + xCB + cbCurRetAddr + xCB] 91 98 %endif 92 99 jmp .return 93 BS3_PROC_END_CMN Bs3TestQueryCfgU 32100 BS3_PROC_END_CMN Bs3TestQueryCfgU16 94 101 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestQueryCfgU32.asm
r98103 r104071 1 1 ; $Id$ 2 2 ;; @file 3 ; BS3Kit - Bs3TestQueryCfgU 8.3 ; BS3Kit - Bs3TestQueryCfgU32. 4 4 ; 5 5 6 6 ; 7 ; Copyright (C) 2007-202 3Oracle and/or its affiliates.7 ; Copyright (C) 2007-2024 Oracle and/or its affiliates. 8 8 ; 9 9 ; This file is part of VirtualBox base platform packages, as … … 42 42 43 43 ;; 44 ; @cproto BS3_DECL(uint32_t) Bs3TestQueryCfgU32(uint16_t uCfg );44 ; @cproto BS3_DECL(uint32_t) Bs3TestQueryCfgU32(uint16_t uCfg, uint32_t uDefault); 45 45 ; 46 46 BS3_PROC_BEGIN_CMN Bs3TestQueryCfgU32, BS3_PBC_HYBRID 47 BS3_CALL_CONV_PROLOG 147 BS3_CALL_CONV_PROLOG 2 48 48 push xBP 49 49 mov xBP, xSP 50 50 TNOT16 push xDX 51 push xCX 51 52 52 53 cmp byte [BS3_DATA16_WRT(g_fbBs3VMMDevTesting)], 0 … … 70 71 ; Read back the result. 71 72 %if TMPL_BITS == 16 72 in ax, dx 73 in ax, dx ; first word 73 74 push ax 74 in ax, dx 75 mov dx, ax 75 in ax, dx ; second word 76 mov cx, ax 77 in ax, dx ; okay magic following the value. 78 cmp ax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL & 0xffff 79 mov dx, cx 76 80 pop ax 77 81 %else 78 82 in eax, dx 83 mov ecx, eax 84 in eax, dx 85 cmp eax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL 86 mov eax, ecx 79 87 %endif 88 jne .no_vmmdev 80 89 81 90 .return: 91 pop xCX 82 92 TNOT16 pop xDX 83 93 pop xBP 84 BS3_CALL_CONV_EPILOG 194 BS3_CALL_CONV_EPILOG 2 85 95 BS3_HYBRID_RET 86 96 87 97 .no_vmmdev: 88 xor xAX, xAX98 mov xAX, [xBP + xCB + cbCurRetAddr + xCB] 89 99 %if TMPL_BITS == 16 90 xor xDX, xDX100 mov xDX, [xBP + xCB + cbCurRetAddr + xCB + xCB] 91 101 %endif 92 102 jmp .return -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestQueryCfgU8.asm
r98103 r104071 42 42 43 43 ;; 44 ; @cproto BS3_DECL(uint8_t) Bs3TestQueryCfgU8(uint16_t uCfg );45 ; @cproto BS3_DECL(bool) Bs3TestQueryCfgBool(uint16_t uCfg );44 ; @cproto BS3_DECL(uint8_t) Bs3TestQueryCfgU8(uint16_t uCfg, uint8_t bDefault); 45 ; @cproto BS3_DECL(bool) Bs3TestQueryCfgBool(uint16_t uCfg, bool fDefault); 46 46 ; 47 47 BS3_GLOBAL_NAME_EX BS3_CMN_NM(Bs3TestQueryCfgBool), function, 3 48 48 BS3_PROC_BEGIN_CMN Bs3TestQueryCfgU8, BS3_PBC_HYBRID 49 BS3_CALL_CONV_PROLOG 149 BS3_CALL_CONV_PROLOG 2 50 50 push xBP 51 51 mov xBP, xSP 52 52 push xDX 53 push xCX 53 54 54 xor al, al55 55 cmp byte [BS3_DATA16_WRT(g_fbBs3VMMDevTesting)], 0 56 56 je .no_vmmdev … … 73 73 ; Read back the result. 74 74 in al, dx 75 %if TMPL_BITS == 16 76 mov cl, al 77 in ax, dx ; check the 'okay' 78 cmp ax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL & 0xffff 79 mov al, cl 80 mov ah, 0 81 %else 82 movzx ecx, al 83 in eax, dx ; check the 'okay' 84 cmp eax, VMMDEV_TESTING_QUERY_CFG_OKAY_TAIL 85 mov eax, ecx 86 %endif 87 jne .no_vmmdev 88 89 .return: 90 pop xCX 91 pop xDX 92 pop xBP 93 BS3_CALL_CONV_EPILOG 2 94 BS3_HYBRID_RET 75 95 76 96 .no_vmmdev: 77 pop xDX 78 pop xBP 79 BS3_CALL_CONV_EPILOG 1 80 BS3_HYBRID_RET 97 %if TMPL_BITS == 16 98 mov al, [xBP + xCB + cbCurRetAddr + xCB] 99 %else 100 movzx eax, byte [xBP + xCB + cbCurRetAddr + xCB] 101 %endif 102 jmp .return 81 103 BS3_PROC_END_CMN Bs3TestQueryCfgU8 82 104 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-autostubs.kmk
r103262 r104071 99 99 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabAllocFixed) 100 100 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3SlabFree) 101 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestQueryCfgU16) 101 102 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3TestSubErrorCount) 102 103 $(call BS3KIT_FN_GEN_CMN_NEARSTUB,bs3kit-common-16,Bs3ExtCtxGetMxCsr) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-define.h
r103262 r104071 208 208 #define Bs3TestPrintfV BS3_CMN_MANGLER(Bs3TestPrintfV) 209 209 #define Bs3TestQueryCfgBool BS3_CMN_MANGLER(Bs3TestQueryCfgBool) 210 #define Bs3TestQueryCfgU16 BS3_CMN_MANGLER(Bs3TestQueryCfgU16) 210 211 #define Bs3TestQueryCfgU32 BS3_CMN_MANGLER(Bs3TestQueryCfgU32) 211 212 #define Bs3TestQueryCfgU8 BS3_CMN_MANGLER(Bs3TestQueryCfgU8) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code-undef.h
r103262 r104071 208 208 #undef Bs3TestPrintfV 209 209 #undef Bs3TestQueryCfgBool 210 #undef Bs3TestQueryCfgU16 210 211 #undef Bs3TestQueryCfgU32 211 212 #undef Bs3TestQueryCfgU8 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r104066 r104071 3699 3699 * @returns Value. 3700 3700 * @param uCfg A VMMDEV_TESTING_CFG_XXX value. 3701 */ 3702 BS3_CMN_PROTO_STUB(uint8_t, Bs3TestQueryCfgU8,(uint16_t uCfg)); 3703 3704 /** 3705 * Queries an unsigned 8-bit configuration value. 3701 * @param bDefault The default value to return if the VMMDev isn't 3702 * available or the query failed. 3703 */ 3704 BS3_CMN_PROTO_STUB(uint8_t, Bs3TestQueryCfgU8,(uint16_t uCfg, uint8_t bDefault)); 3705 3706 /** 3707 * Queries a boolean configuration value. 3706 3708 * 3707 3709 * @returns Value. 3708 3710 * @param uCfg A VMMDEV_TESTING_CFG_XXX value. 3709 */ 3710 BS3_CMN_PROTO_STUB(bool, Bs3TestQueryCfgBool,(uint16_t uCfg)); 3711 3712 /** 3713 * Queries an unsigned 32-bit configuration value. 3711 * @param fDefault The default value to return if the VMMDev isn't 3712 * available or the query failed. 3713 */ 3714 BS3_CMN_PROTO_STUB(bool, Bs3TestQueryCfgBool,(uint16_t uCfg, bool fDefault)); 3715 3716 /** 3717 * Queries an unsigned 16-bit configuration value. 3714 3718 * 3715 3719 * @returns Value. 3716 3720 * @param uCfg A VMMDEV_TESTING_CFG_XXX value. 3717 */ 3718 BS3_CMN_PROTO_STUB(uint32_t, Bs3TestQueryCfgU32,(uint16_t uCfg)); 3721 * @param uDefault The default value to return if the VMMDev isn't 3722 * available or the query failed. 3723 */ 3724 BS3_CMN_PROTO_STUB(uint16_t, Bs3TestQueryCfgU16,(uint16_t uCfg, uint16_t uDefault)); 3725 3726 /** 3727 * Queries an unsigned 32-bit configuration value. 3728 * 3729 * @returns Value. 3730 * @param uCfg A VMMDEV_TESTING_CFG_XXX value. 3731 * @param uDefault The default value to return if the VMMDev isn't 3732 * available or the query failed. 3733 */ 3734 BS3_CMN_PROTO_STUB(uint32_t, Bs3TestQueryCfgU32,(uint16_t uCfg, uint32_t uDefault)); 3719 3735 3720 3736 /**
Note:
See TracChangeset
for help on using the changeset viewer.