From owner-freebsd-hackers Fri Oct 13 17:11:59 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA17638 for hackers-outgoing; Fri, 13 Oct 1995 17:11:59 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id RAA17633 for ; Fri, 13 Oct 1995 17:11:55 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id KAA25340; Sat, 14 Oct 1995 10:08:09 +1000 Date: Sat, 14 Oct 1995 10:08:09 +1000 From: Bruce Evans Message-Id: <199510140008.KAA25340@godzilla.zeta.org.au> To: martin@victor.innovus.com, serg@bcs1.bcs.zaporizhzhe.ua Subject: Re: netboot patch Cc: hackers@freebsd.org Sender: owner-hackers@freebsd.org Precedence: bulk >> > Troubles detected when DOS memory managers used >> > after netboot.com. (I type 'N' when question "Boot from Network") >> > IMHO there are incorrect switching from P-mode to R-mode at exit. >> >> I have heard this from other people as well, but I don't really know >> what I'm doing incorrectly on the switch back. > I found this bug. You need to load selector with limit 64k > to ss, ds, es, fs and fs registers _before_ cleaning PE flag. > Then shadow registers filled correctly. fs and gs need not be switched back because they aren't switched to. The standard boot loader probably doesn't need this because it doesn't support an 'N' question. It seems unlikely that there are any BIOSes sensitive to the segment limits. It's more likely that there are BIOSes sensitive to gateA20, and we don't bother switching gateA20 back and forth. Bruce