Re: [PATCH v2] fs/squashfs: sqfs_read: Prevent arbitrary code execution

2022-06-09 Thread Jincheng Wang
It works well. Tested-by: Jincheng Wang Miquel Raynal 于2022年6月9日周四 22:02写道: > Following Jincheng's report, an out-of-band write leading to arbitrary > code execution is possible because on one side the squashfs logic > accepts directory names up to 65535 bytes (u16), while U-Boot fs logic >

[PATCH v2 7/7] video: Use VIDEO_DAMAGE for VIDEO_COPY

2022-06-09 Thread Alexander Graf
CONFIG_VIDEO_COPY implemented a range based copying mechanism: If we print a single character, it will always copy the full range of bytes from the top left corner of the character to the lower right onto the uncached frame buffer. This includes pretty much the full line contents of the printed

[PATCH v2 5/7] efi_loader: GOP: Add damage notification on BLT

2022-06-09 Thread Alexander Graf
Now that we have a damage tracking API, let's populate damage done by UEFI payloads when they BLT data onto the screen. Signed-off-by: Alexander Graf Reported-by: Da Xue --- v1 -> v2: - Remove ifdefs from gop --- lib/efi_loader/efi_gop.c | 7 ++- 1 file changed, 6 insertions(+), 1

[PATCH v2 6/7] video: Only dcache flush damaged lines

2022-06-09 Thread Alexander Graf
Now that we have a damage area tells us which parts of the frame buffer actually need updating, let's only dcache flush those on video_sync() calls. With this optimization in place, frame buffer updates - especially on large screen such as 4k displays - speed up significantly. Signed-off-by:

[PATCH v2 3/7] vidconsole: Add damage notifications to all vidconsole drivers

2022-06-09 Thread Alexander Graf
Now that we have a damage tracking API, let's populate damage done by vidconsole drivers. We try to declare as little memory as damaged as possible, with the exception of rotated screens that I couldn't get my head wrapped around. On those, we revert to the old behavior and mark the full screen as

[PATCH v2 4/7] video: Add damage notification on bmp display

2022-06-09 Thread Alexander Graf
Let's report the video damage when we draw a bitmap on the screen. This way we can later lazily flush only relevant regions to hardware. Signed-off-by: Alexander Graf Reported-by: Da Xue --- drivers/video/video_bmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v2 1/7] dm: video: Add damage tracking API

2022-06-09 Thread Alexander Graf
We are going to introduce image damage tracking to fasten up screen refresh on large displays. This patch adds damage tracking for up to one rectangle of the screen which is typically enough to hold blt or text print updates. Callers into this API and a reduced dcache flush code path will follow

[PATCH v2 2/7] dm: video: Add damage notification on display clear

2022-06-09 Thread Alexander Graf
Let's report the video damage when we clear the screen. This way we can later lazily flush only relevant regions to hardware. Signed-off-by: Alexander Graf Reported-by: Da Xue --- drivers/video/video-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/video-uclass.c

[PATCH v2 0/7] Add video damage tracking

2022-06-09 Thread Alexander Graf
This patch set speeds up graphics output on ARM by a factor of 60x. On most ARM SBCs, we keep the frame buffer in DRAM and map it as cached, but need it accessible by the display controller which reads directly from a later point of consistency. Hence, we flush the frame buffer to DRAM on every

Re: [PATCH v2 2/2] ARM: imx: imx8mn-evk: use one common u-boot.dtsi for the evk boards

2022-06-09 Thread Heiko Thiery
Hi Tim, Hi Simon, [SNIP] > > Heiko, > > You can add multi-dtb support to this so that it's usable by the other > imx8mn boards with the following: > diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi > index 7b591085a0be..af6697b1efbc 100644 > ---

Re: [PATCH v2 2/2] ARM: imx: imx8mn-evk: use one common u-boot.dtsi for the evk boards

2022-06-09 Thread Tim Harvey
On Thu, Jun 9, 2022 at 1:50 PM Heiko Thiery wrote: > > To have only one place to describe the binman images us the > imx8mn-u-boot.dtsi. To have support for different DDR firmwares this > nodes are included dependent on the used DDR config option. > > Signed-off-by: Heiko Thiery > Reviewed-by:

