[v3] [PATCH 3/3] efi_loader: Extend PCR's for firmware measurements

2021-11-23 Thread Ruchika Gupta
Firmwares before U-Boot may be capable of doing tpm measurements and passing them to U-Boot in the form of eventlog. However there may be scenarios where the firmwares don't have TPM driver and are not capable of extending the measurements in the PCRs. Based on TCG spec, if previous firnware has

[v3][PATCH 2/3] tpm: use more algorithms than sha256 on pcr_read

2021-11-23 Thread Ruchika Gupta
The current tpm2_pcr_read is hardcoded using SHA256. Make the actual command to TPM configurable to use wider range of algorithms. The current command line is kept as is i.e limited to SHA-256 only. Signed-off-by: Ruchika Gupta --- v3: No change v2: Change algorithm from u32 to u16 Add

[v3][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ruchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added

[PATCH v2 1/1] efi_loader: segfault in efi_clear_os_indications()

2021-11-23 Thread Heinrich Schuchardt
If we call efi_clear_os_indications() before initializing the memory store for UEFI variables a NULL pointer dereference occurs. The error was observed on the sandbox with: usb start host bind 0 sandbox.img load host 0:1 $kernel_addr_r helloworld.efi bootefi $kernel_addr_r Here

Re: [PATCH] clk: Add myself as a maintainer for the clock subsystem

2021-11-23 Thread Lukasz Majewski
Hi Sean, > Lukasz has not been very responsive Unfortunately, this is true. I do have some personal issues which reduced my time budget. > in reviewing clock patches. Add > myself as a maintainer. Thanks for offering your help. > > Signed-off-by: Sean Anderson > --- > > MAINTAINERS | 1 +

Re: [v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Masahisa Kojima
Hi Ruchika, Ilias, On Tue, 23 Nov 2021 at 20:53, Ruchika Gupta wrote: > > Platforms may have support to measure their initial firmware components > and pass the event log to u-boot. The event log address can be passed > in property tpm_event_log_addr and tpm_event_log_size of the tpm node. >

Re: [U-BOOT-TEST-HOOKS PATCH 1/1] Enable TPMv2 emulation

2021-11-23 Thread Heinrich Schuchardt
On 11/24/21 08:23, Ilias Apalodimas wrote: Hi Heinrich, On Mon, 15 Nov 2021 at 12:11, Heinrich Schuchardt wrote: Provide a QEMU helper script to launch swtpm and add extra parameters to conf.qemu_arm64_na and conf.qemu_arm_na to provide an emulated TPMv2. Signed-off-by: Heinrich Schuchardt

[PATCH] tools/mxsimage: Remove fclose on empty FILE pointer

2021-11-23 Thread Mattias Hansson
If `sb_load_cmdfile()` fails to open the configuration file it will jump to error handling where the code will try to `fclose()` the FILE pointer which is NULL causing `mkimage` to segfault. This patch removes the `fclose()` since `fopen()` always returns NULL instead of the file descriptor when

Re: [U-BOOT-TEST-HOOKS PATCH 1/1] Enable TPMv2 emulation

2021-11-23 Thread Ilias Apalodimas
Hi Heinrich, On Mon, 15 Nov 2021 at 12:11, Heinrich Schuchardt wrote: > > Provide a QEMU helper script to launch swtpm and add extra parameters to > conf.qemu_arm64_na and conf.qemu_arm_na to provide an emulated TPMv2. > > Signed-off-by: Heinrich Schuchardt > --- > bin/qemu.swtpm

Re: [v2] [PATCH 3/3] efi_loader: Extend PCR's for firmware measurements

2021-11-23 Thread Ilias Apalodimas
On Tue, Nov 23, 2021 at 05:23:35PM +0530, Ruchika Gupta wrote: > Firmwares before U-Boot may be capable of doing tpm measurements > and passing them to U-Boot in the form of eventlog. However there > may be scenarios where the firmwares don't have TPM driver and > are not capable of extending the

Re: [v2] [PATCH 2/3] tpm: use more algorithms than sha256 on pcr_read

2021-11-23 Thread Ilias Apalodimas
On Tue, Nov 23, 2021 at 05:23:34PM +0530, Ruchika Gupta wrote: > The current tpm2_pcr_read is hardcoded using SHA256. Make the > actual command to TPM configurable to use wider range of algorithms. > The current command line is kept as is i.e limited to SHA-256 only. > > Signed-off-by: Ruchika

Re: [v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ilias Apalodimas
Hi Ruchika, > + [...] > + ret = platform_get_eventlog(dev, , ); > + if (ret == EFI_SUCCESS) { Can we invert the logic here? if (ret != EFI_SUCCESS) return ret; etc... > + void *buffer = (void *)base; > + > + if (sz > TPM2_EVENT_LOG_SIZE) > +

Re: [PATCH v2 1/2] riscv: Support booting SiFive Unmatched from SPI.

2021-11-23 Thread Sean Anderson
On 11/23/21 11:27 PM, Thomas Skibo wrote: Configure SPI flash devices into SPL. Add SPI boot option to spl.c. Document how to format flash for booting. Signed-off-by: Thomas Skibo --- .../dts/hifive-unmatched-a00-u-boot.dtsi | 11 +++ board/sifive/unmatched/spl.c

[PATCH] fastboot: Add maintainers entry

2021-11-23 Thread Sean Anderson
Add an entry in maintainers for fastboot. It is starting off orphaned, but hopefully someone can pick it up. Signed-off-by: Sean Anderson --- I would maintain this, but I don't have any boards which use fastboot at home. In the future I may come across something appropriate, but for now I'm not

[PATCH v2 1/2] riscv: Support booting SiFive Unmatched from SPI.

2021-11-23 Thread Thomas Skibo
Configure SPI flash devices into SPL. Add SPI boot option to spl.c. Document how to format flash for booting. Signed-off-by: Thomas Skibo --- .../dts/hifive-unmatched-a00-u-boot.dtsi | 11 +++ board/sifive/unmatched/spl.c | 3 ++ configs/sifive_unmatched_defconfig

[PATCH v2 0/2] riscv: Support booting SiFive Unmatched from SPI flash.

2021-11-23 Thread Thomas Skibo
This patch set adds support for booting the SiFive Unmatched board from SPI flash memory and saving the environment to flash. Thomas Skibo (2): riscv: Support booting SiFive Unmatched from SPI. riscv: Enable SPI flash env for SiFive Unmatched. arch/riscv/cpu/fu740/Kconfig |

[PATCH v2 2/2] riscv: Enable SPI flash env for SiFive Unmatched.

2021-11-23 Thread Thomas Skibo
Enable saving environment to SPI flash memory on SiFive Unmatched. Signed-off-by: Thomas Skibo --- arch/riscv/cpu/fu740/Kconfig | 13 + board/sifive/unmatched/Kconfig | 1 + 2 files changed, 14 insertions(+) diff --git a/arch/riscv/cpu/fu740/Kconfig

[PATCH] clk: Add myself as a maintainer for the clock subsystem

2021-11-23 Thread Sean Anderson
Lukasz has not been very responsive in reviewing clock patches. Add myself as a maintainer. Signed-off-by: Sean Anderson --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6db5354322..d30daff724 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@

[PATCH 7/7] RFC: Move Odroid-C2 to use binman to produce the image

2021-11-23 Thread Simon Glass
This shows how binman can be used to replace the long and complicated instructions with an automated build. It is still complicated to read but users don't have to worry about the details. It needs some tidying up and only supports Odroid-C2 at present. Signed-off-by: Simon Glass ---

[PATCH 3/7] binman: Allow extracting a file in an alternative format

2021-11-23 Thread Simon Glass
In some cases entries encapsulate other data and it is useful to access the data within. An example is the fdtmap which consists of a 16-byte header, followed by a devicetree. Provide an option to specify an alternative format when extracting files. In the case of fdtmap, this is 'fdt', which

[PATCH 6/7] binman: Rename _ReadSubnodes() to ReadEntries()

2021-11-23 Thread Simon Glass
This method name is more commonly used for this function. Use it consistently. Signed-off-by: Simon Glass --- tools/binman/etype/fit.py| 4 ++-- tools/binman/etype/intel_ifwi.py | 4 ++-- tools/binman/etype/mkimage.py| 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff

[PATCH 5/7] binman: Support lists of external blobs

2021-11-23 Thread Simon Glass
Sometimes it is useful to have a list of related external blobs in a single entry. An example is the DDR binaries used by meson. There are 9 files in total. Add support for this, so we don't have to have a separate entry for each. Signed-off-by: Simon Glass --- scripts/pylint.base

[PATCH 4/7] dtoc: Add support for reading string-list properties

2021-11-23 Thread Simon Glass
Add a function to read a list of strings from the devicetree. Signed-off-by: Simon Glass --- tools/dtoc/fdt_util.py | 21 + tools/dtoc/test_fdt.py | 9 + 2 files changed, 30 insertions(+) diff --git a/tools/dtoc/fdt_util.py b/tools/dtoc/fdt_util.py index

[PATCH 2/7] binman: Allow listing an image created by a newer version

2021-11-23 Thread Simon Glass
If an older version of binman is used to list images created by a newer one, it is possible that it will contain entry types that are not supported. At present this produces an error. Adjust binman to use a plain 'blob' entry type to cope with this, so the image can at least be listed.

[PATCH 1/7] binman: Allow providing tools and blob directories

2021-11-23 Thread Simon Glass
At present it is necessary to symlink files containing external blobs into the U-Boot tree in order for binman to find them. This is not very convenient. Add two new environment/Makefile variables to help with this. Add documentation as well, fixing a related nit. Signed-off-by: Simon Glass ---

[PATCH 0/7] meson: Demonstration of using binman to produce the image

2021-11-23 Thread Simon Glass
The Odroid-C2 is quite a complicated image with many steps. It is an ideal example for how Binman can be used. Add a binman description and update the instructions accordingly. Simon Glass (7): binman: Allow providing tools and blob directories binman: Allow listing an image created by a

[PATCH 2/2] binman: Add support for ATF FIP

2021-11-23 Thread Simon Glass
This format is used in firmware binaries so we may as well supported it. With this patch binman supports creating, listing and updating FIPs, as well as extracting files from one, provided that an FDTMAP is also present somewhere in the image. Signed-off-by: Simon Glass ---

[PATCH 1/2] binman: Add a utility module for ATF FIP

2021-11-23 Thread Simon Glass
Add support for this format which is used by ARM Trusted Firmware to find firmware binaries to load. FIP is like a simpler version of FMAP but uses a UUID instead of a name, for each entry. It supports reading a FIP, writing a FIP and parsing the ATF source code to get a list of supported UUIDs.

[PATCH 0/2] binman: Add support for ATF Firmware Image Package (FIP)

2021-11-23 Thread Simon Glass
This series adds support for the FIP format as used by ARM Trusted Firmware (in particular TF-A). This allows images to be created containing a FIP, which itself contains various binaries. With this, image creation can be handled from an in-tree image description instead of needing to perform a

Re: [PATCH v2] clk: fix clk_get_rate() documentation

2021-11-23 Thread Sean Anderson
On 2/13/21 9:17 PM, Giulio Benetti wrote: Improve clk_get_rate() @return documentation that otherwise is a bit ambiguous. At the moment I expect to return 0 as error since the return type is 'ulong', instead the function really returns negative value in case the corresponding function pointer is

Re: [BUG] efi_loader: incorrect creation of device paths

2021-11-23 Thread AKASHI Takahiro
On Sat, Nov 20, 2021 at 01:54:30PM +0100, Heinrich Schuchardt wrote: > Hello Takahiro, > > in a prior mail we have discussed the creation of device paths for USB > mass storage devices. > > On the sand boxyou get the following devices after 'usb start': > > Class Index Probed Driver

Re: [PATCH 1/1] efi_loader: segfault in efi_clear_os_indications()

2021-11-23 Thread AKASHI Takahiro
On Sat, Nov 20, 2021 at 12:02:25PM +0100, Heinrich Schuchardt wrote: > If we call efi_clear_os_indications() before initializing the memory store > for UEFI variables a NULL pointer dereference occurs. > > The error was observed on the sandbox with: > > usb start > host bind 0

Re: [PATCH V2] clk: introduce u-boot,ignore-clk-defaults

2021-11-23 Thread Sean Anderson
On 11/22/21 10:02 PM, Peng Fan (OSS) wrote: Subject: Re: [PATCH V2] clk: introduce u-boot,ignore-clk-defaults On Mon, Nov 22, 2021 at 11:33:27AM +0800, Peng Fan (OSS) wrote: + Rob On 2021/11/20 20:57, Tom Rini wrote: On Sat, Nov 20, 2021 at 12:10:54PM +, Peng Fan (OSS) wrote: Subject:

Re: [PATCH] binman: Fix extract command for using non-absolute image paths

2021-11-23 Thread Simon Glass
Hi Jan, On Thu, 11 Nov 2021 at 00:14, Jan Kiszka wrote: > > From: Jan Kiszka > > Otherwise the updated image will end up in the temporary folder that is > purged after completion. Reviewed-by: Simon Glass I'd like to add a test for this. Regards, Simon > > Signed-off-by: Jan Kiszka > ---

Re: [PATCH v3 1/5] reset: scmi: define LOG_CATEGORY

2021-11-23 Thread Tom Rini
On Thu, Oct 28, 2021 at 07:13:12PM +0200, Patrick Delaunay wrote: > Define LOG_CATEGORY to allow filtering with log command. > > Signed-off-by: Patrick Delaunay > Acked-by: Etienne Carriere For the series, applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v2 1/5] tee: define session login identifiers

2021-11-23 Thread Tom Rini
On Tue, Nov 09, 2021 at 05:08:20PM +0100, Etienne Carriere wrote: > Define identifiers for clnt_login field in struct tee_open_session_arg > based in GlobalPlatform Device TEE IDs and on the REE_KERNEL identifier > extension from OP-TEE OS. > > Cc: Jens Wiklander > Reviewed-by: Patrick Delaunay

Re: [PATCH 1/5] firmware: scmi: fix description of an API function

2021-11-23 Thread Tom Rini
On Mon, Nov 08, 2021 at 08:56:07AM +0100, Etienne Carriere wrote: > Correct inline comment describing API function devm_scmi_process_msg(). > > Signed-off-by: Etienne Carriere > Reviewed-by: Patrick Delaunay For the series, applied to u-boot/next, thanks! -- Tom signature.asc Description:

Re: [PATCH v2 1/3] usb: f_mass_storage: Check bh->state in sleep_thread

2021-11-23 Thread Sean Anderson
On 10/28/21 3:40 PM, Sean Anderson wrote: On 7/22/21 2:38 PM, Sean Anderson wrote: Every caller of sleep_thread except one wraps it in a second loop which waits for a buffer head to be filled. Since sleep_thread is already (infinitely) looping, we can move this check down. Some parts of the

[PATCH v3 11/12] mmc: fsl_esdhc_imx: Replace more #ifdefs by if

2021-11-23 Thread Sean Anderson
This builds on the previous patch by converting yet more preprocessor macros to C ifs. This is split off so that the changes adapted from Micheal's patch may be clearly distinguished from the ones I have authored myself. MMC_SUPPORTS_TUNING should really get a Kconfig conversion. And DM_GPIO

[PATCH v3 12/12] mmc: fsl_esdhc_imx: set sysctl register for clock initialization

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 263ddfc3454ead3a988adef39b962479adce2b28 ] The initial clock setting should be through sysctl register only, while the mmc_set_clock() will call mmc_set_ios() introduce other configurations like bus width, mode, and so on. Signed-off-by: Yangbo Lu Signed-off-by: Sean Anderson

[PATCH v3 10/12] mmc: fsl_esdhc_imx: replace most #ifdefs by IS_ENABLED()

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 52faec31827ec1a1837977e29c067424426634c5 ] Make the code cleaner and drop the old-style #ifdef constructs where it is possible. Signed-off-by: Michael Walle Signed-off-by: Sean Anderson --- (no changes since v1) drivers/mmc/fsl_esdhc_imx.c | 209

[PATCH v3 05/12] mmc: fsl_esdhc_imx: drop redundant code for non-removable feature

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit commit 08197cb8dff7cd097ab07a325093043c39d19bbd ] Drop redundant code for non-removable feature. "non-removable" property has been read in mmc_of_parse(). Signed-off-by: Yangbo Lu [ set MMC_CAP_NONREMOVABLE in plat->cfg.host_caps ] Signed-off-by: Sean Anderson --- Changes

