Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/56709 )
Change subject: arch-x86: Stop using the Flags version of chks in LLDT.
......................................................................
arch-x86: Stop using the Flags version of chks in LLDT.
The only place the flags setting version of the chks microop was used
was in LLDT. When it was used to make sure the LLDT was not in the LLDT
itself, it was also checking whether the index part of the register was
zero to skip setting up the LDT.
By getting rid of this single use of the flags version of this microop,
we free up the ext field (which held the flags to set) so that it can
hold the type of check being requested instead. Then *that* lets us add
a destination register operand so that chks can adjust the RPL of a
selector value in cases where the correct value does not actually equal
the original RPL. For instance, the CPL after calling through a call or
interrupt gate should not necessarily equal the RPL in the selector from
the gate, but should equal the DPL of the target code segment.
Change-Id: I05fee0f51fd73c57b5988d065bfa1f32d1176b72
---
M src/arch/x86/microcode/system/segmentation.ucode
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/src/arch/x86/microcode/system/segmentation.ucode
b/src/arch/x86/microcode/system/segmentation.ucode
index e10d1e7..c88a34f 100644
--- a/src/arch/x86/microcode/system/segmentation.ucode
+++ b/src/arch/x86/microcode/system/segmentation.ucode
@@ -262,7 +262,8 @@
{
.args 'R'
.serialize_after
- chks reg, t0, InGDTCheck, flags=(EZF,)
+ chks reg, t0, InGDTCheck
+ andi t0, reg, 0xf8, flags=(EZF,)
br label("end"), flags=(CEZF,)
limm t4, 0, dataSize=8
srli t4, reg, 3, dataSize=2
@@ -281,7 +282,8 @@
.args 'M'
.serialize_after
ld t5, seg, sib, disp, dataSize=2
- chks t5, t0, InGDTCheck, flags=(EZF,)
+ chks t5, t0, InGDTCheck
+ andi t0, t5, 0xf8, flags=(EZF,)
br label("end"), flags=(CEZF,)
limm t4, 0, dataSize=8
srli t4, t5, 3, dataSize=2
@@ -301,7 +303,8 @@
.serialize_after
rdip t7
ld t5, seg, riprel, disp, dataSize=2
- chks t5, t0, InGDTCheck, flags=(EZF,)
+ chks t5, t0, InGDTCheck
+ andi t0, t5, 0xf8, flags=(EZF,)
br label("end"), flags=(CEZF,)
limm t4, 0, dataSize=8
srli t4, t5, 3, dataSize=2
@@ -319,7 +322,8 @@
{
.args 'R'
.serialize_after
- chks reg, t0, InGDTCheck, flags=(EZF,)
+ chks reg, t0, InGDTCheck
+ andi t0, reg, 0xf8, flags=(EZF,)
br label("end"), flags=(CEZF,)
limm t4, 0, dataSize=8
srli t4, reg, 3, dataSize=2
@@ -335,7 +339,8 @@
.args 'M'
.serialize_after
ld t5, seg, sib, disp, dataSize=2
- chks t5, t0, InGDTCheck, flags=(EZF,)
+ chks t5, t0, InGDTCheck
+ andi t0, t5, 0xf8, flags=(EZF,)
br label("end"), flags=(CEZF,)
limm t4, 0, dataSize=8
srli t4, t5, 3, dataSize=2
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56709
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I05fee0f51fd73c57b5988d065bfa1f32d1176b72
Gerrit-Change-Number: 56709
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s