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

Michael S. Tsirkin mst at redhat.com
Mon Feb 15 06:43:18 GMT 2016


On Mon, Feb 15, 2016 at 01:07:09AM +0000, Michael Brown wrote:
> On 14/02/16 19:52, Michael S. Tsirkin wrote:
> >On Sun, Feb 14, 2016 at 05:36:38PM +0000, Michael Brown wrote:
> >>On 14/02/16 15:53, Michael S. Tsirkin wrote:
> >>>do you think %DS should be zeroed when NBP is called then?
> >>
> >>Not according to the PXE spec.
> >>
> >>As far as I can tell, the initial value of %ds is undefined for both a PXE
> >>NBP and a BIOS boot sector.
> >
> >Thanks,
> 
> Out of interest: did this question arise as a purely academic curiosity, or
> is there some product in existence which creates a boot sector that relies
> on %ds==0?
> 
> Michael

FWIW QEMU has a unit test with a boot sector that relies on %ds=0:
https://git.kernel.org/cgit/virt/kvm/mst/qemu.git/tree/tests/bios-tables-test.c?h=pci
(search for boot_sector in this file).

It's a test, not a product though, and would be easy to change not to
rely on this.

-- 
MST


More information about the ipxe-devel mailing list