intel reset vector and documentation pedantics. Bits vs bytes

288 views Asked by At

An excerpt from intel development documentation volume 3 section 9

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).

My question is why does it use the word bytes here when it seems only makes sense for bits. Assuming the CPU's physical limit is 0xFFFFFFFF then 0xFFFFFFF0 is 16 bits away from that limit, not bytes. Now if Intel flash has to contain single-byte values per address mapped to the top there, then I guess we can call 16 bits, bytes?

1

There are 1 answers

9
cadaniluk On BEST ANSWER

From Intel® 64 and IA-32 architectures software developer's manual volume 1: Basic architecture, section 1.3.4 on page 30:

The processor uses byte addressing. This means memory is organized and accessed as a sequence of bytes. Whether one or more bytes are being accessed, a byte address is used to locate the byte or bytes memory.

Basically, the byte is the smallest addressable unit in memory. To determine the value of a single bit, one would need to fetch the whole byte, which contains its value.

The difference between 0xFFFFFFFF and 0xFFFFFFF0 is 0x0F or 15 in decimal. When we include the byte at 0xFFFFFFF0 in the calculation, it's 16. Memory is byte-addressable, so it's "16 bytes below the processor’s uppermost physical address."


Frankly, I don't know how you arrived at those 16 bits. 16 bits can be represented by four hexadecimal digits (one hex digit corresponds to one nibble, i.e., 4 bits) and nowhere in your citation can I see any relation to any of this.