payload loading: remove passing of struct payload

There's no need to keep track of struct payload within
the boot state machine. It is completely contained within
the payload loader module.

Change-Id: I16fcecf43d7fb41fc311955fdb82eabbd5c96b11
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8836
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Aaron Durbin
2015-03-20 10:20:15 -05:00
committed by Aaron Durbin
parent fcfdff84f4
commit ebf2ed4621
3 changed files with 12 additions and 27 deletions

View File

@ -227,26 +227,16 @@ static boot_state_t bs_write_tables(void *arg)
static boot_state_t bs_payload_load(void *arg)
{
struct payload *payload;
timestamp_add_now(TS_LOAD_PAYLOAD);
payload = payload_load();
if (! payload)
die("Could not load payload\n");
/* Pass the payload to the next state. */
boot_states[BS_PAYLOAD_BOOT].arg = payload;
payload_load();
return BS_PAYLOAD_BOOT;
}
static boot_state_t bs_payload_boot(void *arg)
{
struct payload *payload = arg;
payload_run(payload);
payload_run();
printk(BIOS_EMERG, "Boot failed");
/* Returning from this state will fail because the following signals