VirtualBox

Ignore:
Timestamp:
Mar 26, 2024 4:06:07 PM (14 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162459
Message:

ValKit/bootsectors: Added a g_cBs3ThresholdNativeRecompiler variable that can be used instead of BS3_THRESHOLD_NATIVE_RECOMPILER, initializing it with the VMMDEV_TESTING_CFG_THRESHOLD_NATIVE_RECOMPILER value from the host if available. bugref:9898

Location:
trunk/src/VBox/ValidationKit/bootsectors/bs3kit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestData.c

    r103262 r104066  
    8585uint16_t    g_usBs3TestStep;
    8686
     87/** The host configurable BS3_THRESHOLD_NATIVE_RECOMPILER value. */
     88uint16_t    g_cBs3ThresholdNativeRecompiler = BS3_THRESHOLD_NATIVE_RECOMPILER;
     89
     90
    8791/** VMMDEV_TESTING_UNIT_XXX -> string */
    8892char const  g_aszBs3TestUnitNames[][12] =
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestInit.c

    r98103 r104066  
    4141#include "bs3kit-template-header.h"
    4242#include "bs3-cmn-test.h"
     43#include <iprt/asm-amd64-x86.h>
    4344
    4445
     
    6364    g_cusBs3SubTestsFailed      = 0;
    6465    g_fbBs3VMMDevTesting        = bs3TestIsVmmDevTestingPresent();
     66    if (g_fbBs3VMMDevTesting)
     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);
     76Bs3TestPrintf("VMMDEV_TESTING_CFG_THRESHOLD_NATIVE_RECOMPILER=%RU16\n", uValue);
     77        if (uValue > 0 && uValue < 1024)
     78            g_cBs3ThresholdNativeRecompiler = uValue;
     79    }
    6580
    6681    /*
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r103867 r104066  
    195195 *
    196196 * @{ */
    197 
    198 /** Test repetitions necessary to make sure of engaging native recompilation.
    199  * @note See iemTbCacheLookup() for the actual constant. */
    200 #define BS3_THRESHOLD_NATIVE_RECOMPILER     18
    201197
    202198
     
    36173613extern uint16_t g_usBs3TestStep;
    36183614
     3615/** Test repetitions necessary to make sure of engaging native recompilation.
     3616 * @note See iemTbCacheLookup() for the actual constant. */
     3617#define BS3_THRESHOLD_NATIVE_RECOMPILER     18
     3618
     3619/** The host configurable BS3_THRESHOLD_NATIVE_RECOMPILER value.
     3620 * The host configuration is read by Bs3TestInit, before that it has the same
     3621 * value as the compiletime constant. */
     3622extern uint16_t g_cBs3ThresholdNativeRecompiler;
     3623
    36193624/**
    36203625 * Equivalent to RTTestCreate + RTTestBanner.
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette