Commit bedb69ea0453a65a1c5a7b159ab485c542ecd15c
1 parent
f6b647cd
Temporary hack for alpha user-mode emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2606 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
11 additions
and
0 deletions
exec.c
| ... | ... | @@ -64,6 +64,9 @@ |
| 64 | 64 | |
| 65 | 65 | #if defined(TARGET_SPARC64) |
| 66 | 66 | #define TARGET_PHYS_ADDR_SPACE_BITS 41 |
| 67 | +#elif defined(TARGET_ALPHA) | |
| 68 | +#define TARGET_PHYS_ADDR_SPACE_BITS 42 | |
| 69 | +#define TARGET_VIRT_ADDR_SPACE_BITS 42 | |
| 67 | 70 | #elif defined(TARGET_PPC64) |
| 68 | 71 | #define TARGET_PHYS_ADDR_SPACE_BITS 42 |
| 69 | 72 | #else |
| ... | ... | @@ -109,7 +112,15 @@ typedef struct PhysPageDesc { |
| 109 | 112 | } PhysPageDesc; |
| 110 | 113 | |
| 111 | 114 | #define L2_BITS 10 |
| 115 | +#if defined(CONFIG_USER_ONLY) && defined(TARGET_VIRT_ADDR_SPACE_BITS) | |
| 116 | +/* XXX: this is a temporary hack for alpha target. | |
| 117 | + * In the future, this is to be replaced by a multi-level table | |
| 118 | + * to actually be able to handle the complete 64 bits address space. | |
| 119 | + */ | |
| 120 | +#define L1_BITS (TARGET_VIRT_ADDR_SPACE_BITS - L2_BITS - TARGET_PAGE_BITS) | |
| 121 | +#else | |
| 112 | 122 | #define L1_BITS (32 - L2_BITS - TARGET_PAGE_BITS) |
| 123 | +#endif | |
| 113 | 124 | |
| 114 | 125 | #define L1_SIZE (1 << L1_BITS) |
| 115 | 126 | #define L2_SIZE (1 << L2_BITS) | ... | ... |