UefiPayloadPkg/Include/Coreboot: Add headers for SMMSTOREv2 table

Since commit bc744f5893fc4d53275ed26dd8d968011c6a09c1 coreboot supports
the SMMSTORE v2 feature. It implements a SMI handler that is able to
write, read and erase pages in the boot media (SPI flash).
The existence of this optional feature is advertised by a coreboot table.

Add the tag and headers to parse the table.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Change-Id: I02be3fa8d5d6ff47d56b81876590afef8f6c43c0
This commit is contained in:
Patrick Rudolph
2022-02-20 14:22:46 +01:00
committed by Tim Crawford
parent 7693804ed1
commit bb19b4bc30

View File

@@ -236,6 +236,19 @@ struct cb_cbmem_tab {
UINT64 cbmem_tab;
};
#define CB_TAG_SMMSTOREV2 0x0039
struct cb_smmstorev2 {
UINT32 tag;
UINT32 size;
UINT32 num_blocks; /* Number of writeable blocks in Smm */
UINT32 block_size; /* Size of a block in byte. Default: 64 KiB */
UINT32 mmap_addr; /* MMIO address of the store for read only access */
UINT32 com_buffer; /* Physical address of the communication buffer */
UINT32 com_buffer_size; /* Size of the communication buffer in byte */
UINT8 apm_cmd; /* The command byte to write to the APM I/O port */
UINT8 unused[3]; /* Set to zero */
};
/* Helpful macros */
#define MEM_RANGE_COUNT(_rec) \