summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/general_purpose/system_calls.py
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/insts/general_purpose/system_calls.py
parent47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca (diff)
downloadgem5-7f50ea05ac848e22a70c9a9471904637aea2f907.tar.xz
X86: Keep track of more descriptor state to accomodate KVM.
Diffstat (limited to 'src/arch/x86/isa/insts/general_purpose/system_calls.py')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/system_calls.py36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/system_calls.py b/src/arch/x86/isa/insts/general_purpose/system_calls.py
index fb282502d..9501116d9 100644
--- a/src/arch/x86/isa/insts/general_purpose/system_calls.py
+++ b/src/arch/x86/isa/insts/general_purpose/system_calls.py
@@ -77,8 +77,10 @@ def macroop SYSCALL_64
wrlimit cs, t1, dataSize=4
# Not writable, read/execute-able, not expandDown,
# dpl=0, defaultSize=0, long mode
- limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (1 << 6)), dataSize=8
+ limm t4, ((0 << 0) | (0 << 2) | (0 << 3) | \
+ (1 << 4) | (0 << 5) | (1 << 6) | \
+ (1 << 7) | (10 << 8) | (0 << 12) | \
+ (1 << 13) | (0 << 14) | (1 << 15)), dataSize=8
wrattr cs, t4
# Set up SS.
@@ -88,8 +90,10 @@ def macroop SYSCALL_64
wrlimit ss, t1, dataSize=4
# Writable, readable, not expandDown,
# dpl=0, defaultSize=0, not long mode
- limm t4, ((1 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (0 << 6)), dataSize=8
+ limm t4, ((0 << 0) | (0 << 2) | (1 << 3) | \
+ (0 << 4) | (0 << 5) | (1 << 6) | \
+ (1 << 7) | (2 << 8) | (1 << 12) | \
+ (1 << 13) | (0 << 14) | (1 << 15)), dataSize=8
wrattr ss, t4
# Set the new rip.
@@ -126,8 +130,10 @@ def macroop SYSCALL_COMPAT
wrlimit cs, t1, dataSize=4
# Not writable, read/execute-able, not expandDown,
# dpl=0, defaultSize=0, long mode
- limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (1 << 6)), dataSize=8
+ limm t4, ((0 << 0) | (0 << 2) | (0 << 3) | \
+ (1 << 4) | (0 << 5) | (1 << 6) | \
+ (1 << 7) | (10 << 8) | (0 << 12) | \
+ (1 << 13) | (0 << 14) | (1 << 15)), dataSize=8
wrattr cs, t4
# Set up SS.
@@ -137,8 +143,10 @@ def macroop SYSCALL_COMPAT
wrlimit ss, t1, dataSize=4
# Writable, readable, not expandDown,
# dpl=0, defaultSize=0, not long mode
- limm t4, ((1 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (0 << 6)), dataSize=8
+ limm t4, ((0 << 0) | (0 << 2) | (1 << 3) | \
+ (0 << 4) | (0 << 5) | (1 << 6) | \
+ (1 << 7) | (2 << 8) | (1 << 12) | \
+ (1 << 13) | (0 << 14) | (1 << 15)), dataSize=8
wrattr ss, t4
# Set the new rip.
@@ -178,8 +186,10 @@ def macroop SYSRET_TO_64
wrlimit cs, t1, dataSize=4
# Not writable, read/execute-able, not expandDown,
# dpl=3, defaultSize=0, long mode
- limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (3 << 3) | (0 << 5) | (1 << 6)), dataSize=8
+ limm t4, ((3 << 0) | (0 << 2) | (0 << 3) | \
+ (1 << 4) | (0 << 5) | (1 << 6) | \
+ (1 << 7) | (10 << 8) | (0 << 12) | \
+ (1 << 13) | (0 << 14) | (1 << 15)), dataSize=8
wrattr cs, t4
# Only the selector is changed for SS.
@@ -210,8 +220,10 @@ def macroop SYSRET_TO_COMPAT
wrlimit cs, t1, dataSize=4
# Not writable, read/execute-able, not expandDown,
# dpl=3, defaultSize=1, not long mode
- limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (3 << 3) | (1 << 5) | (0 << 6)), dataSize=8
+ limm t4, ((3 << 0) | (0 << 2) | (0 << 3) | \
+ (1 << 4) | (0 << 5) | (1 << 6) | \
+ (1 << 7) | (10 << 8) | (0 << 12) | \
+ (1 << 13) | (0 << 14) | (1 << 15)), dataSize=8
wrattr cs, t4
# Only the selector is changed for SS.