/* C code entry point for the boot block */ void bootblock_main(const uint64_t reg_x0, const uint64_t reg_pc) { uint64_t base_timestamp = 0; init_timer(); if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS)) base_timestamp = timestamp_get(); /* Initialize timestamps if we have TIMESTAMP region in memlayout.ld. */ if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS) && _timestamp_size > 0) timestamp_init(base_timestamp); bootblock_soc_early_init(); bootblock_mainboard_early_init(); if (IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) { console_init(); exception_init(); if (reg_x0) printk(BIOS_ERR, "BOOTBLOCK: RST Boot Failure Code %lld\n", reg_x0); } bootblock_soc_init(); bootblock_mainboard_init(); run_romstage(); }
void main(void) { init_timer(); if (IS_ENABLED(CONFIG_HAS_PRECBMEM_TIMESTAMP_REGION)) timestamp_init(timestamp_get()); bootblock_mainboard_early_init(); #if CONFIG_BOOTBLOCK_CONSOLE console_init(); exception_init(); #endif bootblock_soc_init(); bootblock_mainboard_init(); run_romstage(); }
asmlinkage void bootblock_main_with_timestamp(uint64_t base_timestamp) { /* Initialize timestamps if we have TIMESTAMP region in memlayout.ld. */ if (IS_ENABLED(CONFIG_COLLECT_TIMESTAMPS) && _timestamp_size > 0) timestamp_init(base_timestamp); cmos_post_init(); bootblock_soc_early_init(); bootblock_mainboard_early_init(); if (IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) { console_init(); exception_init(); } bootblock_soc_init(); bootblock_mainboard_init(); run_romstage(); }