From: Lukasz Majewski <l.majewski@majess.pl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] part_efi: fix protective_mbr struct allocation
Date: Wed, 12 Feb 2014 21:45:41 +0100 [thread overview]
Message-ID: <20140212214541.792d304c@jawa> (raw)
In-Reply-To: <663FBF285582E7408575E1A5C8B86A57ABEA7A4ECA@dor-sms-exch01.digi.com>
Hi Hector,
> Hi Albert,
>
> On 02/12/2014 05:31 PM, Albert ARIBAUD wrote:
> > Hi Hector,
> >
> > On Wed, 12 Feb 2014 17:24:26 +0100, "Palacios, Hector"
> > <Hector.Palacios@digi.com> wrote:
> >
> >> Unfortunately this is causing unaligned access in my i.MX6.
> >> I'm specifically passing the -mno-unaligned-access when building
> >> this file so I guess it has to do with the macro and the packed
> >> structure.
> >
> > I don't think this is due to packed structures, because
> > -mno-unaligned-access tells the compiler that unaligned fields in
> > packed structures should be accesses by breaking the unaligned
> > access into smaller aligned ones, so this would not cause an
> > alignment abort.
> >
> > What can cause an alignment abort despite -mno-unaligned-access is
> > dereferencing a badly aligned pointer, and this is probably what
> > happens here.
>
> Oh, the macro ALLOC_CACHE_ALIGN_BUFFER is returning a correctly
> aligned value for the pointer: 0x4FD33BA0
> The problem is we don't have to free() the pointer anymore at the end
> of the function.
>
> I'll repost the patch
I think, that the patch for fixing the unaligned access in this
function has already been posted by Piotr Wilczek. We have experienced
similar issues with Samsung's Exynos4 based targets.
[PATCH V2] disk:efi: avoid unaligned access on efi partition
Despite its disappearance from patchwork it shall be available at
mailing list archive.
The v1 can be found at the following link:
http://patchwork.ozlabs.org/patch/282753/
Inclusion of v2 has been postponed since there was a discussion if we
shall allow unaligned access (-mno-unaligned-access flag) at armv7
(after patches posted by Tom).
As fair as I can tell, we will keep the current approach so, I think
that Tom will be willing to pull this patch (v2) now.
Best regards,
Lukasz Majewski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140212/3b2b8e7f/attachment.pgp>
next prev parent reply other threads:[~2014-02-12 20:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 14:40 [U-Boot] [PATCH] part_efi: fix protective_mbr struct allocation Hector Palacios
2014-02-12 14:43 ` Fabio Estevam
2014-02-12 16:33 ` Albert ARIBAUD
2014-02-12 17:33 ` Fabio Estevam
2014-02-12 17:58 ` Albert ARIBAUD
2014-02-12 15:55 ` Lukasz Majewski
2014-02-12 16:24 ` Palacios, Hector
2014-02-12 16:30 ` Albert ARIBAUD
2014-02-12 16:48 ` Palacios, Hector
2014-02-12 20:45 ` Lukasz Majewski [this message]
2014-02-13 2:23 ` Albert ARIBAUD
2014-02-19 8:19 ` Lukasz Majewski
2014-02-19 10:08 ` Albert ARIBAUD
2014-02-19 10:15 ` Albert ARIBAUD
2014-02-19 12:52 ` Palacios, Hector
2014-02-19 14:14 ` Albert ARIBAUD
2014-02-19 14:25 ` Lukasz Majewski
2014-02-19 14:38 ` Albert ARIBAUD
2014-02-19 15:11 ` Lukasz Majewski
2014-02-19 14:22 ` Tom Rini
2014-02-19 15:10 ` Lukasz Majewski
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=20140212214541.792d304c@jawa \
--to=l.majewski@majess.pl \
--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