tpm_ppi.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * TPM Physical Presence Interface
  3. *
  4. * Copyright (C) 2018 IBM Corporation
  5. *
  6. * Authors:
  7. * Stefan Berger <stefanb@us.ibm.com>
  8. *
  9. * This work is licensed under the terms of the GNU GPL, version 2 or later.
  10. * See the COPYING file in the top-level directory.
  11. */
  12. #ifndef TPM_TPM_PPI_H
  13. #define TPM_TPM_PPI_H
  14. #include "exec/address-spaces.h"
  15. typedef struct TPMPPI {
  16. MemoryRegion ram;
  17. uint8_t *buf;
  18. } TPMPPI;
  19. /**
  20. * tpm_ppi_init:
  21. * @tpmppi: a TPMPPI
  22. * @m: the address-space / MemoryRegion to use
  23. * @addr: the address of the PPI region
  24. * @obj: the owner object
  25. *
  26. * Register the TPM PPI memory region at @addr on the given address
  27. * space for the object @obj.
  28. **/
  29. void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m,
  30. hwaddr addr, Object *obj);
  31. /**
  32. * tpm_ppi_reset:
  33. * @tpmppi: a TPMPPI
  34. *
  35. * Function to call on machine reset. It will check if the "Memory
  36. * overwrite" variable is set, and perform a memory clear on volatile
  37. * memory if requested.
  38. **/
  39. void tpm_ppi_reset(TPMPPI *tpmppi);
  40. #endif /* TPM_TPM_PPI_H */