summaryrefslogtreecommitdiffstats
path: root/src/security
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-08-11 11:31:05 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-10-25 13:58:02 +0000
commitb7cbb7c43157d45187abcf953d693152230a8120 (patch)
tree40775aeb774648dae4e72f15d62172865f48eb87 /src/security
parentbfadc78bd719196e2fa78c23a8a0bb27dff65fd6 (diff)
downloadcoreboot-b7cbb7c43157d45187abcf953d693152230a8120.tar.gz
coreboot-b7cbb7c43157d45187abcf953d693152230a8120.tar.bz2
coreboot-b7cbb7c43157d45187abcf953d693152230a8120.zip
cbmem.h: Drop cbmem_possible_online in favor of ENV_HAS_CBMEM
The macro ENV_HAS_CBMEM achieves the same as this inline function. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: I6d65ca51c863abe2106f794398ddd7d7d9ac4b5e Reviewed-on: https://review.coreboot.org/c/coreboot/+/77166 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <czapiga@google.com>
Diffstat (limited to 'src/security')
-rw-r--r--src/security/tpm/tspi/crtm.c3
-rw-r--r--src/security/tpm/tspi/log-tpm1.c2
-rw-r--r--src/security/tpm/tspi/log-tpm2.c2
-rw-r--r--src/security/tpm/tspi/log.c2
-rw-r--r--src/security/vboot/common.c2
5 files changed, 5 insertions, 6 deletions
diff --git a/src/security/tpm/tspi/crtm.c b/src/security/tpm/tspi/crtm.c
index 4a89d7f262cb..3c2760a0b84b 100644
--- a/src/security/tpm/tspi/crtm.c
+++ b/src/security/tpm/tspi/crtm.c
@@ -161,8 +161,7 @@ void *tpm_log_init(void)
/* We are dealing here with pre CBMEM environment.
* If cbmem isn't available use CAR or SRAM */
- if (!cbmem_possibly_online() &&
- !CONFIG(VBOOT_RETURN_FROM_VERSTAGE))
+ if (!ENV_HAS_CBMEM && !CONFIG(VBOOT_RETURN_FROM_VERSTAGE))
return _tpm_log;
else if (ENV_CREATES_CBMEM
&& !CONFIG(VBOOT_RETURN_FROM_VERSTAGE)) {
diff --git a/src/security/tpm/tspi/log-tpm1.c b/src/security/tpm/tspi/log-tpm1.c
index 3b192d706955..481b569cd557 100644
--- a/src/security/tpm/tspi/log-tpm1.c
+++ b/src/security/tpm/tspi/log-tpm1.c
@@ -20,7 +20,7 @@ void *tpm1_log_cbmem_init(void)
if (tclt)
return tclt;
- if (cbmem_possibly_online()) {
+ if (ENV_HAS_CBMEM) {
size_t tpm_log_len;
struct spec_id_event_data *hdr;
diff --git a/src/security/tpm/tspi/log-tpm2.c b/src/security/tpm/tspi/log-tpm2.c
index c7bbc9e42bc1..56799a7e9488 100644
--- a/src/security/tpm/tspi/log-tpm2.c
+++ b/src/security/tpm/tspi/log-tpm2.c
@@ -45,7 +45,7 @@ void *tpm2_log_cbmem_init(void)
if (tclt)
return tclt;
- if (cbmem_possibly_online()) {
+ if (ENV_HAS_CBMEM) {
size_t tpm_log_len;
struct tcg_efi_spec_id_event *hdr;
diff --git a/src/security/tpm/tspi/log.c b/src/security/tpm/tspi/log.c
index 9798eabd4566..ea4e9197a270 100644
--- a/src/security/tpm/tspi/log.c
+++ b/src/security/tpm/tspi/log.c
@@ -15,7 +15,7 @@ void *tpm_cb_log_cbmem_init(void)
if (tclt)
return tclt;
- if (cbmem_possibly_online()) {
+ if (ENV_HAS_CBMEM) {
tclt = cbmem_find(CBMEM_ID_TPM_CB_LOG);
if (!tclt) {
size_t tpm_log_len = sizeof(struct tpm_cb_log_table) +
diff --git a/src/security/vboot/common.c b/src/security/vboot/common.c
index 17039330a6f7..4cf45b74b379 100644
--- a/src/security/vboot/common.c
+++ b/src/security/vboot/common.c
@@ -14,7 +14,7 @@ static void *vboot_get_workbuf(void)
{
void *wb = NULL;
- if (cbmem_possibly_online())
+ if (ENV_HAS_CBMEM)
wb = cbmem_find(CBMEM_ID_VBOOT_WORKBUF);
if (!wb && !CONFIG(VBOOT_STARTS_IN_ROMSTAGE) && preram_symbols_available())