summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-01 16:18:01 -0700
committerSimon Glass <sjg@chromium.org>2015-01-13 07:24:59 -0800
commitfba7eac1c84aa674696fea55ac3a37f1e7156181 (patch)
treee82349763dfc4754ed822f4061b0287f67d78337
parent23609c71dc0c4a433b7189308cda25d1b9e70c43 (diff)
downloadu-boot-imx-fba7eac1c84aa674696fea55ac3a37f1e7156181.zip
u-boot-imx-fba7eac1c84aa674696fea55ac3a37f1e7156181.tar.gz
u-boot-imx-fba7eac1c84aa674696fea55ac3a37f1e7156181.tar.bz2
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>
-rw-r--r--drivers/pci/pci_rom.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 9808bb3..5ba315b 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -156,6 +156,8 @@ int pci_rom_load(uint16_t class, struct pci_rom_header *rom_header,
target = (void *)PCI_VGA_RAM_IMAGE_START;
if (target != rom_header) {
+ ulong start = get_timer(0);
+
debug("Copying VGA ROM Image from %p to %p, 0x%x bytes\n",
rom_header, target, 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");
return -EFAULT;
}
+ debug("Copy took %lums\n", get_timer(start));
}
*ram_headerp = target;