aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bhyve/tpm_ppi_qemu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bhyve/tpm_ppi_qemu.c b/usr.sbin/bhyve/tpm_ppi_qemu.c
index 8bea45ea3208..11a306077108 100644
--- a/usr.sbin/bhyve/tpm_ppi_qemu.c
+++ b/usr.sbin/bhyve/tpm_ppi_qemu.c
@@ -26,7 +26,7 @@
#include "tpm_ppi.h"
#define TPM_PPI_ADDRESS 0xFED45000
-#define TPM_PPI_SIZE 0x1000
+#define TPM_PPI_SIZE 0x400
#define TPM_PPI_FWCFG_FILE "etc/tpm/config"
@@ -101,7 +101,7 @@ tpm_ppi_init(void **sc)
struct tpm_ppi_fwcfg *fwcfg = NULL;
int error;
- ppi = calloc(1, sizeof(*ppi));
+ ppi = calloc(1, TPM_PPI_SIZE);
if (ppi == NULL) {
warnx("%s: failed to allocate acpi region for ppi", __func__);
error = ENOMEM;