From: Mark Rutland <mark.rutland@arm.com>
To: Timur Tabi <timur@codeaurora.org>
Cc: Jeffrey Hugo <jhugo@codeaurora.org>,
Sameer Goel <sgoel@codeaurora.org>,
linux-efi@vger.kernel.org,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] efi/libstub/arm*: Set default address and size cells values for an empty dtb
Date: Tue, 7 Feb 2017 19:37:12 +0000 [thread overview]
Message-ID: <20170207193712.GJ26173@leverpostej> (raw)
In-Reply-To: <CAOZdJXWf1YqN8SRSdMayuCfckuhiTdhJLq3Zbo3b9BbzpszRDQ@mail.gmail.com>
On Tue, Feb 07, 2017 at 01:24:53PM -0600, Timur Tabi wrote:
> On Tue, Feb 7, 2017 at 12:15 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> >
> >> In cases where a device tree is not provided (ie ACPI based system), an
> >> empty fdt is generated by efistub. Sets the address and size cell values
> >> in a generated fdt to support 64 bit addressing.
> >>
> >> This enables kexec/kdump on Qualcomm Technologies QDF24XX platforms as those
> >> utilities will read the address/size values from the fdt, and such values
> >> may exceed the range provided by the 32 bit default.
> >
> > The description here doesn't state why this is a problem for ACPI.
>
> The patch description could use some work. It's a problem for ACPI
> because EFI-based systems call typically fdt_create_empty_tree(),
> which is where the problem lies.
>
> The bug is that fdt_create_empty_tree() literally creates an empty
> tree. By default if a node is missing #address-cells and #size-cells
> properties, then it's assume that both values are equal to 1, i.e.
> 32-bit addresses.
Sure, I understand this.
> When update_fdt() in drivers/firmware/efi/libstub/fdt.c creates an
> empty tree, it then proceeds to inject 64-bit addresses into that
> tree. When kdump tries to process the address properties, it reads
> the wrong values because it thinks they are all 32-bit addresses.
This is *not* true.
The EFI stub only injects values which are always defined to be 64 bits
in width.
In Takahiro-san's arm64/kdump branch, the userspace kdump code doesn't
parse properties out of the DT.
In fact, it simply assumes that the kdump-specific properties always
have 64 bits of address, and 64-bits of size, and inserts these
sized accordingly.
The kdump kernel, however, tries to use /#address-cells and
/#size-cells. That is where I assume things go wrong.
There is no upstream kdump code for arm64.
Thanks,
Mark.
prev parent reply other threads:[~2017-02-07 19:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 17:59 [PATCH] efi/libstub/arm*: Set default address and size cells values for an empty dtb Jeffrey Hugo
[not found] ` <1486490390-25251-1-git-send-email-jhugo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-07 18:12 ` Ard Biesheuvel
2017-02-07 18:54 ` Jeffrey Hugo
[not found] ` <1f47fcdd-c5d8-4082-70a3-ca9b1746d7ca-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-07 19:01 ` Mark Rutland
2017-02-07 19:06 ` Mark Rutland
2017-02-07 19:07 ` Jeffrey Hugo
[not found] ` <c49cc64e-4ca1-8d82-5faf-74c0355c35ef-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-07 19:12 ` Ard Biesheuvel
2017-02-07 19:13 ` Mark Rutland
2017-02-07 19:29 ` Jeffrey Hugo
2017-02-07 19:55 ` Mark Rutland
2017-02-08 7:43 ` AKASHI, Takahiro
[not found] ` <20170208074301.GB18445-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-02-08 10:40 ` Ard Biesheuvel
2017-02-09 8:27 ` AKASHI, Takahiro
[not found] ` <20170209082702.GC18445-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-02-13 20:55 ` Timur Tabi
[not found] ` <CAKv+Gu8OXn20JvtFkE_bS=cbWV3XZ5b7a+XaG7tvea+4BqrHfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-13 20:51 ` Timur Tabi
2017-02-08 11:35 ` Mark Rutland
2017-02-07 18:15 ` Mark Rutland
2017-02-07 18:41 ` Jeffrey Hugo
2017-02-07 19:24 ` Timur Tabi
2017-02-07 19:37 ` Mark Rutland [this message]
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=20170207193712.GJ26173@leverpostej \
--to=mark.rutland@arm.com \
--cc=jhugo@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=sgoel@codeaurora.org \
--cc=timur@codeaurora.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