[ipxe-devel] ipxe/seabios: segment register initialization

Michael Brown mcb30 at ipxe.org
Sun Feb 14 15:40:51 UTC 2016


On 14/02/16 15:26, Michael S. Tsirkin wrote:
>> I'm not aware of any standard describing the content of %ds when jumping to
>> a boot sector at 0000:7c00.  Every boot sector that I have encountered
>> explicitly initialises %ds (and %es, and %ss:%sp) to known values.
>
> Sounds reasonable wrt %ds, but  I think %ss:%sp at least is initialized by PXE, isn't it?
>
> PXE spec says (4.4.5 Client State at Bootstrap Execution Time (Remote.0)):
>
> On entry to the NBP:
> ! CS:IP must contain the value 0:7C00h.
> ! ES:BX must contain the address of the PXENV+ structure.
> ! SS:[SP+4] must contain the segment:offset address of the !PXE structure.
> ! EDX is no longer used.
> ! SS:SP is to contain the address of the beginning of the unused portion of the PXE services stack.
> ! There must be at least 1.5KB of free stack space for the NBP.

That's for execution of a PXE NBP, rather than a (SAN-booted) disk boot 
sector.

Michael



More information about the ipxe-devel mailing list