Re: r8a77950-salvator-x does nto boot since cfa7ede20f133cc81cef01dc3a516dda3a9721ee arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely

2021-01-05 Thread Corentin Labbe
Le Tue, Jan 05, 2021 at 11:13:03AM +0100, Geert Uytterhoeven a écrit :
> Hi Corentin,
> 
> On Tue, Jan 5, 2021 at 10:52 AM Corentin Labbe
>  wrote:
> > Due to DTB renaming, salvatorX was not booted since a long time in kernelCI.
> > Now the rename is handled, the board fail to boot.
> >
> > I have bisected the problem:
> 
> > # first bad commit: [cfa7ede20f133cc81cef01dc3a516dda3a9721ee] arm64: set 
> > TEXT_OFFSET to 0x0 in preparation for removing it entirely
> >
> > This is the interesting part of uboot log:
> > [0.000292] NOTI[0.000292] NOTICE:  BL2: R-Car Gen3 Initial Program 
> > Loader(CA57) Rev.1.0.16
> > [0.005855] NOTICE:  BL2: PRR is R-Car H3 Ver1.1
> > [0.010437] NOTICE:  BL2: Board is Salvator-X Rev1.0
> > [0.015379] NOTICE:  BL2: Boot device is HyperFlash(80MHz)
> > [0.020804] NOTICE:  BL2: LCM state is CM
> > [0.024847] NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x53
> > [0.030891] NOTICE:  BL2: DDR1600(rev.0.27)NOTICE:  [COLD_BOOT]NOTICE:  
> > ..0
> > [0.066311] NOTICE:  BL2: DRAM Split is 4ch
> > [0.070195] NOTICE:  BL2: QoS is default setting(rev.0.37)
> > [0.075697] NOTICE:  BL2: Lossy Decomp areas
> > [0.079872] NOTICE:   Entry 0: DCMPAREACRAx:0x8540 
> > DCMPAREACRBx:0x570
> > [0.086957] NOTICE:   Entry 1: DCMPAREACRAx:0x4000 
> > DCMPAREACRBx:0x0
> > [0.093869] NOTICE:   Entry 2: DCMPAREACRAx:0x2000 
> > DCMPAREACRBx:0x0
> > [0.100785] NOTICE:  BL2: v1.3(release):b330e0e
> > [0.105274] NOTICE:  BL2: Built : 15:26:51, Dec  6 2017
> > [0.110462] NOTICE:  BL2: Normal boot
> > [0.114103] NOTICE:  BL2: dst=0xe6320208 src=0x818 len=512(0x200)
> > [0.120652] NOTICE:  BL2: dst=0x43f0 src=0x8180400 len=6144(0x1800)
> > [0.127110] NOTICE:  BL2: dst=0x4400 src=0x81c len=65536(0x1)
> > [0.134336] NOTICE:  BL2: dst=0x4410 src=0x820 
> > len=524288(0x8)
> > [0.144816] NOTICE:  BL2: dst=0x5000 src=0x864 
> > len=1048576(0x10)
> > U-Boot 2015.04 (Dec 06 2017 - 15:26:59)
> > CPU: Renesas Electronics R8A7795 rev 1.1
> > Board: Salvator-X
> > I2C:   ready
> > DRAM:  3.9 GiB
> > MMC:   sh-sdhi: 0, sh-sdhi: 1, sh-sdhi: 2
> > In:serial
> > Out:   serial
> > Err:   serial
> > Net:   ravb
> >
> > [...]
> >
> > booti 0x4808 0x4a00 0x4800
>  ^
> I take it this is the problem?
> 
> For R-Car H3 ES1.0, I currently use the addresses below:
> 
> tftpboot 0x6000 h3-salvator-x/Image
> tftpboot 0x6800 h3-salvator-x/r8a77950-salvator-x.dtb
> booti 0x6000 - 0x6800
> 
> For R-Car H3 ES2.0 (and other R-Car Gen3 SoCs), I use other addresses:
> 
> tftpboot 0x5000 h3-salvator-xs/Image
> tftpboot 0x5800 h3-salvator-xs/r8a77951-salvator-xs.dtb
> booti 0x5000 - 0x5800
> 
> The firmware on your H3 ES1.1 board (Rev.1.0.16) is newer than on my
> ES1.0 board (Rev.1.0.12), so it's possible the second version works on
> your board, too.
> 
> If these work for you, I'll update 
> https://elinux.org/R-Car/Boards/Salvator-X[S]
> 

