[coreboot-gerrit] Change in coreboot[master]: timestamps: Add timestamps around the vbios load & init

Martin Roth (Code Review) gerrit at coreboot.org
Wed Mar 7 00:14:10 CET 2018


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/25018


Change subject: timestamps: Add timestamps around the vbios load & init
......................................................................

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 at chromium.org>
---
M src/commonlib/include/commonlib/timestamp_serialized.h
M src/device/pci_device.c
2 files changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/25018/1

diff --git a/src/commonlib/include/commonlib/timestamp_serialized.h b/src/commonlib/include/commonlib/timestamp_serialized.h
index de92c72..67bff66 100644
--- a/src/commonlib/include/commonlib/timestamp_serialized.h
+++ b/src/commonlib/include/commonlib/timestamp_serialized.h
@@ -54,6 +54,9 @@
 	TS_DEVICE_CONFIGURE = 40,
 	TS_DEVICE_ENABLE = 50,
 	TS_DEVICE_INITIALIZE = 60,
+	TS_OPTROM_INITIALIZE = 65,
+	TS_OPTROM_COPY_END = 66,
+	TS_OPTROM_END = 67,
 	TS_DEVICE_DONE = 70,
 	TS_CBMEM_POST = 75,
 	TS_WRITE_TABLES = 80,
@@ -166,6 +169,9 @@
 	{ TS_DEVICE_CONFIGURE,	"device configuration" },
 	{ TS_DEVICE_ENABLE,	"device enable" },
 	{ TS_DEVICE_INITIALIZE,	"device initialization" },
+	{ TS_OPTROM_INITIALIZE, "Optionrom initialization" },
+	{ TS_OPTROM_COPY_END,   "Optionrom copy done" },
+	{ TS_OPTROM_END,        "Optionrom run done"   },
 	{ TS_DEVICE_DONE,	"device setup done" },
 	{ TS_CBMEM_POST,	"cbmem post" },
 	{ TS_WRITE_TABLES,	"write tables" },
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 02eca66..53831fd 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -48,6 +48,7 @@
 #include <device/hypertransport.h>
 #include <pc80/i8259.h>
 #include <security/vboot/vbnv.h>
+#include <timestamp.h>
 
 u8 pci_moving_config8(struct device *dev, unsigned int reg)
 {
@@ -719,6 +720,7 @@
 
 	if (!should_load_oprom(dev))
 		return;
+	timestamp_add_now(TS_OPTROM_INITIALIZE);
 
 	rom = pci_rom_probe(dev);
 	if (rom == NULL)
@@ -727,6 +729,7 @@
 	ram = pci_rom_load(dev, rom);
 	if (ram == NULL)
 		return;
+	timestamp_add_now(TS_OPTROM_COPY_END);
 
 	if (!should_run_oprom(dev))
 		return;
@@ -734,6 +737,8 @@
 	run_bios(dev, (unsigned long)ram);
 	gfx_set_init_done(1);
 	printk(BIOS_DEBUG, "VGA Option ROM was run\n");
+	timestamp_add_now(TS_OPTROM_END);
+
 }
 
 /** Default device operation for PCI devices */

-- 
To view, visit https://review.coreboot.org/25018
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I878ba653eb086ad6c6614aa08a6d3fe216a9323e
Gerrit-Change-Number: 25018
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180306/aa10b11c/attachment.html>


More information about the coreboot-gerrit mailing list