Subversion Repositories HelenOS-historic

Rev

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

Rev 548 Rev 566
Line 38... Line 38...
38
#include <synch/spinlock.h>
38
#include <synch/spinlock.h>
39
#include <debug.h>
39
#include <debug.h>
40
#include <memstr.h>
40
#include <memstr.h>
41
#include <print.h>
41
#include <print.h>
42
 
42
 
43
__address bootstrap_dba;
43
static __address bootstrap_dba;
44
 
44
 
45
void page_arch_init(void)
45
void page_arch_init(void)
46
{
46
{
47
    __address dba;
47
    __address dba;
48
    __address cur;
48
    __address cur;
Line 61... Line 61...
61
 
61
 
62
        trap_register(14, page_fault);
62
        trap_register(14, page_fault);
63
        write_cr3(KA2PA(dba));
63
        write_cr3(KA2PA(dba));
64
    }
64
    }
65
    else {
65
    else {
66
        /*
-
 
67
         * Application processors need to create their own view of the
-
 
68
         * virtual address space. Because of that, each AP copies
-
 
69
         * already-initialized paging information from the bootstrap
-
 
70
         * processor and adjusts it to fulfill its needs.
-
 
71
         */
-
 
72
 
-
 
73
        dba = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME);
-
 
74
        memcpy((void *)dba, (void *)bootstrap_dba , PAGE_SIZE);
-
 
75
        write_cr3(KA2PA(dba));
66
        write_cr3(KA2PA(bootstrap_dba));
76
    }
67
    }
77
 
68
 
78
    paging_on();
69
    paging_on();
79
}
70
}