Electronic – Reason for x86 reset vector being at 0xFFFFFFF0 instead of 0xFFFFFFFF

resetx86

The top answer to this question on Super User gave an explanation that was satisfactory to me at first as to why the reset vector is not at address 0 (afterwards , I realized that it doesn't why the end of RAM couldn't be put at 0xFFFFFFFF and then grow downwards). But, 0xFFFFFFF0 is such a strange address. Why does x86 begin executing at 16 bytes before the top of the 32-bit address space? Are those 16 bytes used for something special?

Best Answer

x86 instructions often take up more than one byte, and a reasonable reset routine will almost certainly point to multiple instructions.

If the reset vector were to refer to 0xFFFF_FFFF, then only a single byte instruction would fit into that memory mapping; almost any useful reset functionality would thus require instructions that cross the 0xFFFF_FFFF/0xFFFF_0000 linear address boundary (since the code segment is set up with base 0xFFFF_0000)

By placing the reset code at this address, it's possible to fit a few instructions (including a jump) without requiring valid memory at 0xFFFF_0000.