From edd303ff0e9ebc39118e633916278b5ca8558c30 Mon Sep 17 00:00:00 2001 From: Janakarajan Natarajan Date: Fri, 25 May 2018 15:23:29 -0500 Subject: crypto: ccp - Add DOWNLOAD_FIRMWARE SEV command The DOWNLOAD_FIRMWARE command, added as of SEV API v0.15, allows the OS to install SEV firmware newer than the currently active SEV firmware. For the new SEV firmware to be applied it must: * Pass the validation test performed by the existing firmware. * Be of the same build or a newer build compared to the existing firmware. For more information please refer to "Section 5.11 DOWNLOAD_FIRMWARE" of https://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf Signed-off-by: Janakarajan Natarajan Signed-off-by: Herbert Xu --- include/linux/psp-sev.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/linux/psp-sev.h') diff --git a/include/linux/psp-sev.h b/include/linux/psp-sev.h index 93addfa34061..1d2496246072 100644 --- a/include/linux/psp-sev.h +++ b/include/linux/psp-sev.h @@ -54,6 +54,7 @@ enum sev_cmd { SEV_CMD_PDH_CERT_EXPORT = 0x008, SEV_CMD_PDH_GEN = 0x009, SEV_CMD_DF_FLUSH = 0x00A, + SEV_CMD_DOWNLOAD_FIRMWARE = 0x00B, /* Guest commands */ SEV_CMD_DECOMMISSION = 0x020, @@ -129,6 +130,17 @@ struct sev_data_pek_cert_import { u32 oca_cert_len; /* In */ } __packed; +/** + * struct sev_data_download_firmware - DOWNLOAD_FIRMWARE command parameters + * + * @address: physical address of firmware image + * @len: len of the firmware image + */ +struct sev_data_download_firmware { + u64 address; /* In */ + u32 len; /* In */ +} __packed; + /** * struct sev_data_pdh_cert_export - PDH_CERT_EXPORT command parameters * -- cgit v1.2.3