|
|
| version 1.1, 2003/12/08 00:55:31 | version 1.2, 2003/12/11 14:59:42 |
|---|---|
| Line 38 load_segreg(int idx, WORD selector, int | Line 38 load_segreg(int idx, WORD selector, int |
| selector_t sel; | selector_t sel; |
| int rv; | int rv; |
| __ASSERT((unsigned int)idx < CPU_SEGREG_NUM); | |
| if ((unsigned int)idx >= CPU_SEGREG_NUM) { | |
| ia32_panic("load_segreg: sreg(%d)", idx); | |
| } | |
| if (!CPU_STAT_PM || CPU_STAT_VM86) { | if (!CPU_STAT_PM || CPU_STAT_VM86) { |
| descriptor_t sd; | descriptor_t sd; |
| Line 172 load_ldtr(WORD selector, int exc) | Line 169 load_ldtr(WORD selector, int exc) |
| } | } |
| /* check descriptor type */ | /* check descriptor type */ |
| if (!sel.desc.s || (sel.desc.type != CPU_SYSDESC_TYPE_LDT)) { | if (sel.desc.s || (sel.desc.type != CPU_SYSDESC_TYPE_LDT)) { |
| EXCEPTION(exc, sel.selector); | EXCEPTION(exc, sel.selector); |
| } | } |