[PATCH v3 09/12] mmc: fsl_esdhc_imx: simplify esdhc_setup_data()

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 7e48a028a42c111ba38a90b86e5f57dace980fa0 ] First, we need the waterlevel setting for PIO mode only. Secondy, both DMA setup code is identical for both directions, except for the data pointer. Thus, unify them. Signed-off-by: Michael Walle Signed-off-by: Sean Anderson

[PATCH v3 06/12] mmc: fsl_esdhc_imx: fix mmc->clock with actual clock

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 30f6444d024a74ee48aa6969c1531aecd3c59deb ] Fix mmc->clock with actual clock which is divided by the controller, and record it with priv->clock. Signed-off-by: Yangbo Lu Signed-off-by: Sean Anderson Reviewed-by: Jaehoon Chung --- (no changes since v1)

[PATCH v3 07/12] mmc: fsl_esdhc_imx: simplify 64bit check for SDMA transfers

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit da86e8cfcb03ed5c1d8e0718bc8bc8583e60ced8 ] SDMA can only do DMA with 32 bit addresses. This is true for all architectures (just doesn't apply to 32 bit ones). Simplify the code and remove unnecessary CONFIG_FSL_LAYERSCAPE. Also make the error message more concise.

[PATCH v3 08/12] mmc: fsl_esdhc_imx: use dma-mapping API

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit b1ba1460a445bcc67972a617625d0349e4f22b31 ] Use the dma_{map,unmap}_single() calls. These will take care of the flushing and invalidation of caches. Signed-off-by: Michael Walle Signed-off-by: Sean Anderson Reviewed-by: Jaehoon Chung --- (no changes since v1)

