Newsgroups: comp.os.minix
Subject: Re: protected mode
References: <37A5FDA0.283F7112@ichips.intel.com>
Organization: Syracuse University, Syracuse
From: mcconnel@hydra.syr.edu (Terry R. McConnell)
NNTP-Posting-Host: hydra.syr.edu
Message-ID: <37a60dec.0@news.syr.edu>
Date: 2 Aug 1999 17:30:20 -0500
X-Trace: 2 Aug 1999 17:30:20 -0500, hydra.syr.edu
Lines: 20
Path: news.adfa.oz.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!ozemail.com.au!news.mel.aone.net.au!newsfeed.aone.net.au!news.mel.connect.com.au!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.syr.edu!hydra.syr.edu!mcconnel

In article <37A5FDA0.283F7112@ichips.intel.com>,
dvoils  <dvoils@ichips.intel.com> wrote:
>Where does minix switch the processor into protected mode?  I'm looking
>for the code that sets the PE bit in CR0. I'm assuming this happens when
>minix is started up. So far I've looked in mpx386.s, cstart() and
>prot_init() but can't seem to find it.

I don't have the book with me for an exact line number, but it happens
on the page after the minix entry point. Following the call to prot_init,
which sets up the gdt, idt and CR0, there is a seemingly
pointless far jump command. This starts protected mode by forcing a reload of 
the cs selector. If you are unfamiliar with PM programming this may seem
to be an arcane trick; but it is the standard way to switch from real to
protected mode.

-- 
************************************************************************
Terry R. McConnell   Mathematics/304B Carnegie/Syracuse, N.Y. 13244-1150
trmcconn@syr.edu                            http://barnyard.syr.edu/~tmc 
************************************************************************
