From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: socfpga: dm: Fix DM initialization failure after warm reset
Date: Fri, 4 Sep 2015 16:32:46 +0200 [thread overview]
Message-ID: <201509041632.46395.marex@denx.de> (raw)
In-Reply-To: <CAPnjgZ22ZFF=LyZRB2iUkdgTcQHc60xQCQ2zYgHnCPiNoN07FA@mail.gmail.com>
On Friday, September 04, 2015 at 04:26:46 PM, Simon Glass wrote:
> On 4 September 2015 at 08:25, Marek Vasut <marex@denx.de> wrote:
> > On Friday, September 04, 2015 at 04:16:21 PM, Simon Glass wrote:
> >> Hi,
> >>
> >> On 4 September 2015 at 01:36, Jian Luo <Jian.Luo4@boschrexroth.de> wrote:
> >> > Hi Simon,
> >> >
> >> > On 04.09.2015 02:23, Simon Glass wrote:
> >> >> Hi,
> >> >>
> >> >> On 3 September 2015 at 05:14, Marek Vasut <marex@denx.de> wrote:
> >> >>> On Thursday, September 03, 2015 at 01:12:03 PM, Jian Luo wrote:
> >> >>>> On 03.09.2015 12:46, Marek Vasut wrote:
> >> >>>> > On Thursday, September 03, 2015 at 12:17:13 PM, Jian Luo wrote:
> >> >>>> >
> >> >>>> > Hi!
> >> >>>> >
> >> >>>> > [...]
> >> >>>> >
> >> >>>> >> >> Yes, I can. But U-Boot can still have problem with other
> >> >>>> >> >> Image which disables ECC.
> >> >>>> >> >> I found another post related to this problem
> >> >>>> >> >> https://lkml.org/lkml/2015/2/6/685 .
> >> >>>> >> >>
> >> >>>> >> >> Quote: To initialize ECC, the OCRAM needs to enable
> >> >>>> >> >> ECC
> >> >>>>
> >> >>>> then clear
> >> >>>>
> >> >>>> >> >> the entire
> >> >>>> >> >>
> >> >>>> >> >> memory to zero before using it.
> >> >>>> >>
> >> >>>> >> Hi!
> >> >>>> >>
> >> >>>> >> > Oh, but that is a problem, since we're running from the
> >> >>>> >> > OCRAM
> >> >>>>
> >> >>>> ourselves,
> >> >>>>
> >> >>>> >> > thus we cannot clear the OCRAM. Maybe we should
> >> >>>> >> > force-disable the ECC instead? But can we be sure that the
> >> >>>> >> > corruption does not
> >> >>>>
> >> >>>> happen
> >> >>>>
> >> >>>> >> > when you disable ECC ?
> >> >>>> >>
> >> >>>> >> Yes, that will be a problem. It's also why I let the
> >> >>>> >> SYSMGR_ECC_OCRAM_EN bit intact in the patch.
> >> >>>> >
> >> >>>> > OK, but what about turning the ECC off in the SPL, will that
> >> >>>> > also
> >> >>>>
> >> >>>> introduce
> >> >>>>
> >> >>>> > corruption or not ? That might be the right fix, no ?
> >> >>>>
> >> >>>> Hi Marek,
> >> >>>>
> >> >>>> Sorry, I don't know the detail of ECC implementation in socfpga.
> >> >>>> Dinh might have the answer to that.
> >> >>>>
> >> >>>> Anyhow I still think let the setting untouched is the safest fix.
> >> >>>> SPL should use the same ECC setting which BROM loads SPL with.
> >> >>>
> >> >>> That's right, but I'd also like to have this bit in some defined
> >> >>> state from the boot instead of having this in some random setting.
> >> >>> Dinh, can you comment on this corruption please ?
> >> >>
> >> >> Also I'm still a bit confused.
> >> >>
> >> >> The code in crt0.S zeroes global_data so how can it be non-zero a
> >> >> little later in board_init_f()?
> >> >
> >> > board_init_f() enables the ECC of the SRAM regardless its previous
> >> > state. If ECC is disabled beborehand, re-enabling it can cause SRAM
> >> > misreading.
> >>
> >> OK thanks. It might be possible to do this earlier, say in
> >> cpu_init_crit().
> >
> > You cannot enable the bit, because it'd corrupt your OCRAM and your code
> > is running from the OCRAM, thus you'd be susceptible to corrupting the
> > code you're running itself :(
>
> Oh joy. Well anyway I think this is a chip-specific problem and there
> is nothing wrong in general with the current init process.
That's absolutelly correct.
I'd like to hear Dinh's opinion on this, because this seems quite important.
next prev parent reply other threads:[~2015-09-04 14:32 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 8:41 [U-Boot] [PATCH] arm: socfpga: dm: Fix DM initialization failure after warm reset Jian Luo
2015-08-28 9:24 ` Marek Vasut
2015-08-28 10:27 ` Jian Luo
2015-08-28 10:30 ` Marek Vasut
2015-08-28 11:40 ` Jian Luo
2015-08-28 12:01 ` Marek Vasut
2015-08-28 12:09 ` Jian Luo
2015-08-28 21:48 ` Marek Vasut
2015-08-31 13:00 ` Jian Luo
2015-08-31 13:28 ` Marek Vasut
2015-09-02 16:27 ` Jian Luo
2015-09-03 9:41 ` Marek Vasut
2015-09-03 10:03 ` Jian Luo
2015-09-03 10:09 ` Marek Vasut
2015-09-03 10:17 ` Jian Luo
2015-09-03 10:46 ` Marek Vasut
2015-09-03 11:12 ` Jian Luo
2015-09-03 11:14 ` Marek Vasut
2015-09-04 0:23 ` Simon Glass
2015-09-04 7:36 ` Jian Luo
2015-09-04 14:16 ` Simon Glass
2015-09-04 14:25 ` Marek Vasut
2015-09-04 14:26 ` Simon Glass
2015-09-04 14:32 ` Marek Vasut [this message]
2015-09-22 12:26 ` Jian Luo
2015-08-28 23:21 ` Simon Glass
2015-08-29 7:56 ` Marek Vasut
2015-08-29 14:39 ` Simon Glass
2015-08-29 14:46 ` Marek Vasut
2015-08-29 14:49 ` Simon Glass
2015-08-29 15:45 ` Marek Vasut
2015-08-29 16:54 ` Simon Glass
2015-08-29 19:19 ` 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=201509041632.46395.marex@denx.de \
--to=marex@denx.de \
--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