Re: [PATCH 0/6] Add video damage tracking

2022-06-09 Thread Alexander Graf
On 09.06.22 22:32, Heinrich Schuchardt wrote: Am 9. Juni 2022 21:04:37 MESZ schrieb Alexander Graf : On 07.06.22 10:28, Heinrich Schuchardt wrote: On 6/7/22 01:43, Alexander Graf wrote: This patch set speeds up graphics output on ARM by a factor of 60x. On most ARM SBCs, we keep the frame

[PATCH v2 2/2] ARM: imx: imx8mn-evk: use one common u-boot.dtsi for the evk boards

2022-06-09 Thread Heiko Thiery
To have only one place to describe the binman images us the imx8mn-u-boot.dtsi. To have support for different DDR firmwares this nodes are included dependent on the used DDR config option. Signed-off-by: Heiko Thiery Reviewed-by: Fabio Estevam --- v2: sync with current master and fix merge

[PATCH v2 1/2] ARM: imx: imx8mn-evk: generate a single bootable flash.bin

2022-06-09 Thread Heiko Thiery
To have a flash.bin file that also contains the U-Boot and TF-A/ATF create this like already done for other imx8 boards. Signed-off-by: Heiko Thiery Reviewed-by: Fabio Estevam Reviewed-by: Peng Fan --- v2: sync with current master and fix merge conflict arch/arm/dts/imx8mn-evk-u-boot.dtsi |

Re: [PATCH 0/6] Add video damage tracking

2022-06-09 Thread Heinrich Schuchardt
Am 9. Juni 2022 21:04:37 MESZ schrieb Alexander Graf : > >On 07.06.22 10:28, Heinrich Schuchardt wrote: >> On 6/7/22 01:43, Alexander Graf wrote: >>> This patch set speeds up graphics output on ARM by a factor of 60x. >>> >>> On most ARM SBCs, we keep the frame buffer in DRAM and map it as

Re: [PATCH v2] cmd: cat: add new command

2022-06-09 Thread Roger Knecht
On Wednesday, June 8th, 2022 at 15:59, Tom Rini wrote: > On Sat, Jun 04, 2022 at 11:19:15AM +, Roger Knecht wrote: > > > Add cat command to print file content to standard out > > > > Signed-off-by: Roger Knecht rkne...@pm.me > > --- > > v2: > > - Moved cat from boot to shell commands > > -

[PATCH v2] kontron-sl-mx8mm: Add CAAM support

2022-06-09 Thread Fabio Estevam
Add CAAM support, which is required when enabling HAB secure boot. Select CONFIG_SPL_DRIVERS_MISC so that CONFIG_IMX_HAB could build successfully, if selected. Signed-off-by: Fabio Estevam --- Changes since v1: - Do not disable sec_jr0 node in -u-boot.dtsi. This will get disabled by the

Re: [EXT] RE: [PATCH] i.MX8M: crypto: disable JR0 in SPL, U-Boot

2022-06-09 Thread Fabio Estevam
Hi Gaurav, On Thu, Jun 9, 2022 at 10:12 AM Gaurav Jain wrote: > > I suggest that this is submitted into Kernel, and then picked up during the > > next > > DTB re-sync. > > Ok. Fabio has already submitted a patch for this. Yes, if you have a chance please send your Tested-by or Reviewed-by to

Re: [PATCH] kontron-sl-mx8mm: Add CAAM support

