diff options
Diffstat (limited to 'meta/packages/qemu/qemu-0.9.0+cvs20071230/qemu-amd64-32b-mapping-0.9.0.patch')
-rw-r--r-- | meta/packages/qemu/qemu-0.9.0+cvs20071230/qemu-amd64-32b-mapping-0.9.0.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20071230/qemu-amd64-32b-mapping-0.9.0.patch b/meta/packages/qemu/qemu-0.9.0+cvs20071230/qemu-amd64-32b-mapping-0.9.0.patch new file mode 100644 index 0000000000..c7f36d8110 --- /dev/null +++ b/meta/packages/qemu/qemu-0.9.0+cvs20071230/qemu-amd64-32b-mapping-0.9.0.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | --- | ||
2 | linux-user/mmap.c | 8 ++++++-- | ||
3 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
4 | |||
5 | Index: qemu/linux-user/mmap.c | ||
6 | =================================================================== | ||
7 | --- qemu.orig/linux-user/mmap.c 2007-12-03 15:40:25.000000000 +0000 | ||
8 | +++ qemu/linux-user/mmap.c 2007-12-03 16:37:21.000000000 +0000 | ||
9 | @@ -29,6 +29,10 @@ | ||
10 | |||
11 | //#define DEBUG_MMAP | ||
12 | |||
13 | +#ifndef MAP_32BIT | ||
14 | +#define MAP_32BIT 0 | ||
15 | +#endif | ||
16 | + | ||
17 | /* NOTE: all the constants are the HOST ones, but addresses are target. */ | ||
18 | int target_mprotect(abi_ulong start, abi_ulong len, int prot) | ||
19 | { | ||
20 | @@ -251,7 +255,7 @@ abi_long target_mmap(abi_ulong start, ab | ||
21 | especially important if qemu_host_page_size > | ||
22 | qemu_real_host_page_size */ | ||
23 | p = mmap(g2h(mmap_start), | ||
24 | - host_len, prot, flags | MAP_FIXED, fd, host_offset); | ||
25 | + host_len, prot, flags | MAP_FIXED | MAP_32BIT, fd, host_offset); | ||
26 | if (p == MAP_FAILED) | ||
27 | return -1; | ||
28 | /* update start so that it points to the file position at 'offset' */ | ||
29 | @@ -406,7 +410,7 @@ abi_long target_mremap(abi_ulong old_add | ||
30 | unsigned long host_addr; | ||
31 | |||
32 | /* XXX: use 5 args syscall */ | ||
33 | - host_addr = (long)mremap(g2h(old_addr), old_size, new_size, flags); | ||
34 | + host_addr = (long)mremap(g2h(old_addr), old_size, new_size, flags | MAP_32BIT); | ||
35 | if (host_addr == -1) | ||
36 | return -1; | ||
37 | new_addr = h2g(host_addr); | ||