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

vTPM: get the buffer allocated for event log instead of the actual log

The OS should ask Power Firmware (PFW) for the size of the buffer
allocated for the event log, instead of the size of the actual
event log.  It then passes the buffer adddress and size to PFW in
the handover process, into which PFW copies the log.
Signed-off-by: default avatarHon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
parent b4ed0469
...@@ -1450,13 +1450,20 @@ static void __init prom_instantiate_sml(void) ...@@ -1450,13 +1450,20 @@ static void __init prom_instantiate_sml(void)
prom_printf("Reformat SML to EFI alignment failed\n"); prom_printf("Reformat SML to EFI alignment failed\n");
return; 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-allocated-size"),
ibmvtpm_inst) != 0 || size == 0) { ibmvtpm_inst) != 0 || size == 0) {
prom_printf("SML get handover size failed\n"); prom_printf("SML get allocated size failed\n");
return; return;
}
} else {
if (call_prom_ret("call-method", 2, 2, &size,
ADDR("sml-get-handover-size"),
ibmvtpm_inst) != 0 || size == 0) {
prom_printf("SML get handover size failed\n");
return;
}
} }
base = alloc_down(size, PAGE_SIZE, 0); base = alloc_down(size, PAGE_SIZE, 0);
...@@ -1465,6 +1472,8 @@ static void __init prom_instantiate_sml(void) ...@@ -1465,6 +1472,8 @@ static void __init prom_instantiate_sml(void)
prom_printf("instantiating sml at 0x%x...", base); prom_printf("instantiating sml at 0x%x...", base);
memset((void *)base, 0, size);
if (call_prom_ret("call-method", 4, 2, &entry, if (call_prom_ret("call-method", 4, 2, &entry,
ADDR("sml-handover"), ADDR("sml-handover"),
ibmvtpm_inst, size, base) != 0 || entry == 0) { ibmvtpm_inst, size, base) != 0 || entry == 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