2022-06-09 Thread Fabio Estevam
Hi Andrey, On Wed, Jun 8, 2022 at 6:43 PM ZHIZHIKIN Andrey wrote: > > +_jr0 { > > + u-boot,dm-spl; > > + status = "disabled"; > > If this board is supported by upstream Kernel, then perhaps this > reservation shall be included there before, and then sync'd back > into U-Boot? Yes, this

Re: [PATCH 0/6] Add video damage tracking

2022-06-09 Thread Mark Kettenis
> Date: Thu, 9 Jun 2022 21:04:37 +0200 > From: Alexander Graf > > On 07.06.22 10:28, Heinrich Schuchardt wrote: > > On 6/7/22 01:43, Alexander Graf wrote: > >> This patch set speeds up graphics output on ARM by a factor of 60x. > >> > >> On most ARM SBCs, we keep the frame buffer in DRAM and map

Re: [PATCH v4 01/16] sandbox: net: Add aliases for ethernet devices

2022-06-09 Thread Tom Rini
On Thu, May 05, 2022 at 01:11:30PM -0400, Sean Anderson wrote: > Commit f3dd213e15 ("net: introduce helpers to get PHY ofnode from MAC") > changed the ethernet sequence assignment from > > uclass 36: ethernet > 0 * eth@10002000 @ 05813460, seq 0 > 1 * eth@10003000 @ 05813550, seq 5 > 2 *

Re: [PATCH 07/18] Convert CONFIG_USB_XHCI_EXYNOS et al to Kconfig

2022-06-09 Thread Tom Rini
On Thu, Jun 09, 2022 at 10:12:20AM +0900, Minkyu Kang wrote: > Hi, > > 2022년 6월 8일 (수) 21:26, Tom Rini 님이 작성: > > > This converts the following to Kconfig: > >CONFIG_USB_XHCI_EXYNOS > >CONFIG_USB_EHCI_EXYNOS > > > > Signed-off-by: Tom Rini > > --- > > drivers/usb/host/Kconfig

Re: [PATCH 0/6] Add video damage tracking

2022-06-09 Thread Alexander Graf
On 07.06.22 10:28, Heinrich Schuchardt wrote: On 6/7/22 01:43, Alexander Graf wrote: This patch set speeds up graphics output on ARM by a factor of 60x. On most ARM SBCs, we keep the frame buffer in DRAM and map it as cached, but need it accessible by the display controller which reads

RE: [EXT] RE: [PATCH] i.MX8M: crypto: disable JR0 in SPL, U-Boot

2022-06-09 Thread ZHIZHIKIN Andrey
Hello Gaurav, > -Original Message- > From: U-Boot On Behalf Of Gaurav Jain > Sent: Thursday, June 9, 2022 3:13 PM > To: ZHIZHIKIN Andrey ; u- > b...@lists.denx.de; Stefano Babic ; Fabio Estevam > ; Tommaso Merciai ; > Michael Trimarchi ; Marek Vasut ; > Simon Glass ; Patrick Delaunay >

Re: [PATCH v5 11/23] mkeficapsule: Add support for generating empty capsules

2022-06-09 Thread Heinrich Schuchardt
On 6/9/22 14:29, Sughosh Ganu wrote: The Dependable Boot specification[1] describes the structure of the firmware accept and revert capsules. These are empty capsules which are used for signalling the acceptance or rejection of the updated firmware by the OS. Add support for generating these

Reproducibility issue due to use of uname

2022-06-09 Thread Vagrant Cascadian
It looks like u-boot 2022.07-rc1 introduced a reproducibility issue that is dependent on the running kernel. I believe the commit that triggered this issue is: f7691a6d736bec7915c227ac14076f9993a27367 sandbox: allow cross-compiling sandbox While the use of uname in the Makefile goes back

[PATCH] rockchip: make_fit_atf: generate signed conf when FIT_SIGN_KEY is set

2022-06-09 Thread Jerome Forissier
Introduce the environment variable FIT_SIGN_KEY which when set is the name of the key that should be used to sign the binaries and configuration in the FIT image. Usage example (tested on RockPi4B): mkdir keys openssl genpkey -algorithm RSA -out keys/dev.key \ -pkeyopt

[PATCH 1/2] spl: fit: add config option for temporary buffer when loading image

2022-06-09 Thread Jerome Forissier
When the load address of a FIT image isn't properly aligned, spl_load_fit_image() may write past the end of the destination buffer. It is not an issue in many cases because the memory happens to be writeable and nothing important is present in the overflow. On RockPi4 however there is a

[PATCH 2/2] rockchip: rk3399: enable spl-fifo-mode for sdmmc only when needed

2022-06-09 Thread Jerome Forissier
Commit 5c606ca35c42 ("rockchip: rk3399: enable spl-fifo-mode for sdmmc") mentions that the RK3399 SoC can't do DMA between SDMMC and SRAM. According to the TRM "7.3.2 Embedded SRAM access path" [1], only the 8KB SRAM at 0xff3b (INTMEM1) is in this situation. The 192KB SRAM can be accessed by

[PATCH 0/2] spl, rk3399: fix FIT image loadingg out-of-range

2022-06-09 Thread Jerome Forissier
The patches in this series address an issue I met when trying to enable FIT signature verification by SPL on a RockPi4B board. - The first patch avoids a buffer overflow when writing to INTMEM1 SRAM - The second one addresses reliability issues I had with back-to-back MMC reads from the microSD

Re: [PATCH 6/6] video: Only dcache flush damaged lines

2022-06-09 Thread Alexander Graf
On 07.06.22 10:00, Heinrich Schuchardt wrote: On 6/7/22 01:43, Alexander Graf wrote: Now that we have a damage area tells us which parts of the frame buffer actually need updating, let's only dcache flush those on video_sync() calls. With this optimization in place, frame buffer updates -

[PATCH v3 6/7] board: freescale: Add entry for imx8mm_evk_fspi_defconfig

2022-06-09 Thread Mamta Shukla
Add entry for imx8mm_evk_fspi_defconfig in board/freescale/imx8mm_evk/MAINTAINERS Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2: -No changes v3: -No changes board/freescale/imx8mm_evk/MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 7/7] doc: board: nxp: Add instructions to boot from QSPI

