diff options
author | Bill XIE <persmule@hardenedlinux.org> | 2020-02-24 23:08:35 +0800 |
---|---|---|
committer | Philipp Deppenwiese <zaolin.daisuki@gmail.com> | 2020-03-31 10:38:07 +0000 |
commit | 516c0a53384188f00b5df139b0840567dc8b8298 (patch) | |
tree | 787842ee7a72df3211f3497eb2a2ec370b7c8c13 /src/security/vboot | |
parent | bad08c2c29210530e584436a562a1c03a68eb693 (diff) |
security/vboot: relocate and rename vboot_platform_is_resuming()
After measured boot is decoupled from verified boot in CB:35077,
vboot_platform_is_resuming() is never vboot-specific, thus it is
renamed to platform_is_resuming() and declared in bootmode.h.
Change-Id: I29b5b88af0576c34c10cfbd99659a5cdc0c75842
Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39103
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/security/vboot')
-rw-r--r-- | src/security/vboot/vboot_common.h | 6 | ||||
-rw-r--r-- | src/security/vboot/vboot_logic.c | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h index e9221288ad..d825b82f29 100644 --- a/src/security/vboot/vboot_common.h +++ b/src/security/vboot/vboot_common.h @@ -48,12 +48,6 @@ int vboot_save_hash(void *digest, size_t digest_size); */ int vboot_retrieve_hash(void *digest, size_t digest_size); -/* - * Determine if the platform is resuming from suspend. Returns 0 when - * not resuming, > 0 if resuming, and < 0 on error. - */ -int vboot_platform_is_resuming(void); - /* ============================= VERSTAGE ================================== */ /* * Main logic for verified boot. verstage_main() is just the core vboot logic. diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c index 80f7aaa86b..ab5b53dc5f 100644 --- a/src/security/vboot/vboot_logic.c +++ b/src/security/vboot/vboot_logic.c @@ -113,7 +113,7 @@ static int handle_digest_result(void *slot_hash, size_t slot_hash_sz) if (!CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)) return 0; - is_resume = vboot_platform_is_resuming(); + is_resume = platform_is_resuming(); if (is_resume > 0) { uint8_t saved_hash[VBOOT_MAX_HASH_SIZE]; @@ -272,7 +272,7 @@ void verstage_main(void) * does verification of memory init and thus must ensure it resumes with * the same slot that it booted from. */ if (CONFIG(RESUME_PATH_SAME_AS_BOOT) && - vboot_platform_is_resuming()) + platform_is_resuming()) ctx->flags |= VB2_CONTEXT_S3_RESUME; /* Read secdata from TPM. Initialize TPM if secdata not found. We don't |