linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH] scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9
Date: Mon, 15 Feb 2021 16:23:33 +0100	[thread overview]
Message-ID: <85d6deea-abd9-f7aa-8eb7-9067f6376d49@xilinx.com> (raw)
In-Reply-To: <20210212225049.GC115630@roeck-us.net>

Hi,

On 2/12/21 11:50 PM, Guenter Roeck wrote:
> On Fri, Feb 12, 2021 at 04:34:04PM -0600, Rob Herring wrote:
>> On Fri, Feb 12, 2021 at 3:01 PM Rob Herring <robh@kernel.org> wrote:
>>>
>>> On Fri, Feb 12, 2021 at 9:17 AM Guenter Roeck <linux@roeck-us.net> wrote:
>>>>
>>>> On Fri, Feb 12, 2021 at 08:16:04AM -0600, Rob Herring wrote:
>>>>> On Thu, Feb 11, 2021 at 9:31 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>>>>>
>>>>>> Hi Rob,
>>>>>>
>>>>>> On Wed, Feb 03, 2021 at 03:26:03PM -0600, Rob Herring wrote:
>>>>>>> This adds the following commits from upstream:
>>>>>>>
>>>>>>> 183df9e9c2b9 gitignore: Ignore the swp files
>>>>>>> 0db6d09584e1 gitignore: Add cscope files
>>>>>>> 307afa1a7be8 Update Jon Loeliger's email
>>>>>>> ca16a723fa9d fdtdump: Fix gcc11 warning
>>>>>>> 64990a272e8f srcpos: increase MAX_SRCFILE_DEPTH
>>>>>>> 163f0469bf2e dtc: Allow overlays to have .dtbo extension
>>>>>>> 3b01518e688d Set last_comp_version correctly in new dtb and fix potential version issues in fdt_open_into
>>>>>>> f7e5737f26aa tests: Fix overlay_overlay_nosugar test case
>>>>>>> 7cd5d5fe43d5 libfdt: Tweak description of assume-aligned load helpers
>>>>>>> a7c404099349 libfdt: Internally perform potentially unaligned loads
>>>>>>> bab85e48a6f4 meson: increase default timeout for tests
>>>>>>> f8b46098824d meson: do not assume python is installed, skip tests
>>>>>>> 30a56bce4f0b meson: fix -Wall warning
>>>>>>> 5e735860c478 libfdt: Check for 8-byte address alignment in fdt_ro_probe_()
>>>>>>> 67849a327927 build-sys: add meson build
>>>>>>> 05874d08212d pylibfdt: allow build out of tree
>>>>>>> 3bc3a6b9fe0c dtc: Fix signedness comparisons warnings: Wrap (-1)
>>>>>>> e1147b159e92 dtc: Fix signedness comparisons warnings: change types
>>>>>>> 04cf1fdc0fcf convert-dtsv0: Fix signedness comparisons warning
>>>>>>> b30013edb878 libfdt: Fix kernel-doc comments
>>>>>>>
>>>>>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>>>>>
>>>>>> 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?
>>>>>
>>>> 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
>>
>>> 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 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.


> 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


> 
>> 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
> 
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> 
> 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


  reply	other threads:[~2021-02-15 15:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12  3:31 [PATCH] scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9 Guenter Roeck
2021-02-12 14:16 ` Rob Herring
2021-02-12 15:17   ` Guenter Roeck
2021-02-12 21:01     ` Rob Herring
2021-02-12 21:51       ` Guenter Roeck
2021-02-12 22:34       ` Rob Herring
2021-02-12 22:50         ` Guenter Roeck
2021-02-15 15:23           ` Michal Simek [this message]
2021-02-15 16:15             ` Guenter Roeck
2021-02-12 22:44   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85d6deea-abd9-f7aa-8eb7-9067f6376d49@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).