From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/13] mxc nand: Merge mtd and spl register definitions
Date: Wed, 15 Aug 2012 20:11:18 +0200 (CEST) [thread overview]
Message-ID: <150271653.2438912.1345054278237.JavaMail.root@advansee.com> (raw)
In-Reply-To: <1286768973.2402059.1344954544555.JavaMail.root@advansee.com>
Hi Stefano,
On 08/14/2012 04:29:04 PM, Beno?t Th?baudeau wrote:
> Hi Stefano,
>
> > On 14/08/2012 13:13, Beno?t Th?baudeau wrote:
> > > Hi Stefano,
> > >
> >
> > Hi Beno?t,
> >
> > >> We have currently only two boards supporting this mechanismus,
> > >> using
> > >> MX25 (karo tx25) and MX31. Both MX25 and MX31 have an internal
> > >> RAM
> > >> (128KB) that is is suitable for installing the SPL. Note that TI
> > >> SOCs
> > >> have less RAM available, and they support SPL.
> > >
> > > The available RAM size is not the issue. i.MX boards using
> > > nand_spl
> > > can use
> > > internal or external RAM. The issue comes from the i.MX ROM
> > > bootloader that only
> > > uses the NFC buffer. On i.MX31, that means max 2 kiB for SPL, and
> > > 4
> > > kiB on
> > > i.MX25/35/51. What can be done on the latter if using internal
> > > boot
> > > (with DCD
> > > header) is to use at most one NF block (more is not possible
> > > because the i.MX
> > > bootloader goes back to serial mode if any bad block is found,
> > > and
> > > one of the
> > > 1st or 2nd block has to be good).
> >
> > We are both a little off-topic here, but because we are reading
> > probably
> > the same part of the manuals I would like to clear this point.
>
> OK.
>
> > What you are saying is not exactly what I read from the manual - I
> > checked it now in mx35, I will take a look also on the other ones.
> >
> > In 7.4.1.6 NAND Flash Boot Operation, I read:
> >
> > "1. On device power-on, the boot ROM copies the first 4 Kbytes of
> > boot
> > code from the NAND Flash to the NFC buffer."
> >
> > So this correspond to your statement - and DCD tables go into NFC
> > buffer. DCD table must be smaller as 4KB, but this is always the
> > case.
>
> Indeed.
>
> > "2. ROM code checks the first 4 Kbytes of boot data copied in step
> > 1
> > above.
> > a) If no ECC error, then DCD is verified.
> > ? If DCD verification is successful, then the rest of the boot code
> > image is copied to destination RAM (internal RAM or SDRAM) and
> > secure
> > boot is performed."
> >
> > I understand this part as the mx35 goes on to copy the whole image,
> > depending on the size set into the header, to the address specified
> > in
> > the table itself. There is no limitation. Exactly in the same way
> > it
> > works on i.MX5 (I know, this does not mean nothing, but..)
> >
> > I think the limitation of 2KB or 4KB is not correct and is valid
> > only
> > for the DCD data. Do you agree ?
>
> No, it's way more complicated than that.
>
> First, there various boot modes available depending on the device for
> NAND:
> i.MX31: external only
Note that internal NAND Flash boot is also mentioned in the RM, but without
further details. FSL should be contacted to know more. But the RM refers to
secure boot and HAB, so it's probably something close to the internal boot modes
of i.MX25 and i.MX35. Anyway, it does not seem to be used by U-Boot i.MX31
boards.
> i.MX25 and i.MX35: internal or external
> i.MX51: internal only
>
> External means that the NFC buffer is filled from NAND and executed
> without any
> DCD or flash header. The limit is 2 kiB on i.MX31. On i.MX25 and
> i.MX35, it is
> not clear from the RMs if only a single NF page is read, or if the
> NFC buffer is
> fully filled (4 kiB). This is the use case for mx31pdk and tx25.
The details about external NF boot are in the NFC chapter of the RMs. For
i.MX31, it's perfectly clear: The whole 2-kiB NFC buffer is filled whether the
NF pages are 512-B or 2-kiB. For i.MX25 and i.MX35, it's more difficult to find
the details, but I interpret the RMs as meaning that the whole 4-kiB NFC buffer
is filled whatever the NF page sizes. In both cases, the code is run from the
NFC buffer, so that the SPL size cannot exceed 2 kiB for mx31pdk, and 4 kiB for
tx25.
> Internal means that 4 kiB are read from NF. If this fails from the
> 1st block, it
> is retried with the 2nd block. If it fails again, boot is aborted. If
> it
> succeeds, DCD and Flash headers are checked and executed. The
> behavior of the
> ROM bootloader while loading the image indicated by the headers is
> not clear
> from the RMs in case of bad blocks, so I asked FSL support which told
> me that
> as soon as a bad block is found, the boot is aborted. This means that
> an SPL is
> required for NAND boot to be reliable, even with internal boot. This
> also means
> that this SPL can not be larger than a single block.
Best regards,
Beno?t
next prev parent reply other threads:[~2012-08-15 18:11 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 20:47 [U-Boot] [PATCH 00/13] mxc nand: Add support for i.MX5 Benoît Thébaudeau
2012-08-13 20:48 ` [U-Boot] [PATCH 01/13] mxc nand: Merge mtd and spl register definitions Benoît Thébaudeau
2012-08-14 8:37 ` Stefano Babic
2012-08-14 10:15 ` Benoît Thébaudeau
2012-08-14 10:46 ` Stefano Babic
2012-08-14 11:13 ` Benoît Thébaudeau
2012-08-14 14:02 ` Stefano Babic
2012-08-14 14:29 ` Benoît Thébaudeau
2012-08-15 18:11 ` Benoît Thébaudeau [this message]
2012-08-16 7:27 ` Stefano Babic
2012-08-14 16:01 ` Scott Wood
2012-08-13 20:48 ` [U-Boot] [PATCH 02/13] mxc nand: cosmectic: Light cleanup Benoît Thébaudeau
2012-08-14 8:41 ` Stefano Babic
2012-08-13 20:48 ` [U-Boot] [PATCH 03/13] spl mxc nand: Merge duplicated code Benoît Thébaudeau
2012-08-14 9:25 ` Stefano Babic
2012-08-13 20:49 ` [U-Boot] [PATCH 04/13] spl mxc nand: Remove " Benoît Thébaudeau
2012-08-13 20:49 ` [U-Boot] [PATCH 05/13] spl mxc nand: Set symmetric mode Benoît Thébaudeau
2012-08-13 20:49 ` [U-Boot] [PATCH 06/13] mxc nand: Access all ecc_status_result fields Benoît Thébaudeau
2012-09-18 0:39 ` Scott Wood
2012-09-18 0:50 ` Scott Wood
2012-08-13 20:49 ` [U-Boot] [PATCH 07/13] spl mxc nand: Fix broken boot for correctable ECC errors Benoît Thébaudeau
2012-08-13 20:50 ` [U-Boot] [PATCH 08/13] mtd mxc nand: Use _mxc_nand_enable_hwecc() Benoît Thébaudeau
2012-08-14 8:50 ` Stefano Babic
2012-08-14 10:04 ` Benoît Thébaudeau
2012-08-13 20:50 ` [U-Boot] [PATCH 09/13] mtd mxc nand: Fix ECC state after read_page_raw_syndrome() Benoît Thébaudeau
2012-08-13 20:50 ` [U-Boot] [PATCH 10/13] mtd mxc nand: Merge init functions Benoît Thébaudeau
2012-08-13 20:50 ` [U-Boot] [PATCH 11/13] mxc nand: Let driver detect IP revision Benoît Thébaudeau
2012-08-14 9:28 ` Stefano Babic
2012-08-13 20:50 ` [U-Boot] [PATCH 12/13] mxc nand: Homogenize IP revisions with Linux Benoît Thébaudeau
2012-08-13 20:51 ` [U-Boot] [PATCH 13/13] mxc nand: Add support for i.MX5 Benoît Thébaudeau
2012-08-13 21:04 ` Troy Kisky
2012-08-13 21:06 ` Troy Kisky
2012-08-21 21:04 ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-08-21 21:21 ` Scott Wood
2012-09-18 0:36 ` Scott Wood
2012-09-18 18:11 ` Tom Rini
2012-11-15 22:22 ` Scott Wood
2012-11-16 20:15 ` Benoît Thébaudeau
2012-11-16 20:18 ` Scott Wood
2012-11-16 20:19 ` Scott Wood
2012-11-16 20:28 ` Benoît Thébaudeau
2012-11-17 0:01 ` Scott Wood
2012-11-17 1:43 ` Benoît Thébaudeau
2012-11-20 23:03 ` Scott Wood
2012-11-20 23:31 ` Benoît Thébaudeau
2012-11-17 18:37 ` Fabio Estevam
2012-11-20 20:33 ` Matt Sealey
2012-09-18 1:01 ` Scott Wood
2012-09-18 10:18 ` Benoît Thébaudeau
2012-09-18 1:19 ` [U-Boot] [PATCH 00/13] " Scott Wood
2013-01-07 13:02 ` Marek Vasut
2013-01-07 13:37 ` Benoît Thébaudeau
2013-01-07 13:47 ` Marek Vasut
2013-01-08 0:49 ` Scott Wood
2013-01-08 6:59 ` Marek Vasut
2013-01-07 14:36 ` Fabio Estevam
2013-01-07 15:08 ` Marek Vasut
2013-01-07 15:30 ` Benoît Thébaudeau
2013-01-07 15:33 ` Marek Vasut
2013-01-07 16:42 ` Marek Vasut
2013-01-07 16:55 ` Benoît Thébaudeau
2013-01-08 7:15 ` 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=150271653.2438912.1345054278237.JavaMail.root@advansee.com \
--to=benoit.thebaudeau@advansee.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