public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sean Rhodes" <sean@starlabs.systems>
To: devel@edk2.groups.io
Cc: Patrick Rudolph <patrick.rudolph@9elements.com>,
	Guo Dong <guo.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
	Maurice Ma <maurice.ma@intel.com>,
	Benjamin You <benjamin.you@intel.com>,
	Sean Rhodes <sean@starlabs.systems>
Subject: [PATCH 2/5] UefiPayloadPkg/Include/Coreboot: Add headers for SMMSTOREv2 table
Date: Mon, 21 Mar 2022 09:10:10 +0000	[thread overview]
Message-ID: <d0055e629854e47f23d28ec6f7750d513837a73c.1647853813.git.sean@starlabs.systems> (raw)
In-Reply-To: <cc0ee7344cac85aee468ebdcc65aa9fc95a431e5.1647853813.git.sean@starlabs.systems>

From: Patrick Rudolph <patrick.rudolph@9elements.com>

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>
---
 UefiPayloadPkg/Include/Coreboot.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/UefiPayloadPkg/Include/Coreboot.h b/UefiPayloadPkg/Include/Coreboot.h
index a3e1109fe8..617e5e9bc0 100644
--- a/UefiPayloadPkg/Include/Coreboot.h
+++ b/UefiPayloadPkg/Include/Coreboot.h
@@ -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) \
-- 
2.32.0


  reply	other threads:[~2022-03-21  9:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21  9:10 [PATCH 1/5] UefiPayloadPkg/UefiPayloadPkg.ci.yaml: Remove duplicated entry Sean Rhodes
2022-03-21  9:10 ` Sean Rhodes [this message]
2022-03-21  9:10 ` [PATCH 3/5] UefiPayloadPkg: Add SmmStoreInfoGuid Sean Rhodes
2022-03-21  9:10 ` [PATCH 4/5] UefiPayloadPkg: Add SmmStoreLib Sean Rhodes
2022-03-21  9:10 ` [PATCH 5/5] UefiPayloadPkg: Add support for Firmware Volume Block Protocol Sean Rhodes
2022-03-23 18:12   ` Guo Dong
2022-03-23 18:24     ` Patrick Rudolph
2022-03-23 19:27       ` [edk2-devel] " Guo Dong
2022-03-23 19:52         ` Sean Rhodes
2022-03-23 21:06           ` King Sumo
2022-03-23 21:20             ` Guo Dong
2022-03-23 17:58 ` [PATCH 1/5] UefiPayloadPkg/UefiPayloadPkg.ci.yaml: Remove duplicated entry Guo Dong
2022-03-24  0:37   ` Ni, Ray
2022-03-24  1:58     ` duntan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0055e629854e47f23d28ec6f7750d513837a73c.1647853813.git.sean@starlabs.systems \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox