The current TPM emulation in drivers/tpm/tpm(2)_tis_sandbox.c is not spec compliant.
A TPM emulation as UNIX socket exists with https://github.com/stefanberger/swtpm.git. QEMU already uses this emulator. Couldn't the sandbox do the same? I think this is the fastest way to get a compliant sandbox TPM. Best regards Heinrich