tree: Use boolean for s3resume
Change-Id: I3e23134f879fcaf817cf62b641e9b59563eb643b Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86331 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
ec1068883f
commit
b87a9795de
67 changed files with 106 additions and 98 deletions
|
|
@ -1975,10 +1975,10 @@ static inline bool acpi_s3_resume_allowed(void)
|
|||
return CONFIG(HAVE_ACPI_RESUME);
|
||||
}
|
||||
|
||||
static inline int acpi_is_wakeup_s3(void)
|
||||
static inline bool acpi_is_wakeup_s3(void)
|
||||
{
|
||||
if (!acpi_s3_resume_allowed())
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
if (ENV_ROMSTAGE_OR_BEFORE)
|
||||
return (acpi_get_sleep_type() == ACPI_S3);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <commonlib/bsd/cbmem_id.h> /* IWYU pragma: export */
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <boot/coreboot_tables.h>
|
||||
|
||||
#define CBMEM_FSP_HOB_PTR 0x614
|
||||
|
|
@ -86,7 +87,7 @@ u64 cbmem_entry_size(const struct cbmem_entry *entry);
|
|||
|
||||
/* Returns 0 if old cbmem was recovered. Recovery is only attempted if
|
||||
* s3resume is non-zero. */
|
||||
int cbmem_recovery(int s3resume);
|
||||
int cbmem_recovery(bool s3resume);
|
||||
/* Add a cbmem entry of a given size and id. These return NULL on failure. The
|
||||
* add function performs a find first and do not check against the original
|
||||
* size. */
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
#ifndef ROMSTAGE_HANDOFF_H
|
||||
#define ROMSTAGE_HANDOFF_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/* Returns 0 if initialized. Else < 0 if handoff structure not added. */
|
||||
int romstage_handoff_init(int is_s3_resume);
|
||||
|
||||
/* Return 1 if resuming or 0 if not. */
|
||||
int romstage_handoff_is_resume(void);
|
||||
bool romstage_handoff_is_resume(void);
|
||||
|
||||
#endif /* ROMSTAGE_HANDOFF_H */
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ static inline void stage_cache_get_raw(int stage_id, void **base, size_t *size)
|
|||
|
||||
#endif
|
||||
|
||||
static inline int resume_from_stage_cache(void)
|
||||
static inline bool resume_from_stage_cache(void)
|
||||
{
|
||||
if (CONFIG(NO_STAGE_CACHE))
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
/* TBD: Replace this with acpi_is_wakeup_s3(). */
|
||||
return romstage_handoff_is_resume();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue