Re: [PATCH] riscv: timer: Add support for an early timer

2020-11-26 Thread Rick Chen
Hi, Pragnesh > Hi Rick, > > >-Original Message- > >From: Rick Chen > >Sent: 26 November 2020 14:44 > >To: Pragnesh Patel > >Cc: Simon Glass ; U-Boot Mailing List >b...@lists.denx.de>; Atish Patra ; Bin Meng > >; Paul Walmsley ( Sifive) ; > >Anup Patel ; Sagar Kadam > >; Palmer Dabbelt ;

[PATCH v2] tpm: use more than sha256 on pcr_extend

2020-11-26 Thread Ilias Apalodimas
The current tpm2_pcr_extend is hardcoded using SHA256. Let's make the actual command to the TPM2 configurable so we can support a wider range of algorithms and keep the current command line as-is i.e limited to SHA256 only Signed-off-by: Ilias Apalodimas Reviewed-by: Simon Glass --- changes sinc

[PATCH 1/1] common: always compile fixup_cmdtable()

2020-11-26 Thread Heinrich Schuchardt
With our optimization settings the linker eliminates unused functions. But for debugging it is better to compile with -Og or -O0. With -O0 compiling the sandbox fails due to the missing function fixup_cmdtable() called by dm_reloc() and others. Signed-off-by: Heinrich Schuchardt --- common/comm

[PATCH 10/14] efi_loader: Re-factor code to build the signature store from efi signature list

2020-11-26 Thread Sughosh Ganu
The efi_sigstore_parse_sigdb function reads the uefi authenticated variable, stored in the signature database format and builds the signature store structure. Factor out the code for building the signature store. This can then be used by the capsule authentication routine to build the signature sto

[PATCH 13/14] efidebug: capsule: Add a command to update capsule on disk

2020-11-26 Thread Sughosh Ganu
Add a efidebug subcommand to initiate a firmware update using the efi firmware management protocol(fmp) set_image routine. The firmware update can be initiated through 'efidebug capsule disk-update' This would locate the efi capsule file on the efi system partition, and call the platform's set_i

[PATCH 14/14] qemu: arm64: Add documentation for capsule update

2020-11-26 Thread Sughosh Ganu
Add documentation highlighting the steps for using the uefi capsule update feature for updating the u-boot firmware image. Signed-off-by: Sughosh Ganu --- doc/board/emulation/qemu-arm.rst | 157 +++ 1 file changed, 157 insertions(+) diff --git a/doc/board/emulation/q

[PATCH 12/14] efi_loader: Enable uefi capsule authentication

2020-11-26 Thread Sughosh Ganu
Add support for enabling uefi capsule authentication. This feature is enabled by setting the environment variable "capsule_authentication_enabled". The following configs are needed for enabling uefi capsule update and capsule authentication features on the platform. CONFIG_EFI_HAVE_CAPSULE_SUPPOR

[PATCH 11/14] efi: capsule: Add support for uefi capsule authentication

2020-11-26 Thread Sughosh Ganu
Add support for authenticating uefi capsules. Most of the signature verification functionality is shared with the uefi secure boot feature. The root certificate containing the public key used for the signature verification is stored as part of the device tree blob. The root certificate is stored a

[PATCH 09/14] efi_loader: Make the pkcs7 header parsing function an extern

2020-11-26 Thread Sughosh Ganu
The pkcs7 header parsing functionality is pretty generic, and can be used by other features like capsule authentication. Make the function an extern, also changing it's name to efi_parse_pkcs7_header Signed-off-by: Sughosh Ganu --- include/efi_loader.h | 4 ++ lib/efi_loader/efi_signa

[PATCH 08/14] dfu_mtd: Add provision to unlock mtd device

2020-11-26 Thread Sughosh Ganu
Prior to writing to an mtd device, mtd_erase is called. This call fails in case the sector being erased is locked. Call mtd_unlock to unlock the region which is to be erased and later written to. Lock the region once the write to the region has completed. Signed-off-by: Sughosh Ganu --- drivers/

[PATCH 07/14] efi_loader: Add config option to indicate fmp header presence

2020-11-26 Thread Sughosh Ganu
When building the capsule using scripts in edk2, an fmp header is added on top of the binary payload. Add a config option to indicate the presence of the header. When enabled, the pointer to the image needs to be adjusted as per the size of the header to point to the actual binary payload. Signed-

[PATCH 06/14] qemu: arm64: Set dfu_alt_info variable for the platform

