From f5babed62fa7e94fddd16940f5c476866b4c41be Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Mon, 16 May 2016 16:27:45 -0700 Subject: soc/apollolake: Pass earliest timestamp to timestamp_init We have a timestamp from before cache-as-ram setup saved in the MMX registers. Recover that timestamp, and use it as the base timestamp rather than letting lib/bootblock.c use a late timestamp. This allows more accurate profiling of the boot flow, since CAR setup time is no longer excluded from the timing information. Change-Id: I055092c600438c5260ab67509434a38f1eb77fe4 Signed-off-by: Alexandru Gagniuc Reviewed-on: https://review.coreboot.org/14863 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- src/soc/intel/apollolake/bootblock/bootblock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/apollolake/bootblock/bootblock.c') diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c index 77d98d98be..82794327c9 100644 --- a/src/soc/intel/apollolake/bootblock/bootblock.c +++ b/src/soc/intel/apollolake/bootblock/bootblock.c @@ -26,6 +26,7 @@ #include #include #include +#include static const struct pad_config tpm_spi_configs[] = { PAD_CFG_NF(GPIO_106, NATIVE, DEEP, NF3), /* FST_SPI_CS2_N */ @@ -53,7 +54,7 @@ static void enable_pm_timer(void) wrmsr(MSR_EMULATE_PM_TMR, msr); } -void asmlinkage bootblock_c_entry(void) +void asmlinkage bootblock_c_entry(uint32_t tsc_hi, uint32_t tsc_lo) { device_t dev = NB_DEV_ROOT; @@ -67,7 +68,7 @@ void asmlinkage bootblock_c_entry(void) pci_write_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); /* Call lib/bootblock.c main */ - main(); + bootblock_main_with_timestamp(((uint64_t)tsc_hi << 32) | tsc_lo); } static void cache_bios_region(void) -- cgit v1.2.3