--- np2/i386c/ia32/segments.c 2004/03/23 22:39:40 1.16 +++ np2/i386c/ia32/segments.c 2008/01/25 17:53:27 1.18 @@ -1,4 +1,4 @@ -/* $Id: segments.c,v 1.16 2004/03/23 22:39:40 yui Exp $ */ +/* $Id: segments.c,v 1.18 2008/01/25 17:53:27 monaka Exp $ */ /* * Copyright (c) 2003 NONAKA Kimihiro @@ -12,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * 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 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -179,10 +177,18 @@ load_ldtr(UINT16 selector, int exc) EXCEPTION(exc, sel.selector); } +#if 0 + /* + * LEMM の挙動より LDT セグメントのリミットチェック処理を無効化 + * + * 症状1:リミット 0 の LDT セレクタを LLDT は駄目っぽい。 + * 対策1:リミット 0 の LDT セレクタの代わりにヌルセレクタを LLDT。 + */ /* check limit */ if (sel.desc.u.seg.limit < 7) { ia32_panic("load_ldtr: LDTR descriptor limit < 7 (limit = %d)", sel.desc.u.seg.limit); } +#endif /* not present */ rv = selector_is_not_present(&sel);