2020-11-26 Thread Sughosh Ganu
The dfu framework uses the dfu_alt_info environment variable to get information that is needed for performing the firmware update. Set the dfu_alt_info for the platform to reflect the two mtd partitions created for the u-boot env and the firmware image. Signed-off-by: Sughosh Ganu --- board/emul

[PATCH 05/14] qemu: arm64: Add support for dynamic mtdparts for the platform

2020-11-26 Thread Sughosh Ganu
Add support for setting the default values for mtd partitions on the platform for the nor flash. This would be used for updating the firmware image using uefi capsule update with the dfu mtd backend driver. Signed-off-by: Sughosh Ganu --- board/emulation/qemu-arm/qemu-arm.c | 70

[PATCH 04/14] crypto: Fix the logic to calculate hash with authattributes set

2020-11-26 Thread Sughosh Ganu
RFC 2315 Section 9.3 describes the message digesting process. The digest calculated depends on whether the authenticated attributes are present. In case of a scenario where the authenticated attributes are present, the message digest that gets signed and is part of the pkcs7 message is computed fro

[PATCH 03/14] qemu: arm: Scan the pci bus in board_init

2020-11-26 Thread Sughosh Ganu
Scan the pci bus in board_init routine before scanning the virtio devices. This enumerates all the virtio devices, including devices found on the pci bus. Signed-off-by: Sughosh Ganu --- board/emulation/qemu-arm/qemu-arm.c | 8 1 file changed, 8 insertions(+) diff --git a/board/emulati

[PATCH 02/14] mkeficapsule: Add support for embedding public key in a dtb

2020-11-26 Thread Sughosh Ganu
Add options for embedding the public key esl(efi signature list) file to the platform's dtb. The esl file is then retrieved and used for authenticating the capsule to be used for updating firmare components on the platform. The esl file can now be embedded in the dtb by invoking the following comm

[PATCH 01/14] qemu: arm: Use the generated DTB only when CONGIG_OF_BOARD is defined

2020-11-26 Thread Sughosh Ganu
The Qemu platform emulator generates a device tree blob and places it at the start of the dram, which is then used by u-boot. Use this dtb only if CONFIG_OF_BOARD is defined. This allows using a different device tree, using the CONFIG_OF_SEPARATE option. This dtb is attached to the u-boot binary as

[PATCH 00/14] qemu: arm64: Add support for uefi capsule update on qemu arm64 platform

2020-11-26 Thread Sughosh Ganu
The following series adds support for the uefi capsule update feature on the qemu arm64 platform, along with adding support for the capsule authentication feature. The capsule update feature is supported on a platform configuration booting in a non-secure mode, i.e with -machine virt,secure=off

Re: [BUG] mvebu pci auto config broken

2020-11-26 Thread Stefan Roese
Hi Ake, On 25.11.20 11:47, Ake Rehnman wrote: Hello all, it seems since the transition to DM for pci marvell mvebu does not work... autoconfig tries to configure the memory controller but it seems to trash the configuration made by mvebu_pcie_probe(). Also pci enumeration command does not wor

Re: [PATCH 0/2] *** Add support for Mediatek mt762x SoC ***

2020-11-26 Thread SkyLake Huang
HiJagan, On Fri, 2020-11-13 at 11:02 +0800, SkyLake Huang wrote: > From: "SkyLake.Huang" > > This patch adds support MTK's SPI NOR controller on > mt7622 & mt7629. With this controller, you can access > SPI NOR with better performance on mt762x platform. > > SkyLake.Huang (2): > spi: mtk_snor

Re: [PATCH 3/3] patman: fix project-defaults not propagating into parsers

2020-11-26 Thread Philipp Tomsich
Simon, On Wed, 25 Nov 2020 at 16:30, Simon Glass wrote: > Here is a pointer to the docs I saw: > > https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.set_defaults > > "Parser-level defaults can be particularly useful when working with > multiple parsers. See the add_subparser

Re: [PATCH 3/3] patman: fix project-defaults not propagating into parsers

2020-11-26 Thread Philipp Tomsich
Simon, On Wed, 25 Nov 2020 at 00:41, Simon Glass wrote: > According to the Python documentation and my testing, it should > propagate. Do you know what is going wrong here? If there is a > problem, we should update the comment. I don't see any code for propagating this in the argparse module:

Re: [PATCH 3/3] patman: fix project-defaults not propagating into parsers

