Subversion Repositories HelenOS-historic

Rev

Rev 1104 | Rev 1221 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1104 Rev 1210
Line 34... Line 34...
34
#include <mm/asid.h>
34
#include <mm/asid.h>
35
#include <mm/page.h>
35
#include <mm/page.h>
36
#include <mm/as.h>
36
#include <mm/as.h>
37
#include <arch/mm/tlb.h>
37
#include <arch/mm/tlb.h>
38
#include <arch/mm/page.h>
38
#include <arch/mm/page.h>
-
 
39
#include <arch/mm/vhpt.h>
39
#include <arch/barrier.h>
40
#include <arch/barrier.h>
40
#include <arch/interrupt.h>
41
#include <arch/interrupt.h>
41
#include <arch/pal/pal.h>
42
#include <arch/pal/pal.h>
42
#include <arch/asm.h>
43
#include <arch/asm.h>
43
#include <typedefs.h>
44
#include <typedefs.h>
Line 76... Line 77...
76
 
77
 
77
        interrupts_restore(ipl);
78
        interrupts_restore(ipl);
78
 
79
 
79
        srlz_d();
80
        srlz_d();
80
        srlz_i();
81
        srlz_i();
-
 
82
#ifdef CONFIG_VHPT
-
 
83
        vhpt_invalidate_all();
-
 
84
#endif  
81
}
85
}
82
 
86
 
83
/** Invalidate entries belonging to an address space.
87
/** Invalidate entries belonging to an address space.
84
 *
88
 *
85
 * @param asid Address space identifier.
89
 * @param asid Address space identifier.
Line 383... Line 387...
383
    entry.ar = t->w ? AR_WRITE : AR_READ;
387
    entry.ar = t->w ? AR_WRITE : AR_READ;
384
    entry.ppn = t->frame >> PPN_SHIFT;
388
    entry.ppn = t->frame >> PPN_SHIFT;
385
    entry.ps = PAGE_WIDTH;
389
    entry.ps = PAGE_WIDTH;
386
   
390
   
387
    dtc_mapping_insert(t->page, t->as->asid, entry);
391
    dtc_mapping_insert(t->page, t->as->asid, entry);
-
 
392
#ifdef CONFIG_VHPT
-
 
393
    vhpt_mapping_insert(t->page, t->as->asid, entry);
-
 
394
#endif  
388
}
395
}
389
 
396
 
390
/** Copy content of PTE into instruction translation cache.
397
/** Copy content of PTE into instruction translation cache.
391
 *
398
 *
392
 * @param t PTE.
399
 * @param t PTE.
Line 407... Line 414...
407
    entry.ar = t->x ? (AR_EXECUTE | AR_READ) : AR_READ;
414
    entry.ar = t->x ? (AR_EXECUTE | AR_READ) : AR_READ;
408
    entry.ppn = t->frame >> PPN_SHIFT;
415
    entry.ppn = t->frame >> PPN_SHIFT;
409
    entry.ps = PAGE_WIDTH;
416
    entry.ps = PAGE_WIDTH;
410
   
417
   
411
    itc_mapping_insert(t->page, t->as->asid, entry);
418
    itc_mapping_insert(t->page, t->as->asid, entry);
-
 
419
#ifdef CONFIG_VHPT
-
 
420
    vhpt_mapping_insert(t->page, t->as->asid, entry);
-
 
421
#endif  
412
}
422
}
413
 
423
 
414
/** Instruction TLB fault handler for faults with VHPT turned off.
424
/** Instruction TLB fault handler for faults with VHPT turned off.
415
 *
425
 *
416
 * @param vector Interruption vector.
426
 * @param vector Interruption vector.