timestamps: Add timestamps around the vbios load & init
Add timestamps before and after the vBIOS load and after the vBIOS run. This lets us see exactly how long it took to load it from the ROM chip, and how long it takes to run. BUG=b:64549506 TEST=Build & boot Grunt, see vBIOS load & initialization times. Change-Id: I878ba653eb086ad6c6614aa08a6d3fe216a9323e Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://review.coreboot.org/25018 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
b3b47e1a85
commit
5dd4a2a4b0
|
@ -54,6 +54,9 @@ enum timestamp_id {
|
||||||
TS_DEVICE_CONFIGURE = 40,
|
TS_DEVICE_CONFIGURE = 40,
|
||||||
TS_DEVICE_ENABLE = 50,
|
TS_DEVICE_ENABLE = 50,
|
||||||
TS_DEVICE_INITIALIZE = 60,
|
TS_DEVICE_INITIALIZE = 60,
|
||||||
|
TS_OPROM_INITIALIZE = 65,
|
||||||
|
TS_OPROM_COPY_END = 66,
|
||||||
|
TS_OPROM_END = 67,
|
||||||
TS_DEVICE_DONE = 70,
|
TS_DEVICE_DONE = 70,
|
||||||
TS_CBMEM_POST = 75,
|
TS_CBMEM_POST = 75,
|
||||||
TS_WRITE_TABLES = 80,
|
TS_WRITE_TABLES = 80,
|
||||||
|
@ -166,6 +169,9 @@ static const struct timestamp_id_to_name {
|
||||||
{ TS_DEVICE_CONFIGURE, "device configuration" },
|
{ TS_DEVICE_CONFIGURE, "device configuration" },
|
||||||
{ TS_DEVICE_ENABLE, "device enable" },
|
{ TS_DEVICE_ENABLE, "device enable" },
|
||||||
{ TS_DEVICE_INITIALIZE, "device initialization" },
|
{ TS_DEVICE_INITIALIZE, "device initialization" },
|
||||||
|
{ TS_OPROM_INITIALIZE, "Option ROM initialization" },
|
||||||
|
{ TS_OPROM_COPY_END, "Option ROM copy done" },
|
||||||
|
{ TS_OPROM_END, "Option ROM run done" },
|
||||||
{ TS_DEVICE_DONE, "device setup done" },
|
{ TS_DEVICE_DONE, "device setup done" },
|
||||||
{ TS_CBMEM_POST, "cbmem post" },
|
{ TS_CBMEM_POST, "cbmem post" },
|
||||||
{ TS_WRITE_TABLES, "write tables" },
|
{ TS_WRITE_TABLES, "write tables" },
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include <device/hypertransport.h>
|
#include <device/hypertransport.h>
|
||||||
#include <pc80/i8259.h>
|
#include <pc80/i8259.h>
|
||||||
#include <security/vboot/vbnv.h>
|
#include <security/vboot/vbnv.h>
|
||||||
|
#include <timestamp.h>
|
||||||
|
|
||||||
u8 pci_moving_config8(struct device *dev, unsigned int reg)
|
u8 pci_moving_config8(struct device *dev, unsigned int reg)
|
||||||
{
|
{
|
||||||
|
@ -719,6 +720,7 @@ void pci_dev_init(struct device *dev)
|
||||||
|
|
||||||
if (!should_load_oprom(dev))
|
if (!should_load_oprom(dev))
|
||||||
return;
|
return;
|
||||||
|
timestamp_add_now(TS_OPROM_INITIALIZE);
|
||||||
|
|
||||||
rom = pci_rom_probe(dev);
|
rom = pci_rom_probe(dev);
|
||||||
if (rom == NULL)
|
if (rom == NULL)
|
||||||
|
@ -727,6 +729,7 @@ void pci_dev_init(struct device *dev)
|
||||||
ram = pci_rom_load(dev, rom);
|
ram = pci_rom_load(dev, rom);
|
||||||
if (ram == NULL)
|
if (ram == NULL)
|
||||||
return;
|
return;
|
||||||
|
timestamp_add_now(TS_OPROM_COPY_END);
|
||||||
|
|
||||||
if (!should_run_oprom(dev))
|
if (!should_run_oprom(dev))
|
||||||
return;
|
return;
|
||||||
|
@ -734,6 +737,7 @@ void pci_dev_init(struct device *dev)
|
||||||
run_bios(dev, (unsigned long)ram);
|
run_bios(dev, (unsigned long)ram);
|
||||||
gfx_set_init_done(1);
|
gfx_set_init_done(1);
|
||||||
printk(BIOS_DEBUG, "VGA Option ROM was run\n");
|
printk(BIOS_DEBUG, "VGA Option ROM was run\n");
|
||||||
|
timestamp_add_now(TS_OPROM_END);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Default device operation for PCI devices */
|
/** Default device operation for PCI devices */
|
||||||
|
|
Loading…
Reference in New Issue