Re: [U-Boot] [RFC PATCH] rockchip: tinker: Add boot from capability

2019-11-12 Thread Michael Nazzareno Trimarchi
Hi Kever On Wed, Nov 13, 2019 at 2:03 AM Kever Yang wrote: > > > On 2019/11/12 下午6:02, Michael Nazzareno Trimarchi wrote: > > Hi Kever > > > > On Tue, Nov 12, 2019 at 10:57 AM Kever Yang > > wrote: > >> Hi Michael, > >> > >> On 2019/11/12 下午4:14, Michael Trimarchi wrote: > >>> We need to know

Re: [U-Boot] [BUG] U-Boot hangs on fatload, commit ee88eacbdd840199a3dec707234579fb15ddd46a

2019-11-12 Thread Heinrich Schuchardt
On 11/12/19 11:55 PM, Gray Remlin wrote: On Tue, 12 Nov 2019 at 19:50, Heinrich Schuchardt > wrote: On 11/11/19 6:14 PM, Gray Remlin wrote: > > This content is getting very convoluted, if appropriate feel free to > crop it. > New point

[U-Boot] [PATCH v4] armv8: Add workaround for USB erratum A-050106

2019-11-12 Thread Ran Wang
USB3.0 Receiver needs to enable fixed equalization for each of PHY instances in an SOC. This is similar to erratum A-009007, but this one is for LX2160A, and the register value is different. Signed-off-by: Ran Wang --- Change in v4: - Include defines of USB_PHY_RX_EQ_VAL_3 and

Re: [U-Boot] [PATCH v3 6/6] mx7ulp: Add support for Embedded Artists COM board

2019-11-12 Thread Peng Fan
> Subject: Re: [PATCH v3 6/6] mx7ulp: Add support for Embedded Artists COM > board > > Hi Stefano and Peng, > > Any comments, please? I'll help collect patches if Stefano not pick up. Regards, Peng. > > Thanks > > On Tue, Nov 5, 2019 at 9:48 AM Fabio Estevam > wrote: > > > > The Embedded

Re: [U-Boot] [PATCH] armv8: layerscape: set HWCONFIG_BUFFER_SIZE

2019-11-12 Thread Priyanka Jain
>-Original Message- >From: Michael Walle >Sent: Tuesday, November 12, 2019 2:20 PM >To: Priyanka Jain >Cc: u-boot@lists.denx.de; Tom Rini >Subject: Re: [U-Boot] [PATCH] armv8: layerscape: set HWCONFIG_BUFFER_SIZE > >Am 2019-11-11 16:20, schrieb Priyanka Jain: >>> -Original

Re: [U-Boot] [PATCH 4/8] riscv: andes_plic: Fix some wrong configurations

2019-11-12 Thread Rick Chen
Hi Lukas > > Hi Rick, > > On Mon, 2019-11-11 at 15:19 +0800, Rick Chen wrote: > > Hi Lukas > > > > > Hi Rick, > > > > > > On Fri, 2019-11-08 at 15:27 +0800, Rick Chen wrote: > > > > Hi Atish > > > > > > > > > Hi Atish > > > > > > > > > > > On Thu, 2019-11-07 at 19:41 +0800, Rick Chen wrote: > > >

Re: [U-Boot] [PATCH 1/4] arm64: dts: rk3399-rock960: add vdd_log and its init value

2019-11-12 Thread Manivannan Sadhasivam
On Wed, Nov 13, 2019 at 11:14:09AM +0800, Kever Yang wrote: > Add vdd_log node according to rock960 schematic V13. > This patch affect two boards: > - Rock960 Model A > - Ficus > > Signed-off-by: Kever Yang Acked-by: Manivannan Sadhasivam Thanks, Mani > --- > >

[U-Boot] [PATCH 3/4] rockchip: rk3399: khadas-edge: Add init value for vdd_log

2019-11-12 Thread Kever Yang
We should set the init value when vdd_log is enabled, or else the vdd_log output voltage may not in soc required range. Signed-off-by: Kever Yang --- arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi

[U-Boot] [PATCH 4/4] rockchip: rk3399: orangepi: Add init value for vdd_log

2019-11-12 Thread Kever Yang
We should set the init value when vdd_log is enabled, or else the vdd_log output voltage may not in soc required range. Signed-off-by: Kever Yang --- arch/arm/dts/rk3399-orangepi-u-boot.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/rk3399-orangepi-u-boot.dtsi

[U-Boot] [PATCH 2/4] rockchip: rk3399: rock-pi4: Add init value for vdd_log

2019-11-12 Thread Kever Yang
We should set the init value when vdd_log is enabled, or else the vdd_log output voltage may not in soc required range. Signed-off-by: Kever Yang --- arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi

