Christian Gmeiner (christian.gmeiner@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1478
-gerrit
commit e0cb05598872e866d6b8afee2eed3db9a0bff624 Author: Christian Gmeiner christian.gmeiner@gmail.com Date: Wed Aug 22 16:10:46 2012 +0200
Add possibility to patch VGA oprom
In some rare cases it could be usefull to patch a VGA oprom in order to fix some stuff. In later patches this will be used to add EDID information to SeaVIDEOBIOS in oder to support some flat panels.
Change-Id: Ic1005053265505a65b6fd99bc3c6c9cfcbffee43 Signed-off-by: Christian Gmeiner christian.gmeiner@gmail.com --- src/devices/pci_rom.c | 7 +++++++ src/include/device/pci_rom.h | 3 +++ 2 files changed, 10 insertions(+)
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index fe67515..b001ee3 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -162,6 +162,13 @@ struct rom_header *pci_rom_load(struct device *dev, memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); } + + /* In some cases it is usefull to patch an pci vga oprom. A good example + * is adding/changing some EDID information stored in the VGA option rom. + */ + if (pci_vga_rom_patch) + pci_vga_rom_patch(rom_data, (void *)PCI_VGA_RAM_IMAGE_START); + return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START); }
diff --git a/src/include/device/pci_rom.h b/src/include/device/pci_rom.h index fe77276..690e304 100644 --- a/src/include/device/pci_rom.h +++ b/src/include/device/pci_rom.h @@ -37,4 +37,7 @@ struct rom_header *pci_rom_probe(struct device *dev); struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header); u32 __attribute__((weak)) map_oprom_vendev(u32 vendev);
+void __attribute__((weak)) +pci_vga_rom_patch(struct pci_data *rom_data, void *pci_vga_ram_image_start); + #endif