[PATCH v3 04/12] mmc: fsl_esdhc_imx: clean up bus width configuration code

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 07bae1de382723b94244096953b05225572728cd ] This patch is to clean up bus width setting code. - For DM_MMC, remove getting "bus-width" from device tree. This has been done in mmc_of_parse(). - For non-DM_MMC, move bus width configuration from fsl_esdhc_init() to

[PATCH v3 03/12] mmc: fsl_esdhc_imx: fix voltage validation

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 5b05fc0310cd933acf76ee661577c6b07a95e684 ] Voltage validation should be done by CMD8. Current comparison between mmc_cfg voltages and host voltage capabilities is meaningless. So drop current comparison and let voltage validation is through CMD8. Signed-off-by: Yangbo Lu

[PATCH v3 02/12] mmc: fsl_esdhc_imx: remove redundant DM_MMC checking

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 2913926f3b3dec282f8773e3c02377c9600d8267 ] Remove redundant DM_MMC checking which is already in DM_MMC conditional compile block. Signed-off-by: Yangbo Lu Signed-off-by: Sean Anderson Reviewed-by: Jaehoon Chung --- (no changes since v1) drivers/mmc/fsl_esdhc_imx.c | 2 --

[PATCH v3 01/12] mmc: fsl_esdhc_imx: make BLK as hard requirement of DM_MMC

