|
|
| version 1.13, 2004/02/20 16:09:04 | version 1.18, 2008/01/25 17:53:27 |
|---|---|
| Line 12 | Line 12 |
| * 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the | * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. | * documentation and/or other materials provided with the distribution. |
| * 3. The name of the author may not be used to endorse or promote products | |
| * derived from this software without specific prior written permission. | |
| * | * |
| * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| Line 131 load_segreg(int idx, UINT16 selector, in | Line 129 load_segreg(int idx, UINT16 selector, in |
| * load SS register | * load SS register |
| */ | */ |
| void | void |
| load_ss(UINT16 selector, descriptor_t *sd, UINT cpl) | load_ss(UINT16 selector, const descriptor_t *sd, UINT cpl) |
| { | { |
| CPU_STAT_SS32 = sd->d; | CPU_STAT_SS32 = sd->d; |
| Line 143 load_ss(UINT16 selector, descriptor_t *s | Line 141 load_ss(UINT16 selector, descriptor_t *s |
| * load CS register | * load CS register |
| */ | */ |
| void | void |
| load_cs(UINT16 selector, descriptor_t *sd, UINT cpl) | load_cs(UINT16 selector, const descriptor_t *sd, UINT cpl) |
| { | { |
| CPU_INST_OP32 = CPU_INST_AS32 = | CPU_INST_OP32 = CPU_INST_AS32 = |
| Line 179 load_ldtr(UINT16 selector, int exc) | Line 177 load_ldtr(UINT16 selector, int exc) |
| EXCEPTION(exc, sel.selector); | EXCEPTION(exc, sel.selector); |
| } | } |
| #if 0 | |
| /* | |
| * LEMM の挙動より LDT セグメントのリミットチェック処理を無効化 | |
| * | |
| * 症状1:リミット 0 の LDT セレクタを LLDT は駄目っぽい。 | |
| * 対策1:リミット 0 の LDT セレクタの代わりにヌルセレクタを LLDT。 | |
| */ | |
| /* check limit */ | /* check limit */ |
| if (sel.desc.u.seg.limit < 7) { | if (sel.desc.u.seg.limit < 7) { |
| ia32_panic("load_ldtr: LDTR descriptor limit < 7 (limit = %d)", sel.desc.u.seg.limit); | ia32_panic("load_ldtr: LDTR descriptor limit < 7 (limit = %d)", sel.desc.u.seg.limit); |
| } | } |
| #endif | |
| /* not present */ | /* not present */ |
| rv = selector_is_not_present(&sel); | rv = selector_is_not_present(&sel); |
| Line 319 load_descriptor(descriptor_t *descp, UIN | Line 325 load_descriptor(descriptor_t *descp, UIN |
| case 0: case 8: case 10: case 13: /* reserved */ | case 0: case 8: case 10: case 13: /* reserved */ |
| default: | default: |
| descp->valid = 0; | descp->valid = 0; |
| ia32_panic("load_descriptor: bad descriptor (type = %d)", descp->type); | |
| break; | break; |
| } | } |
| } | } |
| Line 375 parse_selector(selector_t *ssp, UINT16 s | Line 380 parse_selector(selector_t *ssp, UINT16 s |
| } | } |
| int | int |
| selector_is_not_present(selector_t *ssp) | selector_is_not_present(const selector_t *ssp) |
| { | { |
| UINT32 h; | UINT32 h; |