public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 07/10] sunxi: Fix end of kernel memory alignment for A33
Date: Fri, 17 Apr 2015 11:20:16 +0100	[thread overview]
Message-ID: <20150417102016.GB21904@leverpostej> (raw)
In-Reply-To: <5530099F.8010901@redhat.com>

On Thu, Apr 16, 2015 at 08:12:31PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 16-04-15 19:35, Mark Rutland wrote:
> > On Thu, Apr 16, 2015 at 08:32:03AM +0100, Hans de Goede wrote:
> >> Hi,
> >>
> >> On 15-04-15 21:57, Ian Campbell wrote:
> >>> On Tue, 2015-04-14 at 18:06 +0200, Hans de Goede wrote:
> >>>> For unknown reasons the A33 needs the end of the memory we report to the
> >>>> kernel to be aligned to a multiple of 4 MiB.
> >>>
> >>> Do you really mean "the A33 needs" (as in the processor itself) or do
> >>> you actually mean "the A33 kernel port"?
> >>>
> >>> If the latter than can't that be investigated/fixed instead of hacked
> >>> here? That would be far more preferable.
> >>
> >> I mean the former, it seems that the SoC itself cannot handle dram
> >> ranges with different cache policies which are not aligned to 4 MiB,
> >> at least that is my WAG what is going on here.
> >
> > That sounds incredibly suspicious.
> >
> > What do you mean w.r.t. different cache policies -- what does that have
> > to do with the end of DRAM?
> 
> We carve out a framebuffer at the end of DRAM, and then report less
> DRAM then we actually have to the kernel. This framebuffer then gets
> picked up by the kernel through simplefb, which will map it with a different
> cache policy then the normal part of the DRAM has.

I see. Thanks for the clarification.

> > What problem do you see?
> 
> Depending on the framebuffer-size the kernel either boots or does not boot,
> when it does not boot it does nothing (I've a serial console) earlyprintk
> does not help, I was looking into setting up an early console (should be
> a matter of just putting in the right parameters) when I found out that if
> I modify the framebuffer size that fixes things.

Ok. So we don't know if the kernel is stuck somewhere or everything is
completely hosed, then?

I take it you can't get JTAG worknig via the SD card slot?

> After experimenting more it seems that keeping the last pixel of the
> framebuffer at the very end of DRAM is not a problem (so this does not seem
> to be a display engine problem), things start to work when I make the carve
> out at the end bigger.
> 
> On the very similar A23 giving the kernel all of the DRAM except for the
> framebuffer (aligned to a multiple of 4k) works just fine.
> 
> Sometimes I can get away with just making the carve-out bigger without
> aligning it to a multiple of 4 MiB, but an alignment to 4 MiB seems to
> always work independent of the framebuffer size.
> 
> > It would be worth reporting this on lakml.
> 
> If you still think that after the above explanation I'll start a new thread
> on lakml with contents more targeted at kernel devs.

I think it would be worthwhile. This could be one instance of an issue
in the memory system that we might hit elsewhere. Even if we don't come
to another solution, it'll at least make it visible to others.

> >> I've been using an a23 dtb + generic multi-platform kernel for my testing
> >> (as said before the a33 really is almost the same design), and that boots
> >> fine without this alignment hack on an actual A23 device, so this is not
> >> a kernel limitation.
> >
> > Not necessarily. Is RAM at the same location on both SoCs? What about
> > other devices and carevouts?
> 
> Everything is the same on both SoCs except that one has 2 Cortex A7
> cores and the new one with the problem has 4 Cortex A7 cores, and a
> new dram controller / mbus subsystem to keep the 4 cores fed.
> 
> > It could be htat the stars happen to align and we're finally caught out
> > by some dodgy maths.
> 
> I don't think that that is the case here.

Yeah. The memory subsystem differences sound like the chief suspects.

Do we know if the A7s in the A23 and A33 are different revisions (and
which bits are set in their aux registers)? It could be that some
memory system features is enabled on one but not the other, or something
like that.

Mark.

  reply	other threads:[~2015-04-17 10:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 16:06 [U-Boot] [PATCH 01/10] sunxi: Also set Auxiliary Ctl SMP bit in SPL Hans de Goede
2015-04-14 16:06 ` [U-Boot] [PATCH 02/10] sunxi: usbc: Remove unused irq field Hans de Goede
2015-04-15 19:41   ` Ian Campbell
2015-04-14 16:06 ` [U-Boot] [PATCH 03/10] sunxi: Introduce a hidden ARCH_SUN6I Kconfig bool Hans de Goede
2015-04-15  6:51   ` Michal Suchanek
2015-04-15  7:35     ` Hans de Goede
2015-04-15  8:01       ` Michal Suchanek
2015-04-15  8:07         ` Hans de Goede
2015-04-15  8:45           ` Michal Suchanek
2015-04-15 19:47             ` Ian Campbell
2015-04-16  7:23               ` Hans de Goede
2015-04-17 11:06                 ` Ian Campbell
2015-04-15  7:00   ` Michal Suchanek
2015-04-15  7:36     ` Hans de Goede
2015-04-14 16:06 ` [U-Boot] [PATCH 04/10] sunxi: s/sun8i/sun8i_a23/ Hans de Goede
2015-04-15 19:49   ` Ian Campbell
2015-04-16  7:24     ` Hans de Goede
2015-04-14 16:06 ` [U-Boot] [PATCH 05/10] sunxi: Add support for A33 PLL11 (second DRAM pll) Hans de Goede
2015-04-15 19:50   ` Ian Campbell
2015-04-14 16:06 ` [U-Boot] [PATCH 06/10] sunxi: Add a33 dram init code Hans de Goede
2015-04-15 19:56   ` Ian Campbell
2015-04-16  7:27     ` Hans de Goede
2015-04-16  9:09       ` Ian Campbell
2015-04-26 18:31         ` Hans de Goede
2015-05-02 13:37           ` Ian Campbell
2015-04-14 16:06 ` [U-Boot] [PATCH 07/10] sunxi: Fix end of kernel memory alignment for A33 Hans de Goede
2015-04-15 19:57   ` Ian Campbell
2015-04-16  7:32     ` Hans de Goede
2015-04-16 17:35       ` Mark Rutland
2015-04-16 19:12         ` Hans de Goede
2015-04-17 10:20           ` Mark Rutland [this message]
2015-04-24 18:32             ` Hans de Goede
2015-04-28  9:33               ` Mark Rutland
2015-04-14 16:06 ` [U-Boot] [PATCH 08/10] sunxi: Add basic A33 basic support Hans de Goede
2015-04-15 20:00   ` Ian Campbell
2015-04-16  7:35     ` Hans de Goede
2015-04-17 11:07       ` Ian Campbell
2015-04-14 16:07 ` [U-Boot] [PATCH 09/10] sunxi: Add softwinner astar mid756 A33 tablet board defconfig Hans de Goede
2015-04-15 20:01   ` Ian Campbell
2015-05-04 15:48     ` Chen-Yu Tsai
2015-05-04 16:54       ` Hans de Goede
2015-04-14 16:07 ` [U-Boot] [PATCH 10/10] sunxi: Add Ippo_q8h_v1_2_a33_1024x600 defconfig Hans de Goede
2015-04-15 20:01   ` Ian Campbell
2015-04-15 19:41 ` [U-Boot] [PATCH 01/10] sunxi: Also set Auxiliary Ctl SMP bit in SPL Ian Campbell

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=20150417102016.GB21904@leverpostej \
    --to=mark.rutland@arm.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