[OpenBIOS] SOLVED: the mystery of Solaris on SPARC32 and the missing Forth arguments
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Fri Oct 22 20:45:55 CEST 2010
Blue Swirl wrote:
>> Ah okay - so swap retl with plain ret? And can I just use %sp like the
>> SPARC64 version?
>
> Yes. If you add 'save' and 'restore', then %sp can be used.
Okay - perhaps I'm missing something more fundamental here. The attached
patch creates a simple handler that does nothing except flush windows to
the stack and then call the C function - but it still seems to corrupt
the stack somehow as subsequent calls into OBP have the wrong parameters.
The only thing I can think of is that this simple example fails because
of something related to the return address, but I'm not 100% sure. Also
what are the rules about how much information you can push onto the
stack of the previous frame, i.e. the frame pointer? My current thoughts
are that I can either i) push arguments onto the %fp and not save into a
new window or ii) push arguments onto the %sp after a save (in which
case I need additional code to copy the i registers into the o registers
before calling the C function). Does this sound correct?
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openbios-sparc32-romvec.patch
Type: text/x-diff
Size: 3875 bytes
Desc: not available
URL: <http://lists.openbios.org/pipermail/openbios/attachments/20101022/b2d4cb06/attachment.bin>
More information about the OpenBIOS
mailing list