RFC: ABI support for special memory area
Suprateeka R Hegde
hegdesmailbox@gmail.com
Sun Jan 1 00:00:00 GMT 2017
On 23-Feb-2017 09:49 PM, H.J. Lu wrote:
> The default implementation of __gnu_mbind_setup is
>
> int
> __gnu_mbind_setup (unsigned int type, void *addr, size_t length)
> {
> return 0;
> }
>
> which can be overridden by a different implementation at link-time.
>
Since this is a design that allows vendor specific extension and
implementation, would it OK if we make it more generic?
Instead of a fixed 3 arguments (type, addr, len), how about something
like a pointer to a generic MBIND_CONTEXT struct (say of type
__gnu_mbind_context defined)? And let the implementation define the
actual struct.
I would like to handle NVM/NVMe (long back I had mentioned about
PT_PERSISTENT) through this MBIND and my implementation of handling
NVM/NVMe needs more data to be passed to such "setup" functions.
Or is this __gnu_mbind_setup should be considered as a very basic /
fundamental function (used just to setup the "memory area") and
implementations/vendors are expected to write wrapper/handler functions
to handle other aspects of the special memory? In that case the fixed
set of basic args looks OK.
IMHO this __gnu_mbind_setup is a very good design to be generic enough
and not be very specific/basic/fundamental runtime support.
--
Supra
More information about the Gnu-gabi
mailing list