All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Carlo Caione <ccaione@baylibre.com>,
	GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
	u-boot@lists.u-boot-project.org
Cc: "Julien Masson" <jmasson@baylibre.com>,
	"Quentin Schulz" <u-boot@0leil.net>,
	"Marek Vasut" <marek.vasut+renesas@mailbox.org>,
	"Ryder Lee" <ryder.lee@mediatek.com>,
	"Weijie Gao" <weijie.gao@mediatek.com>,
	"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
	"Igor Belwon" <igor.belwon@mentallysanemainliners.org>,
	"Julien Stephan" <jstephan@baylibre.com>,
	"Macpaul Lin" <Macpaul.Lin@mediatek.com>,
	"Tom Rini" <trini@konsulko.com>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Vitor Sato Eschholz" <vsatoes@baylibre.com>,
	"Johan Jonker" <jbx6244@gmail.com>,
	"Bastien Curutchet" <bastien.curutchet@bootlin.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Alexey Charkov" <alchark@gmail.com>,
	"Suhrid Subramaniam" <Suhrid.Subramaniam@mediatek.com>,
	"Arnaud Ferraris" <arnaud.ferraris@collabora.com>,
	"Pablo Sun (孫毓翔)" <pablo.sun@mediatek.com>
Subject: Re: [PATCH v6 6/6] doc: board: mediatek: document Genio 510 and 700 SPL boot
Date: Wed, 9 Sep 2026 14:56:02 -0500	[thread overview]
Message-ID: <f12ef161-582c-458d-b49d-974ab55e7788@baylibre.com> (raw)
In-Reply-To: <20260906-ccaione-upstream-mt8390-spl-v6-6-4d4a11d5741d@baylibre.com>

On 9/6/26 10:30 AM, Carlo Caione wrote:
> Document the common Genio 510 and Genio 700 eMMC boot chain,
> board-specific external firmware prerequisites, binman build invocation
> and generated images.
> 

...

> +DDR-loader handoff contract
> +---------------------------
> +
> +The DDR loader and U-Boot SPL have no parameter-block or firmware-call
> +interface. Their contract consists of a fixed image layout, initialized DRAM
> +and the execution state at the SPL entry point. Different DDR-loader
> +implementations may be used as long as they satisfy this contract for the
> +selected board. The BootROM loads the eMMC boot0 payload to
> +``CONFIG_MTK_GENIO_BROM_LOAD_ADDR``::
> +
> +   offset 0                                     +----------------------+
> +                                                | DDR loader           |
> +                                                |                      |
> +   offset CONFIG_MTK_GENIO_DDR_LOADER_SIZE      +----------------------+
> +                                                | U-Boot SPL           |
> +                                                | CONFIG_SPL_MAX_SIZE  |
> +   image end                                    +----------------------+
> +
> +The DDR loader then performs the following handoff::
> +
> +   initialize and train DRAM
> +
> +   copy:
> +     source      = CONFIG_MTK_GENIO_BROM_LOAD_ADDR
> +                   + CONFIG_MTK_GENIO_DDR_LOADER_SIZE
> +     destination = CONFIG_SPL_TEXT_BASE
> +     size        = CONFIG_SPL_MAX_SIZE

Do CONFIG_MTK_GENIO_DDR_LOADER_SIZE and CONFIG_SPL_MAX_SIZE need to be the
same or just CONFIG_SPL_MAX_SIZE >= CONFIG_MTK_GENIO_DDR_LOADER_SIZE?

> +
> +   enter:
> +     PC          = CONFIG_SPL_TEXT_BASE
> +     state       = AArch64 EL3h
> +     exceptions  = masked
> +     x0..x7      = 0
> +
> +The loader must copy the complete fixed-size SPL window, make the copied image
> +coherent, leave the MMU and caches disabled and enter SPL with no live
> +dependency on its own runtime state. The MMU and caches must be disabled at
> +entry, and all writes performed by the loader must be visible to the CPU.
> +SPL does not consume DRAM geometry, a devicetree or boot-source information
> +from registers.
> +
> +SPL obtains platform information from its embedded control devicetree and
> +initializes the console, clocks, pinctrl, watchdog and eMMC through U-Boot
> +drivers.
> +
> +There is no runtime negotiation of these values. A replacement DDR loader is
> +compatible only if it initializes the selected board's DRAM and follows the
> +same image-layout and entry-state contract. It may represent the corresponding
> +addresses, offsets and sizes using any implementation-specific mechanism; the
> +contract does not require particular variable or build-symbol names.
> +
> +Firmware image prerequisites
> +----------------------------
> +
> +The following external binaries are required to assemble the complete
> +firmware images:
> +
> +``ddr-loader.bin``
> +   A MediaTek DDR loader built for the target board and configured to satisfy
> +   the handoff contract above. The input may be shorter than the configured
> +   loader region; binman pads it with zeroes to the offset reserved before

