First cut x86 machine description
Comments solicited
Intel 80386
-----------
Types
-----
Type Format Alignment
char signed 8 bit 1
signed char signed 8 bit 1
unsigned char unsigned 8 bit 1
short signed 16 bit 2
signed short signed 16 bit 2
unsigned short unsigned 16 bit 2
int signed 32 bit 4
signed int signed 32 bit 4
unsigned int unsigned 32 bit 4
long signed 32 bit 4
signed long signed 32 bit 4
unsigned long unsigned 32 bit 4
long long signed 64 bit 4 *
signed long long signed 64 bit 4 *
unsigned long long unsigned 64 bit 4 *
float IEEE float (4 byte) 4
double IEEE float (8 byte) 4
(*) Non ANSI C type.
Execution Environment
---------------------
Address Space
-------------
The address space available to a user application ranges from 0x00000000
to an undefined upper value. The upper value is dependant upon the kernel
build and machine configuration. It is not directly dependant on the amount of
memory present. Some of the address space will be used by ELF libraries
and other shared objects. Typically page 0 is also unmapped to aid in
debugging.
The page size is 4K but this value should not be relied upon directly. Use
the getpagesize() library call. In paticular the hardware and software page
size of future Linux x86 kernels may not match.
Processor
---------
The machine will have at least one processor whose capabilities are at
least those described by the Intel 386 specification. Floating point is
always available to user applications but may be emulated. Emulated floating
point and hardware floating point results are not guaranteed to precisely
match for all cases.
The number of processors is available via the sysconf(_SC_NPROCESSORS_ONL)
call.
Using Procesor Extensions
-------------------------
An application can check the processor class being used by following
the documented Intel procedures [Pentium Family Users Manual and
later documents]. If an application cannot reasonably operate without
the facilities of later processors it should issue an error message and
quit.
An application whose runtime correctly tests and issues an error when
presented with an unsuitable CPU is still LSB compliant. Such an application
must not make this check at install time, except for warning purposes.
{Rationale: An application may be installed before or after a processor
change. An application may be installed shared across several machines}
Coherency
---------
The Intel processors perform hardware cache coherency on shared memory
objects. This behaviour is guaranteed availabe to shared objects in user
applications. Application authors should ensure they are not exceeding
the documented guarantees. The hardware coherency on current Intel
processors exceeds the guarantee. Application authors should note that
coherency guarantees, paticularly SMP ones are not portable.
SMP Locking
-----------
As documented in the Intel manuals processes may use the "xchg" operation
on naturally aligned shared objects in order to implement spin locks and
other constructs. Where portable semaphores and locks are desired the
System 5 semaphore operations provided by the OS should be used.
System Calls
------------
The direct system call mechanism for Linux x86 is not documented by this
standard. Applications should make calls via the library interfaces only.
[Rationale: Firstly it may change, secondly it may be depend on the
processor in future, thirdly the actual kernel syscalls do not always match
the equivalent library interface]
Standard Facilities Not Available On This Platform
--------------------------------------------------
None
Reply to: