/[qemu]/qemu/exec.c
ViewVC logotype

Diff of /qemu/exec.c

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

revision 1.8 by bellard, Sat Jun 21 13:11:07 2003 UTC revision 1.9 by bellard, Tue Jun 24 13:28:12 2003 UTC
# Line 30  Line 30 
30  #include "exec.h"  #include "exec.h"
31    
32  //#define DEBUG_TB_INVALIDATE  //#define DEBUG_TB_INVALIDATE
33  #define DEBUG_FLUSH  //#define DEBUG_FLUSH
34    
35  /* make various TB consistency checks */  /* make various TB consistency checks */
36  //#define DEBUG_TB_CHECK  //#define DEBUG_TB_CHECK
# Line 579  void cpu_abort(CPUState *env, const char Line 579  void cpu_abort(CPUState *env, const char
579      abort();      abort();
580  }  }
581    
582    #ifdef TARGET_I386
583    /* unmap all maped pages and flush all associated code */
584    void page_unmap(void)
585    {
586        PageDesc *p, *pmap;
587        unsigned long addr;
588        int i, j, ret;
589    
590        for(i = 0; i < L1_SIZE; i++) {
591            pmap = l1_map[i];
592            if (pmap) {
593                p = pmap;
594                for(j = 0;j < L2_SIZE; j++) {
595                    if (p->flags & PAGE_VALID) {
596                        addr = (i << (32 - L1_BITS)) | (j << TARGET_PAGE_BITS);
597                        ret = munmap((void *)addr, TARGET_PAGE_SIZE);
598                        if (ret != 0) {
599                            fprintf(stderr, "Could not unmap page 0x%08lx\n", addr);
600                            exit(1);
601                        }
602                    }
603                    p++;
604                }
605                free(pmap);
606                l1_map[i] = NULL;
607            }
608        }
609        tb_flush();
610    }
611    #endif

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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