about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-06-17 11:32:56 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-06-17 11:32:56 +0200
commitbf9e5b8e6e3b42768a787f1a3d3c1f423d1fb38f (patch)
tree77430b88dda5a324dcf00055c0ffe90cbef6bdb8 /src/include
parent7e282c9027a3c7e563b4492a0004174b42de0819 (diff)
downloadbox64-bf9e5b8e6e3b42768a787f1a3d3c1f423d1fb38f.tar.gz
box64-bf9e5b8e6e3b42768a787f1a3d3c1f423d1fb38f.zip
Added support for creating 32bits selector (no 32bits execution yet)
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/box64context.h6
-rwxr-xr-xsrc/include/x64tls.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h
index 9b38fa83..2f82e010 100755
--- a/src/include/box64context.h
+++ b/src/include/box64context.h
@@ -69,8 +69,10 @@ void add1lib_neededlib(needed_libs_t* needed, library_t* lib, const char* name);
 typedef struct base_segment_s {
     uintptr_t       base;
     uint64_t        limit;
-    int             present;
     pthread_key_t   key;
+    uint8_t         present;
+    uint8_t         is32bits;
+    uint8_t         key_init;
 } base_segment_t;
 
 typedef struct box64context_s {
@@ -174,7 +176,7 @@ typedef struct box64context_s {
     pthread_key_t       tlskey;     // then tls key to have actual tlsdata
     void*               tlsdata;    // the initial global tlsdata
     int64_t             tlssize;    // wanted size of tlsdata
-    base_segment_t      segtls[4];  // only handling 0/1/2 descriptors (3 is internal use)
+    base_segment_t      segtls[16];
 
     uintptr_t           *auxval_start;
 
diff --git a/src/include/x64tls.h b/src/include/x64tls.h
index 9ca97efb..b99e3bc0 100755
--- a/src/include/x64tls.h
+++ b/src/include/x64tls.h
@@ -2,8 +2,10 @@
 #define __X64_TLS_H__
 
 typedef struct thread_area_s thread_area_t;
+typedef struct thread_area_32_s thread_area_32_t;
 
 uint32_t my_set_thread_area(thread_area_t* td);
+uint32_t my_set_thread_area_32(thread_area_32_t* td);
 uint32_t my_modify_ldt(x64emu_t* emu, int op, thread_area_t* td, int size);
 
 tlsdatasize_t* getTLSData(box64context_t *context);