s/zeroes/zeros/

> +   SPL.
> +
> +``BL31``
> +   The U-Boot build variable naming the Arm Trusted Firmware-A BL31 binary
> +   built for the MT8188 platform. It is loaded and entered at
> +   ``CONFIG_MTK_GENIO_BL31_LOAD_ADDR``.
> +
> +``TEE``
> +   The U-Boot build variable naming the OP-TEE binary. A standard OP-TEE v1
> +   ``tee.bin`` image is supported. Binman removes its header and derives the
> +   load and entry addresses from it when creating the FIT.
> +
> +These binaries must match the selected board, its memory layout and its
> +firmware security policy. In particular, a common image layout does not make
> +DDR-loader or OP-TEE binaries interchangeable between the two boards. BL31 and
> +OP-TEE must agree on the secure-memory layout. SPL passes OP-TEE's entry point
> +in the standard BL31 parameters; ``CONFIG_SPL_ATF_NO_PLATFORM_PARAM`` suppresses

> +only the separate platform parameter. Place
> +``ddr-loader.bin`` in a directory which can be passed to binman with

Strange line wrap here.

> +``BINMAN_INDIRS``.
> +

  parent reply	other threads:[~2026-09-09 19:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-06 15:30 [PATCH v6 0/6] Add Genio 510 and Genio 700 SPL boot support Carlo Caione
2026-09-06 15:30 ` [PATCH v6 1/6] arm: dts: mediatek: prepare Genio 510 and 700 devices for SPL Carlo Caione
2026-09-09 19:33   ` David Lechner
2026-09-09 20:36     ` Carlo Caione
2026-09-06 15:30 ` [PATCH v6 2/6] configs: mt8188: enable eMMC FIT boot from SPL Carlo Caione
2026-09-07  3:45   ` Macpaul Lin (林智斌)
2026-09-09 19:35   ` David Lechner
2026-09-09 20:37     ` Carlo Caione
2026-09-06 15:30 ` [PATCH v6 3/6] arm: mediatek: build Genio 510 and 700 boot images with binman Carlo Caione
2026-09-09 19:39   ` David Lechner
2026-09-09 20:42     ` Carlo Caione
2026-09-06 15:30 ` [PATCH v6 4/6] arm: dts: mediatek: support signed Genio 510 and 700 bootloader FIT Carlo Caione
2026-09-06 15:30 ` [PATCH v6 5/6] arm: dts: mediatek: emit the Genio 510 and 700 BootROM payload Carlo Caione
2026-09-06 15:30 ` [PATCH v6 6/6] doc: board: mediatek: document Genio 510 and 700 SPL boot Carlo Caione
2026-09-07  3:48   ` Macpaul Lin (林智斌)
2026-09-09 19:56   ` David Lechner [this message]
2026-09-09 20:54     ` Carlo Caione
2026-09-09 20:58       ` Carlo Caione
2026-09-09 21:00       ` David Lechner

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=f12ef161-582c-458d-b49d-974ab55e7788@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=Macpaul.Lin@mediatek.com \
    --cc=Suhrid.Subramaniam@mediatek.com \
    --cc=alchark@gmail.com \
    --cc=arnaud.ferraris@collabora.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=ccaione@baylibre.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=igor.belwon@mentallysanemainliners.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jbx6244@gmail.com \
    --cc=jmasson@baylibre.com \
    --cc=jstephan@baylibre.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=neil.armstrong@linaro.org \
    --cc=pablo.sun@mediatek.com \
    --cc=ryder.lee@mediatek.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@0leil.net \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=vsatoes@baylibre.com \
    --cc=weijie.gao@mediatek.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.