scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9
Subsystems (2)
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc comments
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>
This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
Big endian microblaze emulations are not affected. I can't say if other emulations are affected because I see too many boot failures in -next to be able to track down all individual problems.
Guenter
---
Bisect log:
# bad: [671176b0016c80b3943cb5387312c886aba3308d] Add linux-next specific files for 20210211
# good: [92bf22614b21a2706f4993b278017e437f7785b3] Linux 5.11-rc7
git bisect start 'HEAD' 'v5.11-rc7'
# good: [d69fe59127a072f06e51bf101b82413056859ddc] Merge remote-tracking branch 'crypto/master' git bisect good d69fe59127a072f06e51bf101b82413056859ddc
# bad: [9cbf23a8700e40ce348e5dc83c95add50c8689d3] Merge remote-tracking branch 'spi/for-next' git bisect bad 9cbf23a8700e40ce348e5dc83c95add50c8689d3
# good: [635a8e981a1f34802668307e0b7bb8834d850a66] Merge remote-tracking branch 'drm-misc/for-linux-next' git bisect good 635a8e981a1f34802668307e0b7bb8834d850a66
# good: [dbb24458a99eed64fdcc88630e8ac38376720f96] Merge remote-tracking branch 'block/for-next' git bisect good dbb24458a99eed64fdcc88630e8ac38376720f96
# good: [f82648f1c7dd4709ff34cae8a98978fbf8e47d33] Merge remote-tracking branch 'integrity/next-integrity' git bisect good f82648f1c7dd4709ff34cae8a98978fbf8e47d33
# good: [b18e8865643e421fc3537d7eb446f1eb9edfdf1b] Merge remote-tracking branch 'iommu/next' git bisect good b18e8865643e421fc3537d7eb446f1eb9edfdf1b
# good: [6589daf8bb98c75ad1065edad87c099ffb9f5d87] dt-bindings: spi: sunxi: Add H616 compatible string git bisect good 6589daf8bb98c75ad1065edad87c099ffb9f5d87
# bad: [322322d15b9b912bc8710c367a95a7de62220a72] dt-bindings: ethernet-controller: fix fixed-link specification git bisect bad 322322d15b9b912bc8710c367a95a7de62220a72
# good: [6e09d75513d2670b7ab91ab3584fc5bcf2675a75] hwmon: (lm70) Use device_get_match_data() git bisect good 6e09d75513d2670b7ab91ab3584fc5bcf2675a75
# good: [9183908e70e913d2db052588172968da55d82af5] dt-bindings: Fix errors in 'if' schemas
git bisect good 9183908e70e913d2db052588172968da55d82af5
# bad: [59b48a715107d5719b75250059864fa775837425] scripts: dtc: Remove the unused fdtdump.c file git bisect bad 59b48a715107d5719b75250059864fa775837425
# bad: [79edff12060fe7772af08607eff50c0e2486c5ba] scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9 git bisect bad 79edff12060fe7772af08607eff50c0e2486c5ba
# good: [b775f49fbc8b07b0c3a4079e6f09f192eaf6e92f] scripts: dtc: Fetch fdtoverlay.c from external DTC project git bisect good b775f49fbc8b07b0c3a4079e6f09f192eaf6e92f
# first bad commit: [79edff12060fe7772af08607eff50c0e2486c5ba] scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9
Rob Herring
maintainerQuoted 27 lines · Guenter Roeck
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc comments
Quoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe 7cd5d5fe43d5 or a7c404099349, though that should return to historical behavior.
Can you give me the qemu command line and kernel cfg?
Rob
Quoted 30 lines · Rob Herring
Quoted 29 lines · Guenter Roeck
Hi Rob,
Quoted 24 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc commentsSigned-off-by Rob Herring <[email protected]>
Quoted 9 lines
Quoted 3 lines
This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe
7cd5d5fe43d5ora7c404099349, though that should return to historical behavior.Can you give me the qemu command line and kernel cfg?
I copied everything you should need to build a kernel (including toolchain) to http://server.roeck-us.net/qemu/microblazeel/
[ wow, I really need to update that compiler ]
Guenter
Rob Herring
maintainerQuoted 39 lines · Guenter Roeck
Quoted 37 lines · Rob Herring
Quoted 27 lines · Guenter Roeck
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc commentsQuoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe
7cd5d5fe43d5ora7c404099349, though that should return to historical behavior.
Quoted 6 lines
Quoted 2 lines
Can you give me the qemu command line and kernel cfg?
I copied everything you should need to build a kernel (including toolchain) to http://server.roeck-us.net/qemu/microblazeel/
[ wow, I really need to update that compiler ]
I can't seem to get BE/LE nor reverted or not working. It's always dying in microblaze_cache_init() based on the last print. It's your config, but gcc 10.1.0 off of kernel.org.
There is at least one possible problem here that the FDT may only be 4 byte aligned. The assumption is 8 bytes to not have misaligned accesses (and only for 64-bit accesses if 4 byte aligned). That's an issue with the qemu image loading depending on the sizes and combination of images loaded. That doesn't explain your failure though. As the initrd is a multiple of 8 bytes, you should be fine.
Rob
Quoted 42 lines · Rob Herring
Quoted 41 lines · Guenter Roeck
Quoted 39 lines · Rob Herring
Quoted 27 lines · Guenter Roeck
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc commentsQuoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe
7cd5d5fe43d5ora7c404099349, though that should return to historical behavior.Can you give me the qemu command line and kernel cfg?
Quoted 9 lines
Quoted 4 lines
I copied everything you should need to build a kernel (including toolchain) to http://server.roeck-us.net/qemu/microblazeel/
[ wow, I really need to update that compiler ]
I can't seem to get BE/LE nor reverted or not working. It's always dying in
microblaze_cache_init()based on the last print. It's your config, but gcc 10.1.0 off of kernel.org.
My memory may defeat me, but if I remember correctly microblaze needs a hand-built compiler. That is why I didn't update mine.
Quoted 7 lines
There is at least one possible problem here that the FDT may only be 4 byte aligned. The assumption is 8 bytes to not have misaligned accesses (and only for 64-bit accesses if 4 byte aligned). That's an issue with the qemu image loading depending on the sizes and combination of images loaded. That doesn't explain your failure though. As the initrd is a multiple of 8 bytes, you should be fine.
Also, it worked all along up to your patch. If that was a problem, I should have seen a problem on and off.
Guenter
Rob Herring
maintainerQuoted 43 lines · Rob Herring
Quoted 41 lines · Guenter Roeck
Quoted 39 lines · Rob Herring
Quoted 27 lines · Guenter Roeck
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc commentsQuoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe
7cd5d5fe43d5ora7c404099349, though that should return to historical behavior.Can you give me the qemu command line and kernel cfg?
Quoted 8 lines
Quoted 4 lines
I copied everything you should need to build a kernel (including toolchain) to http://server.roeck-us.net/qemu/microblazeel/
[ wow, I really need to update that compiler ]
I can't seem to get BE/LE nor reverted or not working. It's always dying in
microblaze_cache_init()based on the last print. It's your config, but gcc 10.1.0 off of kernel.org.
It seems gcc 10.1 does not work. Seems to die before here:
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
Quoted 6 lines
There is at least one possible problem here that the FDT may only be 4 byte aligned. The assumption is 8 bytes to not have misaligned accesses (and only for 64-bit accesses if 4 byte aligned). That's an issue with the qemu image loading depending on the sizes and combination of images loaded. That doesn't explain your failure though. As the initrd is a multiple of 8 bytes, you should be fine.
It's the built-in dtb alignment that is the problem. I had noticed this earlier, then discovered I had no built-in DTB and QEMU provides a default. And changing didn't help because on broken gcc-10 it was 8 byte aligned. None of that should matter because we're not using the built-in either, right? Wrong! The assembly entry code copies the bootloader dtb into the built-in dtb space. I remember this now from the last time I cleaned up the early DT code. I suppose the reason is the bootloader dtb is not or may not be at an address mapped early. I'd really like to get rid of that copy. Anyway, the oneliner below fixes it. We need it either way, but I'd like some comments on the copy.
Rob
(quoted diff) +0 -0
b/arch/microblaze/kernel/vmlinux.lds.S
index df07b3d06cd6..fb31747ec092 100644
arch/microblaze/kernel/vmlinux.lds.S +1 -1
@@ -45,7 +45,7 @@ SECTIONS { _etext = . ; } - . = ALIGN (4) ; + . = ALIGN (8) ; __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { _fdt_start = . ; /* place for fdt blob */ *(__fdt_blob) ; /* Any link-placed DTB */
Guenter Roeck
Tested-byQuoted 64 lines · Rob Herring
Quoted 43 lines · Rob Herring
Quoted 41 lines · Guenter Roeck
Quoted 39 lines · Rob Herring
Quoted 27 lines · Guenter Roeck
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc commentsQuoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe
7cd5d5fe43d5ora7c404099349, though that should return to historical behavior.Can you give me the qemu command line and kernel cfg?
Quoted 8 lines
Quoted 4 lines
I copied everything you should need to build a kernel (including toolchain) to http://server.roeck-us.net/qemu/microblazeel/
[ wow, I really need to update that compiler ]
I can't seem to get BE/LE nor reverted or not working. It's always dying in
microblaze_cache_init()based on the last print. It's your config, but gcc 10.1.0 off of kernel.org.It seems gcc 10.1 does not work. Seems to die before here:
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
Quoted 6 lines
There is at least one possible problem here that the FDT may only be 4 byte aligned. The assumption is 8 bytes to not have misaligned accesses (and only for 64-bit accesses if 4 byte aligned). That's an issue with the qemu image loading depending on the sizes and combination of images loaded. That doesn't explain your failure though. As the initrd is a multiple of 8 bytes, you should be fine.
Quoted 8 lines
It's the built-in dtb alignment that is the problem. I had noticed this earlier, then discovered I had no built-in DTB and QEMU provides a default. And changing didn't help because on broken gcc-10 it was 8 byte aligned. None of that should matter because we're not using the built-in either, right? Wrong! The assembly entry code copies the bootloader dtb into the built-in dtb space. I remember this now from the last time I cleaned up the early DT code. I suppose the reason is the bootloader dtb is not or may not be at an address mapped early.
I think the problem is here:
/* initialize device tree for usage in early_printk */
early_init_devtree(_fdt_start);
That probably also explains why enabling earlycon doesn't help.
Quoted 4 lines
I'd really like to get rid of that copy. Anyway, the oneliner below fixes it. We need it either way, but I'd like some comments on the copy.
I can not comment on the copy, but the change below does indeed fix the problem. Feel free to add
to the patch if you send it out.
Thanks,
Guenter
Quoted 16 lines
Rob
arch/microblaze/kernel/vmlinux.lds.S +1
-1@@ -45,7 +45,7 @@ SECTIONS { _etext = . ; } - . = ALIGN (4) ; + . = ALIGN (8) ; __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { _fdt_start = . ; /* place for fdt blob */ *(__fdt_blob) ; /* Any link-placed DTB */
Hi,
Quoted 65 lines · Guenter Roeck
Quoted 64 lines · Rob Herring
Quoted 43 lines · Rob Herring
Quoted 41 lines · Guenter Roeck
Quoted 39 lines · Rob Herring
Quoted 27 lines · Guenter Roeck
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc commentsQuoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe
7cd5d5fe43d5ora7c404099349, though that should return to historical behavior.Can you give me the qemu command line and kernel cfg?
Quoted 8 lines
Quoted 4 lines
I copied everything you should need to build a kernel (including toolchain) to http://server.roeck-us.net/qemu/microblazeel/
[ wow, I really need to update that compiler ]
I can't seem to get BE/LE nor reverted or not working. It's always dying in
microblaze_cache_init()based on the last print. It's your config, but gcc 10.1.0 off of kernel.org.It seems gcc 10.1 does not work. Seems to die before here:
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
Quoted 6 lines
There is at least one possible problem here that the FDT may only be 4 byte aligned. The assumption is 8 bytes to not have misaligned accesses (and only for 64-bit accesses if 4 byte aligned). That's an issue with the qemu image loading depending on the sizes and combination of images loaded. That doesn't explain your failure though. As the initrd is a multiple of 8 bytes, you should be fine.
Quoted 9 lines
Quoted 8 lines
It's the built-in dtb alignment that is the problem. I had noticed this earlier, then discovered I had no built-in DTB and QEMU provides a default. And changing didn't help because on broken gcc-10 it was 8 byte aligned. None of that should matter because we're not using the built-in either, right? Wrong! The assembly entry code copies the bootloader dtb into the built-in dtb space. I remember this now from the last time I cleaned up the early DT code. I suppose the reason is the bootloader dtb is not or may not be at an address mapped early.
I have tried 9.3 and 10.0 from
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/
but none of them did boot on real HW.
Xilinx stayed on 9.2 and I have asked team to generate gcc 10/10.1 for me to be able to try it myself.
Quoted 6 lines
I think the problem is here:
/* initialize device tree for usage in
early_printk*/early_init_devtree(_fdt_start);That probably also explains why enabling earlycon doesn't help.
Can you please elaborate more on it?
I see earlycon to be enabled quite early.
[ 0.000000] Ramdisk addr 0x00000000, [ 0.000000] Compiled-in FDT at (ptrval) [ 0.000000] earlycon: ns16550a0 at MMIO 0x44a01000 (options '115200n8') [ 0.000000] printk: bootconsole [ns16550a0] enabled [ 0.000000] cma: Reserved 16 MiB at 0xaec00000
Quoted 6 lines
Quoted 5 lines
I'd really like to get rid of that copy. Anyway, the oneliner below fixes it. We need it either way, but I'd like some comments on the copy.
Quoted 6 lines
I can not comment on the copy, but the change below does indeed fix the problem. Feel free to add
Tested-by Guenter Roeck <[email protected]>to the patch if you send it out.
Please send the patch. Would be the best as early as possible and I will queue it for 5.12.
Thanks,
Michal
On 2/15/21 7:23 AM, Michal Simek wrote:
[ ... ]
Quoted 6 lines
Quoted 6 lines
I think the problem is here:
/* initialize device tree for usage in
early_printk*/early_init_devtree(_fdt_start);
Quoted 7 lines
Quoted 1 line
That probably also explains why enabling earlycon doesn't help.
Can you please elaborate more on it?
I see earlycon to be enabled quite early.[ 0.000000] Ramdisk addr 0x00000000, [ 0.000000] Compiled-in FDT at (ptrval)
Unless I was missing something, this is where it failed.
Quoted 4 lines
[ 0.000000] earlycon: ns16550a0 at MMIO 0x44a01000 (options '115200n8') [ 0.000000] printk: bootconsole [ns16550a0] enabled [ 0.000000] cma: Reserved 16 MiB at 0xaec00000
[ ... ]
Quoted 4 lines
Please send the patch. Would be the best as early as possible and I will queue it for 5.12.
https://lore.kernel.org/patchwork/patch/1380316/
Guenter
Quoted 28 lines · Rob Herring
Quoted 27 lines · Guenter Roeck
Hi Rob,
Quoted 23 lines · Rob Herring
This adds the following commits from upstream:
183df9e9c2b9gitignore: Ignore the swp files0db6d09584e1gitignore: Add cscope files307afa1a7be8Update Jon Loeliger's emailca16a723fa9dfdtdump: Fix gcc11 warning64990a272e8fsrcpos: increaseMAX_SRCFILE_DEPTH163f0469bf2edtc: Allow overlays to have .dtbo extension3b01518e688dSetlast_comp_versioncorrectly in new dtb and fix potential version issues infdt_open_intof7e5737f26aatests: Fixoverlay_overlay_nosugartest case7cd5d5fe43d5libfdt: Tweak description of assume-aligned load helpersa7c404099349libfdt: Internally perform potentially unaligned loadsbab85e48a6f4meson: increase default timeout for testsf8b46098824dmeson: do not assume python is installed, skip tests30a56bce4f0bmeson: fix -Wall warning5e735860c478libfdt: Check for 8-byte address alignment infdt_ro_probe_()67849a327927build-sys: add meson build05874d08212dpylibfdt: allow build out of tree3bc3a6b9fe0cdtc: Fix signedness comparisons warnings: Wrap (-1)e1147b159e92dtc: Fix signedness comparisons warnings: change types04cf1fdc0fcfconvert-dtsv0: Fix signedness comparisons warningb30013edb878libfdt: Fix kernel-doc comments
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Rob Herring <[email protected]>This patch causes my little-endian microblaze qemu emulations to fail silently (no console output) in next-20210211. Reverting this patch together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
My guess would be something in libfdt. Maybe
7cd5d5fe43d5ora7c404099349, though that should return to historical behavior.
7cd5d5fe43d5 is just a comment change, so that won't be it. Reverting a7c404099349 didn't help, but reverting 5e735860c478 did the trick. This does the trick as well:
index 3e893073da05..6ab627e52a21 100644
scripts/dtc/libfdt/fdt.c +3 -2
@@ -23,8 +23,9 @@ int32_t fdt_ro_probe_(const void *fdt)return totalsize;/* The device tree must be at an 8-byte aligned address */ -if ((uintptr_t )fdt &7 ) -return -FDT_ERR_ALIGNMENT ; +if ((uintptr_t )fdt &7 ) { +// return -FDT_ERR_ALIGNMENT; + }
with some debugging ... aha:
Compiled-in FDT at c043f804
and in arch/microblaze/kernel/vmlinux.lds.S:
. = ALIGN (4) ;
__fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
_fdt_start = . ; /* place for fdt blob */So the fix is to either remove the 8-byte alignment check or:
arch/microblaze/kernel/vmlinux.lds.S +1 -1
@@ -45,7 +45,7 @@ SECTIONS { _etext = . ; } - . = ALIGN (4) ; + . = ALIGN (8) ; __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { _fdt_start = . ; /* place for fdt blob */ *(__fdt_blob) ; /* Any link-placed DTB */
Thanks,
Guenter