Ensure that all headers (PCI, UNDI, PnP, iPXE) are aligned to at least
four bytes, so that all accesses to header fields will be correctly
aligned even when reading directly from the expansion ROM BAR.
Reported-by: Peter von Konigsmark <peter@exablaze.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
.word 0
.size mromheader, . - mromheader
+ .align 4
mpciheader:
.ascii "PCIR" /* Signature */
.word pci_vendor_id /* Vendor identification */
.previous
.ifeqs BUSTYPE, "PCIR"
+ .align 4
pciheader:
.ascii "PCIR" /* Signature */
.word pci_vendor_id /* Vendor identification */
.globl undiheader
.weak undiloader
+ .align 4
undiheader:
.ascii "UNDI" /* Signature */
.byte undiheader_len /* Length of structure */
.equ undiheader_len, . - undiheader
.size undiheader, . - undiheader
+ .align 4
ipxeheader:
.ascii "iPXE" /* Signature */
.byte ipxeheader_len /* Length of structure */