2022-06-09 Thread Mamta Shukla
Add instructions to build and boot from QSPI Flash. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2: -No changes v3: -Fix Checkpatch Error for trailing whitespace doc/board/nxp/imx8mm_evk.rst | 37 ++-- 1 file changed, 35 insertions(+), 2

[PATCH v3 4/7] board: freescale: Add QSPI Boot support in spl for i.MX8m

2022-06-09 Thread Mamta Shukla
Add QSPI Boot option in u-boot-spl for i.MX8m EVK. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2: -No changes v3: -No changes board/freescale/imx8mm_evk/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/freescale/imx8mm_evk/spl.c

[PATCH v3 5/7] configs: imx8mm: Define CONFIG_SYS_UBOOT_BASE for i.MX8m

2022-06-09 Thread Mamta Shukla
The macro `CONFIG_SYS_UBOOT_BASE` is used by SPL loaders `"NOR"` and `"XIP"` to determine the base address of u-boot. For `"NOR"` on i.MX8MM it is the base address of QSPI0 plus the offset of the flattened image tree blob. Although `QSPI0_AMBA_BASE` is used to define CONFIG_SYS_UBOOT_BASE in

[PATCH v3 2/7] dts: imx8mm-uboot: Add support to pack FlexSPI Header using binman

2022-06-09 Thread Mamta Shukla
Add definition for FSPI configuration block and subsequently new offsets for u-boot-spl and u-boot-itb for CONFIG_FSPI_HEADER option. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2: -No changes v3: -Fix Checkpatch ERROR: code indent should use tabs where possible

[PATCH v3 1/7] tools: mkimage: Add support to generate FlexSPI Header for i.MX8m

2022-06-09 Thread Mamta Shukla
Add struct with Flex SPI Configuration Block and enable generating fspi header using mkimage. Refer i.MX 8M Mini Application Processor Reference Manual for detailed information about parameters for FlexSPI Configuration block. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2:

[PATCH v3 3/7] configs: Add config for enabling FSPI boot option for i.MX8m

2022-06-09 Thread Mamta Shukla
Add imx8mm_evk_fspi_defconfig to build QSPI boot image. This config is based on imx8mm_evk_defconfig with addtional config options for FSPI Header,SPL offset and imx-image config to boot from FSPI. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2: -Remove extra line in commit

[PATCH v3 0/7] Add support for FlexSPI Boot for i.MX8m

2022-06-09 Thread Mamta Shukla
This series of patch adds support for generating FlexSPI Header file and booting from QSPI on i.MX8m. Changes in v2: -Add check for error in case open() for fspi_fd in imx8mkimage.c fails -Remove extra line in commit message -Remove extra line in imx8mm_evk_fspi_defconfig -New patch in series to

