bootblocks: use run_romstage()

Instead of sprinkling the cbfs calls around (as well as getting
return values incorrect) use the common run_romstage() to perform
the necessary work to load and run romstage.

Change-Id: Id59f47febf5122cb3ee60f9741cfb58cb60ccab5
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8711
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Aaron Durbin
2015-03-17 13:20:02 -05:00
committed by Aaron Durbin
parent e4f3e7a9c6
commit f5d7f605ab
6 changed files with 12 additions and 62 deletions

View File

@@ -24,16 +24,13 @@
#include <bootblock_common.h>
#include <cbfs.h>
#include <console/console.h>
#include <halt.h>
#include <program_loading.h>
__attribute__((weak)) void bootblock_soc_init(void) { /* do nothing */ }
__attribute__((weak)) void bootblock_mainboard_init(void) { /* do nothing */ }
void main(void)
{
const char *stage_name = "fallback/romstage";
void *entry;
bootblock_soc_init();
bootblock_mainboard_init();
@@ -42,8 +39,5 @@ void main(void)
exception_init();
}
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, stage_name);
if (entry) stage_exit(entry);
halt();
run_romstage();
}

View File

@@ -25,7 +25,7 @@
#include <bootblock_common.h>
#include <cbfs.h>
#include <console/console.h>
#include <halt.h>
#include <program_loading.h>
#include <smp/node.h>
__attribute__((weak)) void bootblock_soc_init(void) { /* do nothing */ }
@@ -33,9 +33,6 @@ __attribute__((weak)) void bootblock_mainboard_init(void) { /* do nothing */ }
void main(void)
{
const char *stage_name = "fallback/romstage";
void *entry;
bootblock_soc_init();
bootblock_mainboard_init();
@@ -44,8 +41,5 @@ void main(void)
exception_init();
#endif
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, stage_name);
if (entry) stage_exit(entry);
halt();
run_romstage();
}