2021-11-23 Thread Sean Anderson
[ fsl_esdhc commit 41dec2fe99512e941261594f522b2e7d485c314b ] U-boot prefers DM_MMC + BLK for MMC. Now eSDHC driver has already support it, so let's force to use it. - Drop non-BLK support for DM_MMC introduced by below patch. 66fa035 mmc: fsl_esdhc: fix probe issue without CONFIG_BLK enabled

[PATCH v3 00/12] fsl_esdhc_imx: port several patches from fsl_esdhc

2021-11-23 Thread Sean Anderson
This series ports some of the patches from fsl_esdhc to fsl_esdhc_imx. Because these drivers share a common lineage, many of these patches apply with minor changes. For each one, I have noted the originating commit in the style of linux stable backports. Where I have had to modify patches, I have

Re: [PATCH] tools/mxsimage: Remove fclose on empty FILE pointer

2021-11-23 Thread Fabio Estevam
Hi Mattias, On Tue, Nov 23, 2021 at 4:10 PM Mattias Hansson wrote: > > If `sb_load_cmdfile()` fails to open the configuration file it will jump > to error handling where the code will try to `fclose()` the FILE pointer > which is NULL causing `mkimage` to segfault. > > This patch removes the

[PATCH] board: ast2500/ast2600: initialize LEDs

