[coreboot] cbfs alignment
ron minnich
rminnich at gmail.com
Sat Aug 1 00:37:55 CEST 2015
yes, they all *seem* like the ought to end up aligned, but they don't :-(
RISCV changed; they can do unaligned loads now.
On Fri, Jul 31, 2015 at 3:26 PM Julius Werner <jwerner at chromium.org> wrote:
> -mno-unaligned-access is ARM32 only, unfortunately. You'd have to
> convince GCC developers to generalize it.
>
> > This statement is true for coreboot tables. CBFS files are aligned to 64
> bytes by default.
>
> The problem is that the CBFS stage and payload headers themselves
> contain inherently misaligned 64-bit values. I guess if the compiler
> was really smart it could stack-allocate a struct { u32 a; u64 b; }
> __attribute__((packed)) structure at an odd 4-byte boundary, but it
> doesn't currently seem to do that (and neither does cbfstool for the
> in-ROM structs).
>
> --
> coreboot mailing list: coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20150731/84e62fd6/attachment.html>
More information about the coreboot
mailing list