soc/amd/common/psp_smi_flash: add RPMC command-specific data structures
Add the data structures used for the command buffers for the PSP SMI commands to increment and request the state of the monotonic counters in the SPI flash. These data structures are specific to the PSP SMI mailbox interface and not the data structures from the RPMC specification. The AGESA code was used as a reference. Change-Id: I8bc8ff4cf9b7ebd0e034f040dde2db8385bb8f79 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84704 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
This commit is contained in:
parent
542dd2e4e6
commit
ee93b35bc3
1 changed files with 25 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <spi_flash.h>
|
||||
#include <types.h>
|
||||
#include "psp_def.h"
|
||||
|
||||
|
|
@ -50,6 +51,30 @@ struct mbox_psp_cmd_spi_erase {
|
|||
struct psp_spi_erase_request req;
|
||||
} __packed;
|
||||
|
||||
struct psp_spi_rpmc_inc_mc {
|
||||
uint32_t counter_address;
|
||||
uint32_t counter_data;
|
||||
uint8_t signature[SPI_RPMC_SIG_LEN];
|
||||
} __packed;
|
||||
|
||||
struct mbox_psp_cmd_spi_rpmc_inc_mc {
|
||||
struct mbox_buffer_header header;
|
||||
struct psp_spi_rpmc_inc_mc req;
|
||||
} __packed;
|
||||
|
||||
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_signature[SPI_RPMC_SIG_LEN];
|
||||
} __packed;
|
||||
|
||||
struct mbox_psp_cmd_spi_rpmc_req_mc {
|
||||
struct mbox_buffer_header header;
|
||||
struct psp_smi_rpmc_req_mc req;
|
||||
} __packed;
|
||||
|
||||
bool is_valid_psp_spi_info(struct mbox_psp_cmd_spi_info *cmd_buf);
|
||||
bool is_valid_psp_spi_read_write(struct mbox_psp_cmd_spi_read_write *cmd_buf);
|
||||
bool is_valid_psp_spi_erase(struct mbox_psp_cmd_spi_erase *cmd_buf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue