-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support memory mapped tpms #271
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- please review README change.
- Consider shortening the option name to WOLFTPM_MMIO
- Should we also add a configure.ac option like
--enable-mmio
that would activate MMIO access?
this allows to enable debug on sprintf-less systems.
Good to go, tested on Qemu. Off to @dgarske for final review & configuration naming (see open comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested working on my setup
21638b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiled on my setup, looks good
wolftpm/tpm2_tis.h
Outdated
@@ -54,6 +54,11 @@ 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is in the hal file and now has the wrong flag
hal/tpm_io_mmio.c
Outdated
#endif | ||
|
||
#ifndef WOLFTPM_ADV_IO | ||
#error "WOLFTPM_MMIO_BUILTIN_CB requires WOLFTPM_ADV_IO" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to new flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it working with the qemu repo
Enabled with
--enable-mmio
orWOLFTPM_MMIO
.