[romprefix] Do not preserve unused register %di

Since some PnP BIOSes fail to set %es:di to point to the PnP signature
on entry, we identify a PnP BIOS by scanning through the top 64kB of
base memory looking for the PnP structure.  We therefore don't
actually use the values of %es:di provided to the initialisation entry
point, and so there is no need to preserve them.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/26/merge
Michael Brown 2014-08-21 15:59:11 +01:00
parent ec7c331ca3
commit 16e235987f
1 changed files with 1 additions and 8 deletions

View File

@ -208,15 +208,8 @@ init:
pushw %cs pushw %cs
popw %ds popw %ds
/* Shuffle some registers around. We need %di available for /* Store PCI 3.0 runtime segment address for later use */
* the print_xxx functions, and in a register that's
* addressable from %es, so shuffle as follows:
*
* %di (pointer to PnP structure) => %bx
* %bx (runtime segment address, for PCI 3.0) => %gs
*/
movw %bx, %gs movw %bx, %gs
movw %di, %bx
/* Store PCI bus:dev.fn address */ /* Store PCI bus:dev.fn address */
movw %ax, init_pci_busdevfn movw %ax, init_pci_busdevfn