From: Stephen Warren <swarren@wwwdotorg.org>
To: Rob Herring <robherring2@gmail.com>,
Julius Werner <jwerner@chromium.org>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Stephen Warren <stephen.r.warren@gmail.com>,
Doug Anderson <dianders@chromium.org>,
Olof Johansson <olofj@chromium.org>,
Stefan Reinauer <stefan.reinauer@coreboot.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Grant Likely <grant.likely@linaro.org>
Subject: Re: [PATCH] firmware: Add device tree binding for coreboot
Date: Mon, 16 Jun 2014 14:43:56 -0600 [thread overview]
Message-ID: <539F570C.2000507@wwwdotorg.org> (raw)
In-Reply-To: <CAL_Jsq+rGLFcOcs8Rmr8NntbPhGBG+F7yAF0YQ-Rm-UsmmTLSA@mail.gmail.com>
On 06/16/2014 07:30 AM, Rob Herring wrote:
> On Fri, Jun 13, 2014 at 4:58 PM, Julius Werner <jwerner@chromium.org> wrote:
...
>> Rob Herring wrote:
>>> Don't you need need to keep the kernel from allocating this memory by
>>> using one of the reserved memory mechanisms? The recently added one
>>> should be able to specific what the memory is reserved for IIRC.
>>
>> Our bootloader is carving the location out of the /memory node and
>> adding it to the device tree reserve map. As far as I know, that only
>> contains a list of raw start and size entries. At any rate, I think
>> it's useful (and in line with other bindings) to add a more explicit
>> node like this (if only to make it easier accessible through
>> /proc/device-tree).
>
> Understand there are 3 different memory reservation bindings. The
> original "/memreserve/" method is indeed limited. What I think you
> should use is the binding documented in
> Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt.
> So you could do something like this:
>
> reserved-memory {
> #address-cells = <1>;
> #size-cells = <1>;
> ranges;
>
> /* global autoconfigured region for contiguous allocations */
> linux,cma {
> compatible = "shared-dma-pool";
> reusable;
> size = <0x4000000>;
> alignment = <0x2000>;
> linux,cma-default;
> };
>
> coreboot_reserved: coreboot@fdfea000 {
> compatible = "coreboot";
> reg = <0xfdfea000 0x264>,
> <0xfdfea000 0x16000>;
> };
>
I thought that the /reserved-memory node was more so that the
(preferred?) location of firmware images or data buffers used by HW
accelerators could be communicated to the kernel. This feels like pure data.
The coreboot binding seems to be more about defining an interface to a
particular firmware (this feels like semantics), which as a side-effect
needs to communicate the location of certain data.
If /reserved-memory is used to communicate the address of the memory
regions, I think we still need a /firmware/coreboot node to indicate the
semantics of the reserved memory region, and point at the phandle of the
region. As such, it seems simpler just to put the addresses in the
coreboot node's reg property. The only exception I see to that argument
is if putting the region in /reserved-memory automatically carves that
region out of the memory the kernel will allocate from. That would
simplify the bootloader, since it wouldn't have to fiddle with the
/memory node and do the carveout itself.
next prev parent reply other threads:[~2014-06-16 20:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 20:06 [PATCH] firmware: Add device tree binding for coreboot Julius Werner
[not found] ` <1402689965-19397-1-git-send-email-jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-06-13 21:11 ` Rob Herring
[not found] ` <CAL_JsqL-K4i54ysugCKSw-aO-9pvnYgZfJ=NdBAot=mwffxmyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-13 21:58 ` Julius Werner
[not found] ` <CAODwPW9tRM8kxBVg3apkec2K1rahuENk_b_BD_0jvXON7JzeaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-16 13:30 ` Rob Herring
2014-06-16 20:43 ` Stephen Warren [this message]
2014-06-17 17:30 ` Rob Herring
2014-06-16 16:39 ` Olof Johansson
[not found] ` <CALiw-2GWHKPbXuMFXUHY_pgpUJNdqQbyPEV1UjEep3zD2sSRPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-16 20:13 ` Julius Werner
[not found] ` <CAODwPW9w0sKme=QSthJN7QACGcwpR6NmxufFtirkm6d3XYZ1_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-16 20:17 ` [PATCH v2] " Julius Werner
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=539F570C.2000507@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=olofj@chromium.org \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.com \
--cc=stefan.reinauer@coreboot.org \
--cc=stephen.r.warren@gmail.com \
/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).