* [Qemu-devel] [PATCH] alpha: correctly defines TARGET_MAP_xx constants
@ 2008-09-18 8:16 Tristan Gingold
2008-09-18 9:21 ` Aurelien Jarno
0 siblings, 1 reply; 3+ messages in thread
From: Tristan Gingold @ 2008-09-18 8:16 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
Hi,
most of the TARGET_MAP_xx macros were wrong for alpha. This patch
fixes it.
Using this patch I was able to run an hello-world program (using
printf) statically
linked with an old glibc.
I agree that the TARGET_MAP_xx definition block starts to be a mess.
Maybe maintainers
have strong opinions about that.
Tristan.
Signed-off-by: Tristan Gingold <gingold@adacore.com>
[-- Attachment #2: q-alpha11.diff --]
[-- Type: application/octet-stream, Size: 1482 bytes --]
Index: linux-user/syscall_defs.h
===================================================================
--- linux-user/syscall_defs.h (revision 5247)
+++ linux-user/syscall_defs.h (working copy)
@@ -860,9 +860,21 @@
#include "termbits.h"
+/* Common. */
#define TARGET_MAP_SHARED 0x01 /* Share changes */
#define TARGET_MAP_PRIVATE 0x02 /* Changes are private */
#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */
+#if defined(TARGET_ALPHA)
+#define TARGET_MAP_FIXED 0x100 /* Interpret addr exactly */
+#define TARGET_MAP_ANONYMOUS 0x10 /* don't use a file */
+#define TARGET_MAP_GROWSDOWN 0x01000 /* stack-like segment */
+#define TARGET_MAP_DENYWRITE 0x02000 /* ETXTBSY */
+#define TARGET_MAP_EXECUTABLE 0x04000 /* mark it as an executable */
+#define TARGET_MAP_LOCKED 0x08000 /* lock the mapping */
+#define TARGET_MAP_NORESERVE 0x10000 /* no check for reservations */
+#define TARGET_MAP_POPULATE 0x20000 /* pop (prefault) pagetables */
+#define TARGET_MAP_NONBLOCK 0x40000 /* do not block on IO */
+#else
#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */
#if defined(TARGET_MIPS)
#define TARGET_MAP_ANONYMOUS 0x0800 /* don't use a file */
@@ -888,6 +900,7 @@
#define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */
#endif
+#endif
#if (defined(TARGET_I386) && defined(TARGET_ABI32)) || defined(TARGET_ARM) || defined(TARGET_CRIS)
struct target_stat {
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Qemu-devel] [PATCH] alpha: correctly defines TARGET_MAP_xx constants
2008-09-18 8:16 [Qemu-devel] [PATCH] alpha: correctly defines TARGET_MAP_xx constants Tristan Gingold
@ 2008-09-18 9:21 ` Aurelien Jarno
2008-09-29 17:24 ` Aurelien Jarno
0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2008-09-18 9:21 UTC (permalink / raw)
To: qemu-devel
On Thu, Sep 18, 2008 at 10:16:49AM +0200, Tristan Gingold wrote:
> Hi,
>
> most of the TARGET_MAP_xx macros were wrong for alpha. This patch fixes
> it.
> Using this patch I was able to run an hello-world program (using printf)
> statically
> linked with an old glibc.
>
> I agree that the TARGET_MAP_xx definition block starts to be a mess.
> Maybe maintainers
> have strong opinions about that.
>
I agree this starts to be a mess. I think we should duplicate a few
lines for values that are "common" to a few architectures only.
Any other opinion?
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] alpha: correctly defines TARGET_MAP_xx constants
2008-09-18 9:21 ` Aurelien Jarno
@ 2008-09-29 17:24 ` Aurelien Jarno
0 siblings, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2008-09-29 17:24 UTC (permalink / raw)
To: qemu-devel
Aurelien Jarno a écrit :
> On Thu, Sep 18, 2008 at 10:16:49AM +0200, Tristan Gingold wrote:
>> Hi,
>>
>> most of the TARGET_MAP_xx macros were wrong for alpha. This patch fixes
>> it.
>> Using this patch I was able to run an hello-world program (using printf)
>> statically
>> linked with an old glibc.
>>
>> I agree that the TARGET_MAP_xx definition block starts to be a mess.
>> Maybe maintainers
>> have strong opinions about that.
>>
>
> I agree this starts to be a mess. I think we should duplicate a few
> lines for values that are "common" to a few architectures only.
>
> Any other opinion?
>
I have applied a patch that duplicate those values to clean all the mess
and to add alpha specific values.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-29 17:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-18 8:16 [Qemu-devel] [PATCH] alpha: correctly defines TARGET_MAP_xx constants Tristan Gingold
2008-09-18 9:21 ` Aurelien Jarno
2008-09-29 17:24 ` Aurelien Jarno
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.