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>
This commit is contained in:
parent
b766b1c76a
commit
3d45c40776
@ -200,16 +200,8 @@ void romstage_common(const struct romstage_params *params)
|
|||||||
int wake_from_s3;
|
int wake_from_s3;
|
||||||
struct romstage_handoff *handoff;
|
struct romstage_handoff *handoff;
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
tsc_t start_romstage_time;
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
tsc_t before_dram_time;
|
|
||||||
tsc_t after_dram_time;
|
|
||||||
tsc_t base_time = get_initial_timestamp();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
|
||||||
start_romstage_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (params->bist == 0)
|
if (params->bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -249,17 +241,15 @@ void romstage_common(const struct romstage_params *params)
|
|||||||
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
params->pei_data->boot_mode = boot_mode;
|
params->pei_data->boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
|
||||||
before_dram_time = rdtsc();
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
#endif
|
|
||||||
|
|
||||||
report_platform_info();
|
report_platform_info();
|
||||||
|
|
||||||
sdram_initialize(params->pei_data);
|
sdram_initialize(params->pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3b);
|
post_code(0x3b);
|
||||||
|
|
||||||
intel_early_me_status();
|
intel_early_me_status();
|
||||||
@ -288,13 +278,8 @@ void romstage_common(const struct romstage_params *params)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void prepare_for_resume(struct romstage_handoff *handoff)
|
static inline void prepare_for_resume(struct romstage_handoff *handoff)
|
||||||
|
@ -114,7 +114,10 @@ static void timestamp_do_sync(void)
|
|||||||
|
|
||||||
void timestamp_init(tsc_t base)
|
void timestamp_init(tsc_t base)
|
||||||
{
|
{
|
||||||
#ifndef __PRE_RAM__
|
#ifdef __PRE_RAM__
|
||||||
|
/* Copy of basetime, it is too early for CBMEM. */
|
||||||
|
ts_basetime = base;
|
||||||
|
#else
|
||||||
struct timestamp_table* tst;
|
struct timestamp_table* tst;
|
||||||
|
|
||||||
/* Locate and use an already existing table. */
|
/* Locate and use an already existing table. */
|
||||||
@ -123,19 +126,21 @@ void timestamp_init(tsc_t base)
|
|||||||
ts_table = tst;
|
ts_table = tst;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
/* Copy of basetime, may be too early for CBMEM. */
|
||||||
|
ts_basetime = base;
|
||||||
timestamp_real_init(base);
|
timestamp_real_init(base);
|
||||||
if (ts_table)
|
#endif
|
||||||
timestamp_do_sync();
|
|
||||||
else
|
|
||||||
ts_basetime = base;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __PRE_RAM__
|
|
||||||
void timestamp_sync(void)
|
void timestamp_sync(void)
|
||||||
{
|
{
|
||||||
|
#ifdef __PRE_RAM__
|
||||||
|
timestamp_real_init(ts_basetime);
|
||||||
|
#else
|
||||||
if (!ts_table)
|
if (!ts_table)
|
||||||
timestamp_init(ts_basetime);
|
timestamp_init(ts_basetime);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
if (ts_table)
|
||||||
|
timestamp_do_sync();
|
||||||
|
}
|
||||||
|
@ -49,10 +49,10 @@ void main(unsigned long bist)
|
|||||||
//dump_pci_devices();
|
//dump_pci_devices();
|
||||||
|
|
||||||
cbmem_was_initted = !cbmem_initialize();
|
cbmem_was_initted = !cbmem_initialize();
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
|
||||||
timestamp_init(rdtsc());
|
timestamp_init(rdtsc());
|
||||||
|
timestamp_sync();
|
||||||
timestamp_add_now(TS_START_ROMSTAGE);
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -51,10 +51,10 @@ void main(unsigned long bist)
|
|||||||
//dump_pci_devices();
|
//dump_pci_devices();
|
||||||
|
|
||||||
cbmem_was_initted = !cbmem_initialize();
|
cbmem_was_initted = !cbmem_initialize();
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
|
||||||
timestamp_init(rdtsc());
|
timestamp_init(rdtsc());
|
||||||
|
timestamp_sync();
|
||||||
timestamp_add_now(TS_START_ROMSTAGE);
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -118,12 +118,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -170,9 +164,8 @@ void main(unsigned long bist)
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -237,14 +230,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3c);
|
post_code(0x3c);
|
||||||
|
|
||||||
rcba_config();
|
rcba_config();
|
||||||
@ -284,13 +273,8 @@ void main(unsigned long bist)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -154,12 +154,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -206,9 +200,8 @@ void main(unsigned long bist)
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -280,14 +273,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3c);
|
post_code(0x3c);
|
||||||
|
|
||||||
rcba_config();
|
rcba_config();
|
||||||
@ -327,13 +316,8 @@ void main(unsigned long bist)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -119,12 +119,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -171,9 +165,8 @@ void main(unsigned long bist)
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -238,14 +231,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3c);
|
post_code(0x3c);
|
||||||
|
|
||||||
rcba_config();
|
rcba_config();
|
||||||
@ -285,13 +274,8 @@ void main(unsigned long bist)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -158,12 +158,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -215,9 +209,8 @@ void main(unsigned long bist)
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -287,14 +280,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3b);
|
post_code(0x3b);
|
||||||
/* Perform some initialization that must run before stage2 */
|
/* Perform some initialization that must run before stage2 */
|
||||||
early_pch_init();
|
early_pch_init();
|
||||||
@ -341,13 +330,8 @@ void main(unsigned long bist)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -170,12 +170,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -220,9 +214,8 @@ void main(unsigned long bist)
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -286,14 +279,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3b);
|
post_code(0x3b);
|
||||||
/* Perform some initialization that must run before stage2 */
|
/* Perform some initialization that must run before stage2 */
|
||||||
early_pch_init();
|
early_pch_init();
|
||||||
@ -339,13 +328,8 @@ void main(unsigned long bist)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -156,12 +156,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -216,9 +210,8 @@ void main(unsigned long bist)
|
|||||||
pcie_init: 1,
|
pcie_init: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -289,14 +282,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3c);
|
post_code(0x3c);
|
||||||
|
|
||||||
rcba_config();
|
rcba_config();
|
||||||
@ -333,13 +322,8 @@ void main(unsigned long bist)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
post_code(0x3f);
|
post_code(0x3f);
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -212,16 +212,9 @@ void main(unsigned long bist)
|
|||||||
int cbmem_was_initted;
|
int cbmem_was_initted;
|
||||||
const u8 spd_addrmap[2 * DIMM_SOCKETS] = { 0x50, 0x52, 0x51, 0x53 };
|
const u8 spd_addrmap[2 * DIMM_SOCKETS] = { 0x50, 0x52, 0x51, 0x53 };
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -291,13 +284,9 @@ void main(unsigned long bist)
|
|||||||
dump_spd_registers();
|
dump_spd_registers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(boot_mode, spd_addrmap);
|
sdram_initialize(boot_mode, spd_addrmap);
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Perform some initialization that must run before stage2 */
|
/* Perform some initialization that must run before stage2 */
|
||||||
early_ich7_init();
|
early_ich7_init();
|
||||||
@ -354,13 +343,8 @@ void main(unsigned long bist)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
|
@ -219,16 +219,9 @@ void main(unsigned long bist)
|
|||||||
int cbmem_was_initted;
|
int cbmem_was_initted;
|
||||||
const u8 spd_addrmap[2 * DIMM_SOCKETS] = { 0x50, 0x52, 0x51, 0x53 };
|
const u8 spd_addrmap[2 * DIMM_SOCKETS] = { 0x50, 0x52, 0x51, 0x53 };
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -293,13 +286,9 @@ void main(unsigned long bist)
|
|||||||
dump_spd_registers();
|
dump_spd_registers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(boot_mode, spd_addrmap);
|
sdram_initialize(boot_mode, spd_addrmap);
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Perform some initialization that must run before stage2 */
|
/* Perform some initialization that must run before stage2 */
|
||||||
early_ich7_init();
|
early_ich7_init();
|
||||||
@ -358,13 +347,8 @@ void main(unsigned long bist)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
|
@ -137,12 +137,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -192,9 +186,8 @@ void main(unsigned long bist)
|
|||||||
spd_blob *spd_data;
|
spd_blob *spd_data;
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -307,14 +300,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x39);
|
post_code(0x39);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
/* Perform some initialization that must run before stage2 */
|
/* Perform some initialization that must run before stage2 */
|
||||||
early_pch_init();
|
early_pch_init();
|
||||||
@ -358,13 +347,8 @@ void main(unsigned long bist)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
@ -173,12 +173,6 @@ void main(unsigned long bist)
|
|||||||
u32 pm1_cnt;
|
u32 pm1_cnt;
|
||||||
u16 pm1_sts;
|
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 = {
|
struct pei_data pei_data = {
|
||||||
pei_version: PEI_VERSION,
|
pei_version: PEI_VERSION,
|
||||||
mchbar: DEFAULT_MCHBAR,
|
mchbar: DEFAULT_MCHBAR,
|
||||||
@ -223,9 +217,8 @@ void main(unsigned long bist)
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_init(get_initial_timestamp());
|
||||||
start_romstage_time = rdtsc();
|
timestamp_add_now(TS_START_ROMSTAGE);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (bist == 0)
|
if (bist == 0)
|
||||||
enable_lapic();
|
enable_lapic();
|
||||||
@ -315,14 +308,10 @@ void main(unsigned long bist)
|
|||||||
|
|
||||||
post_code(0x39);
|
post_code(0x39);
|
||||||
pei_data.boot_mode = boot_mode;
|
pei_data.boot_mode = boot_mode;
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_BEFORE_INITRAM);
|
||||||
before_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
sdram_initialize(&pei_data);
|
sdram_initialize(&pei_data);
|
||||||
|
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
after_dram_time = rdtsc();
|
|
||||||
#endif
|
|
||||||
post_code(0x3a);
|
post_code(0x3a);
|
||||||
/* Perform some initialization that must run before stage2 */
|
/* Perform some initialization that must run before stage2 */
|
||||||
early_pch_init();
|
early_pch_init();
|
||||||
@ -365,13 +354,8 @@ void main(unsigned long bist)
|
|||||||
#if CONFIG_CHROMEOS
|
#if CONFIG_CHROMEOS
|
||||||
init_chromeos(boot_mode);
|
init_chromeos(boot_mode);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_COLLECT_TIMESTAMPS
|
timestamp_sync();
|
||||||
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_add_now(TS_END_ROMSTAGE);
|
timestamp_add_now(TS_END_ROMSTAGE);
|
||||||
#endif
|
|
||||||
#if CONFIG_CONSOLE_CBMEM
|
#if CONFIG_CONSOLE_CBMEM
|
||||||
/* Keep this the last thing this function does. */
|
/* Keep this the last thing this function does. */
|
||||||
cbmemc_reinit();
|
cbmemc_reinit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user