UPSTREAM: romstage_handoff: add helper to determine resume status
Instead of having callers query the romstage handoff resume status by inspecting the object themselves add romstage_handoff_is_resume() so that the same information can be queried easily. BUG=None BRANCH=None TEST=None Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/17647 Tested-by: build bot (Jenkins) Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Change-Id: I40f3769b7646bf296ee4bc323a9ab1d5e5691e21 Reviewed-on: https://chromium-review.googlesource.com/416156 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
c7b7a3fb44
commit
ef19818326
6 changed files with 29 additions and 34 deletions
|
|
@ -78,4 +78,17 @@ static inline int romstage_handoff_init(int is_s3_resume)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Return 1 if resuming or 0 if not. */
|
||||
static inline int romstage_handoff_is_resume(void)
|
||||
{
|
||||
struct romstage_handoff *handoff;
|
||||
|
||||
handoff = cbmem_find(CBMEM_ID_ROMSTAGE_INFO);
|
||||
|
||||
if (handoff == NULL)
|
||||
return 0;
|
||||
|
||||
return handoff->s3_resume;
|
||||
}
|
||||
|
||||
#endif /* ROMSTAGE_HANDOFF_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue