[PATCH v4 06/11] tpm: Add a basic API implementation for TPMv2