summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-09-07 20:26:36 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-09-21 06:20:44 +0200
commit3d45c4077665a17735c69576638dc510f96a2dff (patch)
treeb245303e94318cab2633e7e4785e84b73cfc3b50 /src/mainboard/google
parentb766b1c76aa2258bf66569f429fb092c23813bbc (diff)
timestamps: Stash early timestamps in CAR_GLOBAL
Change-Id: I87b454c748cf885491d5b38bfe53a2ec0e9f38c5 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3910 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/butterfly/romstage.c26
-rw-r--r--src/mainboard/google/link/romstage.c26
-rw-r--r--src/mainboard/google/parrot/romstage.c26
-rw-r--r--src/mainboard/google/stout/romstage.c26
4 files changed, 20 insertions, 84 deletions
diff --git a/src/mainboard/google/butterfly/romstage.c b/src/mainboard/google/butterfly/romstage.c
index 554df8357d..670fc005ee 100644
--- a/src/mainboard/google/butterfly/romstage.c
+++ b/src/mainboard/google/butterfly/romstage.c
@@ -118,12 +118,6 @@ void main(unsigned long bist)
u32 pm1_cnt;
u16 pm1_sts;
-#if CONFIG_COLLECT_TIMESTAMPS
- tsc_t start_romstage_time;
- tsc_t before_dram_time;
- tsc_t after_dram_time;
- tsc_t base_time = get_initial_timestamp();
-#endif
struct pei_data pei_data = {
pei_version: PEI_VERSION,
mchbar: DEFAULT_MCHBAR,
@@ -170,9 +164,8 @@ void main(unsigned long bist)
},
};
-#if CONFIG_COLLECT_TIMESTAMPS
- start_romstage_time = rdtsc();
-#endif
+ timestamp_init(get_initial_timestamp());
+ timestamp_add_now(TS_START_ROMSTAGE);
if (bist == 0)
enable_lapic();
@@ -237,14 +230,10 @@ void main(unsigned long bist)
post_code(0x3a);
pei_data.boot_mode = boot_mode;
-#if CONFIG_COLLECT_TIMESTAMPS
- before_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_BEFORE_INITRAM);
sdram_initialize(&pei_data);
-#if CONFIG_COLLECT_TIMESTAMPS
- after_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_AFTER_INITRAM);
post_code(0x3c);
rcba_config();
@@ -284,13 +273,8 @@ void main(unsigned long bist)
#if CONFIG_CHROMEOS
init_chromeos(boot_mode);
#endif
-#if CONFIG_COLLECT_TIMESTAMPS
- timestamp_init(base_time);
- timestamp_add(TS_START_ROMSTAGE, start_romstage_time );
- timestamp_add(TS_BEFORE_INITRAM, before_dram_time );
- timestamp_add(TS_AFTER_INITRAM, after_dram_time );
+ timestamp_sync();
timestamp_add_now(TS_END_ROMSTAGE);
-#endif
#if CONFIG_CONSOLE_CBMEM
/* Keep this the last thing this function does. */
cbmemc_reinit();
diff --git a/src/mainboard/google/link/romstage.c b/src/mainboard/google/link/romstage.c
index ad4da8452b..aaecfc6230 100644
--- a/src/mainboard/google/link/romstage.c
+++ b/src/mainboard/google/link/romstage.c
@@ -154,12 +154,6 @@ void main(unsigned long bist)
u32 pm1_cnt;
u16 pm1_sts;
-#if CONFIG_COLLECT_TIMESTAMPS
- tsc_t start_romstage_time;
- tsc_t before_dram_time;
- tsc_t after_dram_time;
- tsc_t base_time = get_initial_timestamp();
-#endif
struct pei_data pei_data = {
pei_version: PEI_VERSION,
mchbar: DEFAULT_MCHBAR,
@@ -206,9 +200,8 @@ void main(unsigned long bist)
},
};
-#if CONFIG_COLLECT_TIMESTAMPS
- start_romstage_time = rdtsc();
-#endif
+ timestamp_init(get_initial_timestamp());
+ timestamp_add_now(TS_START_ROMSTAGE);
if (bist == 0)
enable_lapic();
@@ -280,14 +273,10 @@ void main(unsigned long bist)
post_code(0x3a);
pei_data.boot_mode = boot_mode;
-#if CONFIG_COLLECT_TIMESTAMPS
- before_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_BEFORE_INITRAM);
sdram_initialize(&pei_data);
-#if CONFIG_COLLECT_TIMESTAMPS
- after_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_AFTER_INITRAM);
post_code(0x3c);
rcba_config();
@@ -327,13 +316,8 @@ void main(unsigned long bist)
#if CONFIG_CHROMEOS
init_chromeos(boot_mode);
#endif
-#if CONFIG_COLLECT_TIMESTAMPS
- timestamp_init(base_time);
- timestamp_add(TS_START_ROMSTAGE, start_romstage_time );
- timestamp_add(TS_BEFORE_INITRAM, before_dram_time );
- timestamp_add(TS_AFTER_INITRAM, after_dram_time );
+ timestamp_sync();
timestamp_add_now(TS_END_ROMSTAGE);
-#endif
#if CONFIG_CONSOLE_CBMEM
/* Keep this the last thing this function does. */
cbmemc_reinit();
diff --git a/src/mainboard/google/parrot/romstage.c b/src/mainboard/google/parrot/romstage.c
index 79f9c2a8e5..444386f1fd 100644
--- a/src/mainboard/google/parrot/romstage.c
+++ b/src/mainboard/google/parrot/romstage.c
@@ -119,12 +119,6 @@ void main(unsigned long bist)
u32 pm1_cnt;
u16 pm1_sts;
-#if CONFIG_COLLECT_TIMESTAMPS
- tsc_t start_romstage_time;
- tsc_t before_dram_time;
- tsc_t after_dram_time;
- tsc_t base_time = get_initial_timestamp();
-#endif
struct pei_data pei_data = {
pei_version: PEI_VERSION,
mchbar: DEFAULT_MCHBAR,
@@ -171,9 +165,8 @@ void main(unsigned long bist)
},
};
-#if CONFIG_COLLECT_TIMESTAMPS
- start_romstage_time = rdtsc();
-#endif
+ timestamp_init(get_initial_timestamp());
+ timestamp_add_now(TS_START_ROMSTAGE);
if (bist == 0)
enable_lapic();
@@ -238,14 +231,10 @@ void main(unsigned long bist)
post_code(0x3a);
pei_data.boot_mode = boot_mode;
-#if CONFIG_COLLECT_TIMESTAMPS
- before_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_BEFORE_INITRAM);
sdram_initialize(&pei_data);
-#if CONFIG_COLLECT_TIMESTAMPS
- after_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_AFTER_INITRAM);
post_code(0x3c);
rcba_config();
@@ -285,13 +274,8 @@ void main(unsigned long bist)
#if CONFIG_CHROMEOS
init_chromeos(boot_mode);
#endif
-#if CONFIG_COLLECT_TIMESTAMPS
- timestamp_init(base_time);
- timestamp_add(TS_START_ROMSTAGE, start_romstage_time );
- timestamp_add(TS_BEFORE_INITRAM, before_dram_time );
- timestamp_add(TS_AFTER_INITRAM, after_dram_time );
+ timestamp_sync();
timestamp_add_now(TS_END_ROMSTAGE);
-#endif
#if CONFIG_CONSOLE_CBMEM
/* Keep this the last thing this function does. */
cbmemc_reinit();
diff --git a/src/mainboard/google/stout/romstage.c b/src/mainboard/google/stout/romstage.c
index 312483a319..5ace4f6e82 100644
--- a/src/mainboard/google/stout/romstage.c
+++ b/src/mainboard/google/stout/romstage.c
@@ -158,12 +158,6 @@ void main(unsigned long bist)
u32 pm1_cnt;
u16 pm1_sts;
-#if CONFIG_COLLECT_TIMESTAMPS
- tsc_t start_romstage_time;
- tsc_t before_dram_time;
- tsc_t after_dram_time;
- tsc_t base_time = get_initial_timestamp();
-#endif
struct pei_data pei_data = {
pei_version: PEI_VERSION,
mchbar: DEFAULT_MCHBAR,
@@ -215,9 +209,8 @@ void main(unsigned long bist)
},
};
-#if CONFIG_COLLECT_TIMESTAMPS
- start_romstage_time = rdtsc();
-#endif
+ timestamp_init(get_initial_timestamp());
+ timestamp_add_now(TS_START_ROMSTAGE);
if (bist == 0)
enable_lapic();
@@ -287,14 +280,10 @@ void main(unsigned long bist)
post_code(0x3a);
pei_data.boot_mode = boot_mode;
-#if CONFIG_COLLECT_TIMESTAMPS
- before_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_BEFORE_INITRAM);
sdram_initialize(&pei_data);
-#if CONFIG_COLLECT_TIMESTAMPS
- after_dram_time = rdtsc();
-#endif
+ timestamp_add_now(TS_AFTER_INITRAM);
post_code(0x3b);
/* Perform some initialization that must run before stage2 */
early_pch_init();
@@ -341,13 +330,8 @@ void main(unsigned long bist)
#if CONFIG_CHROMEOS
init_chromeos(boot_mode);
#endif
-#if CONFIG_COLLECT_TIMESTAMPS
- timestamp_init(base_time);
- timestamp_add(TS_START_ROMSTAGE, start_romstage_time );
- timestamp_add(TS_BEFORE_INITRAM, before_dram_time );
- timestamp_add(TS_AFTER_INITRAM, after_dram_time );
+ timestamp_sync();
timestamp_add_now(TS_END_ROMSTAGE);
-#endif
#if CONFIG_CONSOLE_CBMEM
/* Keep this the last thing this function does. */
cbmemc_reinit();