2020-11-26 Thread Philipp Tomsich
Simon, On Wed, 25 Nov 2020 at 00:41, Simon Glass wrote: > > > Project defaults (e.g. for linux and gcc) do not propagate into the > > subparsers. As both the processing of tags (e.g. in the defaults > > for the linux project) and supressing the signoff (in the defaults > > for the gcc project) a

RE: [PATCH] added check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition

2020-11-26 Thread Manuel Reis
Hi, thanks for the feedback. Just sent a new corrected patch with fixed commit message title: [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition. regards, Manuel On qua, 25 nov, 2020 at 08:45, Patrick DELAUNAY wrote: Hi, From: Manuel Reis Sent: dimanche 22 nove

[PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition

2020-11-26 Thread Manuel Reis
Check whether user has explicitly defined device and partition where environment file will be located before using 'auto' i.e. bootable partition Voids the need to set such partition as bootable to work with the 'dev:auto' tuple Signed-off-by: Manuel Reis Cc: Patrick Delaunay Cc: Patrice Chotar

[no subject]

2020-11-26 Thread Manuel Reis
Hi, thanks for feedback. sending new squash commit with grouped variables and code, and corrected git message for initial patch sent: [PATCH] added check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART hope this is better now. regards, manuel

[PATCH] arm: ls102xa: select USB PHY erratum's only if USB support is enabled

2020-11-26 Thread Aleksandar Gerasimovski
The USB support is not by default enabled on all designs, so it does not make seance to have USB specific erratum's enabled on such a designs. On our internal Hitachi-Powergrids design not using the USB controller there is a crash when accessing those specific memory locations selected by the erra

[PATCH] drivers: ifc: add define for IFC_CSPRn TE bit

2020-11-26 Thread Aleksandar Gerasimovski
To drive TE pin high is supported IFC configuration that can be used on some designs. Signed-off-by: Aleksandar Gerasimovski --- include/fsl_ifc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h index fd91533..e1e6214 100644 --- a/include/fsl_ifc.h ++

[BUG] mvebu pci auto config broken

2020-11-26 Thread Ake Rehnman
Hello all, it seems since the transition to DM for pci marvell mvebu does not work... autoconfig tries to configure the memory controller but it seems to trash the configuration made by mvebu_pcie_probe(). Also pci enumeration command does not work. Here are my patches: diff --git a/drivers/pc

Re: [BUG] U-boot does not detect emmc card in odroid-c2 for newer U-boot as 2020.04

2020-11-26 Thread Otto Meier
Hi, I bisected it and this is the result: dd5f2351e99aad8fcbedbc1305b8b51b09952336 is the first bad commit commit dd5f2351e99aad8fcbedbc1305b8b51b09952336 Author: Jerome Brunet Date: Thu Mar 5 12:12:38 2020 +0100 arm64: dts: meson: sync dt and bindings from v5.6-rc2 Sync the d

[PATCH] arm: at91: configs: Enable CONFIG_SYS_NAND_USE_FLASH_BBT on all boards

2020-11-26 Thread Eugen Hristev
From: Nicolas Ferre As highlighted by Stefan in the commit e074d0f79b2e ("arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT") it's important to use BBT when Linux enables it. We use it for a long time on all our boards. Signed-off-by: Nicolas Ferre Cc: Stefan Roese

Re: [PATCH] ARM: at91: armv7: sama7g5 uses CCF clock driver

2020-11-26 Thread Eugen.Hristev
On 11.11.2020 13:15, Eugen Hristev wrote: > From: Nicolas Ferre > > SAMA7G5 uses CCF driver under drivers/clk/at91/ and not the custom older > at91 clock.c driver. Remove it from the compilation list and adapt cpu.c > arch_cpu_init() to avoid calling at91_clock_init() which is wrong > anyway. >

Re: [PATCH] ARM: mach-at91: fix timer.o compile condition

2020-11-26 Thread Eugen.Hristev
On 11.11.2020 18:46, Eugen Hristev wrote: > The AT91 architecture now has two possible timer blocks, the old PIT timer > and the new PIT64B. > The timer.c file has an old non DM driver that works for platforms > that do not use the ATMEL_PIT_TIMER DM-based driver. > Update the Makefile to select th

Re: [PATCH] ARM: dts: at91: sam9x60: enable slewrate/high drive for sdhci0 pinout

2020-11-26 Thread Eugen.Hristev
On 09.11.2020 17:35, Eugen Hristev wrote: > Align the pin setup for sdhci0 with linux kernel. > This means to have slew rate enable and high drive strength. > > Signed-off-by: Eugen Hristev > --- Applied to u-boot-atmel/master

Re: [PATCH v2] mmc: atmel-sdhci: fix the clk_enable call in case of no ops

2020-11-26 Thread Eugen.Hristev
On 09.11.2020 14:14, Jaehoon Chung wrote: > On 11/9/20 8:02 PM, Eugen Hristev wrote: >> If the clock driver does not offer a clk_enable ops, then the system will >> return -ENOSYS. >> The clk_enable works with CCF (common clock framework). >> Some clocks in some cases (like the generic clock for so

Re: [PATCH] arm: at91: configs: Enable CONFIG_SYS_NAND_USE_FLASH_BBT on all boards

2020-11-26 Thread Alexander Dahl
Hello, Am Donnerstag, 26. November 2020, 09:21:35 CET schrieb Eugen Hristev: > From: Nicolas Ferre > > As highlighted by Stefan in the commit e074d0f79b2e ("arm: at91: > gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT") > it's important to use BBT when Linux enables it. We us

Re: [PATCH 1/5 v2] mips: start.S: Add Octeon boot header compatibility

2020-11-26 Thread Stefan Roese
Hi Daniel, On 28.10.20 15:09, Stefan Roese wrote: Octeon has a specific boot header, when booted via SPI NOR, NAND or MMC. Here the only 2 instructions are allowed in the first few bytes of the image. And these instructions need to be one branch and a nop. This patch adds the necessary nop after

RE: [PATCH] riscv: timer: Add support for an early timer

2020-11-26 Thread Pragnesh Patel
Hi Rick, >-Original Message- >From: Rick Chen >Sent: 26 November 2020 14:44 >To: Pragnesh Patel >Cc: Simon Glass ; U-Boot Mailing List b...@lists.denx.de>; Atish Patra ; Bin Meng >; Paul Walmsley ( Sifive) ; >Anup Patel ; Sagar Kadam >; Palmer Dabbelt ; rick >; Alan Kao ; Leo Liang > >Su

Re: [BUG] U-boot does not detect emmc card in odroid-c2 for newer U-boot as 2020.04

2020-11-26 Thread Otto Meier
Hi Am 26.11.20 um 04:13 schrieb Jaehoon Chung: Hi, On 11/19/20 11:39 PM, Otto Meier wrote: Hi, with these modifications i get: U-Boot 2021.01-rc2-00047-g9324c9a823-dirty (Nov 19 2020 - 15:33:00 +0100)  odroid-c2 Model: Hardkernel ODROID-C2 SoC:   Amlogic Meson GXBB (S905) Revision 1f:c (0

[PATCH v2] cmd: Add a pwm command

2020-11-26 Thread Pragnesh Patel
Add the command "pwm" for controlling the pwm channels. This command provides pwm invert/config/enable/disable functionalities via PWM uclass drivers Signed-off-by: Pragnesh Patel --- Changes in v2: - Add test for pwm command README| 1 + cmd/Kconfig | 6

Re: [PATCH] Add fdtfile for Marvell Armada 37xx default environment

2020-11-26 Thread Andre Heider
On 26/11/2020 10:04, Matwey V. Kornilov wrote: чт, 26 нояб. 2020 г. в 06:45, Andre Heider >: On 25/11/2020 10:14, Matwey V. Kornilov wrote: > Signed-off-by: Matwey V. Kornilov mailto:matwey.korni...@gmail.com>> > --- >   configs/mvebu_db-88f3720_d

Re: [PATCH] riscv: timer: Add support for an early timer

2020-11-26 Thread Rick Chen
Hi Pragnesh > Hi Rick, > > >-Original Message- > >From: Rick Chen > >Sent: 24 November 2020 13:08 > >To: Pragnesh Patel > >Cc: U-Boot Mailing List ; Atish Patra > >; Bin Meng ; Paul Walmsley ( > >Sifive) ; Anup Patel ; Sagar > >Kadam ; Palmer Dabbelt ; > >Simon Glass ; rick ; Alan Kao >

Re: [PATCH] Add fdtfile for Marvell Armada 37xx default environment

2020-11-26 Thread Matwey V. Kornilov
чт, 26 нояб. 2020 г. в 06:45, Andre Heider : > On 25/11/2020 10:14, Matwey V. Kornilov wrote: > > Signed-off-by: Matwey V. Kornilov > > --- > > configs/mvebu_db-88f3720_defconfig | 1 + > > configs/mvebu_espressobin-88f3720_defconfig | 1 + > > include/configs/mvebu_armada-37xx.h