Re: [coreboot] cbfs alignment

2015-07-31 Thread Stefan Reinauer
* ron minnich rminn...@gmail.com [150717 21:45]: riscv is taking alignment traps reading cbfs. The issue is that 64-bit fields are 32-bit aligned, which fails many places. Thaminda found this comment:    * Since coreboot is usually compiled 32bit, gcc will align 64bit   types to 32bit

Re: [coreboot] cbfs alignment

2015-07-31 Thread Julius Werner
-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

Re: [coreboot] cbfs alignment

2015-07-31 Thread ron minnich
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 jwer...@chromium.org wrote: -mno-unaligned-access is ARM32 only, unfortunately. You'd have to convince GCC developers to

[coreboot] cbfs alignment

2015-07-17 Thread ron minnich
riscv is taking alignment traps reading cbfs. The issue is that 64-bit fields are 32-bit aligned, which fails many places. Thaminda found this comment: * Since coreboot is usually compiled 32bit, gcc will align 64bit * types to 32bit boundaries. If the coreboot table is dumped on a * 64bit

Re: [coreboot] cbfs alignment

2015-07-17 Thread Aaron Durbin
On Fri, Jul 17, 2015 at 3:27 PM, ron minnich rminn...@gmail.com wrote: bummer. We're going to have to add marshalling code to cbfs, to copy Ya. You'd need to fix cbfs as well is my guess. pointers from the architecture we're on to the architecture we're on, which was compiled by gcc for the

Re: [coreboot] cbfs alignment

2015-07-17 Thread ron minnich
bummer. We're going to have to add marshalling code to cbfs, to copy pointers from the architecture we're on to the architecture we're on, which was compiled by gcc for the architecture we're on, compiled on the architecture we're not on, to conform to rules for an architecture we're not on.

Re: [coreboot] cbfs alignment

2015-07-17 Thread ron minnich
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 jwer...@chromium.org wrote: Is there no way to make RISCV support unaligned accesses? There's a

Re: [coreboot] cbfs alignment

2015-07-17 Thread Aaron Durbin
On Fri, Jul 17, 2015 at 2:45 PM, ron minnich rminn...@gmail.com wrote: riscv is taking alignment traps reading cbfs. The issue is that 64-bit fields are 32-bit aligned, which fails many places. Thaminda found this comment: * Since coreboot is usually compiled 32bit, gcc will align 64bit

Re: [coreboot] cbfs alignment

2015-07-17 Thread mrnuke
On Friday, July 17, 2015 03:32:43 PM Aaron Durbin wrote: On Fri, Jul 17, 2015 at 3:27 PM, ron minnich rminn...@gmail.com wrote: bummer. We're going to have to add marshalling code to cbfs, to copy Ya. You'd need to fix cbfs as well is my guess. Not really. It's OK to be extra careful when

Re: [coreboot] cbfs alignment

2015-07-17 Thread Julius Werner
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

Re: [coreboot] cbfs alignment

2015-07-17 Thread Julius Werner
On Fri, Jul 17, 2015 at 3:13 PM, ron minnich rminn...@gmail.com wrote: 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 :-) Of course. Unfortunately they're usually embedded in age-old specifications