2019-01-14 23:27:50 +01:00
|
|
|
/*
|
|
|
|
* TPM Physical Presence Interface
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 IBM Corporation
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Stefan Berger <stefanb@us.ibm.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*/
|
|
|
|
#ifndef TPM_TPM_PPI_H
|
|
|
|
#define TPM_TPM_PPI_H
|
|
|
|
|
2022-02-07 09:27:48 +01:00
|
|
|
#include "exec/memory.h"
|
2019-01-14 23:27:50 +01:00
|
|
|
|
|
|
|
typedef struct TPMPPI {
|
|
|
|
MemoryRegion ram;
|
|
|
|
uint8_t *buf;
|
|
|
|
} TPMPPI;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* tpm_ppi_init:
|
|
|
|
* @tpmppi: a TPMPPI
|
|
|
|
* @m: the address-space / MemoryRegion to use
|
|
|
|
* @addr: the address of the PPI region
|
|
|
|
* @obj: the owner object
|
|
|
|
*
|
|
|
|
* Register the TPM PPI memory region at @addr on the given address
|
|
|
|
* space for the object @obj.
|
|
|
|
**/
|
2022-02-07 09:27:48 +01:00
|
|
|
void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m,
|
2019-01-14 23:27:50 +01:00
|
|
|
hwaddr addr, Object *obj);
|
|
|
|
|
2019-01-14 23:27:54 +01:00
|
|
|
/**
|
|
|
|
* tpm_ppi_reset:
|
|
|
|
* @tpmppi: a TPMPPI
|
|
|
|
*
|
|
|
|
* Function to call on machine reset. It will check if the "Memory
|
|
|
|
* overwrite" variable is set, and perform a memory clear on volatile
|
|
|
|
* memory if requested.
|
|
|
|
**/
|
|
|
|
void tpm_ppi_reset(TPMPPI *tpmppi);
|
|
|
|
|
2019-01-14 23:27:50 +01:00
|
|
|
#endif /* TPM_TPM_PPI_H */
|