diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-04-22 16:32:18 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-04-22 16:32:18 +0000 |
commit | 4d59eaa93b49d42300f3e23a27e6b568e5760348 (patch) | |
tree | ad90d262fc203bc17cb8ae43243866f77c27e5e2 /src | |
parent | f96c2d96a87a7da6c843242d210720383d73fcbe (diff) | |
download | coreboot-4d59eaa93b49d42300f3e23a27e6b568e5760348.tar.xz |
- printed CBFS rom address was always 0
- drop dead code.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4180 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/pci_rom.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index e628161cf6..df2adb2868 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -39,8 +39,8 @@ struct rom_header * pci_rom_probe(struct device *dev) void *v; /* if it's in FLASH, then it's as if dev->on_mainboard was true */ v = cbfs_load_optionrom(dev->vendor, dev->device, NULL); - printk_debug("In cbfs, rom address for %s = %lx\n", - dev_path(dev), rom_address); + printk_debug("In cbfs, rom address for %s = %p\n", + dev_path(dev), v); if (v) { dev->rom_address = (u32)v; dev->on_mainboard = 1; @@ -107,19 +107,17 @@ static void *pci_ram_image_start = (void *)PCI_RAM_IMAGE_START; struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header) { struct pci_data * rom_data; - unsigned long rom_address; unsigned int rom_size; unsigned int image_size=0; - rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); - do { rom_header = (struct rom_header *)((void *) rom_header + image_size); // get next image rom_data = (struct pci_data *)((void *) rom_header + le32_to_cpu(rom_header->data)); image_size = le32_to_cpu(rom_data->ilen) * 512; } while ((rom_data->type!=0) && (rom_data->indicator!=0)); // make sure we got x86 version - if(rom_data->type!=0) return NULL; + if (rom_data->type != 0) + return NULL; rom_size = rom_header->size * 512; @@ -132,15 +130,12 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade rom_header, PCI_VGA_RAM_IMAGE_START, rom_size); memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START); - } else { - printk_debug("copying non-VGA ROM Image from %p to %p, 0x%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-rom_size); } - /* disable expansion ROM address decoding */ - pci_write_config32(dev, PCI_ROM_ADDRESS, rom_address & ~PCI_ROM_ADDRESS_ENABLE); - - return NULL; + + printk_debug("copying non-VGA ROM Image from %p to %p, 0x%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-rom_size); } |