Skip to contentSkip to conversation

tpm_crb: ffa_tpm: fix cut/paste error in comment

PATCH In review Stuart Yoder 2 participants 5 messages Apr 29, 2025 – Apr 30, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tpm_crb: ffa_tpm: fix cut/paste error in comment

Fix the comment for the 'start' function, which was a cut/paste mistake for a different function.

---
 drivers/char/tpm/tpm_crb_ffa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/char/tpm/tpm_crb_ffa.c +2 -1
index 3169a87a56b60..65b01a46d4b88 100644
@@ -68,7 +68,8 @@
 #define CRB_FFA_GET_INTERFACE_VERSION 0x0f000001
 
 /*
- * Return information on a given feature of the TPM service
+ * Notifies the TPM service that a TPM command or TPM locality request is
+ * ready to be processed, and allows the TPM service to process it.
  * Call register usage:
  * w3:    Not used (MBZ)
  * w4:    TPM service function ID, CRB_FFA_START
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/1 tpm_crb: ffa_tpm: update comment to include 64-bit calling convention

The comment for DIRECT_REQ and DIRECT_RESP only mentioned AArch32 and listed 32-bit function IDs. Update to include 64-bit.

---
 drivers/char/tpm/tpm_crb_ffa.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/char/tpm/tpm_crb_ffa.c +5 -3
index 65b01a46d4b88..134747911ba38 100644
@@ -38,9 +38,11 @@
  * messages.
  *
  * All requests with FFA_MSG_SEND_DIRECT_REQ and FFA_MSG_SEND_DIRECT_RESP
- * are using the AArch32 SMC calling convention with register usage as
- * defined in FF-A specification:
- * w0:    Function ID (0x8400006F or 0x84000070)
+ * are using the AArch32 or AArch64 SMC calling convention with register usage
+ * as defined in FF-A specification:
+ * w0:    Function ID
+ *          -for 32-bit: 0x8400006F or 0x84000070
+ *          -for 64-bit: 0xC400006F or 0xC4000070
  * w1:    Source/Destination IDs
  * w2:    Reserved (MBZ)
  * w3-w7: Implementation defined, free to be used below
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/2 tpm_crb: ffa_tpm: update comment to include 64-bit calling convention

In reply to Stuart Yoder

The comment for DIRECT_REQ and DIRECT_RESP only mentioned AArch32 and listed 32-bit function IDs. Update to include 64-bit.

---
 drivers/char/tpm/tpm_crb_ffa.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/char/tpm/tpm_crb_ffa.c +5 -3
index 65b01a46d4b88..134747911ba38 100644
@@ -38,9 +38,11 @@
  * messages.
  *
  * All requests with FFA_MSG_SEND_DIRECT_REQ and FFA_MSG_SEND_DIRECT_RESP
- * are using the AArch32 SMC calling convention with register usage as
- * defined in FF-A specification:
- * w0:    Function ID (0x8400006F or 0x84000070)
+ * are using the AArch32 or AArch64 SMC calling convention with register usage
+ * as defined in FF-A specification:
+ * w0:    Function ID
+ *          -for 32-bit: 0x8400006F or 0x84000070
+ *          -for 64-bit: 0xC400006F or 0xC4000070
  * w1:    Source/Destination IDs
  * w2:    Reserved (MBZ)
  * w3-w7: Implementation defined, free to be used below
Signature · 1 line
2.34.1
maintainer
#3 lore raw
In reply to Stuart Yoder
Quoted 25 lines · Stuart Yoder

Fix the comment for the 'start' function, which was a cut/paste mistake for a different function.

---
 drivers/char/tpm/tpm_crb_ffa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/char/tpm/tpm_crb_ffa.c +2 -1
index 3169a87a56b60..65b01a46d4b88 100644
@@ -68,7 +68,8 @@
 #define CRB_FFA_GET_INTERFACE_VERSION 0x0f000001
 
 /*
- * Return information on a given feature of the TPM service
+ * Notifies the TPM service that a TPM command or TPM locality request is
+ * ready to be processed, and allows the TPM service to process it.
  * Call register usage:
  * w3:    Not used (MBZ)
  * w4:    TPM service function ID, CRB_FFA_START
Signature · 1 line
2.34.1

Can you squash the comment updates into single patch instead and enumerate the changes? Does not really serve any purpose because comments do not "run".

BR, Jarkko

#4 lore raw
Quoted 16 lines · Jarkko Sakkinen
Quoted 15 lines · Stuart Yoder

Fix the comment for the 'start' function, which was a cut/paste mistake for a different function.

---
  drivers/char/tpm/tpm_crb_ffa.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/char/tpm/tpm_crb_ffa.c +0 -0
index 3169a87a56b60..65b01a46d4b88 100644
@@ -68,7 +68,8 @@
  #define CRB_FFA_GET_INTERFACE_VERSION 0x0f000001
 
Quoted 14 lines
Quoted 10 lines
drivers/char/tpm/tpm_crb_ffa.c +2 -1
  /*
- * Return information on a given feature of the TPM service
+ * Notifies the TPM service that a TPM command or TPM locality request is
+ * ready to be processed, and allows the TPM service to process it.
   * Call register usage:
   * w3:    Not used (MBZ)
   * w4:    TPM service function ID, CRB_FFA_START
Signature · 1 line
2.34.1

Can you squash the comment updates into single patch instead and enumerate the changes? Does not really serve any purpose because comments do not "run".

Sure, will do.

Thanks,
Stuart