diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-12-27 18:07:25 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-12-27 18:07:25 +0100 |
| commit | a54f516447dc12e7de2af05cec2a4e3edaa36e75 (patch) | |
| tree | e54a33b74a09ccf422fe8ac408b10b548ff52057 /src/core.c | |
| parent | 26ba1148e8e9dac4b4ddc03030f3a883daf96824 (diff) | |
| download | box64-a54f516447dc12e7de2af05cec2a4e3edaa36e75.tar.gz box64-a54f516447dc12e7de2af05cec2a4e3edaa36e75.zip | |
Introduce BOX64_CPUTYPE to choose emulating Intel or AMD cpus (no AMD specific extension yet)
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c index 36393235..655f9d96 100644 --- a/src/core.c +++ b/src/core.c @@ -64,6 +64,7 @@ path_collection_t box64_addlibs = {0}; int box64_maxcpu = 0; int box64_maxcpu_immutable = 0; int box64_is32bits = 0; +int box64_cputype = 0; #if defined(SD845) || defined(SD888) || defined(SD8G2) || defined(TEGRAX1) int box64_mmap32 = 1; #else @@ -1308,6 +1309,14 @@ void LoadLogEnv() else printf_log(LOG_INFO, "Will not use 32bits address in priority for external MMAP (when 32bits process are detected)\n"); } + p = getenv("BOX64_CPUTYPE"); + if(p) { + if(strlen(p)==1) { + if(p[0]>='0' && p[0]<='0'+1) + box64_cputype = p[0]-'0'; + } + printf_log(LOG_INFO, "Will emulate an %s CPU\n", box64_cputype?"AMD":"Intel"); + } p = getenv("BOX64_IGNOREINT3"); if(p) { if(strlen(p)==1) { |