[powerstation-owners] building SLOF with gcc 4.3

Adrian Reber adrian at lisas.de
Sun Dec 7 14:48:44 MST 2008


I have commited a fix to the repository to make SLOF work on the
PowerStation when built with gcc 4.x.

It was hanging in the bios emulator and enabling the debug code already
fixed the problem. I found the exact position and it seems to be some
timing problem which I do not understand unfortunately. The fix I have
commited helps, but I do not know why.

The following patch fixes it for me:

diff --git a/clients/net-snk/app/biosemu/io.c b/clients/net-snk/app/biosemu/io.c
index 0e46166..37a37a1 100644
--- a/clients/net-snk/app/biosemu/io.c
+++ b/clients/net-snk/app/biosemu/io.c
@@ -196,6 +196,12 @@ my_inl(X86EMU_pioAddr addr)
                                | (read_io((void *)(translated_addr + 2), 1) << 8)
                                | (read_io((void *)(translated_addr + 3), 1));
                }
+               /* For some reason we need this eieio here. With newer compilers
+                * the bios emulator hangs if we do not wait a certain time at
+                * this point. It does not need to be an eieio but it seems it
+                * wastes enough time to keep us going. This is completely not
+                * understood. */
+               eieio();
                DEBUG_PRINTF_IO("%s(%04x) Device I/O --> %08x\n", __FUNCTION__,
                                addr, rval);
                return rval;

If anybody knows a better way to fix the hang in the bios emulator
I would be happy to fix it the right way and not just wait for
some unknown reason.

		Adrian


More information about the powerstation-owners mailing list