Hello,
pci_rom_load() returns wrong rom_header for non-VGA ROM case ?
--- orig/src/devices/pci_rom.c
+++ mod/src/devices/pci_rom.c
@@ -95,11 +95,11 @@
return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
#endif
} else {
- printk_spew("%s, copying non-VGA ROM Image from %x to %x, %x bytes\n",
- __func__, rom_header, pci_ram_image_start, rom_size);
+ printk_debug("copying non-VGA ROM Image from %x to %x, %x bytes\n",
+ rom_header, pci_ram_image_start, rom_size);
memcpy(pci_ram_image_start, rom_header, rom_size);
pci_ram_image_start += rom_size;
- return (struct rom_header *) pci_ram_image_start;
+ return (struct rom_header *) (pci_ram_image_start - rom_size);
}
/* disable expansion ROM address decoding */
pci_write_config32(dev, PCI_ROM_ADDRESS, rom_address &
~PCI_ROM_ADDRESS_ENABLE);
--
Regards,
Liu Tao