Re: [PATCH 5/6] efi_loader: GOP: Add damage notification on BLT

2022-06-09 Thread Alexander Graf
Hey Heinrich, On 07.06.22 09:12, Heinrich Schuchardt wrote: On 6/7/22 01:43, Alexander Graf wrote: Now that we have a damage tracking API, let's populate damage done by UEFI payloads when they BLT data onto the screen. Signed-off-by: Alexander Graf Reported-by: Da Xue ---  

[PATCH v2] fs/squashfs: sqfs_read: Prevent arbitrary code execution

2022-06-09 Thread Miquel Raynal
Following Jincheng's report, an out-of-band write leading to arbitrary code execution is possible because on one side the squashfs logic accepts directory names up to 65535 bytes (u16), while U-Boot fs logic accepts directory names up to 255 bytes long. Prevent such an exploit from happening by

RE: [EXT] RE: [PATCH] i.MX8M: crypto: disable JR0 in SPL, U-Boot

2022-06-09 Thread Gaurav Jain
Hello Andrey > -Original Message- > From: ZHIZHIKIN Andrey > Sent: Wednesday, June 8, 2022 8:31 PM > To: Gaurav Jain ; u-boot@lists.denx.de; Stefano Babic > ; Fabio Estevam ; Tommaso Merciai > ; Michael Trimarchi > ; Marek Vasut ; Simon > Glass ; Patrick Delaunay ; > Stefan Roese ; Horia

[PATCH] arm64: zynqmp: Enable DP for kv260-revA board

2022-06-09 Thread Michal Simek
DP is enabled for revB and should be enabled for kv260-revA too. Changes in other boards were done by commit 8b82a3a7feb0 ("arm64: zynqmp: Enable DP driver for SOMs"). Signed-off-by: Michal Simek --- arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2] crypto/fsl: fsl_hash: Fix crash in flush dcache

2022-06-09 Thread Gaurav Jain
wrong end address passed to flush_dcache_range. modified the flush_dache logic for scatter list elements. Fixes: 1919f58a8f (crypto/fsl: fsl_hash: Fix dcache issue in caam_hash_finish) Signed-off-by: Gaurav Jain --- drivers/crypto/fsl/fsl_hash.c | 18 -- 1 file changed, 12

imx6sabresd: Board hangs when CONFIG_IMX_HAB=y

2022-06-09 Thread Fabio Estevam
Hi, Enabling IMX_HAB in mx6sabresd_defconfig: --- a/configs/mx6sabresd_defconfig +++ b/configs/mx6sabresd_defconfig @@ -122,3 +122,5 @@ CONFIG_VIDEO_IPUV3=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_IMX_HAB=y +CONFIG_SPL_DRIVERS_MISC=y causes the

[PATCH v5 23/23] sandbox: fwu: Add support for testing FWU feature on sandbox

2022-06-09 Thread Sughosh Ganu
Add a python test script for testing the FWU Multi Bank Update functionality on the sandbox platform. The script has test cases for updation of the u-boot binary and the u-boot environment image to the non active bank. The FWU metadata is being stored on the SPI NOR flash, along with the

[PATCH v5 22/23] [TEMP]configs: synquacer: Add FWU support for DeveloperBox

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu Enable FWU Multi-Bank support for DeveloperBox SynQuacer platform. This also enables fwu_metadata_read command and "reboot soon after update" option. Signed-off-by: Masami Hiramatsu --- Changes in v3: - Use CONFIG_FWU_MDATA_MTD. - Remove unused

[PATCH v5 21/23] doc: synquacer: Add how to enable FWU Multi Bank Update

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu Add a section for the instruction of building the FWU Multi Bank Update supported U-Boot and installation. Signed-off-by: Masami Hiramatsu Signed-off-by: Sughosh Ganu --- doc/board/socionext/developerbox.rst | 110 +++ 1 file changed, 110

