summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-05-28 23:27:56 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-05-28 23:27:56 -0700
commit7f50ea05ac848e22a70c9a9471904637aea2f907 (patch)
tree208fb8a40376ccb6b6fb90576c4506f34416930d /src/arch/x86/isa/microops
parent47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca (diff)
downloadgem5-7f50ea05ac848e22a70c9a9471904637aea2f907.tar.xz
X86: Keep track of more descriptor state to accomodate KVM.
Diffstat (limited to 'src/arch/x86/isa/microops')
-rw-r--r--src/arch/x86/isa/microops/regop.isa15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index 6935c780d..dfa10587a 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -1247,9 +1247,18 @@ let {{
SegDescriptor desc = SrcReg1;
SegSelector selector = SrcReg2;
if (selector.si || selector.ti) {
+ if (!desc.p)
+ panic("Segment not present.\\n");
SegAttr attr = 0;
attr.dpl = desc.dpl;
+ attr.unusable = 0;
attr.defaultSize = desc.d;
+ attr.longMode = desc.l;
+ attr.avl = desc.avl;
+ attr.granularity = desc.g;
+ attr.present = desc.p;
+ attr.system = desc.s;
+ attr.type = desc.type;
if (!desc.s) {
// The expand down bit happens to be set for gates.
if (desc.type.e) {
@@ -1257,12 +1266,12 @@ let {{
}
attr.readable = 1;
attr.writable = 1;
+ attr.expandDown = 0;
} else {
- if (!desc.p)
- panic("Segment not present.\\n");
if (desc.type.codeOrData) {
+ attr.expandDown = 0;
attr.readable = desc.type.r;
- attr.longMode = desc.l;
+ attr.writable = 0;
} else {
attr.expandDown = desc.type.e;
attr.readable = 1;