Browse Source

[romprefix] Remove special treatment for IBM BIOSes

Revert commit 38cd351 ("[romprefix] Attempt to gracefully handle
semi-PnP IBM BIOSes"), since the test for the "IBM " signature in %edi
is not sufficient to identify an IBM BIOS.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
058b69d033
1 changed files with 6 additions and 20 deletions
  1. 6
    20
      src/arch/i386/prefix/romprefix.S

+ 6
- 20
src/arch/i386/prefix/romprefix.S View File

@@ -13,7 +13,6 @@ FILE_LICENCE ( GPL2_OR_LATER )
13 13
 #define PNP_SIGNATURE ( '$' + ( 'P' << 8 ) + ( 'n' << 16 ) + ( 'P' << 24 ) )
14 14
 #define PMM_SIGNATURE ( '$' + ( 'P' << 8 ) + ( 'M' << 16 ) + ( 'M' << 24 ) )
15 15
 #define PCI_SIGNATURE ( 'P' + ( 'C' << 8 ) + ( 'I' << 16 ) + ( ' ' << 24 ) )
16
-#define IBM_SIGNATURE ( ( 'I' << 24 ) + ( 'B' << 16 ) + ( 'M' << 8 ) + ' ' )
17 16
 #define STACK_MAGIC ( 'L' + ( 'R' << 8 ) + ( 'E' << 16 ) + ( 'T' << 24 ) )
18 17
 #define PMM_ALLOCATE 0x0000
19 18
 #define PMM_FIND 0x0001
@@ -173,7 +172,6 @@ undiheader:
173 172
 init:
174 173
 	/* Preserve registers, clear direction flag, set %ds=%cs */
175 174
 	pushaw
176
-	pushl	%ebx
177 175
 	pushw	%ds
178 176
 	pushw	%es
179 177
 	pushw	%fs
@@ -182,14 +180,15 @@ init:
182 180
 	pushw	%cs
183 181
 	popw	%ds
184 182
 
185
-	/* Shuffle some registers around.  We need to use %di for the
186
-	 * print_xxx functions, so shuffle as follows:
183
+	/* Shuffle some registers around.  We need %di available for
184
+	 * the print_xxx functions, and in a register that's
185
+	 * addressable from %es, so shuffle as follows:
187 186
 	 *
187
+	 *    %di (pointer to PnP structure) => %bx
188 188
 	 *    %bx (runtime segment address, for PCI 3.0) => %gs
189
-	 *    %edi (IBM signature) => %ebx
190 189
 	 */
191 190
 	movw	%bx, %gs
192
-	movl	%edi, %ebx
191
+	movw	%di, %bx
193 192
 
194 193
 	/* Store PCI bus:dev.fn address */
195 194
 	movw	%ax, init_pci_busdevfn
@@ -264,16 +263,7 @@ no_pci3:
264 263
 	popl	%edx
265 264
 	popl	%ebx
266 265
 
267
-	/* Check for IBM BIOS, which uses the PnP entry points but
268
-	 * doesn't indicate PnP support.
269
-	 */
270
-	cmpl	$IBM_SIGNATURE, %ebx
271
-	jne	no_ibm
272
-	movw	$init_message_ibm, %si
273
-	xorw	%di, %di
274
-	call	print_message
275
-	jmp	pnp_done
276
-no_ibm:	/* Check for PnP BIOS.  Although %es:di should point to the
266
+	/* Check for PnP BIOS.  Although %es:di should point to the
277 267
 	 * PnP BIOS signature on entry, some BIOSes fail to do this.
278 268
 	 */
279 269
 	movw	$( 0xf000 - 1 ), %bx
@@ -426,7 +416,6 @@ no_pmm:
426 416
 	popw	%fs
427 417
 	popw	%es
428 418
 	popw	%ds
429
-	popl	%ebx
430 419
 	popaw
431 420
 
432 421
 	/* Indicate boot capability to PnP BIOS, if present */
@@ -541,9 +530,6 @@ init_message:
541 530
 init_message_pci:
542 531
 	.asciz	" PCI"
543 532
 	.size	init_message_pci, . - init_message_pci
544
-init_message_ibm:
545
-	.asciz	" IBM"
546
-	.size	init_message_ibm, . - init_message_ibm
547 533
 init_message_pnp:
548 534
 	.asciz	" PnP"
549 535
 	.size	init_message_pnp, . - init_message_pnp

Loading…
Cancel
Save