[PATCH] uimage: use read_full where appropriate

2024-10-02 Thread Ahmad Fatoum
Apart from the CRC code, where it's no problem to just compute the CRC of the last read and read again, all other instances of read() in the uimage code are written with the assumption that the read will not be short. Use read_full to satisfy this assumption. Signed-off-by: Ahmad F

[PATCH] uimage: fix CRC32 verification on NFS

2024-10-02 Thread Ahmad Fatoum
: https://github.com/barebox/barebox/issues/28 Reported-by: Rashidwi Signed-off-by: Ahmad Fatoum --- common/uimage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/uimage.c b/common/uimage.c index 140a08c1e426..c578edae2606 100644 --- a/common/uimage.c +++ b/commo

[PATCH] video: mipi-dbi: reword Kconfig prompt

2024-10-01 Thread Ahmad Fatoum
We don't (yet? ;) have a Direct Rendering Manager subsystem as in Linux, so let's rename the option to avoid confusion. Signed-off-by: Ahmad Fatoum --- drivers/video/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kco

Re: [PATCH] mci: Fix erase_grp_size extraction for SD with csd_struct v0

2024-10-01 Thread Ahmad Fatoum
rt for discarding write blocks") > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum Thanks for the fix, Ahmad > --- > drivers/mci/mci-core.c | 17 ++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/drivers/mci/mci-core.c b/drivers/m

Re: [PATCH v2 15/15] video: Rockchip: Add VOP2 driver

2024-09-29 Thread Ahmad Fatoum
emoved, also support for YUV modes has been dropped. > > Tested-by: Ahmad Fatoum # rk3566 HDMI > Signed-off-by: Sascha Hauer > --- > +struct driver vop2_driver = { > + .probe = vop2_bind, > + .name = "rockchip-vop2", > + .of_compatible = vop2_dt_matc

i.MX8/9: question about unused DDR PHY trained CSR board array

2024-09-27 Thread Ahmad Fatoum
Hello Peng, Looking at the DDR setup code for i.MX8M and i.MX9 that you had contributed, I am wondering about struct dram_cfg_param::ddrphy_trained_csr and the global ddrphy_trained_csr array. struct dram_cfg_param::ddrphy_trained_csr is presumably generated by the i.MX DDR tool and it seems popu

Re: [PATCH v4 07/16] keytoc: make key name hint optional

2024-09-27 Thread Ahmad Fatoum
On 13.09.24 09:59, Sascha Hauer wrote: > The key name hint is used in barebox to find a key without iterating > over all keys, but it's not required. Make the key name hint optional > to keytoc. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- &

Re: [PATCH v4 10/16] crypto: add public_key functions

2024-09-27 Thread Ahmad Fatoum
rify(), move key_name_hint to struct public_key. > > With this we do not need to bother the FIT image code when adding > support for ECDSA keys. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > common/image-fit.c | 20 &g

Re: [PATCH v4 03/16] keytoc: fix ECDSA endianess problems

2024-09-27 Thread Ahmad Fatoum
4 array. Fix this by printing out the key values as > an uint64_t array. > > Signed-off-by: Sascha Hauer Acked-by: Ahmad Fatoum Cool, thanks. Now we just need a tes and see it work on big-endian MIPS :-) Cheers, Ahmad > --- > scripts/keytoc.c | 42 +

Re: [PATCH v4 13/16] crypto: rsa: create static inline wrapper for rsa_verify()

2024-09-27 Thread Ahmad Fatoum
On 13.09.24 09:59, Sascha Hauer wrote: > rsa_verify() is called from generic code, so provide a static inline > no-op wrapper used when RSA support is disabled. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum -- Pen

Re: [PATCH v4 15/16] crypto: add ECDSA support

2024-09-27 Thread Ahmad Fatoum
y values into the binary, so this is left out. > > Signed-off-by: Sascha Hauer Acked-by: Ahmad Fatoum Some minor comments below. > diff --git a/crypto/public-keys.c b/crypto/public-keys.c > index dc51ef18f8..bab608be17 100644 > --- a/crypto/public-keys.c > +++ b/crypto/public-k

Re: [PATCH v4 09/16] crypto: rsa: encapsulate rsa keys in public keys struct

2024-09-27 Thread Ahmad Fatoum
gt; Also we rename CONFIG_CRYPTO_RSA_KEY to CONFIG_CRYPTO_PUBLIC_KEYS and > CONFIG_CRYPTO_RSA_BUILTIN_KEYS to CONFIG_CRYPTO_BUILTIN_KEYS as these > variables will be used for all types of keys, not only RSA keys. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum But two comments

Re: [PATCH v4 08/16] crypto: rsa: include key name hint into CONFIG_CRYPTO_RSA_KEY

