瀏覽代碼

[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 年之前
父節點
當前提交
8049a52840
共有 1 個檔案被更改,包括 1 行新增9 行删除
  1. 1
    9
      src/arch/i386/prefix/mromprefix.S

+ 1
- 9
src/arch/i386/prefix/mromprefix.S 查看文件

196
 	movl	%eax, %esi
196
 	movl	%eax, %esi
197
 	addr32 es movzbl 2(%esi), %ecx
197
 	addr32 es movzbl 2(%esi), %ecx
198
 	shll	$7, %ecx
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
 	shll	$7, %edx
200
 	shll	$7, %edx
201
 	addl	%edx, %ecx
201
 	addl	%edx, %ecx
202
 	addr32 es rep movsl
202
 	addr32 es rep movsl
463
 	.org	0x00
463
 	.org	0x00
464
 mromheader:
464
 mromheader:
465
 	.word	0xaa55			/* BIOS extension signature */
465
 	.word	0xaa55			/* BIOS extension signature */
466
-mromheader_size: .byte 0		/* Size in 512-byte blocks */
467
 	.org	0x18
466
 	.org	0x18
468
 	.word	mpciheader
467
 	.word	mpciheader
469
 	.org	0x1a
468
 	.org	0x1a
470
 	.word	0
469
 	.word	0
471
 	.size	mromheader, . - mromheader
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
 mpciheader:
472
 mpciheader:
481
 	.ascii	"PCIR"			/* Signature */
473
 	.ascii	"PCIR"			/* Signature */
482
 	.word	pci_vendor_id		/* Vendor identification */
474
 	.word	pci_vendor_id		/* Vendor identification */

Loading…
取消
儲存