/[qemu]/qemu/helper2-i386.c
ViewVC logotype

Diff of /qemu/helper2-i386.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by bellard, Sun Aug 10 21:35:13 2003 UTC revision 1.2 by bellard, Wed Aug 20 23:02:09 2003 UTC
# Line 52  CPUX86State *cpu_x86_init(void) Line 52  CPUX86State *cpu_x86_init(void)
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) {
# Line 228  int cpu_x86_handle_mmu_fault(CPUX86State Line 228  int cpu_x86_handle_mmu_fault(CPUX86State
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
# Line 325  int cpu_x86_handle_mmu_fault(CPUX86State Line 325  int cpu_x86_handle_mmu_fault(CPUX86State
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    
# Line 359  int cpu_x86_handle_mmu_fault(CPUX86State Line 359  int cpu_x86_handle_mmu_fault(CPUX86State
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;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26