armv7: branch to verstage for early firmware selection

this change makes the bootblock jump to the verstage when VBOOT2_VERIFY_FIRMWARE
is set.

BUG=None
TEST=Booted Veyron Pinky. Verified firmware selection in the log.
BRANCH=None
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: I868b2c1888a55fd181e10856fd0f58d01086355c
Reviewed-on: https://chromium-review.googlesource.com/219626
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Daisuke Nojiri 2014-09-24 09:38:34 -07:00 committed by chrome-internal-fetch
commit cad9f84d16

View file

@ -27,11 +27,11 @@
#include <cbfs.h>
#include <console/console.h>
#include <delay.h>
#include <vendorcode/google/chromeos/chromeos.h>
void main(void)
{
const char *stage_name = "fallback/romstage";
void *entry;
void *entry = (void *)-1;
bootblock_cpu_init();
bootblock_mainboard_init();
@ -41,8 +41,18 @@ void main(void)
exception_init();
}
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, stage_name);
if (IS_ENABLED(CONFIG_VBOOT2_VERIFY_FIRMWARE)) {
if (IS_ENABLED(CONFIG_RETURN_FROM_VERSTAGE))
vboot2_verify_firmware(); /* doesn't return */
else
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA,
CONFIG_CBFS_PREFIX "/verstage");
} else {
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA,
CONFIG_CBFS_PREFIX "/romstage");
}
if (entry) stage_exit(entry);
if (entry != (void *)-1)
stage_exit(entry);
hlt();
}