Skip to content
Snippets Groups Projects
Commit bdc88d4e authored by Simon Glass's avatar Simon Glass
Browse files

x86: Support ROMs on other archs


We shouldn't assume that the VGA ROM can always be loaded at c0000. This
is only true on x86 machines.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent 40305240
No related branches found
No related tags found
No related merge requests found
......@@ -70,4 +70,6 @@ uint64_t timer_get_tsc(void);
void quick_ram_check(void);
#define PCI_VGA_RAM_IMAGE_START 0xc0000
#endif /* _U_BOOT_I386_H_ */
......@@ -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);
......
......@@ -8,7 +8,6 @@
#define _PCI_ROM_H
#define PCI_ROM_HDR 0xaa55
#define PCI_VGA_RAM_IMAGE_START 0xc0000
struct pci_rom_header {
uint16_t signature;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment