summaryrefslogtreecommitdiff
path: root/board/chromebook-x86
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2011-09-23 14:07:04 -0700
committerVadim Bendebury <vbendeb@chromium.org>2011-09-26 11:14:51 -0700
commit9cc79dbbd72b2200763357a0c0fdd16190f3ed5e (patch)
tree9afab9c256c01acd9208d5ed318ad9ab2d70f16b /board/chromebook-x86
parente57479c1e59afa58a644ece6e578da66427d74cd (diff)
Enable coreboot timestamp facility support in u-boot.
This change turns on the code which allows u-boot to add timestamps to the timestamp table created by coreboot. Since u-boot does not use the tsc_t like structure to represent HW counter readings, this structure is being replaced by 64 bit integer. The timestamp_init() function is now initializing the base timer value used by u-boot to calculate the HW counter increments. Timestamp facility is initialized as soon as the timestamp table pointer is found in the coreboot table. The u-boot generated timer events' ID will start at 1000 to clearly separate u-boot events from coreboot events in the timer trace. BUG=chromium-os:20733 TEST=manual A Python script was used to retrieve the CBMEM timestamp table while running CromeOS. The script will later be submitted into the ChromeOS tools directory. The following output was generated by the script: localhost ~ # /var/vbendeb/cbmem.py id 1, value 804,824,023 id 2, value 7,846,816,530 id 1000, value 19,356,528,758 Change-Id: I48c46e7b5cd2b2601d12465e0d8946152f31126e Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/8274 Reviewed-by: Stefan Reinauer <reinauer@google.com>
Diffstat (limited to 'board/chromebook-x86')
-rw-r--r--board/chromebook-x86/coreboot/coreboot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/chromebook-x86/coreboot/coreboot.c b/board/chromebook-x86/coreboot/coreboot.c
index cc47b4f8f15..c1a5e42a6e0 100644
--- a/board/chromebook-x86/coreboot/coreboot.c
+++ b/board/chromebook-x86/coreboot/coreboot.c
@@ -34,6 +34,7 @@
#include <chromeos/power_management.h>
#include <chromeos/common.h>
#include <asm/io.h>
+#include <coreboot/timestamp.h>
#ifdef CONFIG_HW_WATCHDOG
#include <watchdog.h>
#endif
@@ -53,7 +54,7 @@ int cpu_init_f(void)
printf("Failed to parse coreboot tables.\n");
}
gd->blob = lib_sysinfo.sys_fdt;
-
+ timestamp_init();
return ret;
}