Commit b4ed0469 authored by Hon Ching \(Vicky\) Lo's avatar Hon Ching \(Vicky\) Lo Committed by Peter Huewe

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: default avatarHon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
parent 2f82e982
...@@ -1425,8 +1425,9 @@ static void __init prom_instantiate_sml(void) ...@@ -1425,8 +1425,9 @@ static void __init prom_instantiate_sml(void)
{ {
phandle ibmvtpm_node; phandle ibmvtpm_node;
ihandle ibmvtpm_inst; ihandle ibmvtpm_inst;
u32 entry = 0, size = 0; u32 entry = 0, size = 0, succ = 0;
u64 base; u64 base;
__be32 val;
prom_debug("prom_instantiate_sml: start...\n"); prom_debug("prom_instantiate_sml: start...\n");
...@@ -1441,6 +1442,16 @@ static void __init prom_instantiate_sml(void) ...@@ -1441,6 +1442,16 @@ static void __init prom_instantiate_sml(void)
return; 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, if (call_prom_ret("call-method", 2, 2, &size,
ADDR("sml-get-handover-size"), ADDR("sml-get-handover-size"),
ibmvtpm_inst) != 0 || size == 0) { ibmvtpm_inst) != 0 || size == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment