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 d7bdd498d6ed6cbf39c72b15ea24887303740310 Author: Christian Gmeiner christian.gmeiner@gmail.com Date: Wed Aug 22 16:51:32 2012 +0200
Add possibility to patch VGA oprom
In some rare cases it could be useful 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 | 9 ++++++++- src/include/device/pci_rom.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index fe67515..95f8b3b 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -161,7 +161,14 @@ struct rom_header *pci_rom_load(struct device *dev, PCI_VGA_RAM_IMAGE_START, rom_size); memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); - } + }git commit --amend -m + + /* In some cases it is useful 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