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@chromium.org> Original-Commit-Id: 9788e2043cb1bd5df7e30574f7df4de4f25caa0d Original-Change-Id: Iafca416700c51a0546249438ca583a415a1ca944 Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/265292 Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: http://review.coreboot.org/9931 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
be47636de0
commit
c83687d520
|
@ -87,5 +87,6 @@ static inline void chromeos_reserve_ram_oops(struct device *dev, int idx) {}
|
||||||
#endif /* CONFIG_CHROMEOS_RAMOOPS */
|
#endif /* CONFIG_CHROMEOS_RAMOOPS */
|
||||||
|
|
||||||
void cbmem_add_vpd_calibration_data(void);
|
void cbmem_add_vpd_calibration_data(void);
|
||||||
|
void vboot_reboot(void);
|
||||||
|
|
||||||
#endif /* __CHROMEOS_H__ */
|
#endif /* __CHROMEOS_H__ */
|
||||||
|
|
|
@ -73,7 +73,7 @@ static void log_msg(const char *fmt, va_list args)
|
||||||
static void fatal_error(void)
|
static void fatal_error(void)
|
||||||
{
|
{
|
||||||
printk(BIOS_ERR, "vboot encountered fatal error. Resetting.\n");
|
printk(BIOS_ERR, "vboot encountered fatal error. Resetting.\n");
|
||||||
hard_reset();
|
vboot_reboot();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fw_region_size(struct vboot_region *r)
|
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);
|
cbmem_entry_remove(context->vblocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reset(void)
|
|
||||||
{
|
|
||||||
hard_reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vboot_invoke_wrapper(struct vboot_handoff *vboot_handoff)
|
static void vboot_invoke_wrapper(struct vboot_handoff *vboot_handoff)
|
||||||
{
|
{
|
||||||
VbCommonParams cparams;
|
VbCommonParams cparams;
|
||||||
|
@ -280,7 +275,7 @@ static void vboot_invoke_wrapper(struct vboot_handoff *vboot_handoff)
|
||||||
context.log_msg = &log_msg;
|
context.log_msg = &log_msg;
|
||||||
context.fatal_error = &fatal_error;
|
context.fatal_error = &fatal_error;
|
||||||
context.get_region = &vboot_get_region;
|
context.get_region = &vboot_get_region;
|
||||||
context.reset = &reset;
|
context.reset = &vboot_reboot;
|
||||||
|
|
||||||
vboot_run_stub(&context);
|
vboot_run_stub(&context);
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,3 @@ void *vboot_get_work_buffer(struct vb2_working_data *wd)
|
||||||
{
|
{
|
||||||
return (void *)((uintptr_t)wd + wd->buffer_offset);
|
return (void *)((uintptr_t)wd + wd->buffer_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vboot_reboot(void)
|
|
||||||
{
|
|
||||||
hard_reset();
|
|
||||||
die("failed to reboot");
|
|
||||||
}
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ void verstage_main(void);
|
||||||
void *vboot_load_stage(int stage_index,
|
void *vboot_load_stage(int stage_index,
|
||||||
struct vboot_region *fw_main,
|
struct vboot_region *fw_main,
|
||||||
struct vboot_components *fw_info);
|
struct vboot_components *fw_info);
|
||||||
void vboot_reboot(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* this is placed at the start of the vboot work buffer. selected_region is used
|
* this is placed at the start of the vboot work buffer. selected_region is used
|
||||||
|
|
|
@ -17,12 +17,14 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <boot/coreboot_tables.h>
|
#include <boot/coreboot_tables.h>
|
||||||
#include <cbfs.h>
|
#include <cbfs.h>
|
||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
|
#include <reset.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "chromeos.h"
|
#include "chromeos.h"
|
||||||
#include "vboot_common.h"
|
#include "vboot_common.h"
|
||||||
#include "vboot_handoff.h"
|
#include "vboot_handoff.h"
|
||||||
|
@ -124,3 +126,9 @@ void *vboot_get_payload(int *len)
|
||||||
/* This will leak a mapping. */
|
/* This will leak a mapping. */
|
||||||
return vboot_get_region(fwc->address, fwc->size, NULL);
|
return vboot_get_region(fwc->address, fwc->size, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vboot_reboot(void)
|
||||||
|
{
|
||||||
|
hard_reset();
|
||||||
|
die("failed to reboot");
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue