Subversion Repositories HelenOS-historic

Rev

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

Rev 566 Rev 576
Line 37... Line 37...
37
#include <arch/asm.h>
37
#include <arch/asm.h>
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
#include <interrupt.h>
42
 
43
 
43
static __address bootstrap_dba;
44
static __address bootstrap_dba;
44
 
45
 
45
void page_arch_init(void)
46
void page_arch_init(void)
46
{
47
{
Line 57... Line 58...
57
         * PA2KA(identity) mapping for all frames until last_frame.
58
         * PA2KA(identity) mapping for all frames until last_frame.
58
         */
59
         */
59
        for (cur = 0; cur < last_frame; cur += FRAME_SIZE)
60
        for (cur = 0; cur < last_frame; cur += FRAME_SIZE)
60
            page_mapping_insert(PA2KA(cur), cur, PAGE_CACHEABLE, KA2PA(dba));
61
            page_mapping_insert(PA2KA(cur), cur, PAGE_CACHEABLE, KA2PA(dba));
61
 
62
 
62
        trap_register(14, page_fault);
63
        exc_register(14, "page_fault", page_fault);
63
        write_cr3(KA2PA(dba));
64
        write_cr3(KA2PA(dba));
64
    }
65
    }
65
    else {
66
    else {
66
        write_cr3(KA2PA(bootstrap_dba));
67
        write_cr3(KA2PA(bootstrap_dba));
67
    }
68
    }