From: Carlos O'Donell <carlos@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>, gnu-gabi@sourceware.org
Subject: Re: RFC: ABI support for special memory area
Date: Sun, 01 Jan 2017 00:00:00 -0000 [thread overview]
Message-ID: <a40cc936-e618-0850-5fbe-46cace638129@redhat.com> (raw)
In-Reply-To: <CAMe9rOrwm=U9891moSKLQEtbtLMTibFfh5Ok05YjMG_bJj7rJw@mail.gmail.com>
On 02/23/2017 11:19 AM, H.J. Lu wrote:
> A system may have MCDRAM or other types of memory in addition to
> normal RAM. Here is an ABI proposal to allow placement in a section
> whose sh_info field indicates the special memory type.
>
> Any comments?
>
> H.J.
> ---
> To section attributes, add
>
> #define SHF_GNU_MBIND 0x00100000
>
> for sections used to place data or text into a special memory area.
> The section names should start with ".mbind" so that they won't be
> grouped together with normal sections by link editor. The sh_info
> field indicates the special memory type.
>
> To the "Program Header" section, add an inclusive range of segment types
> for GNU_MBIND segments:
>
> #define PT_GNU_MBIND_NUM 4096
> #define PT_GNU_MBIND_LO (PT_LOOS + 0x474e555)
> #define PT_GNU_MBIND_HI (PT_GNU_MBIND_LO + PT_GNU_MBIND_NUM - 1)
>
> The array element specifies the location and size of a special memory area.
> Each GNU_MBIND segment contains one GNU_MBIND section and the segment
> type is PT_GNU_MBIND_LO plus the sh_info value. If the sh_info value is
> greater than PT_GNU_MBIND_NUM, no GNU_MBIND segment will be created. Each
> GNU_MBIND segment must be aligned at page boundary. The interpretation of
> the special memory area information is implementation-dependent.
> Implementations may ignore GNU_MBIND segment.
>
> Run-time support
>
> int __gnu_mbind_setup (unsigned int type, void *addr, size_t length);
>
> It sets up special memory area of 'type' and 'length' at 'addr' where
> 'addr' is a multiple of page size. It returns zero for success, positive
> value of ERRNO for non-fatal error and negative value of ERRNO for fatal
> error.
>
> After all shared objects and the executable file are loaded, relocations
> are processed, for each GNU_MBIND segment in a shared object or the
> executable file, run-time loader calls __gnu_mbind_setup with type,
> address and length. The default implementation of __gnu_mbind_setup is
Why does it run _after_ all shared objects and the executable file are loaded?
Why not let the dynamic loader choose when it needs to setup the memory?
> 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.
What if you _can't_ bind at ADDR?
What if the binding would work if ADD was any value?
--
Cheers,
Carlos.
next prev parent reply other threads:[~2017-02-24 0:55 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-01 0:00 H.J. Lu
2017-01-01 0:00 ` Carlos O'Donell [this message]
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Carlos O'Donell
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Florian Weimer
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Carlos O'Donell
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Suprateeka R Hegde
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Florian Weimer
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Florian Weimer
2017-01-01 0:00 ` H.J. Lu
2017-01-01 0:00 ` Florian Weimer
2017-01-01 0:00 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a40cc936-e618-0850-5fbe-46cace638129@redhat.com \
--to=carlos@redhat.com \
--cc=gnu-gabi@sourceware.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).