[SLOF] [PATCH v3 07/17] Add sml related nodes to vdevice/vtpm node

Stefan Berger stefanb at us.ibm.com
Tue Dec 1 09:01:50 AEDT 2015


From: Stefan Berger <stefanb at linux.vnet.ibm.com>

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>
---
 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 79f484c..081554d 100644
--- a/board-qemu/slof/vio-vtpm-cdriver.fs
+++ b/board-qemu/slof/vio-vtpm-cdriver.fs
@@ -75,6 +75,30 @@ false VALUE vtpm-debug?
 ;
 
 \ 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
         \ vtpm-call-forward failed; clean up stack
-- 
2.4.3



More information about the SLOF mailing list