I am posting the following patches as an RFC. I would want to use them later on for BIOS extensions where work in 32 bit space seems easier to handle due to device addresses and ACPI tables that need to be written into for example being >1M and several function calls invoking functions in 32 bit space from 16 bit space. Parameters to function can be easily passed from 16bit. Also, it doesn't add much code, but provides convenience that others may be able to use as well.
It currently uses the fact that 32 bit code is being relocated into higher memory.
The intention of the patches is to allow a transition from 16 bit to 32 bit as transparent as possible from the C-programming point of view. This means that one should be able to call 32 bit code from 16 bit and be able to pass parameters to the function in 32 bit space and be able to get the result from that function call. The assumption currently is that integers are passed.
Existing code in stack.c seems not to support the passing of parameters, so this would an extension to existing functionality.
All patches should apply cleanly to the tip.