summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2024-12-24 08:01:05 -0800
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2025-01-07 15:45:51 +0200
commit0698f1331f286d4ed04bc2345de59acd86ee634e (patch)
tree387eeb709849f1a5be8255cab9048fc7299cbafb /lib
parentdbe08c7b38f9bcb17c073cafc9ed8d3d2f398566 (diff)
tpm: Rename tpm2_allow_extend()
When that function was introduced we were only using it to check if extending a PCR was allowed, so the name made sense. A few patches ago we used that function to reason about the EventLog creation and general usage of PCRs , so let's rename it to something more generic that makes more sense in all contexts. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/tpm-v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tpm-v2.c b/lib/tpm-v2.c
index cb636414de9..0edb0aa90c9 100644
--- a/lib/tpm-v2.c
+++ b/lib/tpm-v2.c
@@ -197,7 +197,7 @@ u32 tpm2_pcr_extend(struct udevice *dev, u32 index, u32 algorithm,
if (!digest)
return -EINVAL;
- if (!tpm2_allow_extend(dev)) {
+ if (!tpm2_check_active_banks(dev)) {
log_err("Cannot extend PCRs if all the TPM enabled algorithms are not supported\n");
return -EINVAL;
}
@@ -896,7 +896,7 @@ u16 tpm2_algorithm_to_len(enum tpm2_algorithms algo)
return 0;
}
-bool tpm2_allow_extend(struct udevice *dev)
+bool tpm2_check_active_banks(struct udevice *dev)
{
struct tpml_pcr_selection pcrs;
size_t i;