*BSD News Article 17812


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!uunet!emba-news.uvm.edu!wollman
From: wollman@UVM.EDU (Garrett Wollman)
Subject: Re: kernel writes to user space
Message-ID: <1993Jul1.190202.17637@uvm.edu>
Sender: news@uvm.edu
Organization: University of Vermont, EMBA Computer Facility
References: <20bfrm$le7@pdq.coe.montana.edu> <20qqgu$dj@werple.apana.org.au> <1993Jun30.022629.24466@uvm.edu> <C9GMzD.B6@veda.is>
Date: Thu, 1 Jul 1993 19:02:02 GMT
Lines: 47

In article <C9GMzD.B6@veda.is> adam@veda.is (Adam David) writes:
>wollman@trantor.emba.uvm.edu (Garrett Wollman) writes:
>
>>Isn't there a flag bit you can turn on on a *4*86, which tells the MMU
>>to behave in a sane manner?  If so, then perhaps someone ought to
>>write code to take advantage of this, triggered by defined(i486) &&
>>!defined(i386).
>
>i486 is a superset of i386, so it does not make much sense to define i486
>without also defining i386. Therefore defined(i486) should be enough of a
>test.

No!  (At least, not by my interpretation of configuration.)  If you
configure a system for

cpu	i386
cpu	i486

...that means it /must/ work on both systems.  Therefore, you either
have to choose dynamically (at run time) between the two variants, or
you use the pessimistic i386 code without attempting to do anything
i486-specific.  If you leave out the ``cpu i486'', then it should
/definitely/ leave out the 486-specific code.  If you leave out the
``cpu i386'', then it should leave out the 386 code that is replaced
in the 486 edition.

So, to summarize:

cpu	i386	# means that both CPUs will be supported, but
cpu	i486	# might not include /any/ i486-specific code
		# may be slower than either version because of
		# dynamic choice of processor-specific function
		# variants

cpu	i386	# means that nothing i486-specific will be attempted


cpu	i486	# means that code required on i386 but not i486 need
		# not be emitted; may be faster than first variane

-GAWollman

-- 
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@emba.uvm.edu | Shashish is the bonding of hearts in spite of distance.
uvm-gen!wollman      | It is a bond more powerful than absence.  We like people
UVM disagrees.       | who like Shashish.  - Claude McKenzie + Florent Vollant