All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jose Marinho <jose.marinho@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH 0/2] Add ESRT and test ESRT creation
Date: Mon,  8 Feb 2021 12:52:44 +0000	[thread overview]
Message-ID: <20210208125246.32547-1-jose.marinho@arm.com> (raw)

The following 2 commits add the ESRT and provide a test of the
functionality.

The first commit adds the ESRT as defined in the UEFI 2.8 specification.
An empty ESRT is created during the execution of the efi_init_obj_list().
The ESRT is updated when:
  1) a FMP protocol is installed in the system: this will add the
corresponding entries to the ESRT.
  2) a capsule is installed via UpdateCapsule: this should update
entries already present in the ESRT.

This implementation of the ESRT creation takes input from FMP only.
It is assumed that the FMP will maintain the following values across
reboot:
 - LastAttemptVersion.
 - LastAttemptStatus.


The second commit enables testing the ESRT creation in the sandbox
platfrom. The test executes from the u-boot shell with "ut lib".

Note: I've removed the RFC tag that was previously used to post this
patch.

Patch v1:
- reworked the ESRT creation code, allowing table to resize as
FMPs are installed.
- registered a callback for the FMP protocol install.
- Created a unit test running on the sandbox platform.

rfc: initial patch submission

CC: Heinrich Schuchardt	<xypron.glpk@gmx.de>
CC: Sughosh Ganu <sughosh.ganu@linaro.org>
CC: AKASHI Takahiro <takahiro.akashi@linaro.org>
CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
CC: Andre Przywara <andre.przywara@arm.com>
CC: Alexander Graf <agraf@csgraf.de>
CC: nd at arm.com

Jose Marinho (2):
  efi: Add ESRT to the EFI system table
  efi: ESRT cration unit test

 cmd/efidebug.c                |   4 +
 include/efi_api.h             |  21 ++
 include/efi_loader.h          |  19 ++
 lib/efi_loader/Kconfig        |   7 +
 lib/efi_loader/Makefile       |   1 +
 lib/efi_loader/efi_boottime.c |   2 -
 lib/efi_loader/efi_capsule.c  |   7 +
 lib/efi_loader/efi_esrt.c     | 439 ++++++++++++++++++++++++++++++++++
 lib/efi_loader/efi_setup.c    |   6 +
 test/lib/Makefile             |   1 +
 test/lib/efi_esrt.c           | 188 +++++++++++++++
 11 files changed, 693 insertions(+), 2 deletions(-)
 create mode 100644 lib/efi_loader/efi_esrt.c
 create mode 100644 test/lib/efi_esrt.c

-- 
2.17.1

             reply	other threads:[~2021-02-08 12:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 12:52 Jose Marinho [this message]
2021-02-08 12:52 ` [PATCH 1/2] efi: Add ESRT to the EFI system table Jose Marinho
2021-02-08 22:18   ` Heinrich Schuchardt
2021-02-08 22:30     ` Heinrich Schuchardt
2021-02-16  9:06   ` Heinrich Schuchardt
2021-02-16 10:27     ` Heinrich Schuchardt
2021-02-17  5:22     ` AKASHI Takahiro
2021-02-08 12:52 ` [PATCH 2/2] efi: ESRT cration unit test Jose Marinho
2021-02-17  5:26   ` AKASHI Takahiro

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-all 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=20210208125246.32547-1-jose.marinho@arm.com \
    --to=jose.marinho@arm.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.