summaryrefslogtreecommitdiff
path: root/src/lib/loaders
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-03-20 15:55:08 -0500
committerAaron Durbin <adurbin@google.com>2015-04-03 14:52:47 +0200
commitb3847e64242228166976f425cd42331db7857551 (patch)
tree36b912ee4d045402534305723fd006a0ec88012f /src/lib/loaders
parent3948e5392bbfd685e6e2f9abfb16c46a2eae18b9 (diff)
downloadcoreboot-b3847e64242228166976f425cd42331db7857551.tar.xz
program loading: add prog_run() function
The prog_run() function abstracts away what is required for running a given program. Within it, there are 2 calls: 1. platform_prog_run() and 2. arch_prog_run(). The platform_prog_run() allows for a chipset to intercept a program that will be run. This allows for CPU switching as currently needed in t124 and t132. Change-Id: I22a5dd5bfb1018e7e46475e47ac993a0941e2a8c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/8846 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/lib/loaders')
-rw-r--r--src/lib/loaders/load_and_run_payload.c2
-rw-r--r--src/lib/loaders/load_and_run_ramstage.c4
-rw-r--r--src/lib/loaders/load_and_run_romstage.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/loaders/load_and_run_payload.c b/src/lib/loaders/load_and_run_payload.c
index 8e745c9b3b..e3208a9feb 100644
--- a/src/lib/loaders/load_and_run_payload.c
+++ b/src/lib/loaders/load_and_run_payload.c
@@ -83,7 +83,7 @@ out:
void payload_run(void)
{
- const struct payload *payload = &global_payload;
+ struct payload *payload = &global_payload;
/* Reset to booting from this image as late as possible */
boot_successful();
diff --git a/src/lib/loaders/load_and_run_ramstage.c b/src/lib/loaders/load_and_run_ramstage.c
index 82bc1e08fd..9067a28dc6 100644
--- a/src/lib/loaders/load_and_run_ramstage.c
+++ b/src/lib/loaders/load_and_run_ramstage.c
@@ -48,7 +48,7 @@ load_ramstage(const struct ramstage_loader_ops *ops,
timestamp_add_now(TS_END_COPYRAM);
- stage_exit(prog_entry(ramstage));
+ prog_run(ramstage);
}
static void run_ramstage_from_resume(struct romstage_handoff *handoff,
@@ -60,7 +60,7 @@ static void run_ramstage_from_resume(struct romstage_handoff *handoff,
if (prog_entry(ramstage) != NULL) {
printk(BIOS_DEBUG, "Jumping to image.\n");
- stage_exit(prog_entry(ramstage));
+ prog_run(ramstage);
}
}
}
diff --git a/src/lib/loaders/load_and_run_romstage.c b/src/lib/loaders/load_and_run_romstage.c
index 3ad9176877..8467e90129 100644
--- a/src/lib/loaders/load_and_run_romstage.c
+++ b/src/lib/loaders/load_and_run_romstage.c
@@ -38,5 +38,5 @@ void run_romstage(void)
halt();
}
- stage_exit(prog_entry(&romstage));
+ prog_run(&romstage);
}