2
0

tpm_ppi.h 871 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/memory.h"
  15. typedef struct TPMPPI {
  16. MemoryRegion ram;
  17. uint8_t *buf;
  18. } TPMPPI;
  19. /**
  20. * tpm_ppi_init_memory:
  21. * @tpmppi: a TPMPPI
  22. * @obj: the owner object
  23. *
  24. * Creates the TPM PPI memory region.
  25. **/
  26. void tpm_ppi_init_memory(TPMPPI *tpmppi, Object *obj);
  27. /**
  28. * tpm_ppi_reset:
  29. * @tpmppi: a TPMPPI
  30. *
  31. * Function to call on machine reset. It will check if the "Memory
  32. * overwrite" variable is set, and perform a memory clear on volatile
  33. * memory if requested.
  34. **/
  35. void tpm_ppi_reset(TPMPPI *tpmppi);
  36. #endif /* TPM_TPM_PPI_H */