[coreboot-gerrit] Patch set updated for coreboot: a680d8b vboot: route all resets through a single function
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Tue Apr 21 16:35:53 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9931
-gerrit
commit a680d8b6867e6bb471451f20793875d7bf5a7bce
Author: Vadim Bendebury <vbendeb at chromium.org>
Date: Fri Apr 10 17:50:11 2015 -0700
vboot: route all resets through a single function
It is necessary to trigger console buffer contents dump on reset.
Let's make sure all vboot resets are routed through the same function.
BRANCH=none
BUG=chromium:475347
TEST=built and booted storm
Change-Id: I0d8580fb65417ba4b06dfae763dd6455afc8fc26
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: 9788e2043cb1bd5df7e30574f7df4de4f25caa0d
Original-Change-Id: Iafca416700c51a0546249438ca583a415a1ca944
Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/265292
Original-Reviewed-by: Julius Werner <jwerner at chromium.org>
---
src/vendorcode/google/chromeos/chromeos.h | 1 +
src/vendorcode/google/chromeos/vboot1/vboot_loader.c | 9 ++-------
src/vendorcode/google/chromeos/vboot2/common.c | 6 ------
src/vendorcode/google/chromeos/vboot2/misc.h | 1 -
src/vendorcode/google/chromeos/vboot_common.c | 12 ++++++++++--
5 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h
index ccbadab..dad357e 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 a297262..dd6c7de 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 15b661a..d70a108 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 d638cfa..7425082 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 95bab36..3c1a9c3 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");
+}
More information about the coreboot-gerrit
mailing list