diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-03-14 11:01:40 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-03-14 11:01:40 +0100 |
| commit | cd8bda7a29a2ef15d939890cacab02efb84e0158 (patch) | |
| tree | ee89bcc4a842c70582c5ac6736a1989309810bde /src/tools | |
| parent | 8115b4705109028650bdf0236b23a4991ddaaed2 (diff) | |
| download | box64-cd8bda7a29a2ef15d939890cacab02efb84e0158.tar.gz box64-cd8bda7a29a2ef15d939890cacab02efb84e0158.zip | |
Changed, again, RDTSC and Hardware counter, introducing auto calibration when hardware counter is too slow for modern standard (and removed BOX64_RDTSC env. var.)
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/rcfile.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/tools/rcfile.c b/src/tools/rcfile.c index 87cc3dd9..e6c40f2e 100644 --- a/src/tools/rcfile.c +++ b/src/tools/rcfile.c @@ -81,7 +81,7 @@ ENTRYBOOL(BOX64_SHOWSEGV, box64_showsegv) \ ENTRYBOOL(BOX64_SHOWBT, box64_showbt) \ ENTRYBOOL(BOX64_MMAP32, box64_mmap32) \ ENTRYBOOL(BOX64_IGNOREINT3, box64_ignoreint3) \ -ENTRYINT(BOX64_RDTSC, box64_rdtsc, 0, 2, 2) \ +IGNORE(BOX64_RDTSC) \ ENTRYBOOL(BOX64_X11THREADS, box64_x11threads) \ ENTRYBOOL(BOX64_X11GLX, box64_x11glx) \ ENTRYDSTRING(BOX64_LIBGL, box64_libGL) \ @@ -593,22 +593,6 @@ void ApplyParams(const char* name) my_context->bashpath = strdup(param->bash); printf_log(LOG_INFO, "Applying %s=%s\n", "BOX64_BASH", param->bash); } - if(param->is_box64_rdtsc_present && (box64_rdtsc==2)) { - #if defined(ARM64) || defined(RV64) - box64_rdtsc = 0; // allow hardxware counter - uint64_t freq = ReadTSCFrequency(NULL); - printf_log(LOG_INFO, "Applying RDTSC: Hardware counter measured at %d Mhz, ", freq/1000); - if(freq>1000000000) { - printf_log(LOG_INFO, "keeping it\n"); - } else { - box64_rdtsc = 1; - printf_log(LOG_INFO, "not using it\n"); - } - #else - box64_rdtsc = 1; - printf_log(LOG_INFO, "Applying RDTSC: Will use time-based emulation for rdtsc, even if hardware counter are available\n"); - #endif - } #ifdef HAVE_TRACE int old_x64trace = my_context->x64trace; if(param->is_trace_present) { |