Add a PCI header to the VGA ROM if needed
Allows the ROM to be extracted from a PCI device.
V2: * Declare the PCI header in C
* Replace #ifdef CONFIG_VGA_PCI with #if CONFIG_VGA_PCI == 1
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
diff --git a/vgasrc/vgaentry.S b/vgasrc/vgaentry.S
index fbfa9f7..2dc07c1 100644
--- a/vgasrc/vgaentry.S
+++ b/vgasrc/vgaentry.S
@@ -12,6 +12,7 @@
.code16gcc
#include "vgaccode.16.s"
+#include "config.h" // CONFIG_*
#include "entryfuncs.S" // ENTRY_*
@@ -30,7 +31,15 @@
_rom_header_checksum:
.byte 0
_rom_header_other:
- .space 21
+ .space 17
+_rom_header_pcidata:
+#if CONFIG_VGA_PCI == 1
+ .word rom_pci_data
+#else
+ .word 0
+#endif
+_rom_header_pnpdata:
+ .word 0
/****************************************************************