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 |
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 |