On Wed, Nov 23, 2016 at 12:27:36PM -0500, Nayna Jain wrote:
> - memcpy(log->bios_event_log, __va(*basep), *sizep);
> + if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0)
> + memcpy(chip->log.bios_event_log, __va(be64_to_cpup(basep)),
> +
On 11/24/2016 01:07 AM, Jason Gunthorpe wrote:
> On Wed, Nov 23, 2016 at 12:27:36PM -0500, Nayna Jain wrote:
>> sizep = of_get_property(np, "linux,sml-size", NULL);
>> +if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0)
>> +log_size = be32_to_cpup(sizep);
>> +
On Wed, Nov 23, 2016 at 12:27:36PM -0500, Nayna Jain wrote:
> sizep = of_get_property(np, "linux,sml-size", NULL);
> + if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0)
> + log_size = be32_to_cpup(sizep);
> + else
> + log_size = *sizep;
> +
Uh,
Physical TPMs use Open Firmware Device Tree bindings that are similar
to the IBM Power virtual TPM to support event log. However, these
properties store the values in different endianness for Physical
and Virtual TPM.
This patch fixes the endianness issue by doing appropriate conversion
based on