summaryrefslogtreecommitdiff
path: root/src/lib/loaders
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/loaders')
-rw-r--r--src/lib/loaders/load_and_run_payload.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/loaders/load_and_run_payload.c b/src/lib/loaders/load_and_run_payload.c
index 46db93c719..96f5e27580 100644
--- a/src/lib/loaders/load_and_run_payload.c
+++ b/src/lib/loaders/load_and_run_payload.c
@@ -21,7 +21,10 @@
#include <stdlib.h>
#include <console/console.h>
#include <boot/coreboot_tables.h>
+#include <fallback.h>
+#include <lib.h>
#include <payload_loader.h>
+#include <timestamp.h>
extern const struct payload_loader_ops vboot_payload_loader;
extern const struct payload_loader_ops cbfs_payload_loader;
@@ -77,5 +80,18 @@ void payload_run(const struct payload *payload)
if (payload == NULL)
return;
+ /* Reset to booting from this image as late as possible */
+ boot_successful();
+
+ printk(BIOS_DEBUG, "Jumping to boot code at %p\n", payload->entry);
+ post_code(POST_ENTER_ELF_BOOT);
+
+ timestamp_add_now(TS_SELFBOOT_JUMP);
+
+ /* Before we go off to run the payload, see if
+ * we stayed within our bounds.
+ */
+ checkstack(_estack, 0);
+
selfboot(payload->entry);
}