summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vendorcode/google/chromeos/Kconfig2
-rw-r--r--src/vendorcode/google/chromeos/Makefile.inc2
-rw-r--r--src/vendorcode/google/chromeos/chromeos.c3
-rw-r--r--src/vendorcode/google/chromeos/chromeos.h3
-rw-r--r--src/vendorcode/google/chromeos/verstub.c2
5 files changed, 7 insertions, 5 deletions
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index 4e71c3bfe5..3ee92435bd 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -100,7 +100,7 @@ config VBOOT_VERIFY_FIRMWARE
config VBOOT2_VERIFY_FIRMWARE
bool "Firmware Verification with vboot2"
default n
- depends on CHROMEOS
+ depends on CHROMEOS && HAVE_HARD_RESET
help
Enabling VBOOT2_VERIFY_FIRMWARE will use vboot2 to verify the romstage
and boot loader.
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index e9eef4ac19..7e98860ea1 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -104,7 +104,7 @@ verstage-c-ccopts += -D__PRE_RAM__ -D__VER_STAGE__
verstage-S-ccopts += -D__PRE_RAM__ -D__VER_STAGE__
ifeq ($(CONFIG_RETURN_FROM_VERSTAGE),y)
-bootblock-y += verstub.c
+bootblock-y += verstub.c chromeos.c
else
verstage-y += verstub.c
endif
diff --git a/src/vendorcode/google/chromeos/chromeos.c b/src/vendorcode/google/chromeos/chromeos.c
index 5696aec787..3a499d56e6 100644
--- a/src/vendorcode/google/chromeos/chromeos.c
+++ b/src/vendorcode/google/chromeos/chromeos.c
@@ -173,7 +173,7 @@ struct vboot_components *vboot_locate_components(struct vboot_region *region)
size_t req_size;
struct vboot_components *vbc;
- req_size = sizeof(*region);
+ req_size = sizeof(*vbc);
req_size += sizeof(struct vboot_component_entry) *
MAX_PARSED_FW_COMPONENTS;
@@ -259,6 +259,7 @@ struct vb2_working_data * const vboot_get_working_data(void)
void vboot_reboot(void)
{
hard_reset();
+ die("failed to reboot");
}
#endif
diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h
index 0d8da8feaf..4395506c1b 100644
--- a/src/vendorcode/google/chromeos/chromeos.h
+++ b/src/vendorcode/google/chromeos/chromeos.h
@@ -118,9 +118,10 @@ static inline void chromeos_ram_oops_init(chromeos_acpi_t *chromeos) {}
static inline void chromeos_reserve_ram_oops(struct device *dev, int idx) {}
#endif /* CONFIG_CHROMEOS_RAMOOPS */
+void vboot2_verify_firmware(void);
+
#if CONFIG_VBOOT2_VERIFY_FIRMWARE
void *vboot_load_ramstage(void);
-void vboot2_verify_firmware(void);
void verstage_main(void);
void *vboot_load_stage(int stage_index,
struct vboot_region *fw_main,
diff --git a/src/vendorcode/google/chromeos/verstub.c b/src/vendorcode/google/chromeos/verstub.c
index a4ed77f96b..e295b25f07 100644
--- a/src/vendorcode/google/chromeos/verstub.c
+++ b/src/vendorcode/google/chromeos/verstub.c
@@ -61,7 +61,7 @@ void vboot2_verify_firmware(void)
/* load verstage from RO */
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA,
CONFIG_CBFS_PREFIX "/verstage");
- if (entry == -1)
+ if (entry == (void *)-1)
die("failed to load verstage");
/* verify and select a slot */