diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-12-26 13:29:09 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-12-28 19:57:16 +0100 |
commit | 1bdd3217a245d3b93a41562814ee593664f0ad03 (patch) | |
tree | 3315f4cf9a1b5a577d1f53a0713ef66a4012d702 /src/device | |
parent | 134f504cb79dd132d765dc8e4c074312199326cc (diff) |
RELOCATABLE_RAMSTAGE: Fix weak symbols with option ROMs
After relocation the weak symbol map_oprom_vendev is no longer NULL.
Always have empty stub function defined.
Change-Id: I5b1bdeb3f37bb04363cf3d9dedaeafc9e193aaae
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7956
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/pci_rom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index 1bdccf0474..dbc05ac790 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -29,6 +29,9 @@ #include <string.h> #include <cbfs.h> +/* Rmodules don't like weak symbols. */ +u32 __attribute__((weak)) map_oprom_vendev(u32 vendev) { return vendev; } + struct rom_header *pci_rom_probe(struct device *dev) { struct rom_header *rom_header; @@ -41,8 +44,7 @@ struct rom_header *pci_rom_probe(struct device *dev) u32 vendev = (dev->vendor << 16) | dev->device; u32 mapped_vendev = vendev; - if (map_oprom_vendev) - mapped_vendev = map_oprom_vendev(vendev); + mapped_vendev = map_oprom_vendev(vendev); if (!rom_header) { if (vendev != mapped_vendev) { |