2024-09-27 Thread Ahmad Fatoum
On 13.09.24 09:59, Sascha Hauer wrote: > Set the key name hint in CONFIG_CRYPTO_RSA_KEY. CONFIG_CRYPTO_RSA_KEY > now has the form: > > : > > This is done in preparation to make CONFIG_CRYPTO_RSA_KEY a list of > keys. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahm

Re: [PATCH v4 06/16] crypto/Makefile: Drop unnecessary dependencies

2024-09-27 Thread Ahmad Fatoum
't change the existing file. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > crypto/Makefile | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/crypto/Makefile b/crypto/Makefile > index d7a06a721d..5a484355f3 100

Re: [PATCH v4 05/16] crypto: Makefile: make simpler

2024-09-27 Thread Ahmad Fatoum
PTO_RSA_KEY) a few lines up. > so all this is a complicated way of using $(CONFIG_CRYPTO_RSA_KEY) > directly. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > crypto/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/

Re: [PATCH v4 04/16] keytoc: remove duplicate __ENV__ check

2024-09-27 Thread Ahmad Fatoum
On 13.09.24 09:59, Sascha Hauer wrote: > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > scripts/keytoc.c | 11 --- > 1 file changed, 11 deletions(-) > > diff --git a/scripts/keytoc.c b/scripts/keytoc.c > index b140160688..ecb33cbe47 100644 >

Re: [PATCH 09/13] video: i.MX ipuv3: switch to upstream hdmi driver

2024-09-26 Thread Ahmad Fatoum
On 26.09.24 15:15, Sascha Hauer wrote: > The Linux dw-hdmi driver is based on a driver which originally was > written specifically for the i.MX and was converted later to a generic > dw-hdmi driver. The barebox driver is still based on the original Linux > driver. We just merged the dw-hdmi driver.

Re: [PATCH 11/13] fb: print more information on devinfo

2024-09-26 Thread Ahmad Fatoum
On 26.09.24 15:15, Sascha Hauer wrote: > Print some more information about the framebuffer in the devinfo output: > - x/y resolution > - line_length > - type of framebuffer (overlay, base plane) > - if it's an overlay, print the base plane > > Signed-off-by: Sascha Hauer > --- > drivers/video/fb

Re: [PATCH 13/13] video: Rockchip: Add VOP2 driver

2024-09-26 Thread Ahmad Fatoum
been removed, also support for YUV modes has been dropped. > > Signed-off-by: Sascha Hauer With below described adjustments: Tested-by: Ahmad Fatoum # rk3566 HDMI > +config DRIVER_VIDEO_ROCKCHIP_HDMI > +bool "Rockchip HDMI driver" > +sele

Re: [PATCH 12/13] ARM: ARM64: implement dma_alloc_writecombine()

2024-09-26 Thread Ahmad Fatoum
On 26.09.24 15:15, Sascha Hauer wrote: > We currently only have dma_alloc_writecombine() for aarch32. Implement > it for aarch64 as it is useful for mapping framebuffer memory. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum Thanks, Ahmad > --- > arch/arm

Re: [PATCH 03/13] media-bus-format: update from kernel

2024-09-26 Thread Ahmad Fatoum
On 26.09.24 15:15, Sascha Hauer wrote: > There are several new media bus formats since we last updated > media-bus-format.h from Linux. Update it from Linux-6.10 to > get the new formats. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > include/video/me

Re: [PATCH 01/13] clk: rockchip: rk3568: Fix HDMI clocks

2024-09-26 Thread Ahmad Fatoum
k3568") > > These are needed for proper HDMI clock settings on RK3568. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > drivers/clk/rockchip/clk-rk3568.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers

Re: [PATCH 07/13] video: Add Sitronix st7789v panel driver

2024-09-26 Thread Ahmad Fatoum
Hello Sascha, On 26.09.24 15:15, Sascha Hauer wrote: > + ret = st7789v_read_data(ctx, MIPI_DCS_GET_DISPLAY_ID, ids, > ST7789V_IDS_SIZE); > + if (ret) > + return ret; > +printf("%s: %02x %02x %02x\n", __func__, ids[0], ids[1], ids[2]); Debugging left-over. > +static int st778

Re: [PATCH 04/10] ARM: update lib1funcs.S from Linux

2024-09-26 Thread Ahmad Fatoum
On 26.09.24 10:22, Sascha Hauer wrote: > On Wed, Sep 25, 2024 at 06:02:37PM +0200, Ahmad Fatoum wrote: >> On 25.09.24 15:55, Sascha Hauer wrote: >>> This updates lib1funcs.S from Linux >> >> Please mention what Linux version this was imported from. >> >&

Re: [PATCH 3/3] spi: spi-gpio: switch to new gpio binding

2024-09-25 Thread Ahmad Fatoum
Hello Sascha, On 25.09.24 16:06, Sascha Hauer wrote: > The old deprecated device tree binding for the spi-gpio driver uses > "gpio-sck", "gpio-mosi" and "gpio-miso" to specify the GPIOs. Switch to > the new binding which uses the standard GPIO property names. > > The old binding is still used in