Hello

Thanks, changing kernel/dtb address made it boot.
when testing, I have also discovered that r8a7796-m3ulcb hit the same issue 
than the salvatorX and that thoses address made it boot.

Regards


Re: r8a77950-salvator-x does nto boot since cfa7ede20f133cc81cef01dc3a516dda3a9721ee arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely

2021-01-05 Thread Geert Uytterhoeven
Hi Corentin,

On Tue, Jan 5, 2021 at 10:52 AM Corentin Labbe
 wrote:
> Due to DTB renaming, salvatorX was not booted since a long time in kernelCI.
> Now the rename is handled, the board fail to boot.
>
> I have bisected the problem:

> # first bad commit: [cfa7ede20f133cc81cef01dc3a516dda3a9721ee] arm64: set 
> TEXT_OFFSET to 0x0 in preparation for removing it entirely
>
> This is the interesting part of uboot log:
> [0.000292] NOTI[0.000292] NOTICE:  BL2: R-Car Gen3 Initial Program 
> Loader(CA57) Rev.1.0.16
> [0.005855] NOTICE:  BL2: PRR is R-Car H3 Ver1.1
> [0.010437] NOTICE:  BL2: Board is Salvator-X Rev1.0
> [0.015379] NOTICE:  BL2: Boot device is HyperFlash(80MHz)
> [0.020804] NOTICE:  BL2: LCM state is CM
> [0.024847] NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x53
> [0.030891] NOTICE:  BL2: DDR1600(rev.0.27)NOTICE:  [COLD_BOOT]NOTICE:  ..0
> [0.066311] NOTICE:  BL2: DRAM Split is 4ch
> [0.070195] NOTICE:  BL2: QoS is default setting(rev.0.37)
> [0.075697] NOTICE:  BL2: Lossy Decomp areas
> [0.079872] NOTICE:   Entry 0: DCMPAREACRAx:0x8540 
> DCMPAREACRBx:0x570
> [0.086957] NOTICE:   Entry 1: DCMPAREACRAx:0x4000 DCMPAREACRBx:0x0
> [0.093869] NOTICE:   Entry 2: DCMPAREACRAx:0x2000 DCMPAREACRBx:0x0
> [0.100785] NOTICE:  BL2: v1.3(release):b330e0e
> [0.105274] NOTICE:  BL2: Built : 15:26:51, Dec  6 2017
> [0.110462] NOTICE:  BL2: Normal boot
> [0.114103] NOTICE:  BL2: dst=0xe6320208 src=0x818 len=512(0x200)
> [0.120652] NOTICE:  BL2: dst=0x43f0 src=0x8180400 len=6144(0x1800)
> [0.127110] NOTICE:  BL2: dst=0x4400 src=0x81c len=65536(0x1)
> [0.134336] NOTICE:  BL2: dst=0x4410 src=0x820 len=524288(0x8)
> [0.144816] NOTICE:  BL2: dst=0x5000 src=0x864 
> len=1048576(0x10)
> U-Boot 2015.04 (Dec 06 2017 - 15:26:59)
> CPU: Renesas Electronics R8A7795 rev 1.1
> Board: Salvator-X
> I2C:   ready
> DRAM:  3.9 GiB
> MMC:   sh-sdhi: 0, sh-sdhi: 1, sh-sdhi: 2
> In:serial
> Out:   serial
> Err:   serial
> Net:   ravb
>
> [...]
>
> booti 0x4808 0x4a00 0x4800
 ^
I take it this is the problem?

For R-Car H3 ES1.0, I currently use the addresses below:

