Bläddra i källkod

[mromprefix] Allow for .mrom images larger than 128kB

The .mrom payload has a code type of 0xff and so the initialisation
length field (single byte at offset 0x02) does not need to be
present.  Use only the PCI header's image length field, which allows
the .mrom payload to be up to 32MB in size.

Inspired-by: Swift Geek <swiftgeek@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 år sedan
förälder
incheckning
8049a52840
1 ändrade filer med 1 tillägg och 9 borttagningar
  1. 1
    9
      src/arch/i386/prefix/mromprefix.S

+ 1
- 9
src/arch/i386/prefix/mromprefix.S Visa fil

@@ -196,7 +196,7 @@ find_mem_bar:
196 196
 	movl	%eax, %esi
197 197
 	addr32 es movzbl 2(%esi), %ecx
198 198
 	shll	$7, %ecx
199
-	addr32 es movzbl 2(%esi,%ecx,4), %edx
199
+	addr32 es movzwl mpciheader_image_length(%esi,%ecx,4), %edx
200 200
 	shll	$7, %edx
201 201
 	addl	%edx, %ecx
202 202
 	addr32 es rep movsl
@@ -463,20 +463,12 @@ pci_set_mem_access:
463 463
 	.org	0x00
464 464
 mromheader:
465 465
 	.word	0xaa55			/* BIOS extension signature */
466
-mromheader_size: .byte 0		/* Size in 512-byte blocks */
467 466
 	.org	0x18
468 467
 	.word	mpciheader
469 468
 	.org	0x1a
470 469
 	.word	0
471 470
 	.size	mromheader, . - mromheader
472 471
 
473
-	.section ".zinfo.fixup", "a", @progbits	/* Compressor fixups */
474
-	.ascii	"APPB"
475
-	.long	mromheader_size
476
-	.long	512
477
-	.long	0
478
-	.previous
479
-
480 472
 mpciheader:
481 473
 	.ascii	"PCIR"			/* Signature */
482 474
 	.word	pci_vendor_id		/* Vendor identification */

Laddar…
Avbryt
Spara