mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 12:23:58 +00:00
0daf5f02cf
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
25 lines
494 B
C
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)
|