2020-03-04 15:10:45 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2016-09-16 23:15:14 +02:00
|
|
|
|
2019-08-16 19:34:25 +02:00
|
|
|
#include <arch/romstage.h>
|
2016-09-16 23:23:21 +02:00
|
|
|
#include <cbmem.h>
|
2016-09-16 23:15:14 +02:00
|
|
|
#include <console/console.h>
|
2018-11-13 19:28:07 +01:00
|
|
|
#include <cpu/x86/mtrr.h>
|
2016-09-16 23:15:14 +02:00
|
|
|
#include <main_decl.h>
|
|
|
|
#include <program_loading.h>
|
arch/x86/postcar: Add separate timestamp for postcar stage
This patch adds dedicated timestamp value for postcar stage.
TEST=Able to see "start of postcar" and "end of postcar" timestamp
while executing cbmem -t after booting to chrome console.
> cbmem -t
951:returning from FspMemoryInit 20,485,324 (20,103,067)
4:end of romstage 20,559,235 (73,910)
100:start of postcar 20,560,266 (1,031)
101:end of postcar 20,570,038 (9,772)
Change-Id: I084f66949667ad598f811d4233b4e639bc4c113e
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31762
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-03-05 12:15:14 +01:00
|
|
|
#include <timestamp.h>
|
2017-08-10 23:17:26 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Systems without a native coreboot cache-as-ram teardown may implement
|
|
|
|
* this to use an alternate method.
|
|
|
|
*/
|
2018-04-21 22:45:32 +02:00
|
|
|
__weak void late_car_teardown(void) { /* do nothing */ }
|
2016-09-16 23:15:14 +02:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
2017-08-10 23:17:26 +02:00
|
|
|
late_car_teardown();
|
2016-10-18 20:35:15 +02:00
|
|
|
|
2016-09-16 23:15:14 +02:00
|
|
|
console_init();
|
|
|
|
|
2019-09-12 12:45:15 +02:00
|
|
|
/*
|
|
|
|
* CBMEM needs to be recovered because timestamps rely on
|
|
|
|
* the cbmem infrastructure being around. Explicitly recover it.
|
|
|
|
*/
|
2016-09-16 23:23:21 +02:00
|
|
|
cbmem_initialize();
|
|
|
|
|
arch/x86/postcar: Add separate timestamp for postcar stage
This patch adds dedicated timestamp value for postcar stage.
TEST=Able to see "start of postcar" and "end of postcar" timestamp
while executing cbmem -t after booting to chrome console.
> cbmem -t
951:returning from FspMemoryInit 20,485,324 (20,103,067)
4:end of romstage 20,559,235 (73,910)
100:start of postcar 20,560,266 (1,031)
101:end of postcar 20,570,038 (9,772)
Change-Id: I084f66949667ad598f811d4233b4e639bc4c113e
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31762
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-03-05 12:15:14 +01:00
|
|
|
timestamp_add_now(TS_START_POSTCAR);
|
|
|
|
|
2018-11-13 19:28:07 +01:00
|
|
|
display_mtrrs();
|
2016-09-16 23:15:14 +02:00
|
|
|
|
|
|
|
/* Load and run ramstage. */
|
|
|
|
run_ramstage();
|
|
|
|
}
|