All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Tom Rini" <trini@konsulko.com>,
	"François Ozog" <francois.ozog@linaro.org>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Bill Mills" <bill.mills@linaro.org>,
	"Simon Glass" <sjg@chromium.org>,
	"Albert Aribaud" <albert.u.boot@aribaud.net>,
	"Alexandru Gagniuc" <mr.nuke.me@gmail.com>,
	"Anatolij Gustschin" <agust@denx.de>,
	"Artem Lapkin" <email2tema@gmail.com>,
	"Bharat Gooty" <bharat.gooty@broadcom.com>,
	"Bin Meng" <bmeng.cn@gmail.com>,
	"Chia-Wei Wang" <chiawei_wang@aspeedtech.com>,
	"Daniel Schwierzeck" <daniel.schwierzeck@gmail.com>,
	"Dario Binacchi" <dariobin@libero.it>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Harald Seiler" <hws@denx.de>, "Heiko Schocher" <hs@denx.de>,
	"Joel Peshkin" <joel.peshkin@broadcom.com>,
	"Jorge Ramirez-Ortiz" <jorge@foundries.io>,
	"Kristian Amlie" <kristian.amlie@northern.tech>,
	"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
	Leo <ycliang@andestech.com>, "Lukasz Majewski" <lukma@denx.de>,
	"Marek Vasut" <marek.vasut+renesas@gmail.com>,
	"Marek Vasut" <marex@denx.de>, "Mario Six" <mario.six@gdsys.cc>,
	"Matthias Brugger" <mbrugger@suse.com>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
	"Pali Rohár" <pali@kernel.org>,
	"Patrick Delaunay" <patrick.delaunay@foss.st.com>,
	"Peng Fan" <peng.fan@nxp.com>,
	"Rasmus Villemoes" <rasmus.villemoes@prevas.dk>,
	"Rayagonda Kokatanur" <rayagonda.kokatanur@broadcom.com>,
	"Ricardo Salveti" <ricardo@foundries.io>,
	"Rick Chen" <rick@andestech.com>, "Stefan Roese" <sr@denx.de>,
	"Stefano Babic" <sbabic@denx.de>,
	"Tom Warren" <twarren@nvidia.com>,
	"Tuomas Tynkkynen" <tuomas.tynkkynen@iki.fi>,
	"Ye Li" <ye.li@nxp.com>
Subject: [PATCH v2 00/16] passage: Define a standard for firmware data flow
Date: Mon, 17 Jan 2022 08:04:12 -0700	[thread overview]
Message-ID: <20220117150428.1580273-1-sjg@chromium.org> (raw)


This series adds a standard way of passing information between different
firmware phases. This already exists in U-Boot at a very basic level, in
the form of a bloblist containing an spl_handoff structure, but the intent
here is to define something useful across projects.

The need for this is growing as firmware fragments into multiple binaries
each with its own purpose. Without any run-time connection, we must rely
on build-time settings which are brittle and painful to keep in sync.

This feature is named 'standard passage' since the name is more unique
than many others that could be chosen, it is a passage in the sense that
information is flowing from one place to another and it is standard,
because that is what we want to create.

The implementation is simply a pointer to a bloblist in a register, with
an extra register to point to a devicetree, for more complex data. This
should cover all cases (small memory footprint as well as complex data
flow) and be easy enough to implement on all architectures.

The emphasis is on enabling open communcation between binaries, not
enabling passage of secret, undocumented data, although this is possible
in a private environment.

This series is available at u-boot-dm/pass-working

Changes in v2:
- Add a devicetree for qemu-arm so that qemu_arm_spl can work
- Add comments about how to pass standard passage to EFI
- Add comments about passing a bloblist to Linux
- Add detailed arch-specific information
- Add new patch with the arm-specific standard passage implementation
- Incorporate devicetree source
- Make the stdpass calling standard arch-specific
- Rebase to master
- Rebase to master (dropping bloblist patches already applied)
- Rework global_data for new stdpass convention
- Split the jump_to_image_no_args() change into its own patch
- Use three registers instead of two for the entry

