I meant OpenBOOT, as I am trying to write something for a V9 and qemu doesn't have full suport for the V9 arch. But as far as i've noticed the openbios implementation resembles the openboot one. Anywho I managed to get passed this. It seems it was because I had the processor in a wrong state. But now I ran into some other problems, as it seems if I call the "finddevice" CIF command for any node, instead of getting a valid phandle, or an -1 in case i ask for gibberish(which i did). The CIF keeps returning the address to the string I passed as an argument (said device that i am searching).
On Fri, Aug 5, 2011 at 2:24 PM, Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk wrote:
On 04/08/11 15:39, Ghitulete Razvan wrote:
I've written several lines of code in C in which I am trying to access the OpenBoot CIF to execute an instruction. But immediately after I do the call to the CIF interface address the PROM freezes. Does anyone have any ideas why is this so. I'm getting the CIF address from the %o4 register passed by SILO
Do you really mean OpenBoot or do you mean OpenBIOS?
There was a bug in earlier versions of OpenBIOS where the CIF arguments were being read in the wrong order which is now fixed. Basically as you read the IEEE 1275 specification, left -> right maps to bottom -> top of stack so it may just be that you need to reverse the order of your arguments.
Also if you are using OpenBIOS, you can enable DEBUG_CIF in libopenbios/client.c which will output all the CIF calls and their arguments on the console to help you.
HTH,
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
-- OpenBIOS http://openbios.org/ Mailinglist: http://lists.openbios.org/mailman/listinfo Free your System - May the Forth be with you