Am 22.09.2008 um 11:36 schrieb Gerardo Richarte:
nicolas cellier wrote:
He said arguments type was not fixed, but would depend on service
requested
in first argument as I understand it.
right, that's the issue.
If that is indeed the issue then just construct the FFI call on the fly. The <cdecl> declaration is just syntactic sugar. You can as well create an FFI function object, add parameters, and call it.
Others: the actual function Gera tries to wrap is the OpenFirmware client interface:
http://www.firmworks.com/www/clntintf.htm
for some ia32 details see
http://kerneltrap.org/mailarchive/linux-kernel/2008/4/21/1522284
Example code calling back into OFW is here:
http://dev.laptop.org/git?p=olpc-2.6;a=blob;f=arch/x86/kernel/ofw.c
So this is the primitive we want to have ...
- Bert -