Angel Pons uploaded patch set #18 to the change originally created by Patrick Rudolph.

View Change

drivers/smmstore: Implement SMMSTORE version 2

SMMSTORE version 2 is a complete redesign of the current driver. It is
not backwards-compatible with version 1, and only one version can be
used at a time.

Key features:
* Use a fixed communication buffer instead of writing to arbitrary
memory addresses provided by untrusted ring0 code.
* Give the caller full control over the used data format.
* Split the store into smaller chunks to allow fault tolerant updates.
* Don't provide feedback about the actual read/written bytes, just
return error or success in registers.
* Return an error if the requested operation would overflow the
communication buffer.

Separate the SMMSTORE into 64KiB blocks that can individually be
read/written/erased. To be used by payloads that implement a
FaultTolerant Variable store like TianoCore.

The implementation has been tested against EDK2 master.

An example EDK2 implementation can be found here:
https://github.com/9elements/edk2-1/commit/eb1127744a3a5d5c8ac4e8eb76f07e79c736dbe2

Change-Id: I25e49d184135710f3e6dd1ad3bed95de950fe057
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Christian Walter <christian.walter@9elements.com>
---
M Documentation/drivers/index.md
A Documentation/drivers/smmstorev2.md
M payloads/libpayload/include/coreboot_tables.h
M src/commonlib/include/commonlib/cbmem_id.h
M src/commonlib/include/commonlib/coreboot_tables.h
M src/drivers/smmstore/Kconfig
M src/drivers/smmstore/Makefile.inc
A src/drivers/smmstore/ramstage.c
M src/drivers/smmstore/smi.c
M src/drivers/smmstore/store.c
M src/include/smmstore.h
M src/lib/coreboot_table.c
12 files changed, 697 insertions(+), 5 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/40520/18

To view, visit change 40520. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I25e49d184135710f3e6dd1ad3bed95de950fe057
Gerrit-Change-Number: 40520
Gerrit-PatchSet: 18
Gerrit-Owner: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Reviewer: Marcello Sylvester Bauer <sylv@sylv.io>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Christian Walter <christian.walter@9elements.com>
Gerrit-Reviewer: Jeremy Soller <jeremy@system76.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Benjamin Doron <benjamin.doron00@gmail.com>
Gerrit-CC: Duncan Laurie <dlaurie@chromium.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-MessageType: newpatchset