romstages: use common run_ramstage()

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

Change-Id: I37b1e94be36ef7a43efe65b2db110742fa105169
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8710
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Aaron Durbin
2015-03-17 13:25:19 -05:00
committed by Aaron Durbin
parent d1b0e87179
commit e4f3e7a9c6
11 changed files with 22 additions and 70 deletions

View File

@@ -13,17 +13,11 @@
* GNU General Public License for more details.
*/
#include <cbfs.h>
#include <console/console.h>
#include <arch/stages.h>
#include <program_loading.h>
void main(void)
{
void *entry;
console_init();
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/ramstage");
stage_exit(entry);
run_ramstage();
}

View File

@@ -13,17 +13,11 @@
* GNU General Public License for more details.
*/
#include <cbfs.h>
#include <console/console.h>
#include <arch/stages.h>
#include <program_loading.h>
void main(void)
{
void *entry;
console_init();
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, CONFIG_CBFS_PREFIX"/ramstage");
stage_exit(entry);
run_ramstage();
}