[SLOF] [PATCH v4 07/33] tpm: Add sml related nodes to vdevice/vtpm node
Stefan Berger
stefanb at linux.vnet.ibm.com
Thu Dec 12 07:27:02 AEDT 2019
Add stored measurement log (sml) related firmware API calls to the vdevice/vtpm
node and forward calls to them to the ibm,vtpm node.
Once this patch is applied the Linux TPM's securityfs file
/sys/kernel/security/tpm0/ascii_bios_measurements shows the list of measurements,
which is still empty at this point.
Signed-off-by: Stefan Berger <stefanb at linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth at redhat.com>
---
board-qemu/slof/vio-vtpm-cdriver.fs | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/board-qemu/slof/vio-vtpm-cdriver.fs b/board-qemu/slof/vio-vtpm-cdriver.fs
index 53aad4d..04b8ea5 100644
--- a/board-qemu/slof/vio-vtpm-cdriver.fs
+++ b/board-qemu/slof/vio-vtpm-cdriver.fs
@@ -74,6 +74,30 @@ false VALUE vtpm-debug?
THEN
;
+\ firmware API call
+: sml-get-allocated-size ( -- buffer-size)
+ " sml-get-allocated-size" vtpm-call-forward IF
+ \ vtpm-call-forward failed
+ 0
+ THEN
+;
+
+\ firmware API call
+: sml-get-handover-size ( -- size)
+ " sml-get-handover-size" vtpm-call-forward IF
+ \ vtpm-call-forward failed
+ 0
+ THEN
+;
+
+\ firmware API call
+: sml-handover ( dest size -- )
+ " sml-handover" vtpm-call-forward IF
+ \ vtpm-call-forward failed; clean up stack
+ 2drop
+ THEN
+;
+
\ firmware API call
: hash-all ( data-ptr data-len hash-ptr -- )
" hash-all" vtpm-call-forward IF
--
2.17.1
More information about the SLOF
mailing list