[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: First cut x86 machine description



> Address space:
> 	This is covered in the psABI. IT basically says that there is a
> 	32 bit address space. The OS is allowed to reserve up to 1G at
> 	the top, and it goes on to make some recommendations about where
> 	text/data/stack, etc. should reside.

Linux can be configured to split 2Gig/2Gig and that is needed when running
on a machine with >950Mb of RAM.

> 	The psABI states that the page size can vary, and that apps should
> 	use sysconf() to find the actual size.

Ok

> Processor:
> 	The psABI defines the processor to be a 386 with 387 capabilities.
> 	It also states that no guarantees are make about wether certian
> 	instructions are implemented in HW or Sw, nor does it make any
> 	guarantees about performance.

Ok. Our "387 capabilities" are not precise emulation btw - they are generally
excessively accurate 8)

> Procesor Extensions:
> 	I've added some words to say that it is OK to use something greater
> 	than a 386 if you check first.
> 
> 	It would be nice to proved a sysconf() (or at least a library
> 	function) to get the processore type instead of  the application
> 	having to do it inline.

Its not just a processor type. Its now a very large spectrum of questions.
Your chip may be a 386,486, 486SL,pentium (2 species), pentium pro, pentium II 
(3 species), idt winchip (2 species), cyrix 486/586/686/MX/MII/.., and
half a dozen AMD devices. You can add to that a few rarer clones (UMC, TI..)

There are some 20 flags in CPUID, plus the vendor string plus per vendor
pieces of information to report, almost all of which matter to someone and
about half of which alter the instruction set. The winchip especially is
fun as its chameleon and can turn MMX on/off in software configuration,
CMPXCHG8 ditto, 5/2 divide behaviour and more..

You can get the base CPU family from uname(). It will report 386.486.586.686
and more info by parsing /proc. However CPUID is intended to be available
to user space applications , and an app may well know things that an older
kernel or library does not know but it needs to know about.

> Coherency & SMP:
> 	Does an application really need to know about this?

High performance thread based stuff may well do. Your call anyway. Im not
going to jump up and down to defend this one




Reply to: