we're going to support unaligned accesses, they make it easy. I think it's silly that have data structs that are not 64-bit aligned, however :-)
ron
On Fri, Jul 17, 2015 at 3:05 PM Julius Werner jwerner@chromium.org wrote:
Is there no way to make RISCV support unaligned accesses? There's a bunch of things in coreboot (and especially libpayload) that depend on it. I think that it generally makes code look much simpler (and run faster) if you can assume that it's supported across the board.
If we do need to make CBFS unaligned access aware, we should do it with some inline functions that fold into a simple read on the platforms that support them in hardware.
(Depending on how many such accesses you have and what your context switch costs are, it might also be feasible to emulate it in an exception handler... that way you wouldn't need to hunt down every single occurrence we've accumulated over the years.)