summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2012-05-27 19:01:08 -0700
committerGabe Black <gblack@eecs.umich.edu>2012-05-27 19:01:08 -0700
commit40084e0c3eb466e41bd5f39285db2b651fb368b5 (patch)
tree9b43f464812515ae844fe58c8ddb69b68dcf151d /src/arch
parent1d96135087be27b43ddfb5f2f508fbed8e0b7ebb (diff)
downloadgem5-40084e0c3eb466e41bd5f39285db2b651fb368b5.tar.xz
X86: Move the GDT down to where it can be accessed in 32 bit mode.
The GDT can be accessed by user level software running in compatibility mode by moving segment selectors into segment registers. The GDT needs to be set up at an address accessible in this mode.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/process.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 088a0661c..cce8e3a3d 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -132,7 +132,7 @@ I386LiveProcess::I386LiveProcess(LiveProcessParams *params,
int _numSyscallDescs) :
X86LiveProcess(params, objFile, _syscallDescs, _numSyscallDescs)
{
- _gdtStart = ULL(0x100000000);
+ _gdtStart = ULL(0xffffd000);
_gdtSize = VMPageSize;
vsyscallPage.base = 0xffffe000ULL;
@@ -140,7 +140,7 @@ I386LiveProcess::I386LiveProcess(LiveProcessParams *params,
vsyscallPage.vsyscallOffset = 0x400;
vsyscallPage.vsysexitOffset = 0x410;
- stack_base = vsyscallPage.base;
+ stack_base = _gdtStart;
// Set pointer for next thread stack. Reserve 8M for main stack.
next_thread_stack_base = stack_base - (8 * 1024 * 1024);