[U-Boot] [PATCH 1/4] arm64: dts: rk3399-rock960: add vdd_log and its init value

2019-11-12 Thread Kever Yang
Add vdd_log node according to rock960 schematic V13. This patch affect two boards: - Rock960 Model A - Ficus Signed-off-by: Kever Yang --- arch/arm/dts/rk3399-rock960-u-boot.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/dts/rk3399-rock960-u-boot.dtsi

Re: [U-Boot] [RFC PATCH] rockchip: tinker: Add boot from capability

2019-11-12 Thread Kever Yang
On 2019/11/12 下午6:02, Michael Nazzareno Trimarchi wrote: Hi Kever On Tue, Nov 12, 2019 at 10:57 AM Kever Yang wrote: Hi Michael, On 2019/11/12 下午4:14, Michael Trimarchi wrote: We need to know from what device we are booting Please make sure board_spl_was_booted_from() works for rk3288,

[U-Boot] [PATCH 00/16] efi_loader: add secure boot support

2019-11-12 Thread AKASHI Takahiro
One of major missing features in current UEFI implementation is "secure boot." The ultimate goal of my attempt is to implement image authentication based on signature and provide UEFI secure boot support which would be fully compliant with UEFI specification, section 32[1]. (The code was

[U-Boot] [PATCH 06/16] efi_loader: add signature database parser

2019-11-12 Thread AKASHI Takahiro
efi_signature_parse_sigdb() is a helper function will be used to parse signature database variable and instantiate a signature store structure in later patches. Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 3 + lib/efi_loader/efi_signature.c | 227

[U-Boot] [PATCH 16/16] efi_loader, pytest: add UEFI secure boot tests (image)

2019-11-12 Thread AKASHI Takahiro
Provide test cases for * image authentication for signed images (test_efi_secboot/test_signed.py) * image authentication for unsigned images (test_efi_secboot/test_unsigned.py) Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_secboot/test_signed.py | 97 +

[U-Boot] [PATCH 08/16] efi_loader: variable: add secure boot state transition

2019-11-12 Thread AKASHI Takahiro
UEFI specification defines several global variables which are related to the current secure boot state. In this commit, those values will be maintained according to operations. Currently, AuditMode and DeployedMode are defined but not implemented. Signed-off-by: AKASHI Takahiro ---

[U-Boot] [PATCH 14/16] efi_loader, pytest: set up secure boot environment

2019-11-12 Thread AKASHI Takahiro
A fixture for UEFI secure boot tests (image authentication and variable authentication) is defined. A small file system with test data in a single partition formatted in fat is created. This test requires efitools v1.5.2 or later. If the system's efitools is older, you have to build it on your

[U-Boot] [PATCH 09/16] efi_loader: variable: add VendorKeys variable

2019-11-12 Thread AKASHI Takahiro
The following variable is exported as UEFI specification defines: VendorKeys: whether the system is configured to use only vendor-provided keys or not The value will have to be modified if a platform has its own way of initializing signature database, in particular, PK. Signed-off-by:

[U-Boot] [PATCH 01/16] include: pe.h: add signature-related definitions

2019-11-12 Thread AKASHI Takahiro
The index (IMAGE_DIRECTORY_ENTRY_CERTTABLE) in a table points to a region containing authentication information (image's signature) in PE format. WIN_CERTIFICATE structure defines an embedded signature format. Those definitions will be used in my UEFI secure boot patch. Signed-off-by: AKASHI

[U-Boot] [PATCH 07/16] efi_loader: variable: support variable authentication

2019-11-12 Thread AKASHI Takahiro
With this commit, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS is supported for authenticated variables and the system secure state will transfer between setup mode and user mode as UEFI specification section 32.3 describes. Internally, authentication data is stored as part of authenticated

[U-Boot] [PATCH v3 0/6] rsa: extend rsa_verify() for UEFI secure boot

2019-11-12 Thread AKASHI Takahiro
# This patch set is a prerequisite for UEFI secure boot. The current rsa_verify() requires five parameters for a RSA public key for efficiency while RSA, in theory, requires only two. In addition, those parameters are expected to come from FIT image. So this function won't fit very well when we

[U-Boot] [PATCH 04/16] efi_loader: add CONFIG_EFI_SECURE_BOOT config option

2019-11-12 Thread AKASHI Takahiro
Under this configuration, UEFI secure boot support will be added in later patches. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/Kconfig | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index c7027a967653..fb66766d2b7a 100644

[U-Boot] [PATCH 12/16] cmd: env: use appropriate guid for authenticated UEFI variable

2019-11-12 Thread AKASHI Takahiro
A signature database variable is associated with a specific guid. For convenience, if user doesn't supply any guid info, "env set|print -e" should complement it. Signed-off-by: AKASHI Takahiro --- cmd/nvedit_efi.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff

[U-Boot] [PATCH v3 6/6] test: add rsa_verify() unit test

2019-11-12 Thread AKASHI Takahiro
In this patch, a very simple test is added to verify that rsa_verify() using rsa_verify_with_pkey() work correctly. To keep the code simple, all the test data, either public key and verified binary data, are embedded in the source. Signed-off-by: AKASHI Takahiro --- test/Kconfig | 12 +++

[U-Boot] [PATCH 13/16] cmd: env: add "-at" option to "env set -e" command

2019-11-12 Thread AKASHI Takahiro
With "-at" option, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS will be passed to SetVariable() to authenticate the variable. Signed-off-by: AKASHI Takahiro --- cmd/nvedit.c | 5 +++-- cmd/nvedit_efi.c | 5 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git

[U-Boot] [PATCH 10/16] efi_loader: image_loader: support image authentication

2019-11-12 Thread AKASHI Takahiro
With this commit, image validation can be enforced, as UEFI specification section 32.5 describes, if CONFIG_EFI_SECURE_BOOT is enabled. Currently we support * authentication based on db and dbx, so dbx-validated image will always be rejected. * following signature types:

[U-Boot] [PATCH v3 5/6] lib: rsa: add rsa_verify_with_pkey()

2019-11-12 Thread AKASHI Takahiro
This function, and hence rsa_verify(), will perform RSA verification with two essential parameters for a RSA public key in contract of rsa_verify_with_keynode(), which requires additional three parameters stored in FIT image. It will be used in implementing UEFI secure boot, i.e. image

[U-Boot] [PATCH 03/16] secure boot: rename CONFIG_SECURE_BOOT config option

2019-11-12 Thread AKASHI Takahiro
The configuration, CONFIG_SECURE_BOOT, is defined multiple times in different architecture directories for different implementation. If UEFI secure boot will be added later, it will make things more messy. So let's rename them, giving each implementation to different configuration option.

[U-Boot] [PATCH 11/16] efi_loader: set up secure boot

2019-11-12 Thread AKASHI Takahiro
The following variable is exported as UEFI specification defines: SignatureSupport: array of GUIDs representing the type of signatures supported by the platform firmware Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_setup.c | 38

[U-Boot] [PATCH v3 1/6] lib: rsa: decouple rsa from FIT image verification

2019-11-12 Thread AKASHI Takahiro
Introduce new configuration, CONFIG_RSA_VERIFY which will decouple building RSA functions from FIT verification and allow for adding a RSA-based signature verification for other file formats, in particular PE file for UEFI secure boot. Signed-off-by: AKASHI Takahiro --- Kconfig|

[U-Boot] [PATCH 05/16] efi_loader: add signature verification functions

2019-11-12 Thread AKASHI Takahiro
In this commit, implemented are a couple of helper functions which will be used to materialize variable authentication as well as image authentication in later patches. Signed-off-by: AKASHI Takahiro --- include/efi_api.h | 47 +++ include/efi_loader.h | 46 +++

[U-Boot] [PATCH 15/16] efi_loader, pytest: add UEFI secure boot tests (authenticated variables)

2019-11-12 Thread AKASHI Takahiro
Provide a couple of test cases for variable authentication. Signed-off-by: AKASHI Takahiro --- .../py/tests/test_efi_secboot/test_authvar.py | 289 ++ 1 file changed, 289 insertions(+) create mode 100644 test/py/tests/test_efi_secboot/test_authvar.py diff --git

[U-Boot] [PATCH 02/16] include: image.h: export hash algorithm helper functions

2019-11-12 Thread AKASHI Takahiro
This commit allows us to use common/image-sig.c even if CONFIG_FIT is disabled but CONFIG_EFI_LOADER is enabled. Signed-off-by: AKASHI Takahiro --- include/image.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/image.h b/include/image.h index

[U-Boot] [PATCH v3 4/6] lib: rsa: generate additional parameters for public key

2019-11-12 Thread AKASHI Takahiro
In the current implementation of FIT_SIGNATURE, five parameters for a RSA public key are required while only two of them are essential. (See rsa-mod-exp.h and uImage.FIT/signature.txt) This is a result of considering relatively limited computer power and resources on embedded systems, while such a

[U-Boot] [PATCH v3 15/16] lib: crypto: add pkcs7 message parser

2019-11-12 Thread AKASHI Takahiro
Imported from linux kernel v5.3: pkcs7.asn1 without changes pkcs7.h with changes marked as __UBOOT__ pkcs7_parser.h without changes pkcs7_parser.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro --- include/crypto/pkcs7.h| 47 +++ lib/crypto/Kconfig| 10 +

[U-Boot] [PATCH v3 3/6] include: image.h: add key info to image_sign_info

2019-11-12 Thread AKASHI Takahiro
For FIT verification, all the properties of a public key come from "control fdt" pointed to by fdt_blob. In UEFI secure boot, on the other hand, a public key is located and retrieved from dedicated signature database stored as UEFI variables. Added two fields may hold values of a public key if

[U-Boot] [PATCH v3 2/6] rsa: add CONFIG_RSA_VERIFY_WITH_PKEY config

2019-11-12 Thread AKASHI Takahiro
In the next couple of commits, under new CONFIG_RSA_VERIFY_WITH_PKEY, rsa_verify() will be extended to be able to perform RSA decryption without additional RSA key properties from FIT image, i.e. rr and n0inv. Signed-off-by: AKASHI Takahiro --- lib/rsa/Kconfig | 14 ++ 1 file

[U-Boot] [PATCH v3 14/16] lib: crypto: add x509 parser

2019-11-12 Thread AKASHI Takahiro
Imported from linux kernel v5.3: x509.asn1 without changes x509_akid.asn1 without changes x509_parser.h without changes x509_cert_parser.c with changes marked as __UBOOT__ x509_public_key.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro --- lib/Kconfig |

[U-Boot] [PATCH v3 16/16] test: add asn1 unit test

2019-11-12 Thread AKASHI Takahiro
This test will exercise asn1 compiler as well as asn1 decoder functions via various parsers. Signed-off-by: AKASHI Takahiro --- test/Kconfig | 18 ++- test/lib/Makefile | 1 + test/lib/asn1.c | 392 ++ 3 files changed, 410 insertions(+), 1

[U-Boot] [PATCH v3 13/16] lib: crypto: add rsa public key parser

2019-11-12 Thread AKASHI Takahiro
Imported from linux kernel v5.3: rsapubkey.asn1 without changes rsa.h without changes rsa_helper.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro --- include/crypto/internal/rsa.h | 57 ++ lib/crypto/Kconfig| 11 ++ lib/crypto/Makefile | 11 ++

[U-Boot] [PATCH v3 11/16] lib: add oid registry utility

2019-11-12 Thread AKASHI Takahiro
Imported from linux kernel v5.3: build_OID_registry without changes oid_registry.h without changes oid_registry.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro --- include/linux/oid_registry.h | 117 lib/Kconfig | 5 + lib/Makefile

[U-Boot] [PATCH v3 12/16] lib: crypto: add public key utility

2019-11-12 Thread AKASHI Takahiro
Imported from linux kernel v5.3: asymmetric-type.h with changes marked as __UBOOT__ asymmetric_type.c with changes marked as __UBOOT__ public_key.h with changes marked as __UBOOT__ public_key.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro --- include/crypto/public_key.h

[U-Boot] [PATCH v3 08/16] Makefile: add build script for asn1 parsers

2019-11-12 Thread AKASHI Takahiro
This rule will be used to build x509 and pkcs7 parsers. Signed-off-by: AKASHI Takahiro --- Makefile | 1 + scripts/Makefile.build | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3000d30be23c..3fb3ce51be82 100644 --- a/Makefile +++

[U-Boot] [PATCH v3 10/16] doc: add README for asn1 compiler and decoder

2019-11-12 Thread AKASHI Takahiro
This document gives a brief description about ASN1 compiler as well as ASN1 decoder. Signed-off-by: AKASHI Takahiro --- doc/README.asn1 | 40 1 file changed, 40 insertions(+) create mode 100644 doc/README.asn1 diff --git a/doc/README.asn1

[U-Boot] [PATCH v3 09/16] lib: add asn1 decoder

2019-11-12 Thread AKASHI Takahiro
Imported from linux kernel v5.3: lib/asn1_decoder.c with changes marked as __UBOOT__ Signed-off-by: AKASHI Takahiro --- lib/Kconfig| 5 + lib/Makefile | 1 + lib/asn1_decoder.c | 527 + 3 files changed, 533 insertions(+) create

[U-Boot] [PATCH v3 07/16] cmd: add asn1_compiler

2019-11-12 Thread AKASHI Takahiro
Imported from linux kernel v5.3: asn1.h without changes asn1_ber_bytecode.h without changes asn1_decoder.h without changes asn1_compiler.c without changes This host command will be used to create a ASN1 parser, for example, for pkcs7 messages or x509 certificates. More specifically, it will

[U-Boot] [PATCH v3 04/16] lib: add mktime64() for linux compatibility

2019-11-12 Thread AKASHI Takahiro
This function will be used in lib/crypto/x509_cert_parser.c, which will also be imported from linux code in a later commit. Signed-off-by: AKASHI Takahiro --- include/linux/time.h | 10 ++ lib/date.c | 20 2 files changed, 30 insertions(+) diff --git

[U-Boot] [PATCH v3 06/16] linux/time.h: include vsprintf.h

2019-11-12 Thread AKASHI Takahiro
Without this commit, time.h possibly causes a build error as asctime_r() uses sprintf(). Signed-off-by: AKASHI Takahiro --- include/linux/time.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/time.h b/include/linux/time.h index dc9344a6d97b..702dd276aea5 100644 ---

[U-Boot] [PATCH v3 05/16] include: kernel.h: include printk.h

2019-11-12 Thread AKASHI Takahiro
Adding "printk.h" will help improve portability from linux kernel code (in my case, lib/asn1_decoder.c and others) where printf and pr_* variant functions are used. Signed-off-by: AKASHI Takahiro --- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[U-Boot] [PATCH v3 02/16] rtc.h: add struct udevice declaration

2019-11-12 Thread AKASHI Takahiro
Without this change, including rtc.h solely will cause a build error. Signed-off-by: AKASHI Takahiro --- include/rtc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/rtc.h b/include/rtc.h index 7386d52db1d7..8aabfc1162a4 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -18,6

[U-Boot] [PATCH v3 03/16] rtc: move date.c from drivers/rtc/ to lib/

2019-11-12 Thread AKASHI Takahiro
In the next commit, rtc_mktime(), for compatibility with linux, will be implemented using rtc_mktime(), which is no longer drivers/rtc specific. So move this file under lib/. Signed-off-by: AKASHI Takahiro --- cmd/Kconfig | 1 + drivers/rtc/Kconfig | 1 +

[U-Boot] [PATCH v3 01/16] linux_compat: move kmemdup() from ubifs.c to linux_compat.c

2019-11-12 Thread AKASHI Takahiro
linux_compat.c is the best place for kmemdup(), which is currenly used only in ubifs.c, but will also be used when other kernel files (in my case, lib/crypto/x509_cert_parser.c and pkcs7_parser.c) will be imported. So just move it. Signed-off-by: AKASHI Takahiro --- fs/ubifs/ubifs.c | 19

[U-Boot] [PATCH v3 00/16] import x509/pkcs7 parsers from linux

2019-11-12 Thread AKASHI Takahiro
# This patch set is a prerequisite for UEFI secure boot. # This patch set should be merged first prior to my rsa extension patch # due to some dependency. Asn1 parsers of x509 certificates and pkcs7 messages are required to implement image authentication and variable authentication as part of

[U-Boot] [BUG] fs: fat: incorrect creation of files with Unicode file name

2019-11-12 Thread Heinrich Schuchardt
In the UEFI Shell I create a file with FS0:\> echo привет_мир.текст > привет_мир.текст FS0:\> ls Directory of: FS0:\ 00/00/ 00:00 38 привет_мир.текст The U-Boot console shows it correctly: => ls scsi 0:1 38 привет_мир.текст Now in Linux I mount the volume. ls

Re: [U-Boot] [BUG] U-Boot hangs on fatload, commit ee88eacbdd840199a3dec707234579fb15ddd46a

2019-11-12 Thread Gray Remlin
On Tue, 12 Nov 2019 at 19:50, Heinrich Schuchardt wrote: > On 11/11/19 6:14 PM, Gray Remlin wrote: > > > > This content is getting very convoluted, if appropriate feel free to > > crop it. > > New point raised at very bottom. > > > > On Sun, 10 Nov 2019 at 08:41, Heinrich Schuchardt >

[U-Boot] [PATCH 1/1] efi_loader: call add_u_boot_and_runtime() on sandbox

2019-11-12 Thread Heinrich Schuchardt
On the sandbox we should mark the stack area as EFI runtime memory like we do on any other architecture. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_memory.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_memory.c

[U-Boot] [PATCH v2 2/3] efi_loader: support building UEFI binaries on sandbox

2019-11-12 Thread Heinrich Schuchardt
On the sandbox the UEFI binaries must match the host architectures. Adjust the Makefiles. Provide the PE/COFF header and relocation files. Allow building helloworld.efi on the sandbox. Signed-off-by: Heinrich Schuchardt --- v2: no change --- Makefile | 19

[U-Boot] [PATCH v2 1/3] efi_loader: call add_u_boot_and_runtime() on sandbox

2019-11-12 Thread Heinrich Schuchardt
On the sandbox we should mark the stack area as EFI runtime memory like we do on any other architecture. Signed-off-by: Heinrich Schuchardt --- v2: no change --- lib/efi_loader/efi_memory.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

[U-Boot] [PATCH v2 0/3] efi_loader: support building UEFI binaries on sandbox

2019-11-12 Thread Heinrich Schuchardt
Building helloworld.efi and UEFI binaries needed for unit tests requires that the build system considers the host architecture on which the sandbox is built. The patch series provides these adjustment and enables building both helloworld.efi and unit test requiring UEFI binaries. v2:

[U-Boot] [PATCH v2 3/3] efi_selftest: enable all UEFI unit tests on the sandbox

2019-11-12 Thread Heinrich Schuchardt
As we can build relocation code for the sandbox now we should enable the unit tests that had to be disabled up to now. Signed-off-by: Heinrich Schuchardt --- v2: new patch --- lib/efi_selftest/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH 2/2] usb: dwc2: fix possible alignment issues

2019-11-12 Thread Simon Goldschmidt
Since upgrading to gcc9, warnings are issued: "taking address of packed member of ‘...’ may result in an unaligned pointer value" Fix this by converting dwc2_fifo_read to use unaligned access since packed structures may be on an unaligned address, depending on USB hardware. Signed-off-by: Simon

[U-Boot] [PATCH 1/2] usb: composite: fix possible alignment issues

2019-11-12 Thread Simon Goldschmidt
Since upgrading to gcc9, warnings are issued: "taking address of packed member of ‘...’ may result in an unaligned pointer value" Fix this by converting two functions to use unaligned access since packed structures may be on an unaligned address, depending on USB hardware. Signed-off-by: Simon

Re: [U-Boot] [BUG] U-Boot hangs on fatload, commit ee88eacbdd840199a3dec707234579fb15ddd46a

2019-11-12 Thread Heinrich Schuchardt
On 11/11/19 6:14 PM, Gray Remlin wrote: This content is getting very convoluted, if appropriate feel free to crop it. New point raised at very bottom. On Sun, 10 Nov 2019 at 08:41, Heinrich Schuchardt mailto:xypron.g...@gmx.de>> wrote: On 11/9/19 10:31 PM, Gray Remlin wrote: > On

[U-Boot] [PATCH v3 33/42] common: Move interrupt functions into a new header

2019-11-12 Thread Simon Glass
These functions do not use driver model but are fairly widely used in U-Boot. But it is not clear that they will use driver model anytime soon, so we don't want to label them as 'legacy'. Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it is widely used in U-Boot already.

[U-Boot] [PATCH v3 35/42] common: Move command functions out of common.h

2019-11-12 Thread Simon Glass
Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/mach-kirkwood/cpu.c| 1 + arch/sandbox/cpu/start.c| 1 + board/engicam/common/board.c| 1 +

[U-Boot] [PATCH v3 41/42] common: Drop get_endaddr()

2019-11-12 Thread Simon Glass
This is not used in U-Boot. Drop it. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/common.h b/include/common.h index e946e4d9b7..64d0cf542e 100644 --- a/include/common.h +++ b/include/common.h

[U-Boot] [PATCH v3 39/42] common: Move pci_init_board() out of common.h

2019-11-12 Thread Simon Glass
This function can be dropped when all boards use driver model for PCI. For now, move it into init.h with a comment. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None board/armltd/integrator/pci.c | 1 + board/cavium/thunderx/thunderx.c| 1 +

[U-Boot] [PATCH v3 31/42] common: Move ARM cache operations out of common.h

2019-11-12 Thread Simon Glass
These functions are CPU-related and do not use driver model. Move them to cpu_legacy.h Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/arm926ejs/lpc32xx/cpu.c | 1 + arch/arm/cpu/armv7/cache_v7.c | 1 +

[U-Boot] [PATCH v3 36/42] common: Drop board_show_dram()

2019-11-12 Thread Simon Glass
This function is not defined by any boards so the feature is not used. Drop it. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None cmd/mem.c| 9 ++--- include/common.h | 9 - 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/cmd/mem.c

[U-Boot] [PATCH v3 25/42] common: Drop cpu_init()

2019-11-12 Thread Simon Glass
This function is not defined anywhere. Drop it. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/common.h b/include/common.h index 4de05032b2..ce08bfe11f 100644 --- a/include/common.h +++

[U-Boot] [PATCH v3 23/42] common: Move mii_init() function out of common.h

2019-11-12 Thread Simon Glass
This function belongs in mii.h so move it over. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + drivers/net/fsl_mcdmafec.c | 1 + drivers/net/ldpaa_eth/ls1088a.c | 1 + drivers/net/ldpaa_eth/lx2160a.c

[U-Boot] [PATCH v3 40/42] common: Move trap_init() out of common.h

2019-11-12 Thread Simon Glass
Move this function into the init.h header file. Signed-off-by: Simon Glass --- Changes in v3: - Add init.h header Changes in v2: - Move trap_init() into init.h instead; update commit message arch/m68k/lib/traps.c | 1 + arch/mips/lib/traps.c | 1 + include/common.h | 1 - include/init.h

[U-Boot] [PATCH v3 22/42] common: Move get_ticks() function out of common.h

2019-11-12 Thread Simon Glass
This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/arm920t/ep93xx/timer.c| 1 + arch/arm/cpu/arm920t/imx/timer.c | 1 + arch/arm/cpu/arm926ejs/armada100/timer.c | 1 +

[U-Boot] [PATCH v3 17/42] common: Add a new lz4.h header file

2019-11-12 Thread Simon Glass
Add a header file to house the lz4 compression function. Add a comment while we are here, since it not even clear from the name what the function actuall does. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None common/image.c | 1 + include/common.h | 3 ---

[U-Boot] [PATCH v3 26/42] common: Move checkcpu() out of common.h

2019-11-12 Thread Simon Glass
This function belongs in cpu.h so move it over. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/powerpc/cpu/mpc83xx/cpu.c | 1 + arch/powerpc/cpu/mpc8xx/cpu.c| 1 + arch/sh/cpu/sh4/cpu.c| 1 +

[U-Boot] [PATCH v3 30/42] common: Drop checkicache() and checkdcache()

2019-11-12 Thread Simon Glass
These are used by only one arch and only within a single file. Drop the declarations from the common file. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/powerpc/cpu/mpc8xx/cpu.c | 130 +- include/common.h | 2 - 2

[U-Boot] [PATCH v3 37/42] common: Move board_get_usable_ram_top() out of common.h

2019-11-12 Thread Simon Glass
Move this function into init.h which seems to be designed for this sort of thing. Also update the header to declare struct global_data so that it can be included without global_data.h being needed. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None

[U-Boot] [PATCH v3 19/42] common: Move wait_ticks functions out of common.h

2019-11-12 Thread Simon Glass
This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass --- Changes in v3: - Drop include in pxa2xx.c since this is for pxa_wait_ticks() - Update comment to wait_ticks() to indicate it is an internal function Changes in v2: None

[U-Boot] [PATCH v3 21/42] common: Move timer_get_us() function out of common.h

2019-11-12 Thread Simon Glass
This function belongs in time.h so move it over and update the comment style. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/common.h | 3 --- include/time.h | 7 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/common.h

[U-Boot] [PATCH v3 32/42] arm: powerpc: Tidy up code style for interrupt functions

2019-11-12 Thread Simon Glass
Remove the unwanted space before the bracket. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/arm11/cpu.c | 2 +- arch/arm/cpu/arm920t/cpu.c| 2 +- arch/arm/cpu/arm926ejs/cpu.c | 2 +- arch/arm/cpu/arm946es/cpu.c

[U-Boot] [PATCH v3 34/42] common: Move enable/disable_interrupts out of common.h

2019-11-12 Thread Simon Glass
Move these two functions into the irq_funcs.h header file. Also move interrupt_handler_t as this is used by the irq_install_handler() function. Signed-off-by: Simon Glass --- Changes in v3: - Rename irq_legacy to irq_func to avoid the 'legacy' label - Update commit message Changes in v2: None

[U-Boot] [PATCH v3 42/42] common: Move old EEPROM functions into a new header

2019-11-12 Thread Simon Glass
These functions do not use driver model but are still used. Move them to a new eeprom.h header file. Signed-off-by: Simon Glass --- Changes in v3: - Rename eeprom_legacy.h to eeprom.h since this may not be legacy code - Update the commit message Changes in v2: None

[U-Boot] [PATCH v3 38/42] common: Move some board functions out of common.h

2019-11-12 Thread Simon Glass
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/armv8/fsl-layerscape/soc.c | 1 + arch/arm/mach-imx/mx6/opos6ul.c | 1 +

[U-Boot] [PATCH v3 27/42] common: Move some SMP functions out of common.h

2019-11-12 Thread Simon Glass
These functions belong in cpu_legacy.h so move them over. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/armv7/ls102xa/cpu.c| 1 + arch/arm/cpu/armv7/virt-v7.c| 1 + arch/arm/lib/bootm.c| 1 +

[U-Boot] [PATCH v3 28/42] arm: powerpc: Tidy up code style for cache functions

2019-11-12 Thread Simon Glass
Remove the unwanted space before the bracket. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/lib/cache-cp15.c| 12 ++-- arch/microblaze/cpu/cache.c | 18 +++--- board/armltd/integrator/integrator.c | 2 +-

[U-Boot] [PATCH v3 13/42] common: Move env_get_ip() to net.h

2019-11-12 Thread Simon Glass
This function relates to networking, so move it out of the common.h header file. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/common.h | 4 include/net.h| 21 - 2 files changed, 20 insertions(+), 5 deletions(-) diff --git

[U-Boot] [PATCH v3 20/42] arm: pxa: Drop pxa_wait_ticks()

2019-11-12 Thread Simon Glass
This function has a similar name to the common wait_ticks(). It is only used in one place and seems small enough to drop. Inline it. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to inline pxa_wait_ticks() Changes in v2: None arch/arm/cpu/pxa/pxa2xx.c | 12 1

[U-Boot] [PATCH v3 16/42] common: Move serial functions out of common.h

2019-11-12 Thread Simon Glass
These functions belong in serial.h so move them over. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 1 + board/amarula/vyasa-rk3288/vyasa-rk3288.c | 1 + board/astro/mcf5373l/mcf5373l.c| 1 +

[U-Boot] [PATCH v3 09/42] spl: bootcount: Move code out of header file

2019-11-12 Thread Simon Glass
It is not good practice to write code in a header file. If it is included multiple times then the code can cause duplicate functions. Move the bootcount_store() and bootcount_load() functions into SPL. Note: bootcount is a bit strange in that it uses driver model but does not define proper

[U-Boot] [PATCH v3 12/42] Move strtomhz() to vsprintf.h

2019-11-12 Thread Simon Glass
At present this function sits in its own file but it does not really justify it. There are similar string functions in vsprintf.h, so move it there. Also add the missing function comment. Use the vsprintf.h include file explicitly where needed. Signed-off-by: Simon Glass --- Changes in v3: -

[U-Boot] [PATCH v3 29/42] common: Move some cache and MMU functions out of common.h

2019-11-12 Thread Simon Glass
These functions belong in cpu_legacy.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass --- Changes in

[U-Boot] [PATCH v3 07/42] crc: Fix code style with crc functions

2019-11-12 Thread Simon Glass
Some of these have a space before the bracket. Drop it to fix the style. Add some missing function comments while here. Note that u32 and u8 cannot be used here since crc.h is included on the host side. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None cmd/i2c.c

[U-Boot] [PATCH v3 18/42] common: Move some time functions out of common.h

2019-11-12 Thread Simon Glass
These functions belong in time.h so move them over and add comments. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/armv7/ls102xa/timer.c| 1 + arch/arm/cpu/armv8/generic_timer.c| 1 + arch/arm/mach-imx/syscounter.c

[U-Boot] [PATCH v3 14/42] serial: usb: Correct the usbtty_...() prototypes

2019-11-12 Thread Simon Glass
The function declarations in serial.h are not in sync with what is currently used in usbtty. Fix this by updating the header and including it, to help catch future such problems. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None drivers/serial/usbtty.c | 1 +

[U-Boot] [PATCH v3 24/42] common: Move some CPU functions out of common.h

2019-11-12 Thread Simon Glass
These functions belong in cpu_legacy.h since they do not use driver model. Move them over. Don't bother adding comments since these functions should be deleted. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 +

[U-Boot] [PATCH v3 15/42] common: Move serial_printf() to the serial header

2019-11-12 Thread Simon Glass
Move this function header to serial.h since this function is clearly related to serial. The function itself stays in console.c since we don't have a single serial file. DM and non-DM each has a separate file so we would have to either create a new common serial file, or repeat the function in both

[U-Boot] [PATCH v3 11/42] common: Move sorting functions to their own header file

2019-11-12 Thread Simon Glass
These don't need to be in common.h so move them out into a new header. Also add some missing comments. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None cmd/efi.c | 1 + common/bootstage.c | 1 + env/common.c| 1 + fs/yaffs2/yaffs_qsort.c

[U-Boot] [PATCH v3 08/42] crc32: Use the crc.h header for crc functions

2019-11-12 Thread Simon Glass
Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None api/api.c

[U-Boot] [PATCH v3 10/42] common: Move bootcount functions to their header file

2019-11-12 Thread Simon Glass
These don't need to be in common.h so move them out. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None board/BuR/brppt1/board.c | 1 + include/bootcount.h | 10 ++ include/common.h | 4 3 files changed, 11 insertions(+), 4 deletions(-) diff

[U-Boot] [PATCH v3 05/42] common: Move random-number functions into their own header

2019-11-12 Thread Simon Glass
Create a new rand.h header file and move functions into it, to reduce the size of common.h Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None include/common.h | 6 -- include/net.h| 1 + include/rand.h | 40 lib/rand.c

  1   2   >