From: Gabe Black Date: Mon, 13 Oct 2008 03:38:22 +0000 (-0700) Subject: X86: Implement the chks check of interrupt gate target code segments. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b46e5204d52c8e46b48541d5112f7e9a1cadc43;p=gem5.git X86: Implement the chks check of interrupt gate target code segments. --- diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa index 0d019729f..ba996060c 100644 --- a/src/arch/x86/isa/microops/regop.isa +++ b/src/arch/x86/isa/microops/regop.isa @@ -1076,8 +1076,14 @@ let {{ break; } case SegIntCSCheck: - panic("CS selector checks for interrupts and exceptions" - "not implemented.\\n"); + if (m5reg.mode == LongMode) { + if (desc.l != 1 || desc.d != 0) { + return new GeneralProtection(selector); + } + } else { + panic("Interrupt CS checks not implemented " + "in legacy mode.\\n"); + } break; default: panic("Undefined segment check type.\\n");