steven james wrote:
All x86 machines start at 0xf000:fff0 in real mode.
To be strictly correct, x86 machines start at 0xfffffff0 in real mode. ( IA-32 Intel Architecture Software Developer’s Manual Volume 3, System Programming Guide, sect. 9.1.4.).
Quoting the manual, for those that don't have it handy:
"The first instruction that is fetched and executed following a hardware reset is located at physical address FFFFFFF0H. This address is 16 bytes below the processor’s uppermost physical address. The EPROM containing the software-initialization code must be located at this address
The address FFFFFFF0H is beyond the 1-MByte addressable range of the processor while in real-address mode. The processor is initialized to this starting address as follows. The CS register has two parts: the visible segment selector part and the hidden base address part. In real-address mode, the base address is normally formed by shifting the 16-bit segment selector value 4 bits to the left to produce a 20-bit base address. However, during a hardware reset, the segment selector in the CS register is loaded with F000H and the base address is loaded with FFFF0000H. The starting address is thus formed by adding the base address to the value in the EIP register (that is, FFFF0000 + FFF0H = FFFFFFF0H).
The first time the CS register is loaded with a new value after a hardware reset, the processor will follow the normal rule for address translation in real-address mode (that is, [CS base address = CS segment selector * 16]). To insure that the base address in the CS register remains unchanged until the EPROM based software-initialization code is completed, the code must not contain a far jump or far call or allow an interrupt to occur (which would cause the CS selector value to be changed)."
-----------
If the biosbase option is not set, almost immediately, linuxbios does a far jump to 0xf0000:0004, and so reloads the segment register such that the aliasing of this address to the top 4G becomes important, as Steven James points out. But setting biosbase=0xffff0000 will use a relative jump and actually execute physically in the top 4G.
-Steve