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:
committed by
Aaron Durbin
parent
e4f3e7a9c6
commit
f5d7f605ab
@@ -18,28 +18,18 @@
|
||||
*/
|
||||
|
||||
#include <arch/exception.h>
|
||||
#include <arch/hlt.h>
|
||||
#include <bootblock_common.h>
|
||||
#include <cbfs.h>
|
||||
#include <console/console.h>
|
||||
#include <arch/stages.h>
|
||||
#include <program_loading.h>
|
||||
|
||||
// the qemu part of all this is very, very non-hardware like.
|
||||
// so it gets its own bootblock.
|
||||
void main(void)
|
||||
{
|
||||
void *entry;
|
||||
|
||||
if (IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) {
|
||||
console_init();
|
||||
exception_init();
|
||||
}
|
||||
|
||||
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, CONFIG_CBFS_PREFIX"/romstage");
|
||||
if (! entry) {
|
||||
printk(BIOS_EMERG, "AAAAAAAAAAAAAA no romstage!\n");
|
||||
while (1);
|
||||
}
|
||||
|
||||
stage_exit(entry);
|
||||
run_romstage();
|
||||
}
|
||||
|
Reference in New Issue
Block a user