[coreboot] Patch set updated for coreboot: 178269b Add possibility to patch VGA oprom
Christian Gmeiner (christian.gmeiner@gmail.com)
gerrit at coreboot.org
Wed Aug 22 16:51:14 CEST 2012
Christian Gmeiner (christian.gmeiner at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1478
-gerrit
commit 178269b5a7c279a3c798ba9648c4c6f5355048a2
Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date: Wed Aug 22 16:59:02 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 at 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..1135d94 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 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
More information about the coreboot
mailing list