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

vTPM: fix searching for the right vTPM node in device tree

Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm',
as only the latter is guanranteed to be available for the client OS.
The '/ibm,vtpm' node should only be used by Open Firmware, which
is susceptible to changes.
Signed-off-by: default avatarHon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
parent 89adb83c
...@@ -1430,12 +1430,12 @@ static void __init prom_instantiate_sml(void) ...@@ -1430,12 +1430,12 @@ static void __init prom_instantiate_sml(void)
prom_debug("prom_instantiate_sml: start...\n"); prom_debug("prom_instantiate_sml: start...\n");
ibmvtpm_node = call_prom("finddevice", 1, 1, ADDR("/ibm,vtpm")); ibmvtpm_node = call_prom("finddevice", 1, 1, ADDR("/vdevice/vtpm"));
prom_debug("ibmvtpm_node: %x\n", ibmvtpm_node); prom_debug("ibmvtpm_node: %x\n", ibmvtpm_node);
if (!PHANDLE_VALID(ibmvtpm_node)) if (!PHANDLE_VALID(ibmvtpm_node))
return; return;
ibmvtpm_inst = call_prom("open", 1, 1, ADDR("/ibm,vtpm")); ibmvtpm_inst = call_prom("open", 1, 1, ADDR("/vdevice/vtpm"));
if (!IHANDLE_VALID(ibmvtpm_inst)) { if (!IHANDLE_VALID(ibmvtpm_inst)) {
prom_printf("opening vtpm package failed (%x)\n", ibmvtpm_inst); prom_printf("opening vtpm package failed (%x)\n", ibmvtpm_inst);
return; return;
...@@ -1464,9 +1464,9 @@ static void __init prom_instantiate_sml(void) ...@@ -1464,9 +1464,9 @@ static void __init prom_instantiate_sml(void)
reserve_mem(base, size); reserve_mem(base, size);
prom_setprop(ibmvtpm_node, "/ibm,vtpm", "linux,sml-base", prom_setprop(ibmvtpm_node, "/vdevice/vtpm", "linux,sml-base",
&base, sizeof(base)); &base, sizeof(base));
prom_setprop(ibmvtpm_node, "/ibm,vtpm", "linux,sml-size", prom_setprop(ibmvtpm_node, "/vdevice/vtpm", "linux,sml-size",
&size, sizeof(size)); &size, sizeof(size));
prom_debug("sml base = 0x%x\n", base); prom_debug("sml base = 0x%x\n", base);
......
...@@ -31,7 +31,7 @@ int read_log(struct tpm_bios_log *log) ...@@ -31,7 +31,7 @@ int read_log(struct tpm_bios_log *log)
return -EFAULT; return -EFAULT;
} }
np = of_find_node_by_name(NULL, "ibm,vtpm"); np = of_find_node_by_name(NULL, "vtpm");
if (!np) { if (!np) {
pr_err("%s: ERROR - IBMVTPM not supported\n", __func__); pr_err("%s: ERROR - IBMVTPM not supported\n", __func__);
return -ENODEV; return -ENODEV;
......
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