Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85236?usp=email )
Change subject: soc/amd/common/block/psp/psp_smi_flash.h: fix struct element types ......................................................................
soc/amd/common/block/psp/psp_smi_flash.h: fix struct element types
Commit ee93b35bc3dd ("soc/amd/common/psp_smi_flash: add RPMC command- specific data structures") added the 'psp_spi_rpmc_inc_mc' and 'psp_smi_rpmc_req_mc' structs, but added the counter data as uint32_t while it should have been an array of 4 uint8_t, since the bytes in that buffer are already in the order in which they need to be sent over to the SPI flash which is different than the byte order of a uint32_t. This was only noticed after getting the code that uses these structs was tested.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I6c290535a1896c080b74d892cb289e6e122d4525 --- M src/soc/amd/common/block/psp/psp_smi_flash.h 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/85236/1
diff --git a/src/soc/amd/common/block/psp/psp_smi_flash.h b/src/soc/amd/common/block/psp/psp_smi_flash.h index 79593b5..789e28d 100644 --- a/src/soc/amd/common/block/psp/psp_smi_flash.h +++ b/src/soc/amd/common/block/psp/psp_smi_flash.h @@ -53,7 +53,7 @@
struct psp_spi_rpmc_inc_mc { uint32_t counter_address; - uint32_t counter_data; + uint8_t counter_data[SPI_RPMC_COUNTER_DATA_LEN]; uint8_t signature[SPI_RPMC_SIG_LEN]; } __packed;
@@ -66,7 +66,7 @@ uint32_t counter_address; uint8_t tag[SPI_RPMC_TAG_LEN]; uint8_t signature[SPI_RPMC_SIG_LEN]; - uint32_t output_counter_data; + uint8_t output_counter_data[SPI_RPMC_COUNTER_DATA_LEN]; uint8_t output_signature[SPI_RPMC_SIG_LEN]; } __packed;