summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-06-18 16:27:28 +0200
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-06-18 16:27:28 +0200
commit688fc7f71f3321225f6334a1caa380115f506ce9 (patch)
tree26f08b972efcb2091aba0a07ec47c65adc5c7a29 /src/arch
parent5d584934ada15446123d5dc97a9de820a87fd4cf (diff)
downloadgem5-688fc7f71f3321225f6334a1caa380115f506ce9.tar.xz
x86: Make the boot state VMX compliant
This patch allows the default x86 state to be used when by CPUs that use hardware virtualization.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/system.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/x86/system.cc b/src/arch/x86/system.cc
index f99ad43c7..5d214cb37 100644
--- a/src/arch/x86/system.cc
+++ b/src/arch/x86/system.cc
@@ -163,7 +163,7 @@ X86System::initState()
csDesc.g = 1; // Page granularity
csDesc.s = 1; // Not a system segment
csDesc.limitHigh = 0xF;
- csDesc.limitLow = 0xFF;
+ csDesc.limitLow = 0xFFFF;
//Because we're dealing with a pointer and I don't think it's
//guaranteed that there isn't anything in a nonvirtual class between
//it's beginning in memory and it's actual data, we'll use an
@@ -190,7 +190,7 @@ X86System::initState()
dsDesc.g = 1; // Page granularity
dsDesc.s = 1; // Not a system segment
dsDesc.limitHigh = 0xF;
- dsDesc.limitLow = 0xFF;
+ dsDesc.limitLow = 0xFFFF;
uint64_t dsDescVal = dsDesc;
physProxy.writeBlob(GDTBase + numGDTEntries * 8,
(uint8_t *)(&dsDescVal), 8);
@@ -216,9 +216,9 @@ X86System::initState()
tssDesc.p = 1; // Present
tssDesc.d = 1; // default operand size
tssDesc.g = 1; // Page granularity
- tssDesc.s = 1; // Not a system segment
+ tssDesc.s = 0;
tssDesc.limitHigh = 0xF;
- tssDesc.limitLow = 0xFF;
+ tssDesc.limitLow = 0xFFFF;
uint64_t tssDescVal = tssDesc;
physProxy.writeBlob(GDTBase + numGDTEntries * 8,
(uint8_t *)(&tssDescVal), 8);