[SLOF] [PATCH v2 18/20] Add TPM firmware API call reformat-sml-to-efi-alignment

Stefan Berger stefanb at us.ibm.com
Wed Nov 18 04:02:34 AEDT 2015


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

This patch adds support for the TPM firmware API call
reformat-sml-to-efi-alignment. It also adds the required
entry 'ibm,sml-efi-reformat-supported' entry to the
/vdevice/vtpm node. This entry indicates that the API
call exists.

Signed-off-by: Stefan Berger <stefanb at linux.vnet.ibm.com>
---
 board-qemu/slof/vio-vtpm-cdriver.fs | 9 +++++++++
 board-qemu/slof/vtpm-sml.fs         | 8 ++++++++
 2 files changed, 17 insertions(+)

diff --git a/board-qemu/slof/vio-vtpm-cdriver.fs b/board-qemu/slof/vio-vtpm-cdriver.fs
index 3f0cb73..6c3304f 100644
--- a/board-qemu/slof/vio-vtpm-cdriver.fs
+++ b/board-qemu/slof/vio-vtpm-cdriver.fs
@@ -152,6 +152,15 @@ false VALUE vtpm-debug?
     THEN
 ;
 
+0 0 s" ibm,sml-efi-reformat-supported" property
+
+\ firmware API call
+: reformat-sml-to-efi-alignment ( -- success )
+    " reformat-sml-to-efi-alignment" vtpm-call-forward IF
+        false
+    THEN
+;
+
 : open ( )
     vtpm-debug? IF ." VTPM: vTPM open()" cr THEN
     true
diff --git a/board-qemu/slof/vtpm-sml.fs b/board-qemu/slof/vtpm-sml.fs
index b8afed8..f19676c 100644
--- a/board-qemu/slof/vtpm-sml.fs
+++ b/board-qemu/slof/vtpm-sml.fs
@@ -101,6 +101,14 @@ log-base LOG-SIZE tpm-set-log-parameters
     vtpm-pass-through-to-tpm
 ;
 
+: reformat-sml-to-efi-alignment ( -- success? )
+    vtpm-debug? IF
+        ." Call to reformat-sml-to-efi-alignment" cr
+    THEN
+    \ a no-op since already byte aligned
+    true
+;
+
 : open  true ;
 : close ;
 
-- 
2.4.3



More information about the SLOF mailing list