soc/amd/common/block/psp/psp_smi_flash.h: fix struct element types

Commit ee93b35bc3 ("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
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85236
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2024-11-21 00:11:36 +01:00
commit b1f954bc6c

View file

@ -53,7 +53,7 @@ struct mbox_psp_cmd_spi_erase {
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 @@ struct psp_smi_rpmc_req_mc {
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;