From: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "Grant Likely
(grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org)"
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v2 2/3] arm/dt: tegra: add dts file for paz00
Date: Mon, 31 Oct 2011 19:18:08 +0100 [thread overview]
Message-ID: <1337919.CKEhhtzWl7@ax5200p> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF173EDAB782-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
ok, lets bring this to an end.
On Monday 31 October 2011 09:09:13 Stephen Warren wrote:
> Marc Dietrich wrote at Sunday, October 30, 2011 2:40 PM:
> > On Friday 28 October 2011 09:49:49 Stephen Warren wrote:
> > > Marc Dietrich wrote at Friday, October 28, 2011 4:30 AM:
> > > > Am Donnerstag, 27. Oktober 2011, 09:50:03 schrieb Stephen Warren:
> > > > > Marc Dietrich wrote at Wednesday, October 26, 2011 1:59 PM:
> > > > > > This adds a dts file for paz00. As a side effect, this
> > > > > > also enables the embedded controller which controls the keyboard,
> > > > > > touchpad, power, leds, and some other functions.
> > > > > > ...
> > > > > > +++ b/arch/arm/boot/dts/tegra-paz00.dts
> > > > > > @@ -0,0 +1,70 @@
> > > > > > +/dts-v1/;
> > > > > > +
> > > > > > +/memreserve/ 0x1c000000 0x04000000;
> > > > > > +/include/ "tegra20.dtsi"
> > > > > > +
> > > > > > +/ {
> > > > > > + model = "Toshiba AC100 / Dynabook AZ";
> > > > > > + compatible = "compal,paz00", "nvidia,tegra20";
> > > > > > +
> > > > > > + chosen {
> > > > > > + bootargs = "mem=448@0 console=ttyS0,115200n8
> > > > > > root=/dev/mmcblk1p1";
> > > > >
> > > > > You shouldn't need the mem= parameter here; it wasn't in
> > > > > your first patch set.
> > > >
> > > > that's because I forgot it. Sorry, I didn't mentioned it in the
> > > > changelog. I wonder why mem= is still needed.
> > >
> > > I wonder if this is some conflict between ATAGs and the DT-specified
> > > memory node.
> > >
> > > As far as I can tell, the kernel's memory information typically
> > > comes from ATAGs. Some boards override what's in the ATAGs in their
> > > machine descriptor's fixup routine, e.g. see tegra_paz00_fixup().
> > > Presumably, this is because of buggy bootloaders sending incorrect
> > > memory information in the ATAGs. Do you have any way to check the ATAGs
> > > that the bootloader is sending? Probably, you could enable DEBUG_LL
> > > and using the low-level debugging functions to dump some of that
> > > information to the UART early during boot.
> >
> > I got the ATAGS from /proc/atags and there is no memory entry there,
> > only
> > initrd and cmdline (which is the one from nvflash).
> >
> > The machine also has a fixup routine, but it also boots without (I'm
> > sure it was necessary in the past),
>
> ...
>
> > I tested several variations. Without DT, the fixup can compensate a
> > missing mem entry in the kernel command line, but with a mem= from the
> > kernel command line, a fixup is not needed.
>
> OK, that makes sense.
>
> > With DT, the command line specified from nvflash is ignored and the one
> > from DT comes into the game.
>
> I assume you're using CONFIG_ARM_APPENDED_DTB but not
> CONFIG_ARM_ATAG_DTB_COMPAT.
> > If it is also missing there, system detects 512 MB.
correct.
> That makes sense; that's the value in the .dts file you posted.
>
> > (which is physical right, but we cannot reserve memory for the gpu). The
> > fixup is indeed ignored in this case.
>
> It's not "ignored" as such.
>
> When booting without DT, the machine descriptor in board-paz00.c is used,
> since the descriptor is selected based on the machine ID in the descriptor,
> and that descriptor includes:
>
> .fixup = tegra_paz00_fixup,
>
> ... which causes that fixup function to be called.
>
> When booting with DT, the machine descriptor in board-dt.c is used, since
> the descriptor is selected based on the DT's overall compatible property,
> and that descriptor doesn't refer to tegra_paz00_fixup() at all, so it's
> not called.
ok, I think I understood now. Thanks for the detailed explanation.
> > ...
> >
> > > c) Test booting, and check what RAM size the kernel thinks you have.
> >
> > see above. RAM detection works, but it's not what we want ...
>
> At this point, I'd argue that exposing the full 512M to the kernel /is/
> what we want. There is no Tegra GPU support in the mainline kernel at
> present. As such, I'd argue that we should give the entire RAM space to
> the kernel to use. As and when we add GPU support to the kernel, we can
> use an appropriate mechanism to take RAM away from the kernel for that
> purpose.
sound fine. I guess the vmalloc is also due to some gpu requirements...
> So, I'm planning to remove all the /memreserve/ entries from the Tegra
> .dts files as soon as I can find a minute to do so.
>
> But, as Grant mentioned, the /memreserve/ .dts directive should work
> right now to reserve memory. I'm not sure if you'd tried that and it didn't
> work? If so, it'd be good to debug that just to make sure the mechanism
> works, even if we don't intend to use it.
actually, it works as Grant said. For some reasons it didn't worked here when
I tested it. Maybe I just catched a bad setup of linux-next/bootloader/kernel
arguments.
Thanks for you patience with me...
Marc
WARNING: multiple messages have this Message-ID (diff)
From: marvin24@gmx.de (Marc Dietrich)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] arm/dt: tegra: add dts file for paz00
Date: Mon, 31 Oct 2011 19:18:08 +0100 [thread overview]
Message-ID: <1337919.CKEhhtzWl7@ax5200p> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF173EDAB782@HQMAIL01.nvidia.com>
ok, lets bring this to an end.
On Monday 31 October 2011 09:09:13 Stephen Warren wrote:
> Marc Dietrich wrote at Sunday, October 30, 2011 2:40 PM:
> > On Friday 28 October 2011 09:49:49 Stephen Warren wrote:
> > > Marc Dietrich wrote at Friday, October 28, 2011 4:30 AM:
> > > > Am Donnerstag, 27. Oktober 2011, 09:50:03 schrieb Stephen Warren:
> > > > > Marc Dietrich wrote at Wednesday, October 26, 2011 1:59 PM:
> > > > > > This adds a dts file for paz00. As a side effect, this
> > > > > > also enables the embedded controller which controls the keyboard,
> > > > > > touchpad, power, leds, and some other functions.
> > > > > > ...
> > > > > > +++ b/arch/arm/boot/dts/tegra-paz00.dts
> > > > > > @@ -0,0 +1,70 @@
> > > > > > +/dts-v1/;
> > > > > > +
> > > > > > +/memreserve/ 0x1c000000 0x04000000;
> > > > > > +/include/ "tegra20.dtsi"
> > > > > > +
> > > > > > +/ {
> > > > > > + model = "Toshiba AC100 / Dynabook AZ";
> > > > > > + compatible = "compal,paz00", "nvidia,tegra20";
> > > > > > +
> > > > > > + chosen {
> > > > > > + bootargs = "mem=448 at 0 console=ttyS0,115200n8
> > > > > > root=/dev/mmcblk1p1";
> > > > >
> > > > > You shouldn't need the mem= parameter here; it wasn't in
> > > > > your first patch set.
> > > >
> > > > that's because I forgot it. Sorry, I didn't mentioned it in the
> > > > changelog. I wonder why mem= is still needed.
> > >
> > > I wonder if this is some conflict between ATAGs and the DT-specified
> > > memory node.
> > >
> > > As far as I can tell, the kernel's memory information typically
> > > comes from ATAGs. Some boards override what's in the ATAGs in their
> > > machine descriptor's fixup routine, e.g. see tegra_paz00_fixup().
> > > Presumably, this is because of buggy bootloaders sending incorrect
> > > memory information in the ATAGs. Do you have any way to check the ATAGs
> > > that the bootloader is sending? Probably, you could enable DEBUG_LL
> > > and using the low-level debugging functions to dump some of that
> > > information to the UART early during boot.
> >
> > I got the ATAGS from /proc/atags and there is no memory entry there,
> > only
> > initrd and cmdline (which is the one from nvflash).
> >
> > The machine also has a fixup routine, but it also boots without (I'm
> > sure it was necessary in the past),
>
> ...
>
> > I tested several variations. Without DT, the fixup can compensate a
> > missing mem entry in the kernel command line, but with a mem= from the
> > kernel command line, a fixup is not needed.
>
> OK, that makes sense.
>
> > With DT, the command line specified from nvflash is ignored and the one
> > from DT comes into the game.
>
> I assume you're using CONFIG_ARM_APPENDED_DTB but not
> CONFIG_ARM_ATAG_DTB_COMPAT.
> > If it is also missing there, system detects 512 MB.
correct.
> That makes sense; that's the value in the .dts file you posted.
>
> > (which is physical right, but we cannot reserve memory for the gpu). The
> > fixup is indeed ignored in this case.
>
> It's not "ignored" as such.
>
> When booting without DT, the machine descriptor in board-paz00.c is used,
> since the descriptor is selected based on the machine ID in the descriptor,
> and that descriptor includes:
>
> .fixup = tegra_paz00_fixup,
>
> ... which causes that fixup function to be called.
>
> When booting with DT, the machine descriptor in board-dt.c is used, since
> the descriptor is selected based on the DT's overall compatible property,
> and that descriptor doesn't refer to tegra_paz00_fixup() at all, so it's
> not called.
ok, I think I understood now. Thanks for the detailed explanation.
> > ...
> >
> > > c) Test booting, and check what RAM size the kernel thinks you have.
> >
> > see above. RAM detection works, but it's not what we want ...
>
> At this point, I'd argue that exposing the full 512M to the kernel /is/
> what we want. There is no Tegra GPU support in the mainline kernel at
> present. As such, I'd argue that we should give the entire RAM space to
> the kernel to use. As and when we add GPU support to the kernel, we can
> use an appropriate mechanism to take RAM away from the kernel for that
> purpose.
sound fine. I guess the vmalloc is also due to some gpu requirements...
> So, I'm planning to remove all the /memreserve/ entries from the Tegra
> .dts files as soon as I can find a minute to do so.
>
> But, as Grant mentioned, the /memreserve/ .dts directive should work
> right now to reserve memory. I'm not sure if you'd tried that and it didn't
> work? If so, it'd be good to debug that just to make sure the mechanism
> works, even if we don't intend to use it.
actually, it works as Grant said. For some reasons it didn't worked here when
I tested it. Maybe I just catched a bad setup of linux-next/bootloader/kernel
arguments.
Thanks for you patience with me...
Marc
next prev parent reply other threads:[~2011-10-31 18:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 19:59 [PATCH v2 0/3] paz00 updates for 3.3 Marc Dietrich
[not found] ` <cover.1319658296.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2011-10-26 19:59 ` [PATCH v2 1/3] ARM: tegra: paz00: add support for wakeup gpio key Marc Dietrich
2011-10-26 19:59 ` [PATCH v2 2/3] arm/dt: tegra: add dts file for paz00 Marc Dietrich
[not found] ` <e528a8eb783ace4729e0c76ca72d500d5281c9af.1319658296.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2011-10-27 16:50 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173E1B48D7-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-28 10:29 ` Marc Dietrich
2011-10-28 16:49 ` Stephen Warren
2011-10-28 16:49 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173EDAB4C7-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-29 8:43 ` Russell King - ARM Linux
2011-10-29 8:43 ` Russell King - ARM Linux
2011-10-29 11:03 ` Grant Likely
2011-10-29 11:03 ` Grant Likely
[not found] ` <20111029110320.GD20132-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-10-29 11:44 ` Russell King - ARM Linux
2011-10-29 11:44 ` Russell King - ARM Linux
[not found] ` <20111029084330.GW19187-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-10-31 15:51 ` Stephen Warren
2011-10-31 15:51 ` Stephen Warren
2011-10-30 20:39 ` Marc Dietrich
2011-10-30 20:39 ` Marc Dietrich
2011-10-31 3:13 ` Grant Likely
2011-10-31 3:13 ` Grant Likely
2011-10-31 16:09 ` Stephen Warren
2011-10-31 16:09 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173EDAB782-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-31 18:18 ` Marc Dietrich [this message]
2011-10-31 18:18 ` Marc Dietrich
2011-10-26 19:59 ` [PATCH v2 3/3] staging: nvec: add device tree support Marc Dietrich
[not found] ` <48050ec08d248a2a10b4f5faf6cac6b214041ebe.1319658296.git.marvin24-Mmb7MZpHnFY@public.gmane.org>
2011-10-27 19:17 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173E1B498B-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-27 21:07 ` Julian Andres Klode
2011-10-28 11:01 ` Marc Dietrich
2011-10-28 16:56 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173EDAB4D1-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-30 20:58 ` Marc Dietrich
2011-10-31 16:16 ` Stephen Warren
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=1337919.CKEhhtzWl7@ax5200p \
--to=marvin24-mmb7mzphnfy@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.