coreboot-kgpe-d16/src/arch
Alexandru Gagniuc 87c6097c8f arch/x86: Include timestamp.c in all stages
timestamp.c was not included in bootblock and postcar. This means that
these two stages would use the weak implementation in lib/timestamp.c
instead of the arch-specific implementation based on rdtsc.

This resulted in using timer_monotonic_get() which resets the
timestamps from 0. timer_monotonic_get() only provides per-stage
incrementing semantics on x86 because lapic implementation has
counting down values. A globally incrementing counter like rdtsc
provides the semantics like every other non-x86.

On the test configuration, the weak implementation of timestamp_get()
returned zero, resulting in wrong timestamps coming from the bootblock,
while romstage and ramstage used the arch implementation and returned
correct timestamps.

This is a great example of why weak functions are dangerous, and how
easy it is to miss subtle yet strong interactions between subsystems
and the coreboot buildsystem.

Change-Id: I656f9bd58a6fc179d9dbbc496c5b684ea9288eb5
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/14860
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-19 18:25:59 +02:00
..
arm arch/armv7: Fix end index calculation in mmu_config_range_kb 2016-05-09 06:44:32 +02:00
arm64 arch/arm64: add FRAMEBUFFER region macros to memlayout 2016-05-10 23:47:57 +02:00
mips build system: remove CBFSTOOL_PRE1_OPTS 2016-05-03 11:40:49 +02:00
power8 build system: remove CBFSTOOL_PRE1_OPTS 2016-05-03 11:40:49 +02:00
riscv build system: remove CBFSTOOL_PRE1_OPTS 2016-05-03 11:40:49 +02:00
x86 arch/x86: Include timestamp.c in all stages 2016-05-19 18:25:59 +02:00