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.