[PATCH v5 20/23] FWU: synquacer: Generate dfu_alt_info from devicetree partition

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu Generate dfu_alt_info from the partition uuid information in the devicetree, and record the mapping of partition uuid and the index of dfu_alt_num. This could be a reference implementation of the automatic DFU generation for FWU multi-bank update for non GPT firmware

[PATCH v5 19/23] FWU: synquacer: Add FWU Multi bank update support for DeveloperBox

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu The DeveloperBox platform can support the FWU Multi bank update. SCP firmware will switch the boot mode by DSW3-4 and load the Multi bank update supported TF-A BL2 from 0x60 offset on the SPI flash. Thus it can co-exist with the legacy boot mode (legacy U-Boot or

[PATCH v5 18/23] developerbox: synquacer: Use FIP as the updatable image

2022-06-09 Thread Sughosh Ganu
From: Jassi Brar The Synquacer board is migrating to using the FIP as the only updatable image on the platform with the u-boot and op-tee images packaged as part of the FIP image. Make changes to the structures used for capsule updates to reflect this change. Signed-off-by: Jassi Brar

[PATCH v5 16/23] FWU: doc: Update documentation for the FWU non-GPT MTD

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu Update documentation for the FWU non-GPT MTD device and mkfwumdata command. Signed-off-by: Masami Hiramatsu Signed-off-by: Sughosh Ganu --- doc/develop/uefi/fwu_updates.rst | 82 +++- 1 file changed, 70 insertions(+), 12 deletions(-) diff

[PATCH v5 17/23] synquacer: Update for TBBR (BL2) based new FIP layout

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu This changes SPI NOR flash partition layout for TBBR and also make the U-Boot as position independent executable again because BL33 is loaded on the memory. With enabling TBBR, TF-A BL2 loads all BL3x images from FIP image, and the U-Boot image is added to the FIP image

[PATCH v5 15/23] tools: Add mkfwumdata tool for FWU metadata image

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu Add 'mkfwumdata' tool which can generate an image of the FWU metadata which is required for initializing the platform. Usage: mkfwumdata -i NR_IMAGES -b NR_BANKS [--guid] \ LOCATION_UUID0,IMAGE_TYPE_UUID0,BANK0_IMAGE_UUID[,BANK1_IMAGE_UUID[,...]] \

[PATCH v5 13/23] FWU: Add FWU metadata access driver for non-GPT MTD devices

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu For the platform which doesn't have GPT partitions for the firmware but on MTD devices, the FWU metadata is stored on MTD device as raw image at specific offset. This driver gives the access methods for the FWU metadata information on such MTD devices. Signed-off-by:

[PATCH v5 14/23] dt/bindings: firmware: Add FWU metadata on MTD devices binding

2022-06-09 Thread Sughosh Ganu
From: Masami Hiramatsu Add a devicetree-binding YAML file for the FWU metadata on MTD devices without GPT. Signed-off-by: Masami Hiramatsu Signed-off-by: Sughosh Ganu --- .../firmware/uboot,fwu-mdata-mtd.yaml | 38 +++ 1 file changed, 38 insertions(+) create mode

[PATCH v5 11/23] mkeficapsule: Add support for generating empty capsules

2022-06-09 Thread Sughosh Ganu
The Dependable Boot specification[1] describes the structure of the firmware accept and revert capsules. These are empty capsules which are used for signalling the acceptance or rejection of the updated firmware by the OS. Add support for generating these empty capsules. [1] -

[PATCH v5 12/23] FWU: doc: Add documentation for the FWU feature

2022-06-09 Thread Sughosh Ganu
Add documentattion for the FWU Multi Bank Update feature. The document describes the steps needed for setting up the platform for the feature, as well as steps for enabling the feature on the platform. Signed-off-by: Sughosh Ganu --- doc/develop/uefi/fwu_updates.rst | 142

[PATCH v5 09/23] FWU: Add support for the FWU Multi Bank Update feature

2022-06-09 Thread Sughosh Ganu
The FWU Multi Bank Update feature supports updation of firmware images to one of multiple sets(also called banks) of images. The firmware images are clubbed together in banks, with the system booting images from the active bank. Information on the images such as which bank they belong to is stored

[PATCH v5 10/23] FWU: cmd: Add a command to read FWU metadata

2022-06-09 Thread Sughosh Ganu
Add a command to read the metadata as specified in the FWU specification and print the fields of the metadata. Signed-off-by: Sughosh Ganu --- cmd/Kconfig | 7 + cmd/Makefile| 1 + cmd/fwu_mdata.c | 74 + 3 files changed, 82

[PATCH v5 08/23] FWU: Add boot time checks as highlighted by the FWU specification

2022-06-09 Thread Sughosh Ganu
The FWU Multi Bank Update specification requires the Update Agent to carry out certain checks at the time of platform boot. The Update Agent is the component which is responsible for updating the firmware components and maintaining and keeping the metadata in sync. The spec requires that the

[PATCH v5 07/23] FWU: STM32MP1: Add support to read boot index from backup register

2022-06-09 Thread Sughosh Ganu
The FWU Multi Bank Update feature allows the platform to boot the firmware images from one of the partitions(banks). The first stage bootloader(fsbl) passes the value of the boot index, i.e. the bank from which the firmware images were booted from to U-Boot. On the STM32MP157C-DK2 board, this

[PATCH v5 06/23] FWU: stm32mp1: Add helper functions for accessing FWU metadata

2022-06-09 Thread Sughosh Ganu
Add helper functions needed for accessing the FWU metadata which contains information on the updatable images. These functions have been added for the STM32MP157C-DK2 board which has the updatable images on the uSD card, formatted as GPT partitions. Signed-off-by: Sughosh Ganu ---

[PATCH v5 03/23] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-06-09 Thread Sughosh Ganu
In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, on a separate partition. Add a driver for reading from and writing to the metadata when the updatable images and the metadata are stored on a block device which is formated with GPT

[PATCH v5 05/23] stm32mp1: dk2: Add image information for capsule updates

2022-06-09 Thread Sughosh Ganu
Enabling capsule update functionality on the platform requires populating information on the images that are to be updated using the functionality. Do so for the DK2 board. Signed-off-by: Sughosh Ganu --- board/st/stm32mp1/stm32mp1.c | 19 +++

[PATCH v5 02/23] FWU: Add FWU metadata structure and driver for accessing metadata

2022-06-09 Thread Sughosh Ganu
In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, which is stored on a dedicated partition. Add the metadata structure, and a driver model uclass which provides functions to access the metadata. These are generic API's, and

[PATCH v5 04/23] stm32mp1: dk2: Add a node for the FWU metadata device

2022-06-09 Thread Sughosh Ganu
The FWU metadata structure is accessed through the driver model interface. On the stm32mp157c-dk2 board, the FWU metadata is stored on the uSD card. Add the fwu-mdata node on the u-boot specifc dtsi file for accessing the metadata structure. Signed-off-by: Sughosh Ganu ---

[PATCH v5 01/23] dt/bindings: Add bindings for FWU Metadata storage device

2022-06-09 Thread Sughosh Ganu
Add bindings needed for accessing the FWU metadata partitions. These include the compatible string which point to the access method and the actual device which stores the FWU metadata. The current patch adds basic bindings needed for accessing the metadata structure on GPT partitioned block

[PATCH v5 00/23] FWU: Add FWU Multi Bank Update feature support

2022-06-09 Thread Sughosh Ganu
The patchset adds support for the FWU Multi Bank Update[1] feature. Certain aspects of the Dependable Boot[2] specification have also been implemented. The FWU multi bank update feature is used for supporting multiple sets(also called banks) of firmware image(s), allowing the platform to boot

Re: [PATCH] secure boot: enable ARCH_MISC_INIT config.

2022-06-09 Thread Fabio Estevam
Hi Gaurav, On Thu, Jun 9, 2022 at 8:02 AM Gaurav Jain wrote: > > add ARCH_MISC_INIT to initilaize caam jr driver. "Add" "initialize" Reviewed-by: Fabio Estevam

[PATCH v2 7/7] doc: board: nxp: Add instructions to boot from QSPI

2022-06-09 Thread Mamta Shukla
Add instructions to build and boot from QSPI Flash. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- doc/board/nxp/imx8mm_evk.rst | 38 ++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/doc/board/nxp/imx8mm_evk.rst

[PATCH v2 6/7] board: freescale: Add entry for imx8mm_evk_fspi_defconfig

2022-06-09 Thread Mamta Shukla
Add entry for imx8mm_evk_fspi_defconfig in board/freescale/imx8mm_evk/MAINTAINERS Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- board/freescale/imx8mm_evk/MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/board/freescale/imx8mm_evk/MAINTAINERS

[PATCH v2 5/7] configs: imx8mm: Define CONFIG_SYS_UBOOT_BASE for i.MX8m

2022-06-09 Thread Mamta Shukla
The macro `CONFIG_SYS_UBOOT_BASE` is used by SPL loaders `"NOR"` and `"XIP"` to determine the base address of u-boot. For `"NOR"` on i.MX8MM it is the base address of QSPI0 plus the offset of the flattened image tree blob. Although `QSPI0_AMBA_BASE` is used to define CONFIG_SYS_UBOOT_BASE in

[PATCH v2 4/7] board: freescale: Add QSPI Boot support in spl for i.MX8m

2022-06-09 Thread Mamta Shukla
Add QSPI Boot option in u-boot-spl for i.MX8m EVK. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- (no changes since v1) board/freescale/imx8mm_evk/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c

[PATCH v2 3/7] configs: Add config for enabling FSPI boot option for i.MX8m

2022-06-09 Thread Mamta Shukla
Add imx8mm_evk_fspi_defconfig to build QSPI boot image. This config is based on imx8mm_evk_defconfig with addtional config options for FSPI Header,SPL offset and imx-image config to boot from FSPI. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2: -Remove extra line in commit

[PATCH v2 2/7] dts: imx8mm-uboot: Add support to pack FlexSPI Header using binman

2022-06-09 Thread Mamta Shukla
Add definition for FSPI configuration block and subsequently new offsets for u-boot-spl and u-boot-itb for CONFIG_FSPI_HEADER option. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- (no changes since v1) arch/arm/dts/imx8mm-u-boot.dtsi | 22 +- 1 file

[PATCH v2 1/7] tools: mkimage: Add support to generate FlexSPI Header for i.MX8m

2022-06-09 Thread Mamta Shukla
Add struct with Flex SPI Configuration Block and enable generating fspi header using mkimage. Refer i.MX 8M Mini Application Processor Reference Manual for detailed information about parameters for FlexSPI Configuration block. Signed-off-by: Mamta Shukla Signed-off-by: Thomas Haemmerle --- v2:

[PATCH v2 0/7] Add support for FLexSPI Boot for i.MX8m

2022-06-09 Thread Mamta Shukla
This series of patch adds support for generating FlexSPI Header file and booting from QSPI on i.MX8m. Changes in v2: -Add check for error in case open() for fspi_fd in imx8mkimage.c fails -Remove extra line in commit message -Remove extra line in imx8mm_evk_fspi_defconfig -New patch in series to

[PATCH] secure boot: enable ARCH_MISC_INIT config.

2022-06-09 Thread Gaurav Jain
add ARCH_MISC_INIT to initilaize caam jr driver. Signed-off-by: Gaurav Jain --- board/freescale/common/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig index 6553bf63bf..b0e6e43f4f 100644 ---

[PATCH] secure boot: enable ARCH_MISC_INIT config.

2022-06-09 Thread Gaurav Jain
add ARCH_MISC_INIT to initilaize caam jr driver. Signed-off-by: Gaurav Jain --- board/freescale/common/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig index 6553bf63bf..b0e6e43f4f 100644 ---

[PATCH v1] drivers: spi: sunxi: Fix spi speed settting

2022-06-09 Thread qianfanguijin
From: qianfan Zhao dm_spi_claim_bus run spi_set_speed_mode first and then ops->claim_bus, but spi clock is enabled when sun4i_spi_claim_bus, that will make sun4i_spi_set_speed doesn't work. Fix it. Signed-off-by: qianfan Zhao --- drivers/spi/spi-sunxi.c | 78