summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vendorcode/google/chromeos/chromeos.h1
-rw-r--r--src/vendorcode/google/chromeos/vboot1/vboot_loader.c9
-rw-r--r--src/vendorcode/google/chromeos/vboot2/common.c6
-rw-r--r--src/vendorcode/google/chromeos/vboot2/misc.h1
-rw-r--r--src/vendorcode/google/chromeos/vboot_common.c12
5 files changed, 13 insertions, 16 deletions
diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h
index ccbadabc49..dad357e71d 100644
--- a/src/vendorcode/google/chromeos/chromeos.h
+++ b/src/vendorcode/google/chromeos/chromeos.h
@@ -87,5 +87,6 @@ static inline void chromeos_reserve_ram_oops(struct device *dev, int idx) {}
#endif /* CONFIG_CHROMEOS_RAMOOPS */
void cbmem_add_vpd_calibration_data(void);
+void vboot_reboot(void);
#endif /* __CHROMEOS_H__ */
diff --git a/src/vendorcode/google/chromeos/vboot1/vboot_loader.c b/src/vendorcode/google/chromeos/vboot1/vboot_loader.c
index a2972621d3..dd6c7de180 100644
--- a/src/vendorcode/google/chromeos/vboot1/vboot_loader.c
+++ b/src/vendorcode/google/chromeos/vboot1/vboot_loader.c
@@ -73,7 +73,7 @@ static void log_msg(const char *fmt, va_list args)
static void fatal_error(void)
{
printk(BIOS_ERR, "vboot encountered fatal error. Resetting.\n");
- hard_reset();
+ vboot_reboot();
}
static int fw_region_size(struct vboot_region *r)
@@ -195,11 +195,6 @@ static void vboot_clean_up(struct vboot_context *context)
cbmem_entry_remove(context->vblocks);
}
-static void reset(void)
-{
- hard_reset();
-}
-
static void vboot_invoke_wrapper(struct vboot_handoff *vboot_handoff)
{
VbCommonParams cparams;
@@ -280,7 +275,7 @@ static void vboot_invoke_wrapper(struct vboot_handoff *vboot_handoff)
context.log_msg = &log_msg;
context.fatal_error = &fatal_error;
context.get_region = &vboot_get_region;
- context.reset = &reset;
+ context.reset = &vboot_reboot;
vboot_run_stub(&context);
diff --git a/src/vendorcode/google/chromeos/vboot2/common.c b/src/vendorcode/google/chromeos/vboot2/common.c
index 15b661a7b4..d70a108b05 100644
--- a/src/vendorcode/google/chromeos/vboot2/common.c
+++ b/src/vendorcode/google/chromeos/vboot2/common.c
@@ -67,9 +67,3 @@ void *vboot_get_work_buffer(struct vb2_working_data *wd)
{
return (void *)((uintptr_t)wd + wd->buffer_offset);
}
-
-void vboot_reboot(void)
-{
- hard_reset();
- die("failed to reboot");
-}
diff --git a/src/vendorcode/google/chromeos/vboot2/misc.h b/src/vendorcode/google/chromeos/vboot2/misc.h
index d638cfadae..7425082064 100644
--- a/src/vendorcode/google/chromeos/vboot2/misc.h
+++ b/src/vendorcode/google/chromeos/vboot2/misc.h
@@ -28,7 +28,6 @@ void verstage_main(void);
void *vboot_load_stage(int stage_index,
struct vboot_region *fw_main,
struct vboot_components *fw_info);
-void vboot_reboot(void);
/*
* this is placed at the start of the vboot work buffer. selected_region is used
diff --git a/src/vendorcode/google/chromeos/vboot_common.c b/src/vendorcode/google/chromeos/vboot_common.c
index 95bab367ed..3c1a9c3444 100644
--- a/src/vendorcode/google/chromeos/vboot_common.c
+++ b/src/vendorcode/google/chromeos/vboot_common.c
@@ -17,12 +17,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stddef.h>
-#include <string.h>
#include <boot/coreboot_tables.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
+#include <reset.h>
+#include <stddef.h>
+#include <string.h>
+
#include "chromeos.h"
#include "vboot_common.h"
#include "vboot_handoff.h"
@@ -124,3 +126,9 @@ void *vboot_get_payload(int *len)
/* This will leak a mapping. */
return vboot_get_region(fwc->address, fwc->size, NULL);
}
+
+void vboot_reboot(void)
+{
+ hard_reset();
+ die("failed to reboot");
+}