<div dir="ltr">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 :-)<div><br></div><div>ron</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 17, 2015 at 3:05 PM Julius Werner <<a href="mailto:jwerner@chromium.org">jwerner@chromium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there no way to make RISCV support unaligned accesses? There's a<br>
bunch of things in coreboot (and especially libpayload) that depend on<br>
it. I think that it generally makes code look much simpler (and run<br>
faster) if you can assume that it's supported across the board.<br>
<br>
If we do need to make CBFS unaligned access aware, we should do it<br>
with some inline functions that fold into a simple read on the<br>
platforms that support them in hardware.<br>
<br>
(Depending on how many such accesses you have and what your context<br>
switch costs are, it might also be feasible to emulate it in an<br>
exception handler... that way you wouldn't need to hunt down every<br>
single occurrence we've accumulated over the years.)<br>
</blockquote></div>