2021-11-23 Thread Andrei Kartashev
Add option to initialize LEDs in board_init stage for aspeed-based boards. Signed-off-by: Andrei Kartashev --- board/aspeed/evb_ast2500/evb_ast2500.c | 8 board/aspeed/evb_ast2600/evb_ast2600.c | 8 2 files changed, 16 insertions(+) diff --git

[PATCH] tools/mxsimage: Remove fclose on empty FILE pointer

2021-11-23 Thread Mattias Hansson
If `sb_load_cmdfile()` fails to open the configuration file it will jump to error handling where the code will try to `fclose()` the FILE pointer which is NULL causing `mkimage` to segfault. This patch removes the `fclose()` since `fopen()` always returns NULL instead of the file descriptor when

[PATCH 15/17] binman: cbfs: Refactor the init process

2021-11-23 Thread Simon Glass
Update the constructor to work in the recommended way, where the node properties are read in a separate function. This makes it more similar to entry_Section. Signed-off-by: Simon Glass --- tools/binman/etype/cbfs.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

[PATCH 14/17] binman: Use normal entries in cbfs

2021-11-23 Thread Simon Glass
This currently uses _cbfs_entries[] to store entries. Since the entries are in fact valid etypes, we may as well use the same name as entry_Section uses, which is _entries. This allows reusing more of the code there (in a future patch). Signed-off-by: Simon Glass --- tools/binman/etype/cbfs.py

[PATCH 13/17] binman: Move cbfs.ObtainContents() down a bit

2021-11-23 Thread Simon Glass
It is easier to understand this file if reading the entries comes before obtaining the contents, since that is the order in which Binman proceeds. Move the function down a bit. Signed-off-by: Simon Glass --- tools/binman/etype/cbfs.py | 30 +++--- 1 file changed, 15

[PATCH 17/17] binman: Rename testCbfsNoCOntents()

2021-11-23 Thread Simon Glass
Use a lower-case O as was intended. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 3982560c47c..0f4330b6807 100644 --- a/tools/binman/ftest.py +++

[PATCH 16/17] binman: cfbs: Refactor ObtainContents() for consistency

2021-11-23 Thread Simon Glass
Update this to use the same arguments as entry_Section uses. Signed-off-by: Simon Glass --- tools/binman/etype/cbfs.py | 40 ++ 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py index

[PATCH 12/17] binman: Update the section documentation

2021-11-23 Thread Simon Glass
Expand this to explain subclassing better and also to tidy up formatting for rST. Fix a few pylint warnings to avoid dropping the score. Signed-off-by: Simon Glass --- tools/binman/entries.rst | 149 +++--- tools/binman/etype/section.py | 148

[PATCH 11/17] binman: Allow control of which entries to read

2021-11-23 Thread Simon Glass
The ObtainContents() and GetEntryContents() methods in this file read every single entry in the section. This is the common case. However when one of the entries has had its data updated (e.g. with 'binman replace') we don't want to read it again from the file. Allow the entry to be skipped, for

[PATCH 10/17] binman: Allow overriding BuildSectionData()

2021-11-23 Thread Simon Glass
This method is currently marked private. However it is useful to be able to subclass it, since much of the entry_Section code can be reused. Rename it. Also document one confusing part of this code, so people can understand how to add a test for this case. Fix up a few pylint warnings to avoid

[PATCH 09/17] binman: Drop the filename property in entry_Section

2021-11-23 Thread Simon Glass
This is not used and does nothing. Drop it. Add a tweak to avoid reducing the pylint score. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index

[PATCH 08/17] binman: Drop the underscore in _ReadEntries()

