[coreboot] cbfs alignment

Julius Werner jwerner at chromium.org
Sat Aug 1 00:25:17 CEST 2015


-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).



More information about the coreboot mailing list