mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Middelschulte, Leif" <Leif.Middelschulte@klsmartin.com>
To: "sha@pengutronix.de" <sha@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: imx6 nand: dbbt version/layout
Date: Fri, 11 Jun 2021 15:16:40 +0000	[thread overview]
Message-ID: <c72b0e7bc67a05f77a67c4fbf9d0b04d27a7fd44.camel@klsmartin.com> (raw)
In-Reply-To: <20210503123232.GJ19819@pengutronix.de>

Am Montag, dem 03.05.2021 um 14:32 +0200 schrieb Sascha Hauer:
> Hi Leif,
Hi Sascha,

>
> On Thu, Apr 22, 2021 at 12:13:59PM +0000, Middelschulte, Leif wrote:
> > Hi,
> >
> > I'm in the process of fixing up imx-kobs to support
> > - boot configuration dumps
> > - boot stream extracts/updates
> > on iMX6QDL using the GPMI-NAND interface, as provided by some more
> > "recent" kernels.
> >
> > I updated barebox on the NAND flash storage using another instance of
> > barebox. Now it turns out that the dbbt version used (i.e. written)
> > by
> > barebox and supported by imx-kobs (as it was) is not documented in
> > the
> > i.MX6 QDL reference manual.
> > Barebox uses[0] DBBT version 0x1000000, while the reference manual
> > describes (i.MX6DQRM Rev 3., section 8.5.2.4) layout version 0x1.
>
> It's stored in big endian. Just endianess swap 0x01000000 and you have
> your 0x00000001.
Thank you for explaining the quite obvious, my bad.  :)

On another note though: Barebox writes[0] and verifies[1] ' BCF' and
'TBBD' in the BCB.

The most recent manual (IMX6DQRM rev. 6)* states the following though:
- FCB FingerPrint "FCB ": also given as 0x20424346, which is ' BCF' in
ascii
- DBBT FingerPrint "DBBT": also given as 0x44424254, which is 'DBBT' in
ascii
Notice how the value is reversed in the first case, while it is not in
the second.

Other tools, such as imx-kobs, seem to use[2] the value given in the
reference manual for the DBBT.

Since the ROM seems to boot either way, finding "the correct"
Fingerprint might be nitpicking, besides the verification (write skip).


[0]
https://git.pengutronix.de/cgit/barebox/tree/include/soc/imx/imx-nand-bcb.h?id=7689055a8b037363dae840eee33a0ed43f905b7a

[1]
https://git.pengutronix.de/cgit/barebox/tree/common/imx-bbu-nand-fcb.c?id=7689055a8b037363dae840eee33a0ed43f905b7a#n791
[2]
https://github.com/NXPmicro/imx-kobs/blob/269fdffcf97238684de9f28977a73677282e061f/src/BootControlBlocks.h#L35

*CAUTION: Older versions of the IMX6DQRM state even other hex values
for the FCB fingerprint (i.e. the ascii equivalent of ` BCN`).

>
> >
> > Besides that, the reference manual apparently does not describe the
> > field `BBMarkerPhysicalOffsetInSpareData` at the end of the FCB
> > structure. Yet again, imx-kobs and barebox are reading/writing it.
>
> barebox doesn't actively sets the value to anything else than 0x0. I
> have no idea if and how the ROM interprets this value. Indeed the name
> of the field seems to be inconsistent to the reference manual.
Never mind this.
>
> Regards,
>   Sascha
>
>
> --
> Pengutronix e.K.
> |                             |
> Steuerwalder Str. 21                       |
> http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-
> 0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-
> 5555 |

--
Kind regards

Leif Middelschulte
Software Development

KLS Martin GmbH + Co. KG
A company of the KLS Martin Group
Am Flughafen 18
79108 Freiburg, Germany

Phone
Fax
Mail
Web

+49 761 557 997 -543
+49 761 557 997 -152

leif.middelschulte@klsmartin.com
www.klsmartin.com




Commercial Register: Freiburg im Breisgau HRA 4044
Managing directors: Michael Martin, Karl Leibinger, Christian
Leibinger
General partner: KLS Martin Verwaltungsgesellschaft mbH
Commercial register: Stuttgart HRB 451316
Tax ID number: DE 237467280

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Any views or opinions expressed are solely those of the author and do not necessarily represent those of KLS Martin. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2021-06-11 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 12:13 Middelschulte, Leif
2021-05-03 12:32 ` Sascha Hauer
2021-06-11 15:16   ` Middelschulte, Leif [this message]

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=c72b0e7bc67a05f77a67c4fbf9d0b04d27a7fd44.camel@klsmartin.com \
    --to=leif.middelschulte@klsmartin.com \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.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