Tarl Neustaedter wrote:
My recollection (I don't have time to pursue it right now, alligators at work) is that OpenBoot switches register sets when called by Solaris, thus using a different set of globals. I'll try to check later.
Oh wait - I think I see what it is now. On closer inspection, it seems that translate was being invoked through CIF after all (I think now the Qemu output only shows blocks being translated and not executed?).
Tracing through the code, it seems like there's an off-by-one bug in the CIF parameter code which means that a subsequent stack push will overwrite the last saved parameter (which is %g7). I think I've fixed it and am testing a patch now.
ATB,
Mark.
Mark Cave-Ayland wrote:
Tracing through the code, it seems like there's an off-by-one bug in the CIF parameter code which means that a subsequent stack push will overwrite the last saved parameter (which is %g7). I think I've fixed it and am testing a patch now.
Yes, that seems to be working correctly! :) Now a Milax OpenSolaris boot is failing here:
0 > go Jumping to entry point 00000000010071d8 for type 0000000000000001... switching to new context: entry point 0x10071d8 stack 0x00000000ffe02a91 call-method SUNW,retain: exception -21 panic - kernel: Can't allocate retained panicbuf physical address EXIT
Looks like there is some mystical Forth word called "SUNW,retain" that needs to be implemented for this to work. Time to Google for some more specs...
ATB,
Mark.
On 4/16/10 12:24 PM, Mark Cave-Ayland wrote:
call-method SUNW,retain: exception -21
I've never seen this in any standard so far, but Linux seems to know about it, too:
/* Set aside physical memory which is not touched or modified * across soft resets. */ unsigned long prom_retain(const char *name, unsigned long pa_low, unsigned long pa_high, long size, long align) { /* XXX I don't think we return multiple values correctly. * XXX OBP supposedly returns pa_low/pa_high here, how does * XXX it work? */
/* If align is zero, the pa_low/pa_high args are passed, * else they are not. */ if (align == 0) return p1275_cmd("SUNW,retain", (P1275_ARG(0, P1275_ARG_IN_BUF) | P1275_INOUT(5, 2)), name, pa_low, pa_high, size, align); else return p1275_cmd("SUNW,retain", (P1275_ARG(0, P1275_ARG_IN_BUF) | P1275_INOUT(3, 2)), name, size, align); }
On 2010-4-16 12:17 PM, Stefan Reinauer wrote:
On 4/16/10 12:24 PM, Mark Cave-Ayland wrote:
call-method SUNW,retain: exception -21
I've never seen this in any standard so far, but Linux seems to know about it, too:
It's a Sun-proprietary interface. It's a kludge to keep memory across reboots (for things like disk change logs) that aren't clobbered by either OpenBoot or Solaris restart. There should be some FWARC cases on it, I don't know if they have been made public.
Unfortunately it doesn't appear FWARC 2000/420 was exported. At the very end of this case is the basic outline of SUNW,retain.
http://arc.opensolaris.org/caselog/FWARC/2009/213/Materials/sun4v-binding.tx...