qemu/hw/tpm/tpm_ppi.h
Philippe Mathieu-Daudé b05b6e3606 hw/tpm: Clean includes
"tpm_ppi.h" only requires to include "exec/memory.h" to get
the MemoryRegion declaration.

tpm_ppi.c requires "hw/qdev-core.h" to use the DEVICE() macro,
tpm_crb.c is the only source file requiring "exec/address-spaces.h".

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220207082756.82600-2-f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-02-21 10:18:06 +01:00

46 lines
1.0 KiB
C

/*
* 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
#include "exec/memory.h"
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.
**/
void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m,
hwaddr addr, Object *obj);
/**
* 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);
#endif /* TPM_TPM_PPI_H */