[OpenBIOS] Q: How to "squeeze" C functions in between two symbols?

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Oct 14 18:45:23 CEST 2010


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.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the OpenBIOS mailing list