diff options
author | Aaron Durbin <adurbin@chromium.org> | 2016-12-07 11:58:20 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2016-12-08 21:38:48 +0100 |
commit | 16bd2676ce1dcec342de19640c45bd7216ba70f1 (patch) | |
tree | e0616ee519c9f1635b30c7b370af3559b160cc9f /src/include | |
parent | 530f677cdc5de0cac94d00ee58037063ecb6cd64 (diff) |
bootstate: add arch specific hook at coreboot exit
The bootstate machine allows one to schedule work at the
boundaries of each state. However, there are no priorities by
design. As such if there are things that need to be performed
that are interdependent between callbacks there's no way to
do that aside from explicitly putting the call in one of the
callbacks.
This situation arises around BS_OS_RESUME, BS_PAYLOAD_LOAD,
and BS_PAYLOAD_BOOT as those are the states where coreboot is
about to exit. As such, provide an architecture specific hook
at these key places so that one is guaranteed any work done
in arch_bootstate_coreboot_exit() is after all callbacks in
the state machine.
BUG=chrome-os-partner:60657
BRANCH=reef
Change-Id: Icb4afb341ab15af0670501b9d21799e564fb32c6
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17767
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/bootstate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/bootstate.h b/src/include/bootstate.h index 09178a56f0..481a8bc54a 100644 --- a/src/include/bootstate.h +++ b/src/include/bootstate.h @@ -195,4 +195,8 @@ struct boot_state_init_entry { bsie_ ## func_ ##_## state_ ##_## when_ BOOT_STATE_INIT_ATTR = \ & func_ ##_## state_ ##_## when_; +/* Hook per arch when coreboot is exiting to payload or ACPI OS resume. It's + * the very last thing done before the transition. */ +void arch_bootstate_coreboot_exit(void); + #endif /* BOOTSTATE_H */ |