x86: video: Add debug option to time the BIOS copy
This can be very slow - typically 80ms even on a fast machine since it uses the SPI flash to read the data. Add an option to display the time taken. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
23609c71dc
commit
fba7eac1c8
|
@ -156,6 +156,8 @@ int pci_rom_load(uint16_t class, struct pci_rom_header *rom_header,
|
||||||
|
|
||||||
target = (void *)PCI_VGA_RAM_IMAGE_START;
|
target = (void *)PCI_VGA_RAM_IMAGE_START;
|
||||||
if (target != rom_header) {
|
if (target != rom_header) {
|
||||||
|
ulong start = get_timer(0);
|
||||||
|
|
||||||
debug("Copying VGA ROM Image from %p to %p, 0x%x bytes\n",
|
debug("Copying VGA ROM Image from %p to %p, 0x%x bytes\n",
|
||||||
rom_header, target, rom_size);
|
rom_header, target, rom_size);
|
||||||
memcpy(target, rom_header, rom_size);
|
memcpy(target, rom_header, rom_size);
|
||||||
|
@ -163,6 +165,7 @@ int pci_rom_load(uint16_t class, struct pci_rom_header *rom_header,
|
||||||
printf("VGA ROM copy failed\n");
|
printf("VGA ROM copy failed\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
debug("Copy took %lums\n", get_timer(start));
|
||||||
}
|
}
|
||||||
*ram_headerp = target;
|
*ram_headerp = target;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue