memlayout: Add TIMESTAMP region

This region is used to store the timestamps from bootblock and verstage when
cbmem is not yet initialized. Once cbmem is setup, the timestamps from this
region can be retrieved and filled up properly in cbmem. In order to achieve
this a new Kconfig option is introduced HAS_TIMESTAMP_REGION. This is to
maintain compatbility with older boards which do not use this region.

BUG=chrome-os-partner:32973
BRANCH=None
TEST=cbmem -t and verified timestamps on ryu

Change-Id: I4d78653c0595523eeeb02115423e7fecceea5e1e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/223348
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
Furquan Shaikh 2014-10-14 15:26:47 -07:00 committed by chrome-internal-fetch
commit 3f77e81a36
3 changed files with 15 additions and 0 deletions

View file

@ -202,6 +202,14 @@ config COLLECT_TIMESTAMPS
Make coreboot create a table of timer-ID/timer-value pairs to
allow measuring time spent at different phases of the boot process.
config HAS_PRECBMEM_TIMESTAMP_REGION
bool "Timestamp region exists for pre-cbmem timestamps"
depends on COLLECT_TIMESTAMPS
help
A separate region is maintained to allow storing of timestamps before
cbmem comes up. This is useful for storing timestamps across different
stage boundaries.
config USE_BLOBS
bool "Allow use of binary-only repository"
default n

View file

@ -47,6 +47,9 @@
#define DRAM_START(addr) SYMBOL(dram, addr)
#define TIMESTAMP(addr, size) \
REGION(timestamp, addr, size, 8)
#define PRERAM_CBMEM_CONSOLE(addr, size) \
REGION(preram_cbmem_console, addr, size, 4)

View file

@ -28,6 +28,10 @@ extern u8 _esram[];
extern u8 _dram[];
extern u8 _timestamp[];
extern u8 _etimestamp[];
#define _timestamp_size (_etimestamp - _timestamp)
extern u8 _preram_cbmem_console[];
extern u8 _epreram_cbmem_console[];
#define _preram_cbmem_console_size \