tftpboot 0x6000 h3-salvator-x/Image
tftpboot 0x6800 h3-salvator-x/r8a77950-salvator-x.dtb
booti 0x6000 - 0x6800

For R-Car H3 ES2.0 (and other R-Car Gen3 SoCs), I use other addresses:

tftpboot 0x5000 h3-salvator-xs/Image
tftpboot 0x5800 h3-salvator-xs/r8a77951-salvator-xs.dtb
booti 0x5000 - 0x5800

The firmware on your H3 ES1.1 board (Rev.1.0.16) is newer than on my
ES1.0 board (Rev.1.0.12), so it's possible the second version works on
your board, too.

If these work for you, I'll update https://elinux.org/R-Car/Boards/Salvator-X[S]

> ## Loading init Ramdisk from Legacy Image at 4a00 ...
>Image Name:
>Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
>Data Size:15809011 Bytes = 15.1 MiB
>Load Address: 
>Entry Point:  
> ERROR: Did not find a cmdline Flattened Device Tree

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


r8a77950-salvator-x does nto boot since cfa7ede20f133cc81cef01dc3a516dda3a9721ee arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely

2021-01-05 Thread Corentin Labbe
Hello

Due to DTB renaming, salvatorX was not booted since a long time in kernelCI.
Now the rename is handled, the board fail to boot.

I have bisected the problem:
git bisect start
# good: [6b9830fecd4a87d7ebb4d93484fef00f46d0fa0f] Linux 5.7.19
git bisect good 6b9830fecd4a87d7ebb4d93484fef00f46d0fa0f
# bad: [ab435ce49bd1d02e33dfec24f76955dc1196970b] Linux 5.8.18
git bisect bad ab435ce49bd1d02e33dfec24f76955dc1196970b
# good: [3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162] Linux 5.7
git bisect good 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
# bad: [7ae77150d94d3b535c7b85e6b3647113095e79bf] Merge tag 'powerpc-5.8-1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect bad 7ae77150d94d3b535c7b85e6b3647113095e79bf
# bad: [2e63f6ce7ed2c4ff83ba30ad9ccad422289a6c63] Merge branch 'uaccess.comedi' 
of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
git bisect bad 2e63f6ce7ed2c4ff83ba30ad9ccad422289a6c63
# bad: [cfa3b8068b09f25037146bfd5eed041b78878bee] Merge tag 'for-linus-hmm' of 
git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
git bisect bad cfa3b8068b09f25037146bfd5eed041b78878bee
# good: [17e0a7cb6a254c6d086562e7adf8b7ac24d267f3] Merge tag 
'x86-cleanups-2020-06-01' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 17e0a7cb6a254c6d086562e7adf8b7ac24d267f3
# bad: [17839856fd588f4ab6b789f482ed3ffd7c403e1f] gup: document and work around 
"COW can break either way" issue
git bisect bad 17839856fd588f4ab6b789f482ed3ffd7c403e1f
# bad: [c2b0fc847f3122e5a4176c3772626a7a8facced0] Merge tag 'for-linus' of 
git://git.armlinux.org.uk/~rmk/linux-arm
git bisect bad c2b0fc847f3122e5a4176c3772626a7a8facced0
# bad: [342403bcb4dfe41324a0f6f4cb5a8d324f31c725] Merge branches 
'for-next/acpi', 'for-next/bpf', 'for-next/cpufeature', 'for-next/docs', 
'for-next/kconfig', 'for-next/misc', 'for-next/perf', 'for-next/ptr-auth', 
'for-next/sdei', 'for-next/smccc' and 'for-next/vdso' into for-next/core
git bisect bad 342403bcb4dfe41324a0f6f4cb5a8d324f31c725
# good: [b130a8f70cbbf907c399799bd1073a78763ca0e7] KVM: arm64: Check advertised 
Stage-2 page size capability
git bisect good b130a8f70cbbf907c399799bd1073a78763ca0e7
# bad: [4fc92254bf86b19ac1ef81f61f4e690fccfcba4a] arm64: mm: Add 
asid_gen_match() helper
git bisect bad 4fc92254bf86b19ac1ef81f61f4e690fccfcba4a
# bad: [9d2d75ede59bc1edd8561f2ee9d4702a5ea0ae30] arm64/kernel: Fix range on 
invalidating dcache for boot page tables
git bisect bad 9d2d75ede59bc1edd8561f2ee9d4702a5ea0ae30
# good: [0dd2334fd5b99e610ceccba0e5263e6969207880] arm64: entry: remove 
unneeded semicolon in el1_sync_handler()
git bisect good 0dd2334fd5b99e610ceccba0e5263e6969207880
# good: [68ecabd0e680a4ceaf950ae189a55d4730d10c64] arm64/mm: Use phys_to_page() 
to access pgtable memory
git bisect good 68ecabd0e680a4ceaf950ae189a55d4730d10c64
# bad: [cfa7ede20f133cc81cef01dc3a516dda3a9721ee] arm64: set TEXT_OFFSET to 0x0 
in preparation for removing it entirely
git bisect bad cfa7ede20f133cc81cef01dc3a516dda3a9721ee
# good: [30218da5974ceb29c913e53296577526cb742a7e] arm64: lib: Consistently 
enable crc32 extension
git bisect good 30218da5974ceb29c913e53296577526cb742a7e
# first bad commit: [cfa7ede20f133cc81cef01dc3a516dda3a9721ee] arm64: set 
TEXT_OFFSET to 0x0 in preparation for removing it entirely