2021-11-23 Thread Simon Glass
This function can be overridden so should not have an underscore. Drop it. Signed-off-by: Simon Glass --- tools/binman/etype/blob_phase.py | 2 +- tools/binman/etype/cbfs.py | 4 ++-- tools/binman/etype/files.py | 2 +- tools/binman/etype/section.py| 8 4 files changed,

[PATCH 04/17] binman: Tidy up style in cmdline

2021-11-23 Thread Simon Glass
Update this file to improve the pylint score a little. The remaining item is: Function name "ParseArgs" doesn't conform to snake_case naming style which needs some binman-wide renaming. Signed-off-by: Simon Glass --- scripts/pylint.base | 2 +- tools/binman/cmdline.py | 45

[PATCH 05/17] binman: Add a way to obtain the version

2021-11-23 Thread Simon Glass
Add a -V option which shows the version number of binman. For now this just uses a local 'version' file. Once the tool is packaged in some way we can figure out an approach that suits. Signed-off-by: Simon Glass --- tools/binman/cmdline.py | 29 +

[PATCH 06/17] binman: Correct init of entry in Entry class

2021-11-23 Thread Simon Glass
This should not have an underscore. Drop it so that derived classes can rely on it being set correctly. Signed-off-by: Simon Glass --- tools/binman/entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/entry.py b/tools/binman/entry.py index

[PATCH 03/17] dtoc: Add support for reading fixed-length bytes properties

2021-11-23 Thread Simon Glass
Add functions to read a sequence of bytes from the devicetree. Signed-off-by: Simon Glass --- scripts/pylint.base| 4 ++-- tools/dtoc/fdt_util.py | 20 tools/dtoc/test_fdt.py | 17 + 3 files changed, 39 insertions(+), 2 deletions(-) diff --git

[PATCH 07/17] binman: Correct comments for ReadChildData()

2021-11-23 Thread Simon Glass
The comment here is incomplete. Fix it. Signed-off-by: Simon Glass --- tools/binman/entry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/binman/entry.py b/tools/binman/entry.py index 5e66aa4fa54..2205bc8d923 100644 --- a/tools/binman/entry.py +++

[PATCH 01/17] dtoc: Bring in the libfdt module automatically

2021-11-23 Thread Simon Glass
Use the same technique as with binman to load this module from the U-Boot tree if available. This allows running tests without having to specify the PYTHONPATH variable. Signed-off-by: Simon Glass --- tools/dtoc/test_fdt.py | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 02/17] dtoc: Add support for reading 64-bit ints

2021-11-23 Thread Simon Glass
Add functions to read a 64-bit integer property from the devicetree. Signed-off-by: Simon Glass --- tools/dtoc/fdt_util.py | 35 tools/dtoc/test/dtoc_test_simple.dts | 1 + tools/dtoc/test_dtoc.py | 2 ++ tools/dtoc/test_fdt.py

[PATCH 00/17] binman: Various tidy-ups and refactors

2021-11-23 Thread Simon Glass
This series improves the implementation of the entry_Section class so that it is easier to subclass it. It also updates the documentation in this area and adds support for a few more types in the Fdt class. Using this, the CBFS implementation is tidied up a bit, but is not yet updated to use

[PATCH v2 2/2] bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

2021-11-23 Thread Ariel D'Alessandro
Introduce BSH SystemMaster (SMM) S2 board family, which consists of: iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards. Add support for iMX8MN BSH SMM S2 board: - 256 MiB DDR3 RAM - 512MiB Nand - USBOTG1 peripheral - fastboot. Add support for iMX8MN BSH SMM S2 PRO board: - 512 MiB DDR3 RAM - 8 GiB

[PATCH v2 1/2] imx8m: add regs used by GPMI

2021-11-23 Thread Ariel D'Alessandro
From: Michael Trimarchi Add regs used by GPMI Signed-off-by: Michael Trimarchi Signed-off-by: Ariel D'Alessandro --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h

[PATCH v2 0/2] imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

2021-11-23 Thread Ariel D'Alessandro
Changes in v2: * Properly added MAINTAINERS entry. * Fixed binman configuration. * Picked device tree from kernel. * Removed CONFIG_SPL_BUILD anti-pattern in board config. * Removed downstream stuff in bootargs. * Added board documentation. Ariel D'Alessandro (1): bsh: imx8mn-smm-s2/pro: Add

[PATCH v6 1/1] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-23 Thread Ariel D'Alessandro
Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for: - 1GiB DDR4 RAM - 16 GiB eMMC - SD card - Gigabit ethernet - USBOTG1 peripheral - fastboot Signed-off-by: Ariel D'Alessandro Reviewed-by: Tom Rini Reviewed-by: Fabio Estevam --- arch/arm/dts/Makefile

[PATCH v6 0/1] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-23 Thread Ariel D'Alessandro
Changes in v6: * Fixed typo in documentation. * Removed downstream config option IMX8M_BOARD_INIT_DRAM. Changes in v5: * Fixed documentation. Changes in v4: * Added board documentation. * Cleaned up board config. Changes in v3: * Picked device tree from kernel. * Properly added MAINTAINERS

