Hi Simon

On Thu, 17 Apr 2025 at 21:16, Simon Glass <s...@chromium.org> wrote:
>
>
> 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.

I'll try to have a wider look, but it would be useful to explain why
the transfer list that's already implemented in U-Boot doesn't meet
your needs. Isn't that already useful across projects? It is already
implemented in TF-A, U-Boot and AFAIK EDKII is adding support for it.

>
> 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.

We now end up with three names. Standard passage, bloblist and
firmware handoff. I think this is going to cause a lot of confusion.
Does bloblist implement the barebones for firmware handoff and
standard passage?

Thanks
/Ilias
>
> The implementation is mostly 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 v3:
> - Add a build for aarch64 as well
> - Add conditions to avoid enaling the test on qemu_arm_sbsa
> - Add mention of QEMU_MANUAL_DTB in doc/
> - Add new patch to adjust how the bloblist is received from stdpass
> - Add new patch to redo how a devicetree is set up
> - Add passage_valid() to decide if stdpass was provided
> - Add support for a 64-bit test also
> - Add support for aarch64 also
> - Add test for aarch64
> - Add tests for azure
> - Drop common.h
> - Fix 'that' typo
> - Fix 'usiing' typo
> - Make the global_data fields present only when needed
> - Move arch_passage_entry() into this patch
> - Move passage.h into this patch
> - Rebase to -master
> - Refresh the U-Boot output in the documentation
> - Update docs for the various code changes
> - Update registers to match the Firmware Handoff protocol
> - Use bootph tags
>
> Changes in v2:
> - Add a devicetree for qemu-arm so that qemu_arm_spl can work
> - Add a new QEMU-specific Kconfig instead
> - 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
> - Fix 'it' typo
> - Make the stdpass calling standard arch-specific
> - Move patch into the standard-passage series
> - Rebase on -master
> - 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
> - Update the commit message to mention the long lines
> - Use three registers instead of two for the entry
>
> Simon Glass (22):
>   RFC: scripts: Add a script for running QEMU
>   emulation: fdt: Allow using U-Boot's device tree with QEMU
>   spl: Tidy up the header includes
>   x86: Move Intel GNVS file into the common include directory
>   spl: Rename jump_to_image_no_args()
>   passage: Support an incoming passage
>   fdt: Redo devicetree setup
>   fdt: Support reading FDT from standard passage
>   bloblist: Adjust how the bloblist is received from passage
>   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
>   arm: qemu: Add an SPL build
>   arm: qemu: Add a 64-bit SPL build
>   xferlist: Drop old xferlist code
>   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
>   passage: Add checks for pre-existing blobs
>   CI: Add tests for gitlab and azure
>
>  .azure-pipelines.yml                          |   6 +
>  .gitlab-ci.yml                                |  12 +
>  MAINTAINERS                                   |  10 +
>  Makefile                                      |   2 +-
>  arch/arm/Kconfig                              |   2 +-
>  arch/arm/cpu/armv7/cpu.c                      |  18 +
>  arch/arm/cpu/armv7/start.S                    |  10 +-
>  arch/arm/cpu/armv8/cpu.c                      |  19 +
>  arch/arm/cpu/armv8/start.S                    |  12 +
>  arch/arm/dts/qemu-arm-u-boot.dtsi             |  22 +
>  arch/arm/dts/qemu-arm.dts                     | 393 +++++++++++++++++-
>  arch/arm/dts/qemu-arm64-u-boot.dtsi           |  29 ++
>  arch/arm/dts/qemu-arm64.dts                   | 338 ++++++++++++++-
>  arch/arm/lib/Makefile                         |   1 -
>  arch/arm/lib/crt0.S                           |   6 +
>  arch/arm/lib/crt0_64.S                        |   6 +
>  arch/arm/lib/xferlist.c                       |  23 -
>  arch/arm/lib/xferlist.h                       |  19 -
>  arch/arm/mach-imx/imx8ulp/soc.c               |   2 +-
>  arch/arm/mach-imx/spl.c                       |   2 +-
>  arch/arm/mach-omap2/boot-common.c             |   2 +-
>  arch/arm/mach-qemu/Kconfig                    |  20 +-
>  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/common/Kconfig                |  12 +
>  board/emulation/qemu-arm/Kconfig              |  29 +-
>  board/emulation/qemu-arm/MAINTAINERS          |   2 +
>  board/emulation/qemu-arm/Makefile             |   1 +
>  board/emulation/qemu-arm/qemu-arm.c           |   3 +
>  board/emulation/qemu-arm/spl.c                |  26 ++
>  board/freescale/common/fsl_chain_of_trust.c   |   2 +-
>  board/google/chromebook_coral/coral.c         |   2 +-
>  board/renesas/common/rcar64-spl.c             |   2 +-
>  board/sandbox/Makefile                        |   3 +-
>  board/sandbox/stdpass_check.c                 | 104 +++++
>  common/Kconfig                                |  58 ++-
>  common/bloblist.c                             | 108 ++---
>  common/board_f.c                              |  13 +-
>  common/spl/spl.c                              | 112 +++--
>  configs/qemu_arm64_spl_defconfig              |  95 +++++
>  configs/qemu_arm_spl_defconfig                |  88 ++++
>  configs/vexpress_fvp_bloblist_defconfig       |   2 +-
>  doc/board/armltd/vexpress64.rst               |   2 +-
>  doc/board/emulation/qemu-arm.rst              |  84 ++++
>  doc/develop/bloblist.rst                      |   4 +-
>  doc/develop/devicetree/dt_qemu.rst            |   8 +
>  doc/develop/index.rst                         |   1 +
>  doc/develop/std_passage.rst                   | 384 +++++++++++++++++
>  drivers/usb/gadget/f_sdp.c                    |   2 +-
>  dts/Kconfig                                   |  17 +-
>  include/asm-generic/global_data.h             |  37 ++
>  include/bloblist.h                            |  26 +-
>  include/fdtdec.h                              |   4 +-
>  include/handoff.h                             |  10 +-
>  .../x86/include/asm => include}/intel_gnvs.h  |   0
>  include/passage.h                             |  53 +++
>  include/spl.h                                 |   4 +-
>  include/stdpass/README                        |   4 +
>  include/stdpass/tpm2_eventlog.h               |  42 ++
>  include/stdpass/vboot_ctx.h                   | 267 ++++++++++++
>  lib/asm-offsets.c                             |   8 +
>  lib/fdtdec.c                                  |  42 +-
>  scripts/Makefile.xpl                          |   2 +-
>  scripts/build-qemu.sh                         | 226 ++++++++++
>  test/py/tests/test_passage.py                 |  13 +
>  72 files changed, 2618 insertions(+), 258 deletions(-)
>  create mode 100644 arch/arm/dts/qemu-arm-u-boot.dtsi
>  create mode 100644 arch/arm/dts/qemu-arm64-u-boot.dtsi
>  delete mode 100644 arch/arm/lib/xferlist.c
>  delete mode 100644 arch/arm/lib/xferlist.h
>  create mode 100644 board/emulation/qemu-arm/spl.c
>  create mode 100644 board/sandbox/stdpass_check.c
>  create mode 100644 configs/qemu_arm64_spl_defconfig
>  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 100755 scripts/build-qemu.sh
>  create mode 100644 test/py/tests/test_passage.py
>
> --
> 2.43.0
>
> base-commit: 278be62c052f3a5749c3c7a57bcd307b82dcdc2d
> branch: pass3

Reply via email to