freebsd-src/usr.sbin/bhyve/tpm_emul.h
Corvin Köhne 0daf5f02cf
bhyve/tpm: create crb thread for sending tpm commands
Commands send to a tpm are very slow. They can take up to several
seconds for completion. For that reason, create a thread which issues
the commands to the tpm device.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D40458
2023-06-20 10:59:00 +02:00

25 lines
494 B
C

/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2023 Beckhoff Automation GmbH & Co. KG
* Author: Corvin Köhne <corvink@FreeBSD.org>
*/
#pragma once
#include <sys/linker_set.h>
#include "config.h"
struct tpm_device;
struct tpm_emul {
const char *name;
int (*init)(void **sc, nvlist_t *nvl);
void (*deinit)(void *sc);
int (*execute_cmd)(void *sc, void *cmd, uint32_t cmd_size, void *rsp,
uint32_t rsp_size);
};
#define TPM_EMUL_SET(x) DATA_SET(tpm_emul_set, x)