diff options
author | Michał Żygowski <michal.zygowski@3mdeb.com> | 2017-10-17 09:04:58 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2017-10-19 11:23:29 +0000 |
commit | 57760e3cdf19b1339f936bd89f082dc2701397ba (patch) | |
tree | dc3a36ea1fd511acbde17f3afb102eaa9c998d59 /src | |
parent | 4e4a7637030f01bc3b5aa5943c24e4f1d157ebb8 (diff) | |
download | coreboot-57760e3cdf19b1339f936bd89f082dc2701397ba.tar.xz |
pcengines/apu2: Add timestamps to romstage
This change adds timestamps to romstage in order to keep
PC Engines apu2 platform in active codebase.
Change-Id: Ie0286d4982623da9d035c47df6077edaf51e5110
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/22071
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/pcengines/apu2/romstage.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainboard/pcengines/apu2/romstage.c b/src/mainboard/pcengines/apu2/romstage.c index 1ccf7c4e36..9eb9e817d0 100644 --- a/src/mainboard/pcengines/apu2/romstage.c +++ b/src/mainboard/pcengines/apu2/romstage.c @@ -24,6 +24,7 @@ #include <cpu/x86/lapic.h> #include <console/console.h> #include <commonlib/loglevel.h> +#include <timestamp.h> #include <cpu/amd/car.h> #include <northbridge/amd/agesa/state_machine.h> #include <northbridge/amd/pi/agesawrapper.h> @@ -56,6 +57,9 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) hudson_lpc_port80(); if (!cpu_init_detectedx && boot_cpu()) { + timestamp_init(timestamp_get()); + timestamp_add_now(TS_START_ROMSTAGE); + post_code(0x30); early_lpc_init(); @@ -82,8 +86,15 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) post_code(0x39); AGESAWRAPPER(amdinitearly); + timestamp_add_now(TS_BEFORE_INITRAM); + post_code(0x40); AGESAWRAPPER(amdinitpost); + + /* FIXME: Detect if TSC frequency changed during raminit? */ + timestamp_rescale_table(1, 4); + + timestamp_add_now(TS_AFTER_INITRAM); } void agesa_postcar(struct sysinfo *cb) |