Subversion Repositories HelenOS-historic

Rev

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

Rev 257 Rev 391
Line 30... Line 30...
30
#include <mm/page.h>
30
#include <mm/page.h>
31
#include <mm/frame.h>
31
#include <mm/frame.h>
32
#include <mm/tlb.h>
32
#include <mm/tlb.h>
33
#include <mm/heap.h>
33
#include <mm/heap.h>
34
#include <arch/mm/page.h>
34
#include <arch/mm/page.h>
-
 
35
#include <arch/mm/asid.h>
-
 
36
#include <arch/mm/vm.h>
35
#include <arch/types.h>
37
#include <arch/types.h>
36
#include <typedefs.h>
38
#include <typedefs.h>
37
#include <synch/spinlock.h>
39
#include <synch/spinlock.h>
38
#include <config.h>
40
#include <config.h>
39
#include <list.h>
41
#include <list.h>
Line 54... Line 56...
54
    m = (vm_t *) malloc(sizeof(vm_t));
56
    m = (vm_t *) malloc(sizeof(vm_t));
55
    if (m) {
57
    if (m) {
56
        spinlock_initialize(&m->lock);
58
        spinlock_initialize(&m->lock);
57
        list_initialize(&m->vm_area_head);
59
        list_initialize(&m->vm_area_head);
58
 
60
 
-
 
61
        m->asid = asid_get();
-
 
62
 
59
        /*
63
        /*
60
         * Each vm_t is supposed to have its own page table.
64
         * Each vm_t is supposed to have its own page table.
61
         * It is either passed one or it has to allocate and set one up.
65
         * It is either passed one or it has to allocate and set one up.
62
         */
66
         */
63
        m->ptl0 = ptl0;
67
        m->ptl0 = ptl0;
Line 197... Line 201...
197
 
201
 
198
    spinlock_unlock(&m->lock);
202
    spinlock_unlock(&m->lock);
199
    tlb_shootdown_finalize();
203
    tlb_shootdown_finalize();
200
 
204
 
201
    cpu_priority_restore(pri);
205
    cpu_priority_restore(pri);
-
 
206
 
-
 
207
    vm_install_arch(m);
-
 
208
   
-
 
209
    VM = m;
202
}
210
}