diff options
author | Hon Ching \(Vicky\) Lo <honclo@linux.vnet.ibm.com> | 2015-10-07 20:11:53 -0400 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2015-10-19 01:01:23 +0200 |
commit | b4ed0469d00ad7ad051e5acbdb3e7587fd0221e2 (patch) | |
tree | e4ccdd960cb0305db5c5e64a4c0cffef27716352 | |
parent | 2f82e98265e0a46e122ee2a035450d065dbd0f4f (diff) | |
download | linux-b4ed0469d00ad7ad051e5acbdb3e7587fd0221e2.tar.gz linux-b4ed0469d00ad7ad051e5acbdb3e7587fd0221e2.tar.bz2 linux-b4ed0469d00ad7ad051e5acbdb3e7587fd0221e2.zip |
vTPM: reformat event log to be byte-aligned
The event log generated by OpenFirmware in PowerPC is 4-byte aligned.
This patch reformats the log to be byte-aligned for the Linux client.
Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index a8af4d4400e6..7b2e452be19d 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -1425,8 +1425,9 @@ static void __init prom_instantiate_sml(void) { phandle ibmvtpm_node; ihandle ibmvtpm_inst; - u32 entry = 0, size = 0; + u32 entry = 0, size = 0, succ = 0; u64 base; + __be32 val; prom_debug("prom_instantiate_sml: start...\n"); @@ -1441,6 +1442,16 @@ static void __init prom_instantiate_sml(void) return; } + if (prom_getprop(ibmvtpm_node, "ibm,sml-efi-reformat-supported", + &val, sizeof(val)) != PROM_ERROR) { + if (call_prom_ret("call-method", 2, 2, &succ, + ADDR("reformat-sml-to-efi-alignment"), + ibmvtpm_inst) != 0 || succ == 0) { + prom_printf("Reformat SML to EFI alignment failed\n"); + return; + } + } + if (call_prom_ret("call-method", 2, 2, &size, ADDR("sml-get-handover-size"), ibmvtpm_inst) != 0 || size == 0) { |