summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/baytrail/baytrail/romstage.h7
-rw-r--r--src/soc/intel/baytrail/romstage/romstage.c23
-rw-r--r--src/soc/intel/broadwell/broadwell/romstage.h7
-rw-r--r--src/soc/intel/broadwell/romstage/romstage.c23
4 files changed, 10 insertions, 50 deletions
diff --git a/src/soc/intel/baytrail/baytrail/romstage.h b/src/soc/intel/baytrail/baytrail/romstage.h
index 9ea3564fa3..5fbda3725e 100644
--- a/src/soc/intel/baytrail/baytrail/romstage.h
+++ b/src/soc/intel/baytrail/baytrail/romstage.h
@@ -28,14 +28,7 @@
#include <arch/cpu.h>
#include <baytrail/mrc_wrapper.h>
-#define NUM_ROMSTAGE_TS 4
-struct romstage_timestamps {
- uint64_t times[NUM_ROMSTAGE_TS];
- int count;
-};
-
struct romstage_params {
- struct romstage_timestamps ts;
unsigned long bist;
struct mrc_params *mrc_params;
};
diff --git a/src/soc/intel/baytrail/romstage/romstage.c b/src/soc/intel/baytrail/romstage/romstage.c
index ac5afabffd..a989a99c89 100644
--- a/src/soc/intel/baytrail/romstage/romstage.c
+++ b/src/soc/intel/baytrail/romstage/romstage.c
@@ -99,14 +99,6 @@ static void spi_init(void)
write32(bcr, reg);
}
-static inline void mark_ts(struct romstage_params *rp, uint64_t ts)
-{
- struct romstage_timestamps *rt = &rp->ts;
-
- rt->times[rt->count] = ts;
- rt->count++;
-}
-
/* Entry from cache-as-ram.inc. */
void * asmlinkage romstage_main(unsigned long bist,
uint32_t tsc_low, uint32_t tsc_hi)
@@ -117,9 +109,10 @@ void * asmlinkage romstage_main(unsigned long bist,
};
/* Save initial timestamp from bootblock. */
- mark_ts(&rp, (((uint64_t)tsc_hi) << 32) | (uint64_t)tsc_low);
+ timestamp_init((((uint64_t)tsc_hi) << 32) | (uint64_t)tsc_low);
+
/* Save romstage begin */
- mark_ts(&rp, timestamp_get());
+ timestamp_add_now(TS_START_ROMSTAGE);
program_base_addresses();
@@ -233,7 +226,7 @@ void romstage_common(struct romstage_params *params)
struct chipset_power_state *ps;
int prev_sleep_state;
- mark_ts(params, timestamp_get());
+ timestamp_add_now(TS_BEFORE_INITRAM);
ps = fill_power_state();
prev_sleep_state = chipset_prev_sleep_state(ps);
@@ -249,7 +242,7 @@ void romstage_common(struct romstage_params *params)
/* Initialize RAM */
raminit(params->mrc_params, prev_sleep_state);
- mark_ts(params, timestamp_get());
+ timestamp_add_now(TS_AFTER_INITRAM);
handoff = romstage_handoff_find_or_add();
if (handoff != NULL)
@@ -258,12 +251,6 @@ void romstage_common(struct romstage_params *params)
printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
chromeos_init(prev_sleep_state);
-
- /* Save timestamp information. */
- timestamp_init(params->ts.times[0]);
- timestamp_add(TS_START_ROMSTAGE, params->ts.times[1]);
- timestamp_add(TS_BEFORE_INITRAM, params->ts.times[2]);
- timestamp_add(TS_AFTER_INITRAM, params->ts.times[3]);
}
void asmlinkage romstage_after_car(void)
diff --git a/src/soc/intel/broadwell/broadwell/romstage.h b/src/soc/intel/broadwell/broadwell/romstage.h
index d3702c7490..946d1d0739 100644
--- a/src/soc/intel/broadwell/broadwell/romstage.h
+++ b/src/soc/intel/broadwell/broadwell/romstage.h
@@ -23,16 +23,9 @@
#include <stdint.h>
#include <arch/cpu.h>
-#define NUM_ROMSTAGE_TS 4
-struct romstage_timestamps {
- uint64_t times[NUM_ROMSTAGE_TS];
- int count;
-};
-
struct chipset_power_state;
struct pei_data;
struct romstage_params {
- struct romstage_timestamps ts;
unsigned long bist;
struct chipset_power_state *power_state;
struct pei_data *pei_data;
diff --git a/src/soc/intel/broadwell/romstage/romstage.c b/src/soc/intel/broadwell/romstage/romstage.c
index f234fda034..5ca57d0563 100644
--- a/src/soc/intel/broadwell/romstage/romstage.c
+++ b/src/soc/intel/broadwell/romstage/romstage.c
@@ -38,14 +38,6 @@
#include <broadwell/romstage.h>
#include <broadwell/spi.h>
-static inline void mark_ts(struct romstage_params *rp, uint64_t ts)
-{
- struct romstage_timestamps *rt = &rp->ts;
-
- rt->times[rt->count] = ts;
- rt->count++;
-}
-
/* Entry from cache-as-ram.inc. */
void * asmlinkage romstage_main(unsigned long bist,
uint32_t tsc_low, uint32_t tsc_hi)
@@ -58,10 +50,10 @@ void * asmlinkage romstage_main(unsigned long bist,
post_code(0x30);
/* Save initial timestamp from bootblock. */
- mark_ts(&rp, (((uint64_t)tsc_hi) << 32) | (uint64_t)tsc_low);
+ timestamp_init((((uint64_t)tsc_hi) << 32) | (uint64_t)tsc_low);
/* Save romstage begin */
- mark_ts(&rp, timestamp_get());
+ timestamp_add_now(TS_START_ROMSTAGE);
/* System Agent Early Initialization */
systemagent_early_init();
@@ -102,7 +94,7 @@ void romstage_common(struct romstage_params *params)
post_code(0x32);
- mark_ts(params, timestamp_get());
+ timestamp_add_now(TS_BEFORE_INITRAM);
params->pei_data->boot_mode = params->power_state->prev_sleep_state;
@@ -116,7 +108,8 @@ void romstage_common(struct romstage_params *params)
/* Initialize RAM */
raminit(params->pei_data);
- mark_ts(params, timestamp_get());
+
+ timestamp_add_now(TS_AFTER_INITRAM);
handoff = romstage_handoff_find_or_add();
if (handoff != NULL)
@@ -126,12 +119,6 @@ void romstage_common(struct romstage_params *params)
printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
chromeos_init(params->power_state->prev_sleep_state);
-
- /* Save timestamp information. */
- timestamp_init(params->ts.times[0]);
- timestamp_add(TS_START_ROMSTAGE, params->ts.times[1]);
- timestamp_add(TS_BEFORE_INITRAM, params->ts.times[2]);
- timestamp_add(TS_AFTER_INITRAM, params->ts.times[3]);
}
void asmlinkage romstage_after_car(void)