Windows requires a physical presence interface to recognize the tpm
device. Qemu has an implementation for the ppi which can reuse. Using
the qemu ppi makes it very easy because we don't have to implement new
ppi functionality into ovmf. The qemu implementation is already there.
Details
Details
- Reviewers
jhb markj - Group Reviewers
bhyve - Commits
- rG85a775e61b98: bhyve: add Qemu PPI emulation for TPM devices
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
usr.sbin/bhyve/tpm_ppi_qemu.c | ||
---|---|---|
117 | These switch statements can be replaced by calls to memcpy(). | |
134 | Same comment everywhere else. | |
164 | mr_name is unused. There is no need to use a stack buffer for a string which is known at compile time. | |
201 | Same bug as elsewhere, mr.name must not be a pointer to a stack buffer. Please just use a string literal. |
Comment Actions
The warnx() strings do not need newlines.
usr.sbin/bhyve/tpm_ppi_qemu.c | ||
---|---|---|
100 | If you make this a global variable, then this function isn't needed. Callers can call (un)register_mem() directly and we don't need the extra registration flag variable. |