tpm: allocate/map buffer for TPM Physical Presence interface
commit3b97c01e9ccdfbd517a0fd631838d6252dbfa692
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Mon, 14 Jan 2019 22:27:50 +0000 (15 02:27 +0400)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 18 Jan 2019 02:10:57 +0000 (17 21:10 -0500)
treeb2d4edfabf86d01607dd1114928c1d74d18672f3
parentb6148757f9baa2de11304c09aaf9f9a276c825cd
tpm: allocate/map buffer for TPM Physical Presence interface

Implement a virtual memory device for the TPM Physical Presence interface.
The memory is located at 0xFED45000 and used by ACPI to send messages to the
firmware (BIOS) and by the firmware to provide parameters for each one of
the supported codes.

This interface should be used by all TPM devices on x86 and can be
added by calling tpm_ppi_init_io().

Note: bios_linker cannot be used to allocate the PPI memory region,
since the reserved memory should stay stable across reboots, and might
be needed before the ACPI tables are installed.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/tpm/Makefile.objs
hw/tpm/tpm_crb.c
hw/tpm/tpm_ppi.c [new file with mode: 0644]
hw/tpm/tpm_ppi.h [new file with mode: 0644]
hw/tpm/tpm_tis.c
include/hw/acpi/tpm.h