Просмотр исходного кода

[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>
tags/v1.20.1
Michael Brown 9 лет назад
Родитель
Сommit
16e235987f
1 измененных файлов: 1 добавлений и 8 удалений
  1. 1
    8
      src/arch/i386/prefix/romprefix.S

+ 1
- 8
src/arch/i386/prefix/romprefix.S Просмотреть файл

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

Загрузка…
Отмена
Сохранить