[U-Boot] [PATCH 11/14] sunxi: Fill memory before comparing it when doing dram init on sun6i
Ian Campbell
ijc at hellion.org.uk
Mon Dec 22 15:34:24 CET 2014
On Mon, 2014-12-22 at 16:32 +0200, Siarhei Siamashka wrote:
> On Mon, 22 Dec 2014 14:19:20 +0000
> Ian Campbell <ijc at hellion.org.uk> wrote:
>
> > On Fri, 2014-12-19 at 17:55 +0100, Hans de Goede wrote:
> > > Hi,
> > >
> > > On 18-12-14 20:12, Ian Campbell wrote:
> > > > On Tue, 2014-12-16 at 21:31 +0100, Hans de Goede wrote:
> > > >> The sun8i boot0 code fills the DRAM with a "random" pattern before comparing
> > > >> it at different offsets to do columns, etc. detection. The sun6i boot0 code
> > > >> does not do it, but it seems like a good idea to do this regardless.
> > > >
> > > > Is this the right way round?
> > >
> > > Yes, while working on the sun8i code I noticed that it was prefilling memory
> > > before doing wrap-around checks like the sun6i code is doing too, and then I
> > > realized that the sun6i code was relying on whatever is in DRAM being random
> > > enough for its wrap-around tests to work, without ensuring it is random
> > > enough.
> > >
> > > > The existing sun6i code (which you are
> > > > moving here) seems to _rely_ on something having written a useful
> > > > pattern, which I would have assumed to have been boot0. Or else how does
> > > > it work now? Chance?
> > >
> > > Yep, it purely works by chance so far.
> >
> > "excellent". Can you mention that in the commit message please. With
> > that: Acked-by: Ian Campbell <ijc at hellion.org.uk>
>
> Ian, are you fine with the fact that it still works by chance
> even after this "fix"? Albeit with a much higher chance of not
> running into troubles.
Yes, it's clearly an improvement even if it isn't perfect.
Ian.
More information about the U-Boot
mailing list