summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci_rom.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 86f0e95..124b730 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -157,7 +157,13 @@ int pci_rom_load(uint16_t class, struct pci_rom_header *rom_header,
rom_size = rom_header->size * 512;
+#ifdef PCI_VGA_RAM_IMAGE_START
target = (void *)PCI_VGA_RAM_IMAGE_START;
+#else
+ target = (void *)malloc(rom_size);
+ if (!target)
+ return -ENOMEM;
+#endif
if (target != rom_header) {
ulong start = get_timer(0);