Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34106 )
Change subject: src/drivers/crb: Add CRB Driver for TPM2 Support ......................................................................
Patch Set 21:
(8 comments)
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.h File src/drivers/crb/tpm.h:
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.h@13 PS4, Line 13: #define TPM_CRB_BASE_ADDRESS 0xfed40000
should be a Kconfig, like SPI_BUS/SPI_ADDR on SPI TPM
Done
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.h@44 PS4, Line 44: extern struct control_area
move to tpm. […]
Done
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.c File src/drivers/crb/tpm.c:
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.c@31 PS4, Line 31: struct control_area control_area;
static […]
Done
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.c@32 PS4, Line 32: uint8_t current_locality = 0;
static […]
Done
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.c@72 PS4, Line 72: if ((tpmStatus & ((1<<17) | (1 << 19))) != 0) {
use defines for bitmask
Done
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.c@115 PS4, Line 115: uint8_t rc = crb_wait_for_reg32(CRB_REG(0, CRB_REG_LOC_STATE), 750, 0x2, 0x2);
int, as crb_wait_for_reg32 returns int
Done
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.c@181 PS4, Line 181: // Check if PTT establishment bit is valid
that's not part of CRB spec and need to be run somewhere else
Done
https://review.coreboot.org/c/coreboot/+/34106/4/src/drivers/crb/tpm.c@257 PS4, Line 257: // Copy Response
verify length before copying data
Done