52 |
|
|
53 |
tlb_flush(env); |
tlb_flush(env); |
54 |
#ifdef CONFIG_SOFTMMU |
#ifdef CONFIG_SOFTMMU |
55 |
env->soft_mmu = 1; |
env->hflags |= HF_SOFTMMU_MASK; |
56 |
#endif |
#endif |
57 |
/* init various static tables */ |
/* init various static tables */ |
58 |
if (!inited) { |
if (!inited) { |
228 |
int cpl, error_code, is_dirty, is_user, prot, page_size, ret; |
int cpl, error_code, is_dirty, is_user, prot, page_size, ret; |
229 |
unsigned long pd; |
unsigned long pd; |
230 |
|
|
231 |
cpl = env->cpl; |
cpl = env->hflags & HF_CPL_MASK; |
232 |
is_user = (cpl == 3); |
is_user = (cpl == 3); |
233 |
|
|
234 |
#ifdef DEBUG_MMU |
#ifdef DEBUG_MMU |
325 |
} |
} |
326 |
|
|
327 |
do_mapping: |
do_mapping: |
328 |
if (env->soft_mmu) { |
if (env->hflags & HF_SOFTMMU_MASK) { |
329 |
unsigned long paddr, vaddr, address, addend, page_offset; |
unsigned long paddr, vaddr, address, addend, page_offset; |
330 |
int index; |
int index; |
331 |
|
|
359 |
if ((pd & 0xfff) != 0) { |
if ((pd & 0xfff) != 0) { |
360 |
/* IO access: no mapping is done as it will be handled by the |
/* IO access: no mapping is done as it will be handled by the |
361 |
soft MMU */ |
soft MMU */ |
362 |
if (!env->soft_mmu) |
if (!(env->hflags & HF_SOFTMMU_MASK)) |
363 |
ret = 2; |
ret = 2; |
364 |
} else { |
} else { |
365 |
void *map_addr; |
void *map_addr; |