mirror of https://github.com/wolfSSL/wolfTPM.git
Fixes for MMIO HAL refactor.
parent
21638b065a
commit
ab9bf2981b
|
@ -39,7 +39,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef WOLFTPM_ADV_IO
|
||||
#error "WOLFTPM_MMIO_BUILTIN_CB requires WOLFTPM_ADV_IO"
|
||||
#error "WOLFTPM_MMIO requires WOLFTPM_ADV_IO"
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <wolftpm/tpm2_winapi.h>
|
||||
#include <wolftpm/tpm2_param_enc.h>
|
||||
|
||||
#include <hal/tpm_io.h>
|
||||
|
||||
/******************************************************************************/
|
||||
/* --- Local Variables -- */
|
||||
/******************************************************************************/
|
||||
|
@ -623,14 +625,14 @@ TPM_RC TPM2_Init_ex(TPM2_CTX* ctx, TPM2HalIoCb ioCb, void* userCtx,
|
|||
#endif
|
||||
|
||||
#if defined(WOLFTPM_LINUX_DEV) || defined(WOLFTPM_SWTPM) || \
|
||||
defined(WOLFTPM_WINAPI) || defined(WOLFTPM_MMIO)
|
||||
defined(WOLFTPM_WINAPI)
|
||||
if (ioCb != NULL || userCtx != NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
#else
|
||||
#ifdef WOLFTPM_MMIO
|
||||
if (ioCb == NULL)
|
||||
ioCb = TPM2_Mmio_Cb;
|
||||
ioCb = TPM2_IoCb_Mmio;
|
||||
#endif
|
||||
/* Setup HAL IO Callback */
|
||||
rc = TPM2_SetHalIoCb(ctx, ioCb, userCtx);
|
||||
|
|
|
@ -54,11 +54,6 @@ WOLFTPM_LOCAL int TPM2_TIS_StartupWait(TPM2_CTX* ctx, int timeout);
|
|||
WOLFTPM_LOCAL int TPM2_TIS_Write(TPM2_CTX* ctx, word32 addr, const byte* value, word32 len);
|
||||
WOLFTPM_LOCAL int TPM2_TIS_Read(TPM2_CTX* ctx, word32 addr, byte* result, word32 len);
|
||||
|
||||
#ifdef WOLFTPM_MMIO_BUILTIN_CB
|
||||
WOLFTPM_LOCAL int TPM2_Mmio_Cb(TPM2_CTX *ctx, int isRead, word32 addr, byte* buf, word16 size,
|
||||
void* userCtx);
|
||||
#endif /* WOLFTPM_MMIO_BUILTIN_CB */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue