summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2014-08-26 13:33:40 +0200
committerMichael Brown2014-08-26 16:17:56 +0200
commit8049a528402f0a6d9e2d2eac8461e6431974cff3 (patch)
tree916ecbf29e43793f73e346e8cae41fa8226b84b8 /src/arch
parent[mromprefix] Use PCI length field to obtain length of individual images (diff)
downloadipxe-8049a528402f0a6d9e2d2eac8461e6431974cff3.tar.gz
ipxe-8049a528402f0a6d9e2d2eac8461e6431974cff3.tar.xz
ipxe-8049a528402f0a6d9e2d2eac8461e6431974cff3.zip
[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>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/prefix/mromprefix.S10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/arch/i386/prefix/mromprefix.S b/src/arch/i386/prefix/mromprefix.S
index 43f0d97de..4c94457c2 100644
--- a/src/arch/i386/prefix/mromprefix.S
+++ b/src/arch/i386/prefix/mromprefix.S
@@ -196,7 +196,7 @@ find_mem_bar:
movl %eax, %esi
addr32 es movzbl 2(%esi), %ecx
shll $7, %ecx
- addr32 es movzbl 2(%esi,%ecx,4), %edx
+ addr32 es movzwl mpciheader_image_length(%esi,%ecx,4), %edx
shll $7, %edx
addl %edx, %ecx
addr32 es rep movsl
@@ -463,20 +463,12 @@ pci_set_mem_access:
.org 0x00
mromheader:
.word 0xaa55 /* BIOS extension signature */
-mromheader_size: .byte 0 /* Size in 512-byte blocks */
.org 0x18
.word mpciheader
.org 0x1a
.word 0
.size mromheader, . - mromheader
- .section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
- .ascii "APPB"
- .long mromheader_size
- .long 512
- .long 0
- .previous
-
mpciheader:
.ascii "PCIR" /* Signature */
.word pci_vendor_id /* Vendor identification */