j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
Author: mcayland Date: Sun Dec 8 13:48:24 2013 New Revision: 1236 URL: http://tracker.coreboot.org/trac/openbios/changeset/1236
Log: forthstrap: avoid unaligned accesses
Trying to compile OpenBIOS for SPARC32 on a SPARC machine, I get a SIGBUS within forthstrap, more precisely accessing reloc_table in load_dictionary. This table is not aligned because the dictionnary head as a size which is not a multiple of 4.
This is due to the file QEMU,tcx.bin which is being encoded, and which has a size which is not a multiple of 4. Fix that by adding some padding after the encoded data.
Modified: trunk/openbios-devel/kernel/bootstrap.c ============================================================================== --- trunk/openbios-devel/kernel/bootstrap.c Sun Nov 10 21:14:39 2013 (r1235) +++ trunk/openbios-devel/kernel/bootstrap.c Sun Dec 8 13:48:24 2013 (r1236) @@ -1008,6 +1008,7 @@ PUSH( pointer2cell(dict + dicthead) ); PUSH( size ); dicthead += size; + paddict(sizeof(cell)); }