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
 #define PNP_SIGNATURE ( '$' + ( 'P' << 8 ) + ( 'n' << 16 ) + ( 'P' << 24 ) )
13
 #define PNP_SIGNATURE ( '$' + ( 'P' << 8 ) + ( 'n' << 16 ) + ( 'P' << 24 ) )
14
 #define PMM_SIGNATURE ( '$' + ( 'P' << 8 ) + ( 'M' << 16 ) + ( 'M' << 24 ) )
14
 #define PMM_SIGNATURE ( '$' + ( 'P' << 8 ) + ( 'M' << 16 ) + ( 'M' << 24 ) )
15
 #define PCI_SIGNATURE ( 'P' + ( 'C' << 8 ) + ( 'I' << 16 ) + ( ' ' << 24 ) )
15
 #define PCI_SIGNATURE ( 'P' + ( 'C' << 8 ) + ( 'I' << 16 ) + ( ' ' << 24 ) )
16
-#define IBM_SIGNATURE ( ( 'I' << 24 ) + ( 'B' << 16 ) + ( 'M' << 8 ) + ' ' )
17
 #define STACK_MAGIC ( 'L' + ( 'R' << 8 ) + ( 'E' << 16 ) + ( 'T' << 24 ) )
16
 #define STACK_MAGIC ( 'L' + ( 'R' << 8 ) + ( 'E' << 16 ) + ( 'T' << 24 ) )
18
 #define PMM_ALLOCATE 0x0000
17
 #define PMM_ALLOCATE 0x0000
19
 #define PMM_FIND 0x0001
18
 #define PMM_FIND 0x0001
173
 init:
172
 init:
174
 	/* Preserve registers, clear direction flag, set %ds=%cs */
173
 	/* Preserve registers, clear direction flag, set %ds=%cs */
175
 	pushaw
174
 	pushaw
176
-	pushl	%ebx
177
 	pushw	%ds
175
 	pushw	%ds
178
 	pushw	%es
176
 	pushw	%es
179
 	pushw	%fs
177
 	pushw	%fs
182
 	pushw	%cs
180
 	pushw	%cs
183
 	popw	%ds
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
 	 *    %bx (runtime segment address, for PCI 3.0) => %gs
188
 	 *    %bx (runtime segment address, for PCI 3.0) => %gs
189
-	 *    %edi (IBM signature) => %ebx
190
 	 */
189
 	 */
191
 	movw	%bx, %gs
190
 	movw	%bx, %gs
192
-	movl	%edi, %ebx
191
+	movw	%di, %bx
193
 
192
 
194
 	/* Store PCI bus:dev.fn address */
193
 	/* Store PCI bus:dev.fn address */
195
 	movw	%ax, init_pci_busdevfn
194
 	movw	%ax, init_pci_busdevfn
264
 	popl	%edx
263
 	popl	%edx
265
 	popl	%ebx
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
 	 * PnP BIOS signature on entry, some BIOSes fail to do this.
267
 	 * PnP BIOS signature on entry, some BIOSes fail to do this.
278
 	 */
268
 	 */
279
 	movw	$( 0xf000 - 1 ), %bx
269
 	movw	$( 0xf000 - 1 ), %bx
426
 	popw	%fs
416
 	popw	%fs
427
 	popw	%es
417
 	popw	%es
428
 	popw	%ds
418
 	popw	%ds
429
-	popl	%ebx
430
 	popaw
419
 	popaw
431
 
420
 
432
 	/* Indicate boot capability to PnP BIOS, if present */
421
 	/* Indicate boot capability to PnP BIOS, if present */
541
 init_message_pci:
530
 init_message_pci:
542
 	.asciz	" PCI"
531
 	.asciz	" PCI"
543
 	.size	init_message_pci, . - init_message_pci
532
 	.size	init_message_pci, . - init_message_pci
544
-init_message_ibm:
545
-	.asciz	" IBM"
546
-	.size	init_message_ibm, . - init_message_ibm
547
 init_message_pnp:
533
 init_message_pnp:
548
 	.asciz	" PnP"
534
 	.asciz	" PnP"
549
 	.size	init_message_pnp, . - init_message_pnp
535
 	.size	init_message_pnp, . - init_message_pnp

Loading…
Cancel
Save