[PATCH 13/16] ps3: get firmware version
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Jan 30 08:22:22 EST 2007
> To make it work, I need to arrange to do 64 bit HV calls from the 32 bit
> wrapper. I'm not yet entirely sure how to set that up. Any suggestions
> would be welcome.
You can use the ld and std instructions in 32 bits mode to load / store
full 64 bits registers. So you can define wrappers for the few HV calls
you need that either put all args in an array of 64 bits entries that
your asm wrapper then loads in registers using "ld" (and stores back the
results using std) or you can define proper wrappers per functions that
"turn" the arguments into the right shape for the 64 bits call (a bit
harder since 32 bits will pass 64 bits values as 2 registers, so you'd
have to write them on the stack and load the combined value with ld...)
Ben.
More information about the Linuxppc-dev
mailing list