tpm: move buffer size definition to common code