[PATCH v3 3/3] riscv: Fix build against binutils 2.38

2022-10-01 Thread Heinrich Schuchardt
From: Alexandre Ghiti The following description is copied from the equivalent patch for the Linux Kernel proposed by Aurelien Jarno: >From version 2.38, binutils default to ISA spec version 20191213. This means that the csr read/write (csrr*/csrw*) instructions and fence.i instruction has separa

[PATCH v3 2/3] buildman: differentiate between riscv32, riscv64

2022-10-01 Thread Heinrich Schuchardt
riscv32 needs a different toolchain than riscv64 Signed-off-by: Heinrich Schuchardt --- v3: new patch --- tools/buildman/boards.py | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index 8a0971aa40..cdc4d9ffd2 100644 ---

[PATCH v3 1/3] docker: install riscv32 toolchain

2022-10-01 Thread Heinrich Schuchardt
For building riscv32 targets we should use the riscv32 toolchain. Add it to the Docker image. Signed-off-by: Heinrich Schuchardt --- v3: new patch --- tools/docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index d3292

[PATCH v3 0/3] riscv: Fix build against binutils 2.38

2022-10-01 Thread Heinrich Schuchardt
Binutils 2.37 and 2.38 are based on different revisions of the "RISC-V Unprivileged Specification" and there fore require different -march parameters for GCC. We support both 32bit and 64bit RISC-V boards. Buildman uses a 64bit toolchain for both which leads to build failures with -march=rv32imac_

Re: [PATCH] riscv: Fix build against binutils 2.38

2022-10-01 Thread Heinrich Schuchardt
On 10/2/22 01:57, Tom Rini wrote: Any thoughts or comments ? In our Docker container command tools/buildman/buildman -o build -w -E -W -e --board qemu-riscv32_spl leads to build/toolchain with content gcc /opt/gcc-11.1.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc path /opt/gcc-11.1.0-noli

Re: [PATCH] riscv: Fix build against binutils 2.38

2022-10-01 Thread Tom Rini
On Sun, Oct 02, 2022 at 01:24:08AM +0200, Heinrich Schuchardt wrote: > On 3/9/22 07:31, Leo Liang wrote: > > Hi Alex, > > On Thu, Mar 03, 2022 at 11:06:18AM +, Leo Liang wrote: > > > Hi Alex, > > > On Tue, Mar 01, 2022 at 03:21:56AM +, Leo Liang wrote: > > > > Hi Alex, > > > > On Mon, Feb 2

Re: [PATCH] riscv: Fix build against binutils 2.38

2022-10-01 Thread Heinrich Schuchardt
On 3/9/22 07:31, Leo Liang wrote: Hi Alex, On Thu, Mar 03, 2022 at 11:06:18AM +, Leo Liang wrote: Hi Alex, On Tue, Mar 01, 2022 at 03:21:56AM +, Leo Liang wrote: Hi Alex, On Mon, Feb 21, 2022 at 05:42:41PM +0100, Alexandre Ghiti wrote: On Sat, Feb 19, 2022 at 9:52 AM Leo Liang wrote:

Re: Bug in ext2load?

2022-10-01 Thread Heinrich Schuchardt
On 9/30/22 15:28, Simon Glass wrote: +Heinrich Schuchardt On Thu, 29 Sept 2022 at 16:31, Gary Johnson wrote: I think I've found a bug in the ext2load command. When the file According to the description below the bug is not in the command but in the file-system driver. Function read_alloca

[PATCH v2 2/3] riscv: Fix build against binutils 2.38

2022-10-01 Thread Heinrich Schuchardt
From: Alexandre Ghiti The following description is copied from the equivalent patch for the Linux Kernel proposed by Aurelien Jarno: >From version 2.38, binutils default to ISA spec version 20191213. This means that the csr read/write (csrr*/csrw*) instructions and fence.i instruction has separa

[PATCH v2 3/3] test: test bit shift operations on RISC-V

2022-10-01 Thread Heinrich Schuchardt
Add unit tests for library functions __ashldi3() and __lshrdi3). Signed-off-by: Heinrich Schuchardt --- v2: new patch --- test/lib/Makefile | 2 ++ test/lib/bitops.c | 71 +++ 2 files changed, 73 insertions(+) create mode 100644 test/lib/bito

[PATCH v2 0/3] riscv: Fix build against binutils 2.38

2022-10-01 Thread Heinrich Schuchardt
Compiling for RISC-V with binutils 2.38 and binutils 2.37 requires different build flags. This is fixed by Alexandre Ghiti's patch. But building qemu-riscv32*_defconfig fails due to missing implementations of __ashldi3, __lshrdi3. Add these functions and a unit test for them. Alexandre Ghiti (1):

[PATCH v2 1/3] riscv: implement __ashldi3, __lshrdi3

2022-10-01 Thread Heinrich Schuchardt
On 32bit RISC-V calls to __ashrdi3 and __lshrdi3 are generated. These functions are normally provided by glibc but U-Boot is freestanding and needs its own implementation. Signed-off-by: Heinrich Schuchardt --- v2: new patch --- arch/riscv/lib/Makefile | 1 + arch/riscv/lib/bitops.S | 1

