From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: IMX8MM 4GiB boundary issue
Date: Sun, 27 Sep 2020 00:56:00 +0000 [thread overview]
Message-ID: <DB6PR0402MB276043EDCFDB65F44C308F0488340@DB6PR0402MB2760.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAJ+vNU3hbOW2sSN+wqSYXnwsngcDRP-v2JkdA0Ye3RXCUYcUGA@mail.gmail.com>
> Subject: Re: IMX8MM 4GiB boundary issue
>
> On Fri, Sep 25, 2020 at 8:05 AM Marek Vasut <marex@denx.de> wrote:
> >
> > On 9/25/20 4:52 PM, Tim Harvey wrote:
> > > Greetings,
> > >
> > > I'm working with an IMX8MM board that has 4GiB of DRAM. I've found
> > > that in this configuration the MMC driver and FEC network driver
> > > appear to have some issues with crossing the 4GiB address space. If
> > > I tell U-Boot I have 3GiB everything is ok, but when I set it to
> > > 4GiB I see the following:
> > >
> > > MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
> > > Loading Environment from MMC... Error found for upper 32 bits Error
> > > found for upper 32 bits Error found for upper 32 bits
> > > *** Warning - No block device, using default environment
> > >
> > > In: serial
> > > Out: serial
> > > Err: serial
> > > Net: DP83867
> > > Warning: ethernet at 30be0000 (eth0) using random MAC address -
> > > ea:22:3a:4d:8f:d5
> > > eth0: ethernet at 30be0000 [PRIME]
> > > Hit any key to stop autoboot: 0
> > >
> > > On the FEC ethernet side I don't see any errors reported but ping's
> > > fail with 4GiB DRAM.
> > >
> > > I suspect drivers have 32bit addressing issues as the base of mem
> > > for IMX8MM is 1GiB so anything over 3GiB of DRAM runs you over the
> > > 32bit boundary.
> > >
> > > Anyone run into this yet?
> >
> > I saw similar things on RCar3 with 32bit IPs and used bounce buffers
> > to work around the 32bit limitations where applicable.
> >
> > > Marek, I noticed you are the maintainer for the technexion
> > > pico-imx8mq which has support for 1, 2, 3, and 4 GiB DRAM. Did you
> > > encounter such issues on the 4GiB variant?
> >
> > I dont have the 4 GiB variant.
>
> ah... that explains why you didn't see it. Note a patch I just sent
> 'imx8m: fix cache setup for dynamic sdram size' that your board will need as
> well in order to boot with 4GiB.
>
> >
> > I can imagine that either the FEC/SDHCI is limited to 32bit addressing
> > in hardware (the DMA can only operate on 32bit range due to it coming
> > from 32bit systems), OR, the drivers need to be patched to support the
> > 64bit addresses properly on 64bit SoCs and 64bit variants of the IPs
>
> I hadn't thought about the DMA boundary issue. I'll wait for NXP to weigh in
> before I start digging through drivers. I wonder if there is a simple workaround
> to make sure U-Boot is running in lower DRAM? I'm not all that clear where
> U-Boot gets allocated.
The IP only support 32bits DMA, you could let U-Boot only relocated to the end
of 4GB memory address space using get_effective_memsize
Regards,
Peng.
>
> Tim
next prev parent reply other threads:[~2020-09-27 0:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 14:52 IMX8MM 4GiB boundary issue Tim Harvey
2020-09-25 15:04 ` Marek Vasut
2020-09-25 15:12 ` Tim Harvey
2020-09-25 17:55 ` Marek Vasut
2020-09-27 0:56 ` Peng Fan [this message]
2020-09-27 1:13 ` Marek Vasut
2020-09-27 2:35 ` Peng Fan
2020-09-27 14:45 ` Marek Vasut
2020-10-01 16:33 ` Tim Harvey
2020-10-01 16:50 ` Marek Vasut
2020-10-02 17:05 ` Fabio Estevam
2020-09-30 20:18 ` Tim Harvey
2020-10-02 11:07 ` Peng Fan
2022-02-24 19:50 ` Fabio Estevam
2022-02-24 20:03 ` Marek Vasut
2022-02-24 20:19 ` Tim Harvey
2022-02-24 20:26 ` Marek Vasut
2022-02-24 20:31 ` Fabio Estevam
2022-02-24 21:45 ` Tim Harvey
2022-02-25 11:12 ` Fabio Estevam
2022-02-25 11:37 ` Mark Kettenis
2022-02-25 13:50 ` Marek Vasut
2022-02-26 13:30 ` Mark Kettenis
2022-02-28 0:51 ` Marek Vasut
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=DB6PR0402MB276043EDCFDB65F44C308F0488340@DB6PR0402MB2760.eurprd04.prod.outlook.com \
--to=peng.fan@nxp.com \
--cc=u-boot@lists.denx.de \
/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).