From 30feb90c1cba922a7dac38204900e29b4788b935 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 12 Oct 2008 20:33:37 -0700 Subject: X86: Add a check type for interrupt gates. --- src/arch/x86/isa/microops/regop.isa | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/arch/x86/isa/microops') diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa index b7883b2e2..0d019729f 100644 --- a/src/arch/x86/isa/microops/regop.isa +++ b/src/arch/x86/isa/microops/regop.isa @@ -233,7 +233,7 @@ output header {{ uint64_t "ient, uint64_t &remainder); enum SegmentSelectorCheck { - SegNoCheck, SegCSCheck, SegCallGateCheck, + SegNoCheck, SegCSCheck, SegCallGateCheck, SegIntGateCheck, SegSSCheck, SegIretCheck, SegIntCSCheck }; }}; @@ -1041,6 +1041,11 @@ let {{ panic("CS checks for far calls/jumps through call gates" "not implemented.\\n"); break; + case SegIntGateCheck: + if (desc.dpl < m5reg.cpl) { + return new GeneralProtection((uint16_t)selector); + } + break; case SegSSCheck: if (selector.si || selector.ti) { if (!desc.p) { -- cgit v1.2.3