[PATCH 1/1] test: run setexpr test only on sandbox

2022-10-01 Thread Heinrich Schuchardt
The test relies on memory being available at 0x0. This in not valid for many boards. Signed-off-by: Heinrich Schuchardt --- test/cmd/Makefile | 2 ++ test/cmd_ut.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cmd/Makefile b/test/cmd/Makefile index c331757425..d0

[PATCH 1/1] test: fix some pylint errors in test_efi_secboot

2022-10-01 Thread Heinrich Schuchardt
* Remove unused import * Provide module docstring Signed-off-by: Heinrich Schuchardt --- test/py/tests/test_efi_secboot/conftest.py | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/py/tests/test_efi_secboot/conftest.py b/test/py/tests/test_efi_secboot/confte

[PATCH 2/2] x86: provide typedef jmp_buf

2022-10-01 Thread Heinrich Schuchardt
The jmp_buf type is required by the C99 specification. Defining it for x86 fixes building the longjmp unit test. Signed-off-by: Heinrich Schuchardt --- arch/x86/include/asm/setjmp.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/setjmp.h b/arch/x86

[PATCH 0/2] x86: fix longjmp() implementation

2022-10-01 Thread Heinrich Schuchardt
longjmp() must be defined as void longjmp(jmp_buf env, int val) Add the missing jmp_buf type and fix the definition. This fixes building the longjmp unit test on qemu-x86_defconfig. If longjmp(jmp_buf env, int val) is invoked with val == 0, the setjmp() macro must return 1. We could have ea

[PATCH 1/2] x86: fix longjmp() implementation

2022-10-01 Thread Heinrich Schuchardt
If longjmp(jmp_buf env, int val) is called with val = 0, the setjmp() macro must return 1. Signed-off-by: Heinrich Schuchardt --- arch/x86/cpu/i386/setjmp.S | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/x86/cpu/i386/setjmp.S b/arch/x86/cpu/i386/setjmp.S index 40b10dc8df..eceeafa7

Re: [PATCH] usb: common: Detect USB storage media with "miscellaneous" USB devices

2022-10-01 Thread Christian Kohlschütter
> On 1. Oct 2022, at 00:58, Christian Kohlschütter > wrote: > > On 1. Oct 2022, at 00:21, Christian Kohlschütter > wrote: >> See https://github.com/hathach/tinyusb/blob/master/examples/device/cdc_msc/src/usb_descriptors.c for an example of such a device. It has one mass stora

[PATCH] test: run boot tests only on sandbox

2022-10-01 Thread Heinrich Schuchardt
Building test/boot fails on qemu-riscv64_smode_defconfig with test/boot/bootdev.c:178: undefined reference to `usb_started' Checking CONFIG_UNIT_TEST is already done in /Makefile, no need to repeat it in /test/Makefile. Signed-off-by: Heinrich Schuchardt --- test/Makefile | 4 ++-- test/cm

Re: [u-boot][PATCH 1/3] scripts: Makefile.spl: Enable memory drivers to be built for SPL

2022-10-01 Thread Roger Quadros
Hi, On 01/10/2022 02:48, Simon Glass wrote: > Hi, > > On Fri, 30 Sept 2022 at 14:18, Roger Quadros wrote: >> >> On 30/09/2022 17:00, Tom Rini wrote: >>> On Fri, Sep 30, 2022 at 07:28:51AM -0600, Simon Glass wrote: Hi Roger, On Fri, 30 Sept 2022 at 06:47, Roger Quadros wrote:

[PATCH 1/3] cmd/sbi: format RustSBI version number

2022-10-01 Thread Heinrich Schuchardt
The SBI command can print out the version number of the SBI implementation. Choose the correct output format for RustSBI. Signed-off-by: Heinrich Schuchardt --- cmd/riscv/sbi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c index 522f502435..160d7c7b30 1006

[PATCH 3/3] cmd/sbi: user friendly short texts

2022-10-01 Thread Heinrich Schuchardt
In the sbi command use the same short texts for the legacy extensions as the SBI specification 1.0.0. Signed-off-by: Heinrich Schuchardt --- cmd/riscv/sbi.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c index 70574bbc66..

[PATCH 2/3] cmd/sbi: error message for failure to get spec version

2022-10-01 Thread Heinrich Schuchardt
If calling 'Get SBI specification version' fails, write an error message and return CMD_RET_FAILURE. Signed-off-by: Heinrich Schuchardt --- cmd/riscv/sbi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c index 160d7c7b30..70574bbc66 10

[PATCH 0/3] sbi/cmd: improve output formatting

2022-10-01 Thread Heinrich Schuchardt
* correctly format the version number for RustSBI * provide an error message if the SBI does not implement the 'SBI Base Functionality' extension. * provide user friendly short texts for the legacy extensions Heinrich Schuchardt (3): cmd/sbi: format RustSBI version number cmd/sbi: error mess