Simon Glass (16):
  spl: Tidy up the header includes
  arm: qemu: Add an SPL build
  spl: Rename jump_to_image_no_args()
  passage: Support an incoming passage
  passage: Support a control devicetree
  passage: arm: Accept a passage from the previous phase
  passage: spl: Support adding the dtb to the passage bloblist
  passage: spl: Support passing the passage to U-Boot
  passage: arm: Add the arch-specific standard passage impl
  passage: Add a qemu test for ARM
  sandbox: Add a way of checking structs for standard passage
  passage: Add documentation
  passage: Add docs for spl_handoff
  x86: Move Intel GNVS file into the common include directory
  passage: Add checks for pre-existing blobs
  WIP: RFC: Add a gitlab test

 .gitlab-ci.yml                                |   6 +
 MAINTAINERS                                   |  10 +
 arch/arm/Kconfig                              |   2 +-
 arch/arm/cpu/armv7/cpu.c                      |  28 ++
 arch/arm/cpu/armv7/start.S                    |   7 +-
 arch/arm/cpu/armv8/cpu.c                      |  20 +
 arch/arm/dts/qemu-arm-u-boot.dtsi             |  22 +
 arch/arm/dts/qemu-arm.dts                     | 393 ++++++++++++++++-
 arch/arm/lib/crt0.S                           |   5 +
 arch/arm/mach-imx/imx8ulp/soc.c               |   2 +-
 arch/arm/mach-imx/spl.c                       |   2 +-
 arch/arm/mach-k3/common.c                     |   2 +-
 arch/arm/mach-omap2/boot-common.c             |   2 +-
 arch/arm/mach-qemu/Kconfig                    |   9 +
 arch/arm/mach-tegra/spl.c                     |   2 +-
 arch/mips/lib/spl.c                           |   2 +-
 arch/riscv/lib/spl.c                          |   2 +-
 arch/sandbox/cpu/spl.c                        |   4 +-
 arch/x86/cpu/apollolake/acpi.c                |   2 +-
 arch/x86/cpu/intel_common/acpi.c              |   2 +-
 .../include/asm/arch-apollolake/global_nvs.h  |   2 +-
 arch/x86/lib/spl.c                            |   2 +-
 arch/x86/lib/tpl.c                            |   2 +-
 board/emulation/qemu-arm/Kconfig              |  23 +-
 board/emulation/qemu-arm/MAINTAINERS          |   1 +
 board/emulation/qemu-arm/Makefile             |   1 +
 board/emulation/qemu-arm/spl.c                |  27 ++
 board/freescale/common/fsl_chain_of_trust.c   |   2 +-
 board/google/chromebook_coral/coral.c         |   2 +-
 board/renesas/rcar-common/gen3-spl.c          |   2 +-
 board/sandbox/Makefile                        |   3 +-
 board/sandbox/stdpass_check.c                 | 107 +++++
 common/Kconfig                                |  51 +++
 common/bloblist.c                             |   8 +-
 common/board_f.c                              |  48 ++-
 common/spl/spl.c                              |  95 ++++-
 configs/qemu_arm_spl_defconfig                |  78 ++++
 doc/board/emulation/qemu-arm.rst              |  37 ++
 doc/develop/bloblist.rst                      |   4 +-
 doc/develop/index.rst                         |   1 +
 doc/develop/std_passage.rst                   | 396 ++++++++++++++++++
 drivers/usb/gadget/f_sdp.c                    |   2 +-
 dts/Kconfig                                   |  12 +
 include/asm-generic/global_data.h             |  38 ++
 include/bloblist.h                            |   1 +
 include/fdtdec.h                              |   4 +
 include/handoff.h                             |   8 +-
 .../x86/include/asm => include}/intel_gnvs.h  |   0
 include/passage.h                             |  28 ++
 include/spl.h                                 |   4 +-
 include/stdpass/README                        |   4 +
 include/stdpass/tpm2_eventlog.h               |  42 ++
 include/stdpass/vboot_ctx.h                   | 267 ++++++++++++
 lib/asm-offsets.c                             |   6 +
 lib/fdtdec.c                                  |  33 ++
 test/py/tests/test_passage.py                 |  11 +
 56 files changed, 1804 insertions(+), 72 deletions(-)
 create mode 100644 arch/arm/dts/qemu-arm-u-boot.dtsi
 create mode 100644 board/emulation/qemu-arm/spl.c
 create mode 100644 board/sandbox/stdpass_check.c
 create mode 100644 configs/qemu_arm_spl_defconfig
 create mode 100644 doc/develop/std_passage.rst
 rename {arch/x86/include/asm => include}/intel_gnvs.h (100%)
 create mode 100644 include/passage.h
 create mode 100644 include/stdpass/README
 create mode 100644 include/stdpass/tpm2_eventlog.h
 create mode 100644 include/stdpass/vboot_ctx.h
 create mode 100644 test/py/tests/test_passage.py

