summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-05-12 16:43:10 -0500
committerAaron Durbin <adurbin@chromium.org>2015-05-13 00:23:27 +0200
commit09560facd4a599afbc8f2ed47f48a97aabf40579 (patch)
tree6b73362c0df2a4c8feb5ee31eabb6aaba2c2b84a /src/vendorcode
parent3dad489cac181381b211a0fbf3a6538e32cd5dc2 (diff)
vboot: handle RELOCATABLE_RAMSTAGE
The support for RELOCATABLE_RAMSTAGE was accidentally omitted in the vboot loader. Add said support. Change-Id: I569918823253c33f698acefd6a619133543c7aef Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/10184 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/google/chromeos/vboot2/vboot_loader.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_loader.c b/src/vendorcode/google/chromeos/vboot2/vboot_loader.c
index 505c9c0090..9e60472152 100644
--- a/src/vendorcode/google/chromeos/vboot2/vboot_loader.c
+++ b/src/vendorcode/google/chromeos/vboot2/vboot_loader.c
@@ -18,8 +18,10 @@
*/
#include <cbfs.h>
+#include <cbmem.h>
#include <console/console.h>
#include <program_loading.h>
+#include <rmodule.h>
#include <rules.h>
#include <string.h>
#include "misc.h"
@@ -231,7 +233,15 @@ static int vboot_prepare(struct prog *prog)
if (stage == 0)
die("Vboot stage load failed.");
- if (cbfs_load_prog_stage_by_offset(CBFS_DEFAULT_MEDIA,
+ if (ENV_ROMSTAGE && IS_ENABLED(CONFIG_RELOCATABLE_RAMSTAGE)) {
+ struct rmod_stage_load rmod_ram = {
+ .cbmem_id = CBMEM_ID_RAMSTAGE,
+ .prog = prog,
+ };
+
+ if (rmodule_stage_load(&rmod_ram, (void *)stage))
+ die("Vboot couldn't load stage");
+ } else if (cbfs_load_prog_stage_by_offset(CBFS_DEFAULT_MEDIA,
prog, stage) < 0)
die("Vboot couldn't load stage");
}