This is the interesting part of uboot log:
[0.000292] NOTI[0.000292] NOTICE:  BL2: R-Car Gen3 Initial Program 
Loader(CA57) Rev.1.0.16
[0.005855] NOTICE:  BL2: PRR is R-Car H3 Ver1.1
[0.010437] NOTICE:  BL2: Board is Salvator-X Rev1.0
[0.015379] NOTICE:  BL2: Boot device is HyperFlash(80MHz)
[0.020804] NOTICE:  BL2: LCM state is CM
[0.024847] NOTICE:  BL2: AVS setting succeeded. DVFS_SetVID=0x53
[0.030891] NOTICE:  BL2: DDR1600(rev.0.27)NOTICE:  [COLD_BOOT]NOTICE:  ..0
[0.066311] NOTICE:  BL2: DRAM Split is 4ch
[0.070195] NOTICE:  BL2: QoS is default setting(rev.0.37)
[0.075697] NOTICE:  BL2: Lossy Decomp areas
[0.079872] NOTICE:   Entry 0: DCMPAREACRAx:0x8540 DCMPAREACRBx:0x570
[0.086957] NOTICE:   Entry 1: DCMPAREACRAx:0x4000 DCMPAREACRBx:0x0
[0.093869] NOTICE:   Entry 2: DCMPAREACRAx:0x2000 DCMPAREACRBx:0x0
[0.100785] NOTICE:  BL2: v1.3(release):b330e0e
[0.105274] NOTICE:  BL2: Built : 15:26:51, Dec  6 2017
[0.110462] NOTICE:  BL2: Normal boot
[0.114103] NOTICE:  BL2: dst=0xe6320208 src=0x818 len=512(0x200)
[0.120652] NOTICE:  BL2: dst=0x43f0 src=0x8180400 len=6144(0x1800)
[0.127110] NOTICE:  BL2: dst=0x4400 src=0x81c len=65536(0x1)
[0.134336] NOTICE:  BL2: dst=0x4410 src=0x820 len=524288(0x8)
[0.144816] NOTICE:  BL2: dst=0x5000 src=0x864 len=1048576(0x10)
U-Boot 2015.04 (Dec 06 2017 - 15:26:59)
CPU: Renesas Electronics R8A7795 rev 1.1
Board: Salvator-X
I2C:   ready
DRAM:  3.9 GiB
MMC:   sh-sdhi: 0, sh-sdhi: 1, sh-sdhi: 2
In:serial
Out:   serial
Err:   serial
Net:   ravb

[...]

booti 0x4808