From a54f516447dc12e7de2af05cec2a4e3edaa36e75 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 27 Dec 2024 18:07:25 +0100 Subject: Introduce BOX64_CPUTYPE to choose emulating Intel or AMD cpus (no AMD specific extension yet) --- src/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core.c') 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) { -- cgit 1.4.1