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>
This commit is contained in:
Michał Żygowski 2017-10-17 09:04:58 +02:00 committed by Kyösti Mälkki
parent 4e4a763703
commit 57760e3cdf
1 changed files with 11 additions and 0 deletions

View File

@ -24,6 +24,7 @@
#include <cpu/x86/lapic.h> #include <cpu/x86/lapic.h>
#include <console/console.h> #include <console/console.h>
#include <commonlib/loglevel.h> #include <commonlib/loglevel.h>
#include <timestamp.h>
#include <cpu/amd/car.h> #include <cpu/amd/car.h>
#include <northbridge/amd/agesa/state_machine.h> #include <northbridge/amd/agesa/state_machine.h>
#include <northbridge/amd/pi/agesawrapper.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(); hudson_lpc_port80();
if (!cpu_init_detectedx && boot_cpu()) { if (!cpu_init_detectedx && boot_cpu()) {
timestamp_init(timestamp_get());
timestamp_add_now(TS_START_ROMSTAGE);
post_code(0x30); post_code(0x30);
early_lpc_init(); early_lpc_init();
@ -82,8 +86,15 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
post_code(0x39); post_code(0x39);
AGESAWRAPPER(amdinitearly); AGESAWRAPPER(amdinitearly);
timestamp_add_now(TS_BEFORE_INITRAM);
post_code(0x40); post_code(0x40);
AGESAWRAPPER(amdinitpost); 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) void agesa_postcar(struct sysinfo *cb)