timestamps: You can never have enough of them!

Now that we have timestamps in pre-RAM stages, let's actually make use
of them. This patch adds several timestamps to both the bootblock and
especially the verstage to allow more fine-grained boot time tracking.

Some of the introduced timestamps can appear more than once per boot.
This doesn't seem to be a problem for both coreboot and the cbmem
utility, and the context makes it clear which operation was timestamped
at what point.

Also simplifies cbmem's timestamp printing routine a bit, fixing a
display bug when a timestamp had a section of exactly ",000," in it
(e.g. 1,000,185).

BRANCH=None
BUG=None
TEST=Booted Pinky, Blaze and Falco, confirmed that all timestamps show
up and contained sane values. Booted Storm (no timestamps here since it
doesn't support pre-RAM timestamps yet).

Change-Id: I5979bfa9445a9e0aba98ffdf8006c21096743456
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/234063
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Julius Werner 2014-12-02 20:51:19 -08:00 committed by chrome-internal-fetch
commit 7a2ce81722
11 changed files with 116 additions and 42 deletions

View file

@ -47,8 +47,10 @@
#define DRAM_START(addr) SYMBOL(dram, addr)
/* Coordinate asserted minimum size with timestamp.c and x86 romstage.ld! */
#define TIMESTAMP(addr, size) \
REGION(timestamp, addr, size, 8)
REGION(timestamp, addr, size, 8) \
_ = ASSERT(size >= 0x180, "Timestamp region must fit timestamp_cache!");
#define PRERAM_CBMEM_CONSOLE(addr, size) \
REGION(preram_cbmem_console, addr, size, 4) \