Commit 917f95fd4d3e88b2813a3ff00050d63cf7d59307
1 parent
fe319756
alpha fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@207 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
0 deletions
linux-user/mmap.c
| ... | ... | @@ -188,6 +188,11 @@ long target_mmap(unsigned long start, unsigned long len, int prot, |
| 188 | 188 | host_start = start & host_page_mask; |
| 189 | 189 | |
| 190 | 190 | if (!(flags & MAP_FIXED)) { |
| 191 | +#ifdef __alpha__ | |
| 192 | + /* tell the kenel to search at the same place as i386 */ | |
| 193 | + if (host_start == 0) | |
| 194 | + host_start = 0x40000000; | |
| 195 | +#endif | |
| 191 | 196 | if (host_page_size != real_host_page_size) { |
| 192 | 197 | /* NOTE: this code is only for debugging with '-p' option */ |
| 193 | 198 | /* reserve a memory area */ |
| ... | ... | @@ -286,6 +291,7 @@ long target_mmap(unsigned long start, unsigned long len, int prot, |
| 286 | 291 | page_set_flags(start, start + len, prot | PAGE_VALID); |
| 287 | 292 | the_end: |
| 288 | 293 | #ifdef DEBUG_MMAP |
| 294 | + printf("ret=0x%lx\n", (long)start); | |
| 289 | 295 | page_dump(stdout); |
| 290 | 296 | printf("\n"); |
| 291 | 297 | #endif | ... | ... |