So I'm working on implementing support in netfs for IPXE download protocol, if available.

The thing I'm hitting is that when iPXE goes to invoke the callback, the argument list seems reversed. I know how to kind of brute force this scenario, but was wondering if there was some more sane looking way to cope.

For example, assume:
iPXE calls data callback with:
*context, *buffer, length, offset
0xaddf, 0xcdde, 1024, 0

And if I have elilo print out the arguments in order, I get:
0, 1024, 0xcdde, 0xaddf

I see quite a bit of dancing in gnu-efi to have code call into uefi provided functions, but wasn't clear on the converse...