Andreas Färber wrote:
I was successful using a section ".rtasentry", but since I get r4 as a pointer to the start of memory, I'll rather use a known offset.
I got OpenBIOS to load my RTAS blob and AIX to enter my RTAS C function and emit something to escc uart from there. It looks like AIX is trying to emit "\nAIX " via display-character RTAS calls. My code's not very stable though, the same code snippet didn't work inside a [{static,inline}] serial_putchar() function but did directly in my main function called from assembly. Still poking at ldscript and assembler to find the cause or a workaround. Right now it does print okay but hangs on returning from the RTAS call. Will post an RFC once I've cleaned it up a little, maybe it's something obvious...
Andreas
I don't know if it helps with PPC, but on SPARC64 there is an issue whereby if you are compiling with -O0 (which is typical during development), you need to allow extra stack space when switching contexts. Does compiling with -Os solve the issue at all?
ATB,
Mark.