Re: [PATCH 2/3] spi: spi-gpio: support different word widths

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 16:06, Sascha Hauer wrote: > The spi-gpio driver only supports 8bit word width. Add support for > arbitrary word widths up to 32bit. > > Signed-off-by: Sascha Hauer With below issue addressed: Reviewed-by: Ahmad Fatoum > static int gpio_spi_setup(struct

Re: [PATCH 10/10] ARM: add optimized memmove

2024-09-25 Thread Ahmad Fatoum
Hello Sascha, On 25.09.24 15:55, Sascha Hauer wrote: > Until now there has been no assembler optimized version of memmove() for > ARM. Add this from Linux for both ARM32 and ARM64. This also updates > memcpy() for ARM64 from Linux. > > Signed-off-by: Sascha Hauer Reviewed-b

Re: [PATCH 1/3] spi: spi-gpio: actually delay in spidelay()

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 16:06, Sascha Hauer wrote: > spidelay() currently only is a no-op dummy function. Actually delay in > this function to avoid spi-gpio being faster than specified. > > Signed-off-by: Sascha Hauer > --- > drivers/spi/gpio_spi.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-

Re: [PATCH 08/10] ARM: update memcpy.S and memset.S from Linux

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 15:55, Sascha Hauer wrote: > This updates the assembler optimized memcpy() and memset() functions > from Linux. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum with a small nitpick: > /* SPDX-License-Identifier: GPL-2.0-only */ > -/* SPDX-FileC

Re: [PATCH 5/5] fbconsole: actually store rows/cols

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 16:34, Sascha Hauer wrote: > struct fbc_priv has rows and cols fields, but they do not actually > store the rows and columns, but instead the actual values minus one. > Change this to make the code better understandable. > > Signed-off-by: Sascha Hauer Reviewed-b

Re: [PATCH 4/5] fbconsole: make background pixels transparent

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 16:34, Sascha Hauer wrote: > When we have a background image we want the background to actually shine > through, so set the alpha value of the background to transparent and not > opaque. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum I wonder if this cou

Re: [PATCH 3/5] gui: fix alpha blend

2024-09-25 Thread Ahmad Fatoum
> At least this was the intention. The function sets the alpha value > correctly only when it's not fully opaque. Fix this by always setting > the alpha channel when it exists. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > lib/gui/graphic_uti

Re: [PATCH 2/5] commands: splash: honour line_length

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 16:34, Sascha Hauer wrote: > the splash command has an option for setting a background colour. This > doesn't always fill the whole screen as expected. > > struct fb_info has a line_length field that specifies the length in > bytes of a single line. That length may be bigger than the a

Re: [PATCH 1/5] graphic_utils: Clip to screen boundaries

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 16:34, Sascha Hauer wrote: > Do not render the parts of the image that are outside the screen > boundaries to prevent memory corruptions. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > lib/gui/graphic_utils.c | 6 ++ > 1 file

Re: [PATCH 09/10] lib/string.c: export non optimized memmove as __default_memmove

2024-09-25 Thread Ahmad Fatoum
fault_memcpy already. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > lib/string.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/lib/string.c b/lib/string.c > index 374f326143..98dd3cffdd 100644 > --- a/lib/st

Re: [PATCH 07/10] ARM: always assume the unified syntax for assembly code

2024-09-25 Thread Ahmad Fatoum
when we build for CONFIG_THUMB2_BAREBOX. I suggest, we remove this line and see if we even have any warnings. With this addressed: Reviewed-by: Ahmad Fatoum Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http:/

Re: [PATCH 06/10] ARM: update io-* from Linux

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 15:55, Sascha Hauer wrote: > This updates io-readsb.S, io-readsl.S, io-readsw-armv4.S, io-writesb.S, > io-writesl.S and io-writesw-armv4.S from Linux. Likewise, please add version. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > arch/arm

Re: [PATCH 05/10] ARM: update findbit.S from Linux

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 15:55, Sascha Hauer wrote: > This updates findbit.S from Linux Please mention version. > > Signed-off-by: Sascha Hauer > --- > arch/arm/lib32/findbit.S | 243 > ++- > 1 file changed, 94 insertions(+), 149 deletions(-) > > diff --git a/a

Re: [PATCH 04/10] ARM: update lib1funcs.S from Linux

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 15:55, Sascha Hauer wrote: > This updates lib1funcs.S from Linux Please mention what Linux version this was imported from. > - moveq pc, lr > + reteq lr huh, what kind of instruction is reteq? Cheers, Ahmad -- Pengutronix e.K. |

Re: [PATCH 03/10] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2024-09-25 Thread Ahmad Fatoum
ng # PXA3xx > | Acked-by: Stefano Stabellini # Xen > | Tested-by: Uwe Kleine-König # ARMv7M > | Tested-by: Simon Horman # Shmobile > | Signed-off-by: Russell King > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > arch/arm/cpu/

Re: [PATCH 02/10] ARM: rename logical shift macros push pull into lspush lspull

2024-09-25 Thread Ahmad Fatoum
d 'push' instruction mnemonic. That allows assembler.h to be > | included in .S files that use 'push' instruction. > | > | Suggested-by: Will Deacon > | Signed-off-by: Victor Kamensky > | Acked-by: Nicolas Pitre > | Signed-off-

Re: [PATCH 01/10] ARM: Use optimized reads[bwl] and writes[bwl] functions

2024-09-25 Thread Ahmad Fatoum
On 25.09.24 15:55, Sascha Hauer wrote: > The optimized versions are there for ARM32, but since 0d53f3c584a2 > ("arm: use asm-generic/io.h") they were no longer used. Activate > them again. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > arch/a

Re: [PATCH v4 02/16] keytoc: fail in case gen_key() fails

2024-09-25 Thread Ahmad Fatoum
On 13.09.24 09:59, Sascha Hauer wrote: > In case of an error in gen_key() return an error code so that the keytoc > tool returns an error. > > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > scripts/keytoc.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH v4 01/16] keytoc: remove ECDSA dts support

2024-09-25 Thread Ahmad Fatoum
On 13.09.24 09:59, Sascha Hauer wrote: > Generating dts snippets for ECDSA keys does not work properly, > there are various endianess problems. As we do not need this currently > for barebox drop the support for now. > > Signed-off-by: Sascha Hauer Acked-by: Ahmad Fatoum &

[PATCH] efi: payload: image use new CONFIG_ARM64 symbol

2024-09-20 Thread Ahmad Fatoum
keep the order elsewhere in the file, where x86 checks are done before those for ARM. Both can't be active at the same time, so no functional change expected. Signed-off-by: Ahmad Fatoum --- efi/payload/image.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e

[PATCH master 2/2] include: stdlib.h: define prototypes for malloc/free

2024-09-11 Thread Ahmad Fatoum
malloc(), free() and friends are declared in for hosted implementations. Given that we have the header in barebox too, we should define malloc(), free() as users porting userspace code may expect it there. Signed-off-by: Ahmad Fatoum --- include/stdlib.h | 1 + 1 file changed, 1 insertion

[PATCH master 1/2] lib: jsmn: fix compilation error

2024-09-11 Thread Ahmad Fatoum
With recent restructuring of the headers, kmalloc_array was no longer indirectly included, which broke the build. Add the missing headers and while at it switch over to normal malloc, because kmalloc_array() uses a bigger alignment than necessary. Signed-off-by: Ahmad Fatoum --- lib/jsmn.c | 4

Re: [PATCH v3 00/15] Add ECDSA support for FIT image verification

2024-09-11 Thread Ahmad Fatoum
On 06.09.24 12:40, Sascha Hauer wrote: > This series implements ECDSA signature verification for FIT images. > The ECDSA code itself is taken from the Kernel. Currently only supported > way to specify a ECDSA key is to compile it into the binary using > CONFIG_CRYPTO_ECDSA_KEY, taking it from a dev

Re: [PATCH v3 11/15] crypto: public-keys: use array of public_keys

2024-09-11 Thread Ahmad Fatoum
ates them first, so this change looks sensible. > Signed-off-by: Sascha Hauer Reviewed-by: Ahmad Fatoum > --- > crypto/public-keys.c | 10 +- > scripts/keytoc.c | 12 > 2 files changed, 9 insertions(+), 13 deletions(-) > > diff --git a/crypto/public

Re: [PATCH v3 08/15] crypto: rsa: encapsulate rsa keys in public keys struct

2024-09-11 Thread Ahmad Fatoum
On 06.09.24 12:40, Sascha Hauer wrote: > This encapsulates struct rsa_public_key into a struct public_key. So far > RSA keys are the only supported key type. With adding ECDSA keys we need > a container struct so that we can add ECDSA keys using the same > mechanisms. > > Also we rename CONFIG_CRY

Re: [PATCH v3 10/15] crypto: builtin_keys: Allow to specify multiple keys in CONFIG_CRYPTO_PUBLIC_KEYS

2024-09-11 Thread Ahmad Fatoum
Hi Sascha, On 06.09.24 12:40, Sascha Hauer wrote: > This adds the missing pieces to make CONFIG_CRYPTO_PUBLIC_KEYS > a list of keys rather than a single key only. > > We have to remove the quotes from the key argument in cmd_keys to > pass the keys as multiple arguments to keytoc. While at it the

Re: [PATCH v3 07/15] crypto: rsa: include key name hint into CONFIG_CRYPTO_RSA_KEY

2024-09-11 Thread Ahmad Fatoum
Hello Sascha, On 06.09.24 12:40, Sascha Hauer wrote: > Set the key name hint in CONFIG_CRYPTO_RSA_KEY. CONFIG_CRYPTO_RSA_KEY > now has the form: > > : > > This is done in preparation to make CONFIG_CRYPTO_RSA_KEY a list of > keys. IIUC, existing users that do make oldconfig will: - either lo

[PATCH 1/3] ARM: rpi: turn fixup message into debug messages

2024-09-11 Thread Ahmad Fatoum
When network booted, these properties may be missing and informing the user about it arguably just clutters the log. Thus bump down the log level to debug. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/raspberry-pi/rpi-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 2/3] ARM: rpi: always add built-in env

2024-09-11 Thread Ahmad Fatoum
The function loads both the built-in env and the barebox.env file on the SD-Card's boot partition. Failure to mount the SD-Card should still result in the built-in env being loaded, therefore move it to the start of the function. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/raspberry-p

[PATCH 3/3] ARM: rpi: return correct error code when failing to read revision

2024-09-11 Thread Ahmad Fatoum
extra error code results in no loss of information. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/raspberry-pi/rpi-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index 7a3911e

[PATCH] ARM: psci: hide ARM_PSCI options when ARCH_IMX7 is disabled

2024-09-11 Thread Ahmad Fatoum
We only support providing PSCI on a single SoC, the i.MX7. Having the option in other configuration is thus confusing. Therefore hide the symbols when not building for the i.MX7. Using PSCI as consumer is a separate symbol (ARM_PSCI_CLIENT) and should be unaffected. Signed-off-by: Ahmad Fatoum

[PATCH] font: fbconsole: use DIV_ROUND_UP for clarity

2024-09-11 Thread Ahmad Fatoum
Adding X - 1 and then dividing by X is effectively rounding up, so let's use the macro to make this clearer. No functional change. Signed-off-by: Ahmad Fatoum --- lib/fonts/fonts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fonts/fonts.c b/lib/fonts/fonts.c

[PATCH] PWM: core: make pwm.h header self-contained

2024-09-11 Thread Ahmad Fatoum
The file has references to DIV_ROUND_CLOSEST_ULL and struct device_node, which so far only worked because of headers previously included. Fix this to make the header self-contained. Signed-off-by: Ahmad Fatoum --- include/pwm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include

[PATCH 3/4] dma: debug: poison DMA buffers with KASAN while owned by device

2024-09-10 Thread Ahmad Fatoum
idated, so the CPU sees what was written by the device. It's therefore sensible to poison access to a buffer while owned by the device and only unpoison it after ownership has been transferred to the CPU. Signed-off-by: Ahmad Fatoum --- drivers/dma/debu

[PATCH 4/4] dma: debug: detect repeated DMA sync using KASAN

2024-09-10 Thread Ahmad Fatoum
A sync"). Such repeated sync's are usually a result of mapping a buffer and then calling dma_sync_single_for_device on it. This is unnecessary and warrants a renewed look at the DMA management scheme, which this warning hopefully accomplishes. Signed-off-by: Ahmad Fatoum ---

[PATCH 0/4] dma: debug: track DMA buffer ownership with KASAN

2024-09-10 Thread Ahmad Fatoum
a01ae0>] (0xa01ae0) from [<00a01360>] (0xa01360) Memory state around the buggy address: 40419e00: 00 00 00 00 00 00 00 00 02 fc ff ff ff ff fc 00 40419e80: 00 00 00 fc 00 00 00 00 04 fc ff ff ff ff fc fc >40419f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f

[PATCH 1/4] Revert "dma: debug: detect repeated DMA sync"

2024-09-10 Thread Ahmad Fatoum
#x27;s revert commit 1ad4b32702ddc3b801e8cd35441d2a9b3a41bb19 first to have a clean slate. Fixes: 1ad4b32702dd ("dma: debug: detect repeated DMA sync") Signed-off-by: Ahmad Fatoum --- drivers/dma/debug.c | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a

[PATCH 2/4] KASan: implement non-warning kasan_is_poisoned_shadow

2024-09-10 Thread Ahmad Fatoum
ect double poisons/unpoisons that should not occur if the DMA API is correctly used. Signed-off-by: Ahmad Fatoum --- include/linux/kasan.h | 2 ++ lib/kasan/generic.c | 37 + 2 files changed, 39 insertions(+) diff --git a/include/linux/kasan.h b/include/lin

[PATCH] ARM: errata: document errata workarounds

2024-09-10 Thread Ahmad Fatoum
Give all errata workaround functions a kernel-doc listing the title of the erratum and what CPUs it affects for documentation purposes. Signed-off-by: Ahmad Fatoum --- arch/arm/include/asm/errata.h | 83 +++ 1 file changed, 83 insertions(+) diff --git a/arch/arm

[PATCH v2] sandbox: lds: fix "ELF has a LOAD segment with RWX permissions" warning

2024-09-10 Thread Ahmad Fatoum
he warning completely felt wrong. Looking more into it now, we can mark the .barebox_rodata section in the linker file snippet we have in sandbox as READONLY and the warning disappears, so let's do that instead. Signed-off-by: Ahmad Fatoum --- v1 -> v2: - add fallback for earlier binuti

[PATCH] lib: notifier: allow unregistering notifier in notifier_call_chain

2024-09-10 Thread Ahmad Fatoum
It's possible for Linux notifiers to be removed from within the notifier callback. Allow the same within barebox to avoid subtle bugs. Signed-off-by: Ahmad Fatoum --- lib/notifier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/notifier.c b/lib/notifier.c

[PATCH 2/2] include: linux/math.h: sync with linux

2024-09-10 Thread Ahmad Fatoum
The header has evolved upstream since we last imported it. Sync it with Linux to make available some more functions for use in barebox. Signed-off-by: Ahmad Fatoum --- include/linux/math.h | 173 --- lib/math/Makefile| 1 + lib/math/int_pow.c

[PATCH 1/2] lib: drop separate int_sqrt.h header

2024-09-10 Thread Ahmad Fatoum
Linux defines int_sqrt in linux/math.h and has the implementations in lib/math. We have both these locations, so move the existing code over to simplify future sync of math functions. Signed-off-by: Ahmad Fatoum --- commands/fbtest.c | 2 +- include/int_sqrt.h| 8

[PATCH master] Kbuild: update gen_compile_commands.py

2024-09-10 Thread Ahmad Fatoum
one commit that we don't take over though as that doesn't apply to barebox yet: 321648455061 kbuild: use obj-y instead extra-y for objects placed at the head Signed-off-by: Ahmad Fatoum --- scripts/clang-tools/gen_compile_commands.py | 50 - 1 file changed, 29 i

Re: [PATCH] include: linux/iopoll: fix uninitialized warning

2024-09-10 Thread Ahmad Fatoum
Hello Rouven, On 03.09.24 11:37, Rouven Czerwinski wrote: > In gcc 13.3 there is a warning that start may be used unitialized: > > include/linux/iopoll.h:42:21: warning: ‘start’ may be used uninitialized > [-Wmaybe-uninitialized] > 42 | is_timeout(start, ((timeout_us)

[PATCH 2/2] fonts: add TER16x32 font

2024-08-24 Thread Ahmad Fatoum
The biggest font we have, VGA8x16, looks quite small on higher density displays like the 15 inch 1080p display used for the barebox demo at FrOSCon. To make it easier to discern the text, import a bigger font from Linux. Signed-off-by: Ahmad Fatoum --- lib/fonts/Kconfig |9 + lib

[PATCH 1/2] fbconsole: support fonts wider than 16 pixels

2024-08-24 Thread Ahmad Fatoum
: Ahmad Fatoum --- drivers/video/fbconsole.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c index 6c85e8e06a8c..cec1afec56cb 100644 --- a/drivers/video/fbconsole.c +++ b/drivers/video/fbconsole.c @@ -117,7

[PATCH] doc: bcm283x: Mention arm_64bit config.txt key

2024-08-24 Thread Ahmad Fatoum
Guide users into the right direction by mentioning what config.txt key is needed to start barebox in 64-bit mode. Signed-off-by: Ahmad Fatoum --- Documentation/boards/bcm2835.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/boards/bcm2835.rst b

[PATCH master] input: don't report depressed keys that were never pressed

2024-08-24 Thread Ahmad Fatoum
, have the core only report depress event for previously pressed keys. Signed-off-by: Ahmad Fatoum --- drivers/input/input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/input/input.c b/drivers/input/input.c index 1a4792935114..e5509bf90d3e 100644 --- a/drivers

[PATCH] lib: math: rename file providing arith() to arith.c

2024-08-24 Thread Ahmad Fatoum
We have math/ in the same directory, so having a math.c file is a bit confusing. Rename the file to a more descriptive arith.c. Signed-off-by: Ahmad Fatoum --- lib/Makefile| 2 +- lib/{math.c => arith.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename lib/{mat

[PATCH] include: move STACK_ALIGN_ARRAY to linux/align.h

2024-08-24 Thread Ahmad Fatoum
As part of the measures to factor out stuff from common.h into dedicated headers, move out STACK_ALIGN_ARRAY. This macro doesn't exit in Linux, but the file is fitting. We don't need to explicitly include it, because it's being included by . Signed-off-by: Ahmad Fatoum --- i

[PATCH] ci: container: restore OpenRISC toolchain to v14.2.0

2024-08-23 Thread Ahmad Fatoum
to point at correct version") Signed-off-by: Ahmad Fatoum --- test/Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Containerfile b/test/Containerfile index 1c4932f56a64..5c49164d33b6 100644 --- a/test/Containerfile +++ b/test/Containerf

[PATCH] test: directly exit when barebox state transition fails

2024-08-22 Thread Ahmad Fatoum
[1] for details. [1]: https://github.com/pytest-dev/pytest/issues/2704 Suggested-by: Bastian Krause Signed-off-by: Ahmad Fatoum --- conftest.py | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/conftest.py b/conftest.py index 56d4b512a912..5639b7e22e

[PATCH master] openrisc: dts: describe all 4 UARTs

2024-08-22 Thread Ahmad Fatoum
rc3, but I submitted a patch to restore serial@9000 as default. Until that's merged, let's just activate all consoles after describing them in the device tree. Signed-off-by: Ahmad Fatoum --- Optimally, we would start consuming the device tree supplied by QEMU, but this should be good en

Re: [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0

2024-08-22 Thread Ahmad Fatoum
Hello, On 18.08.24 19:09, Ahmad Fatoum wrote: > Hello Stafford, > > On 18.08.24 09:14, Stafford Horne wrote: >> On Wed, Aug 14, 2024 at 06:14:35PM +0200, Ahmad Fatoum wrote: >>> The newest toolchain bump breaks OpenRISC start-up under QEMU: The console >>> is &g

[PATCH 3/5] MAKEALL: don't build all configs wen defconfigs given

2024-08-22 Thread Ahmad Fatoum
arguments. Signed-off-by: Ahmad Fatoum --- MAKEALL | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/MAKEALL b/MAKEALL index df318c6d123c..68ebe6ef98a3 100755 --- a/MAKEALL +++ b/MAKEALL @@ -281,20 +281,20 @@ then REGEX="*" fi -if [

[PATCH 4/5] MAKEALL: add support for running pytest after build

2024-08-22 Thread Ahmad Fatoum
once. The benefit of this is that we can have a single command to get QEMU running on a target, e.g.: scripts/container.sh ./MAKEALL test/arm/multi_v8_defconfig.yaml Signed-off-by: Ahmad Fatoum --- MAKEALL | 102 1 file changed, 96 insert

[PATCH 2/5] MAKEALL: return error code from do_build_target

2024-08-22 Thread Ahmad Fatoum
t variable to a more descriptive exitcode. Signed-off-by: Ahmad Fatoum --- MAKEALL | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/MAKEALL b/MAKEALL index 861d397814d9..df318c6d123c 100755 --- a/MAKEALL +++ b/MAKEALL @@ -8,7 +8,7 @@ warnings_list="

[PATCH 5/5] Documentation: board: emulated: rewrite to use MAKEALL/pytest directly

2024-08-22 Thread Ahmad Fatoum
pytest, so let's rewrite the documentation to use them. There's still some features remaining that only emulate.pl supports, once these are present in MAKEALL/pytest, we can drop it too. Signed-off-by: Ahmad Fatoum --- Documentation/boards/emulated.rst | 85 +--

[PATCH 1/5] test: conftest.py: move top-level

2024-08-22 Thread Ahmad Fatoum
level higher as described in: https://github.com/pytest-dev/pytest/issues/5822#issuecomment-697331920 Signed-off-by: Ahmad Fatoum --- test/conftest.py => conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/conftest.py => conftest.py (99%) diff --git a/test/co

[PATCH 1/3] MIPS: dts: add /chosen/stdout-path where it is missing

2024-08-22 Thread Ahmad Fatoum
let's have /chosen/stdout-path point at it. Signed-off-by: Ahmad Fatoum --- arch/mips/dts/black-swift.dts | 4 arch/mips/dts/dlink-dir-320.dts | 4 arch/mips/dts/img-ci20.dts | 4 arch/mips/dts/loongson-ls1b.dts | 4 arch/mips/dts/rzx50.dts | 4 5 fil

[PATCH master] ARM: semihosting: use svc instead of incorrect bkpt in DEBUG_LL

2024-08-22 Thread Ahmad Fatoum
The semihosting DEBUG_LL support was tested on ARM64. Trying it out on ARM32 leads to a hanging system, because the DEBUG_LL handler used the wrong instruction (breakpoint) instead of what the normal semihosting implementation uses (supervisor call). Signed-off-by: Ahmad Fatoum --- arch/arm

[PATCH 3/3] test: mips: use new qemu-maltael_defconfig

2024-08-22 Thread Ahmad Fatoum
We have a qemu-maltael_defconfig, which is generated by Kbuild by merging qemu-maltael_defconfig with a Kconfig fragment that switches to little endian. Let's make use of it, instead of depending on the runner kconfig_add key, which is only evaluated by emulate.pl. Signed-off-by: Ahmad F

[PATCH 2/3] MIPS: qemu-malta: explicitly set stdout-path

2024-08-22 Thread Ahmad Fatoum
y pointing stdout-path at the first console. Signed-off-by: Ahmad Fatoum --- arch/mips/dts/qemu-malta.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/dts/qemu-malta.dts b/arch/mips/dts/qemu-malta.dts index c2bc03dd4631..6cf7513ff5fa 100644 --- a/arch/mips/dts/qemu-malta.dts

[PATCH] ARM: socfpga: drop unused Arria 10 barebox-arm-head.h

2024-08-22 Thread Ahmad Fatoum
From: Ahmad Fatoum The file is unreferenced anywhere and it doesn't differ from the default __barebox_arm_head anyway, except by two additional words with value 0x, which shouldn't matter. It thus seems that the file wasn't needed when it was first added and it's s

[PATCH master] ci: container: fix CROSS_COMPILE_openrisc to point at correct version

2024-08-22 Thread Ahmad Fatoum
MAKEALL. Fixes: 6d4c6b01f4c4 ("ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0") Signed-off-by: Ahmad Fatoum --- This is hopefully the last patch needed to make CI green again. --- test/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH] ci: container: rerun workflow when modifying container.yml

2024-08-20 Thread Ahmad Fatoum
We currently, only rebuild the container when its Containerfile changes. The container build is described by the workflow in container.yml, so Github changes should also rebuild the container on changes to this file. Signed-off-by: Ahmad Fatoum --- .github/workflows/container.yml | 1 + 1 file

[PATCH v3] acpi: fix compilation for 32-bit

2024-08-20 Thread Ahmad Fatoum
ompilation for 32-bit") Signed-off-by: Ahmad Fatoum --- v2 -> v3: - make commit apply on top of v1, which has already been applied. v1 -> v2: - fix CI x86_64 breakage, by keeping the packed/aligned specifiction as is, but changing it to 32-bit on 32-bit systems. --- include/ac

Re: [PATCH 3/3] ci: container: downgrade OpenRISC toolchain from 14.2.0 to 13.1.0

2024-08-18 Thread Ahmad Fatoum
Hello Stafford, On 18.08.24 09:14, Stafford Horne wrote: > On Wed, Aug 14, 2024 at 06:14:35PM +0200, Ahmad Fatoum wrote: >> The newest toolchain bump breaks OpenRISC start-up under QEMU: The console is >> now completely silent. Steps to reproduce the hang: >> >

[PATCH v2] acpi: fix compilation for 32-bit

2024-08-15 Thread Ahmad Fatoum
From: Ahmad Fatoum Build test on x86 fails due to pointer cast and because of forcing the bigger alignment on the flexible array. The problematic pointer cast is for the XSDT, which is 64-bit-only, so let's fix the cast and return an error if we somehow see an XSDT on 32-bit. For the fle

Re: [PATCH 5/6] i2c: efi: avoid 64-bit division

2024-08-14 Thread Ahmad Fatoum
Hello Tomas, On 15.08.24 07:53, Tomas Marek wrote: > Hello Ahmad, > > Thanks for maintenance of the Barebox EFI. > > On Wed, Aug 14, 2024 at 11:24:23AM +0200, Ahmad Fatoum wrote: >> I2C message length is 16 bit, so doing a 64-bit division is overkill. >> Let's

[PATCH 1/2] include: linux/math.h: promote DIV_ROUND_UP_ULL args to 64-bit

2024-08-14 Thread Ahmad Fatoum
-by: Ahmad Fatoum --- include/linux/math.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/math.h b/include/linux/math.h index acbffa96e6eb..f5d5cc714c4e 100644 --- a/include/linux/math.h +++ b/include/linux/math.h @@ -23,7 +23,8 @@ #define DIV_ROUND_DOWN_ULL(ll

[PATCH 2/2] i2c: efi: use DIV_ROUND_UP_ULL instead of native division

2024-08-14 Thread Ahmad Fatoum
ision. Make use of this to fix compilation for 32-bit. Cc: Tomas Marek Signed-off-by: Ahmad Fatoum --- This replaces "i2c: efi: avoid 64-bit division" --- drivers/i2c/busses/i2c-efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-efi.c b/drivers

[PATCH 2/3] openrisc: implement C debug_ll for NS16550

2024-08-14 Thread Ahmad Fatoum
The early startup code is written in assembly, so the C DEBUG_LL implementation isn't as useful, but it can still come in handy as debugging aid, so let's add it. Signed-off-by: Ahmad Fatoum --- arch/openrisc/Kconfig| 1 + arch/openrisc/include/asm/debug

[PATCH 1/3] debug_ll: ns16550: fix prototype in documentation comment

2024-08-14 Thread Ahmad Fatoum
The functions were changed to take a base parameter, so they can be used with PBL console instead of just DEBUG_LL. Update the comment to reflect the current state of the code. Fixes: e64990099c8f ("debug_ll ns16550: Add base address argument to register functions") Signed-off-by: Ah

  1   2   3   4   5   6   7   8   9   10   >