Re: [BUG] fdt_pack_reg in common/fdt_support.c can cause crash from unaligned access

2024-03-26 Thread Sam Protsenko
[snip] > > So I suspect the answer might be that we have a problem here, on ARM. > > One solution might be to add a helper like put_unaligned_be64() which > uses a CONFIG to indicate whether 32-bit-aligned 64-bit read/write is > supported, and either just does the write, or calls > put_unaligned_b

Re: [BUG] fdt_pack_reg in common/fdt_support.c can cause crash from unaligned access

2023-07-11 Thread Simon Glass
Hi David, On Tue, 11 Jul 2023 at 04:34, David Virag wrote: > > On Mon, 2023-07-10 at 15:38 -0600, Simon Glass wrote: > > Hi, > > > > On Mon, 10 Jul 2023 at 14:13, Tom Rini wrote: > > > > > > On Mon, Jul 10, 2023 at 01:45:46PM -0600, Simon Glass wrote: > > > > Hi David, > > > > > > > > On Sun, 9

Re: [BUG] fdt_pack_reg in common/fdt_support.c can cause crash from unaligned access

2023-07-11 Thread David Virag
On Mon, 2023-07-10 at 15:38 -0600, Simon Glass wrote: > Hi, > > On Mon, 10 Jul 2023 at 14:13, Tom Rini wrote: > > > > On Mon, Jul 10, 2023 at 01:45:46PM -0600, Simon Glass wrote: > > > Hi David, > > > > > > On Sun, 9 Jul 2023 at 19:11, David Virag > > > wrote: > > > > > > > > Hi, > > > > > >

Re: [BUG] fdt_pack_reg in common/fdt_support.c can cause crash from unaligned access

2023-07-10 Thread Simon Glass
Hi, On Mon, 10 Jul 2023 at 14:13, Tom Rini wrote: > > On Mon, Jul 10, 2023 at 01:45:46PM -0600, Simon Glass wrote: > > Hi David, > > > > On Sun, 9 Jul 2023 at 19:11, David Virag wrote: > > > > > > Hi, > > > > > > I'm trying to port U-Boot to a new board (Samsung JACKPOTLTE, ARMv8, > > > Exynos78

Re: [BUG] fdt_pack_reg in common/fdt_support.c can cause crash from unaligned access

2023-07-10 Thread Tom Rini
On Mon, Jul 10, 2023 at 01:45:46PM -0600, Simon Glass wrote: > Hi David, > > On Sun, 9 Jul 2023 at 19:11, David Virag wrote: > > > > Hi, > > > > I'm trying to port U-Boot to a new board (Samsung JACKPOTLTE, ARMv8, > > Exynos7885) but when CONFIG_ARCH_FIXUP_FDT_MEMORY is enabled, the bootm > > com

Re: [BUG] fdt_pack_reg in common/fdt_support.c can cause crash from unaligned access

2023-07-10 Thread Simon Glass
Hi David, On Sun, 9 Jul 2023 at 19:11, David Virag wrote: > > Hi, > > I'm trying to port U-Boot to a new board (Samsung JACKPOTLTE, ARMv8, > Exynos7885) but when CONFIG_ARCH_FIXUP_FDT_MEMORY is enabled, the bootm > command leads to an unaligned memory access, which results in a > synchronous abor

[BUG] fdt_pack_reg in common/fdt_support.c can cause crash from unaligned access

2023-07-09 Thread David Virag
Hi, I'm trying to port U-Boot to a new board (Samsung JACKPOTLTE, ARMv8, Exynos7885) but when CONFIG_ARCH_FIXUP_FDT_MEMORY is enabled, the bootm command leads to an unaligned memory access, which results in a synchronous abort. After a long debugging session, I concluded that fdt_pack_reg in comm