[OpenBIOS] [commit] r1236 - trunk/openbios-devel/kernel

repository service svn at openbios.org
Sun Dec 8 13:48:24 CET 2013


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.

Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/kernel/bootstrap.c

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));
 }
 
 



More information about the OpenBIOS mailing list