From 46234ea36be69b89c42b550838092ecc0f0bf972 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 18 Oct 2017 10:18:12 +0200 Subject: sb/intel/i82801jx: Store initial timestamp in bootblock The function to fetch this timestamp is already present. Change-Id: I760aea8a867339764be9ca627b2ccdff4fd18e30 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/22100 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph Reviewed-by: Paul Menzel --- src/southbridge/intel/i82801jx/bootblock.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/southbridge/intel/i82801jx/bootblock.c') diff --git a/src/southbridge/intel/i82801jx/bootblock.c b/src/southbridge/intel/i82801jx/bootblock.c index cc685c4544..115555c599 100644 --- a/src/southbridge/intel/i82801jx/bootblock.c +++ b/src/southbridge/intel/i82801jx/bootblock.c @@ -14,8 +14,21 @@ */ #include +#include #include "i82801jx.h" +static void store_initial_timestamp(void) +{ + /* + * We have two 32bit scratchpad registers available: + * D0:F0 0xdc (SKPAD) + * D31:F2 0xd0 (SATA SP) + */ + tsc_t tsc = rdtsc(); + pci_write_config32(PCI_DEV(0, 0x00, 0), 0xdc, tsc.lo); + pci_write_config32(PCI_DEV(0, 0x1f, 2), 0xd0, tsc.hi); +} + static void enable_spi_prefetch(void) { u8 reg8; @@ -31,6 +44,7 @@ static void enable_spi_prefetch(void) static void bootblock_southbridge_init(void) { + store_initial_timestamp(); enable_spi_prefetch(); /* Enable RCBA */ -- cgit v1.2.3