linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* AT_BASE_PLATFORM (v2)
@ 2008-07-15 23:58 Nathan Lynch
  2008-07-15 23:58 ` [PATCH] elf loader support for auxvec base platform string Nathan Lynch
  2008-07-15 23:58 ` [PATCH] enable AT_BASE_PLATFORM aux vector for powerpc Nathan Lynch
  0 siblings, 2 replies; 20+ messages in thread
From: Nathan Lynch @ 2008-07-15 23:58 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, linux-kernel, roland

Background:
Some IBM POWER-based systems have the ability to run in a
"compatibility" mode which mostly appears to the OS as a different
processor from the actual hardware.  This feature of the platform is
useful for live partition migration and for backwards compatibility
with old kernels on new hardware.  For example, a Power6 system may
appear to be a Power5+, which makes the AT_PLATFORM value "power5+".

Problem:
Booting a system in a compatibility mode means that ld.so may load
libraries that are inappropriately tuned for the real
microarchitecture, and apps that use JIT techniques do not have the
right information for generating tuned code.  While the AT_PLATFORM
auxiliary vector entry correctly indicates the ISA supported, it does
not accurately reflect the underlying microarchitecture in this case,
and there is no good way for userspace to get this information.

Proposed solution:
Add an AT_BASE_PLATFORM auxiliary vector entry which indicates the
microarchitecture.  This entry uses the same string format as
AT_PLATFORM, and is readily usable by ld.so and other applications.

Other solutions that have been suggested but found wanting:

- Use a bit in AT_HWCAP to indicate compat mode -- this is not
expressive enough.  It's not possible to derive the microarchitecture
from the combination of AT_PLATFORM's value and a single bit.

- Use dsocaps -- this seems to be a ld.so-specific interface and not
easily usable by other programs.  ld.so/glibc is not the only program
that can use knowledge of the microarchitecture.

The following two patches:
- add the base support to binfmt_elf.c for AT_BASE_PLATFORM
- implement AT_BASE_PLATFORM for powerpc

Changes since v1:
- increment AT_VECTOR_SIZE_BASE
- define AT_BASE_PLATFORM in generic code instead of powerpc

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-07-22  2:03 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 23:58 AT_BASE_PLATFORM (v2) Nathan Lynch
2008-07-15 23:58 ` [PATCH] elf loader support for auxvec base platform string Nathan Lynch
2008-07-17  6:35   ` Benjamin Herrenschmidt
2008-07-17  7:09     ` Andrew Morton
2008-07-17 17:39       ` Nathan Lynch
2008-07-17 22:19       ` [PATCH v3] " Nathan Lynch
2008-07-17 22:42         ` Andrew Morton
2008-07-17 23:35           ` John Reiser
2008-07-18 18:28             ` Nathan Lynch
2008-07-18 20:31               ` John Reiser
2008-07-18 20:52                 ` Andrew Morton
2008-07-21  3:24               ` Benjamin Herrenschmidt
2008-07-21  3:40                 ` Andrew Morton
2008-07-21  9:33                   ` Benjamin Herrenschmidt
2008-07-21 18:48           ` [PATCH v4] " Nathan Lynch
2008-07-22  2:03             ` Benjamin Herrenschmidt
2008-07-17 16:10     ` [PATCH] " Linus Torvalds
2008-07-17 19:35       ` Nathan Lynch
2008-07-21  3:19       ` Benjamin Herrenschmidt
2008-07-15 23:58 ` [PATCH] enable AT_BASE_PLATFORM aux vector for powerpc Nathan Lynch

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 NNTP newsgroup(s).