-- 
2.34.1.703.g22d0c6ccf7-goog


             reply	other threads:[~2022-01-17 15:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 15:04 Simon Glass [this message]
2022-01-17 15:04 ` [PATCH v2 01/16] spl: Tidy up the header includes Simon Glass
2022-01-17 15:04 ` [PATCH v2 02/16] arm: qemu: Add an SPL build Simon Glass
2022-01-17 15:04 ` [PATCH v2 03/16] spl: Rename jump_to_image_no_args() Simon Glass
2022-01-17 15:04 ` [PATCH v2 04/16] passage: Support an incoming passage Simon Glass
2022-01-17 15:04 ` [PATCH v2 05/16] passage: Support a control devicetree Simon Glass
2022-01-17 15:04 ` [PATCH v2 06/16] passage: arm: Accept a passage from the previous phase Simon Glass
2022-01-17 15:04 ` [PATCH v2 07/16] passage: spl: Support adding the dtb to the passage bloblist Simon Glass
2022-01-17 15:04 ` [PATCH v2 08/16] passage: spl: Support passing the passage to U-Boot Simon Glass
2022-01-17 15:04 ` [PATCH v2 09/16] passage: arm: Add the arch-specific standard passage impl Simon Glass
2022-01-17 15:04 ` [PATCH v2 10/16] passage: Add a qemu test for ARM Simon Glass
2022-01-17 15:04 ` [PATCH v2 11/16] sandbox: Add a way of checking structs for standard passage Simon Glass
2022-01-17 15:04 ` [PATCH v2 12/16] passage: Add documentation Simon Glass
2022-01-17 16:39   ` Mark Kettenis
2022-01-17 15:04 ` [PATCH v2 13/16] passage: Add docs for spl_handoff Simon Glass
2022-01-17 15:04 ` [PATCH v2 14/16] x86: Move Intel GNVS file into the common include directory Simon Glass
2022-01-17 15:04 ` [PATCH v2 15/16] passage: Add checks for pre-existing blobs Simon Glass
2022-01-17 15:04 ` [PATCH v2 16/16] WIP: RFC: Add a gitlab test Simon Glass

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=20220117150428.1580273-1-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=agust@denx.de \
    --cc=albert.u.boot@aribaud.net \
    --cc=bharat.gooty@broadcom.com \
    --cc=bill.mills@linaro.org \
    --cc=bmeng.cn@gmail.com \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=dariobin@libero.it \
    --cc=email2tema@gmail.com \
    --cc=festevam@gmail.com \
    --cc=francois.ozog@linaro.org \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=hs@denx.de \
    --cc=hws@denx.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=joel.peshkin@broadcom.com \
    --cc=jorge@foundries.io \
    --cc=kristian.amlie@northern.tech \
    --cc=lukma@denx.de \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=marex@denx.de \
    --cc=mario.six@gdsys.cc \
    --cc=mbrugger@suse.com \
    --cc=michal.simek@xilinx.com \
    --cc=mr.nuke.me@gmail.com \
    --cc=pali@kernel.org \
    --cc=patrick.delaunay@foss.st.com \
    --cc=peng.fan@nxp.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=ricardo@foundries.io \
    --cc=rick@andestech.com \
    --cc=sbabic@denx.de \
    --cc=sr@denx.de \
    --cc=trini@konsulko.com \
    --cc=tuomas.tynkkynen@iki.fi \
    --cc=twarren@nvidia.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.com \
    --cc=ye.li@nxp.com \
    /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.