All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] tools: mkimage: fix imximage header size
Date: Wed, 15 Jul 2015 09:54:42 +0200	[thread overview]
Message-ID: <20150715095442.3e2504ad@lilith> (raw)
In-Reply-To: <55A6099B.6050908@denx.de>

Hello Stefano,

On Wed, 15 Jul 2015 09:19:55 +0200, Stefano Babic <sbabic@denx.de>
wrote:

> > I think my patch back then solves the issue nicer. The struct dcd_v2_t
> > is not the reason the whole header is not aligned by 8-byte, it is a
> > problem of the boot_data_t header which is 12 bytes long. So inserting
> > the padding just after struct boot_data_t (or inside of struct
> > boot_data_t) seems to be more appropriate.
> 
> I see. Albert, can you test on your board if Stefan's patch solves your
> issue, too ? I could then revert this one and apply Stefan's.

I can test it, but I'm sure that boot data does not need size alignment
since in my case there is no such alignment and Vybrid boots. To me
this means aligning boot_data_t size would introduce a constraint that
is not really there.

If Stefan would test my patch as well, I reckon he would find it to
work as well as his.

So we have two patches which fix Vybrid booting:

- one which aligns the boot_data_t /size/ but keeps its /offset/
  unaligned;

- one which aligns the the boot_data_t /offset/ but keeps its /size/
  unaligned.

Seems to me that the conclusion is that the actual alignment of
boot_data_t does not matter and that only the alignment of the
whole imx_header_v2_t size (and, consequently, offset) matters.

How about just adding an attribute((align(8))) to imx_header_v2_t?

> It remains doubious how the ROMs on Freescale are interpretating the
> header, but we can only test it.

See my other answer. We could prove it by disassembling the ROM code.
Any volunteer? :)

> Best regards,
> Stefano

Amicalement,
-- 
Albert.

  reply	other threads:[~2015-07-15  7:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 12:18 [U-Boot] [PATCH 0/5] Add support for Vybrid VF610-based PCM052 Albert ARIBAUD
2015-06-19 12:18 ` [U-Boot] [PATCH 1/5] net: fec_mxc: remove useless struct nbuf Albert ARIBAUD
2015-06-19 12:18   ` [U-Boot] [PATCH 2/5] vf610: refactor DDRMC code Albert ARIBAUD
2015-06-19 12:18     ` [U-Boot] [PATCH 3/5] i2c: fix vf610 support Albert ARIBAUD
2015-06-19 12:18       ` [U-Boot] [PATCH 4/5] tools: mkimage: fix imximage header size Albert ARIBAUD
2015-06-19 12:18         ` [U-Boot] [PATCH 5/5] vf610: add support for Phytec PCM052 Albert ARIBAUD
2015-07-10  8:14         ` [U-Boot] [PATCH 4/5] tools: mkimage: fix imximage header size Stefano Babic
2015-07-14 10:29           ` Stefan Agner
2015-07-15  7:19             ` Stefano Babic
2015-07-15  7:54               ` Albert ARIBAUD [this message]
2015-07-15 10:41                 ` Stefan Agner
2015-07-15 11:44                   ` Albert ARIBAUD
2015-07-15 12:36                     ` Stefan Agner
2015-07-15 12:54                       ` Albert ARIBAUD
2015-07-15  7:37             ` Albert ARIBAUD
2015-07-10  8:11       ` [U-Boot] [PATCH 3/5] i2c: fix vf610 support Stefano Babic
2015-06-19 15:13     ` [U-Boot] [PATCH 2/5] vf610: refactor DDRMC code Stefan Agner
2015-06-19 16:50       ` Albert ARIBAUD
2015-06-19 17:33       ` Albert ARIBAUD
2015-07-10  8:09         ` Stefano Babic
2015-07-13 19:01           ` Stefan Agner
2015-07-14  7:16             ` [U-Boot] (rather [LONG], sorry) " Albert ARIBAUD
2015-06-19 15:38   ` [U-Boot] [PATCH 1/5] net: fec_mxc: remove useless struct nbuf Joe Hershberger
2015-07-10  8:03   ` Stefano Babic

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=20150715095442.3e2504ad@lilith \
    --to=albert.u.boot@aribaud.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.