[PATCH] efi_loader: Check for pointers before appending to the eventlog

2021-11-23 Thread Ilias Apalodimas
The TCG protocol returns EFI_SUCCESS even when it fails to install. If the protocol is not installed there should be no calls to tcg2_agile_log_append(). However there are calls to this function occurring outside the TCG protocol invocation (e.g tcg2_measure_pe_image). Let's deal with this and

Re: [RFC] binman: add support for creating dummy files for external blobs

2021-11-23 Thread Simon Glass
Hi Heiko, On Tue, 16 Nov 2021 at 03:47, Heiko Thiery wrote: > > While converting to binman for an imx8mq board, it has been found that > building in the u-boot CI fails. This is because an imx8mq requires an > external binary (signed_hdmi_imx8m.bin). If this file cannot be found > mkimage fails.

Re: [PATCH u-boot-marvell 02/10] arm: mvebu: a38x: serdes: Move non-serdes PCIe code to pci_mvebu.c

2021-11-23 Thread Pali Rohár
On Friday 19 November 2021 07:55:00 Stefan Roese wrote: > On 11/18/21 19:01, Pali Rohár wrote: > > On Friday 12 November 2021 15:01:57 Stefan Roese wrote: > > > On 11/11/21 16:35, Marek Behún wrote: > > > > From: Pali Rohár > > > > > > > > As explained in commit 3bedbcc3aa18 ("arm: mvebu: a38x:

Re: [RFC] binman: add support for creating dummy files for external blobs

2021-11-23 Thread Heiko Thiery
Hi Stefano, Am Di., 23. Nov. 2021 um 16:44 Uhr schrieb Stefano Babic : > > On 23.11.21 16:29, Tom Rini wrote: > > On Tue, Nov 16, 2021 at 11:47:10AM +0100, Heiko Thiery wrote: > > > >> While converting to binman for an imx8mq board, it has been found that > >> building in the u-boot CI fails.

Re: [RFC] binman: add support for creating dummy files for external blobs

2021-11-23 Thread Stefano Babic
On 23.11.21 16:29, Tom Rini wrote: On Tue, Nov 16, 2021 at 11:47:10AM +0100, Heiko Thiery wrote: While converting to binman for an imx8mq board, it has been found that building in the u-boot CI fails. This is because an imx8mq requires an external binary (signed_hdmi_imx8m.bin). If this file

Re: [PATCH V2] clk: introduce u-boot,ignore-clk-defaults

2021-11-23 Thread Tom Rini
On Tue, Nov 23, 2021 at 03:02:45AM +, Peng Fan (OSS) wrote: > > Subject: Re: [PATCH V2] clk: introduce u-boot,ignore-clk-defaults > > > > On Mon, Nov 22, 2021 at 11:33:27AM +0800, Peng Fan (OSS) wrote: > > > + Rob > > > > > > On 2021/11/20 20:57, Tom Rini wrote: > > > > On Sat, Nov 20, 2021

Re: Please pull u-boot-net/next [v3]

2021-11-23 Thread Tom Rini
On Tue, Nov 23, 2021 at 11:04:18AM +0200, Ramon Fried wrote: > Hi, Tom. > > this PR includes the following net changes for next: > > - Various DSA additions > - bootp: fix for VCI string > - tsec: support for promiscuous mode > - add Aspeed MDIO driver > > Changed: > v2: removed netlist patch.

Re: [RFC] binman: add support for creating dummy files for external blobs

2021-11-23 Thread Tom Rini
On Tue, Nov 16, 2021 at 11:47:10AM +0100, Heiko Thiery wrote: > While converting to binman for an imx8mq board, it has been found that > building in the u-boot CI fails. This is because an imx8mq requires an > external binary (signed_hdmi_imx8m.bin). If this file cannot be found > mkimage fails.

Re: [RFC PATCH 0/5] Exception handling in HYP mode on ARMv7-A

2021-11-23 Thread Tom Rini
On Sun, Oct 24, 2021 at 07:58:03PM -0400, Jim Posen wrote: > Currently, when U-Boot is running in hypervisor mode on ARMv7-A CPUs > with virtualization extensions, the exception handling does not work. > A couple things need to change which are detailed in my earlier > message to the u-boot

Re: [PATCH v2] board: stemmy: Increase boot image to 64 MB

2021-11-23 Thread Stephan Gerhold
On Sat, Nov 20, 2021 at 11:55:42PM +0100, Linus Walleij wrote: > When using a recent kernel with a bunch of compiled-in > stuff the kernel image easily becomes bigger than 8 MB > yielding this error: > > Loading Kernel Image > Image too large: increase CONFIG_SYS_BOOTM_LEN > Must RESET

RE: [EXT] RE: [PATCH v5 11/16] crypto/fsl: Fix kick_trng

2021-11-23 Thread Gaurav Jain
Hello Michael > -Original Message- > From: Michael Walle > Sent: Tuesday, November 23, 2021 4:22 PM > To: Gaurav Jain > Cc: ZHIZHIKIN Andrey ; u- > b...@lists.denx.de; Stefano Babic ; Fabio Estevam > ; Peng Fan ; Simon Glass > ; Priyanka Jain ; Ye Li > ; Horia Geanta ; Ji Luo > ; Franck

[v2] [PATCH 3/3] efi_loader: Extend PCR's for firmware measurements

2021-11-23 Thread Ruchika Gupta
Firmwares before U-Boot may be capable of doing tpm measurements and passing them to U-Boot in the form of eventlog. However there may be scenarios where the firmwares don't have TPM driver and are not capable of extending the measurements in the PCRs. Based on TCG spec, if previous firnware has

[v2] [PATCH 2/3] tpm: use more algorithms than sha256 on pcr_read

2021-11-23 Thread Ruchika Gupta
The current tpm2_pcr_read is hardcoded using SHA256. Make the actual command to TPM configurable to use wider range of algorithms. The current command line is kept as is i.e limited to SHA-256 only. Signed-off-by: Ruchika Gupta --- v2: Change algorithm from u32 to u16 Add parameter description

[v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ruchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added

[v2] [PATCH 3/3] efi_loader: Extend PCR's for firmware measurements

2021-11-23 Thread Ruchika Gupta
Firmwares before U-Boot may be capable of doing tpm measurements and passing them to U-Boot in the form of eventlog. However there may be scenarios where the firmwares don't have TPM driver and are not capable of extending the measurements in the PCRs. Based on TCG spec, if previous firnware has

[v2] [PATCH 2/3] tpm: use more algorithms than sha256 on pcr_read

2021-11-23 Thread Ruchika Gupta
The current tpm2_pcr_read is hardcoded using SHA256. Make the actual command to TPM configurable to use wider range of algorithms. The current command line is kept as is i.e limited to SHA-256 only. Signed-off-by: Ruchika Gupta --- v2: Change algorithm from u32 to u16 Add parameter description

[v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ruchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added

[PATCH] pci: layerscape: update the searching compatible of LX2160A PCIe

2021-11-23 Thread Zhiqiang Hou
From: Hou Zhiqiang The current fixup of LX2160A PCIe nodes is based on non-production rev1 silicon, and in Linux the nodes have been updated for rev2 silicon, so update the searching compatible string to match the kernel changes. And for compatibility with the rev1 nodes, move forward the board

Re: [EXT] RE: [PATCH v5 11/16] crypto/fsl: Fix kick_trng

2021-11-23 Thread Michael Walle
Hi Gaurav, Am 2021-11-23 11:44, schrieb Gaurav Jain: > fix hwrng performance issue in kernel. This patch is missing some context information, specifically which performance issue does exist in the Kernel (with some quantification), and how is it addressed here. This function introduced

RE: [EXT] RE: [PATCH v5 11/16] crypto/fsl: Fix kick_trng

2021-11-23 Thread Gaurav Jain
Hello Andrey > -Original Message- > From: ZHIZHIKIN Andrey > Sent: Tuesday, November 23, 2021 1:15 AM > To: Gaurav Jain ; u-boot@lists.denx.de > Cc: Stefano Babic ; Fabio Estevam ; > Peng Fan ; Simon Glass ; Priyanka > Jain ; Ye Li ; Horia Geanta > ; Ji Luo ; Franck Lenormand > ; Silvano

Re: [PATCH 1/2] riscv: Support booting SiFive Unmatched from SPI.

2021-11-23 Thread Leo Liang
Hi Thomas, This patch does not apply. Could you rebase this patchset onto master and then send it again? Thanks! Best regards, Leo On Mon, Sep 27, 2021 at 12:59:37PM -0700, Thomas Skibo wrote: > Configure SPI flash devices into SPL. Add SPI boot option to spl.c. > Document how to format flash

RE: [PATCH] board: ls1043ardb: force PCI device enumeration

2021-11-23 Thread Camelia Alexandra Groza (OSS)
> -Original Message- > From: U-Boot On Behalf Of Martin Schiller > Sent: Tuesday, November 23, 2021 8:28 > To: u-boot@lists.denx.de > Cc: Martin Schiller ; Priyanka Jain > ; Camelia Alexandra Groza > > Subject: [PATCH] board: ls1043ardb: force PCI device enumeration > > Commit

RE: [EXT] RE: [PATCH v5 01/16] crypto/fsl: Add support for CAAM Job ring driver model

2021-11-23 Thread ZHIZHIKIN Andrey
Hello Gaurav, > -Original Message- > From: Gaurav Jain > Sent: Tuesday, November 23, 2021 8:22 AM > To: ZHIZHIKIN Andrey ; u- > b...@lists.denx.de > Cc: Stefano Babic ; Fabio Estevam ; Peng > Fan > ; Simon Glass ; Priyanka Jain > ; Ye Li ; Horia Geanta > ; Ji Luo ; Franck Lenormand > ;

  1   2   >