X86: Add a check type for interrupt gates.
This commit is contained in:
parent
15f5bb3055
commit
30feb90c1c
2 changed files with 7 additions and 2 deletions
|
@ -85,7 +85,7 @@ let {{
|
|||
assembler.symbols["%ss" % letter.lower()] = "SEGMENT_REG_%sS" % letter
|
||||
|
||||
# Add in symbols for the various checks of segment selectors.
|
||||
for check in ("NoCheck", "CSCheck", "CallGateCheck",
|
||||
for check in ("NoCheck", "CSCheck", "CallGateCheck", "IntGateCheck",
|
||||
"SSCheck", "IretCheck", "IntCSCheck"):
|
||||
assembler.symbols[check] = "Seg%s" % check
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue