[PATCH v11] efi_vars: Implement SPI Flash store
Michal Simek
michal.simek at amd.com
Mon Mar 16 12:54:56 CET 2026
On 3/14/26 10:19, Heinrich Schuchardt wrote:
> On 3/13/26 16:45, Michal Simek wrote:
>> From: Shantur Rathore <i at shantur.com>
>>
>> Currently U-Boot uses ESP as storage for EFI variables.
>> Devices with SPI Flash are used for storing environment with this
>> commit we allow EFI variables to be stored on SPI Flash.
>>
>> Signed-off-by: Shantur Rathore <i at shantur.com>
>> Signed-off-by: Michal Simek <michal.simek at amd.com>
>> Tested-by: Neil Armstrong <neil.armstrong at linaro.org> # on AML-S905D3-CC
>> Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
>
> Tested on StarFive VisionFive 2.
>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>
>
> The next logical step will be to define a value like RTStorageVolatile and allow
> to select CONFIG_EFI_RT_VOLATILE_STORE.
>
> One way to define the location would be a SPI flash partition defined in the
> device-tree. An EFI variable could provide the compatible property of the
> partition that efivar should write to.
>
> partitions {
> compatible = "fixed-partitions";
> #address-cells = <1>;
> #size-cells = <1>;
>
> partition at c0000 {
> compatible = "uboot-efivar";
> reg = <0xc0000 0x20000>;
> };
> };
>
> cf. Linux
> Documentation/devicetree/bindings/mtd/partitions/partition.yaml
Can you clarify your request?
I mean, yes partition can be defined but that's more or less for OS/efivar.
U-Boot is using Kconfig parameters to save it to exact location.
Or are you suggesting that u-boot itself should be also decoding locations from
mtd partition (as second configuration method)?
Thanks,
Michal
More information about the U-Boot
mailing list