Subversion Repositories HelenOS-historic

Rev

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

Rev 566 Rev 576
Line 32... Line 32...
32
#include <mm/frame.h>
32
#include <mm/frame.h>
33
#include <arch/interrupt.h>
33
#include <arch/interrupt.h>
34
#include <arch/asm.h>
34
#include <arch/asm.h>
35
#include <config.h>
35
#include <config.h>
36
#include <memstr.h>
36
#include <memstr.h>
-
 
37
#include <interrupt.h>
37
 
38
 
38
static __address bootstrap_dba;
39
static __address bootstrap_dba;
39
 
40
 
40
void page_arch_init(void)
41
void page_arch_init(void)
41
{
42
{
Line 53... Line 54...
53
         */
54
         */
54
        for (cur = 0; cur < last_frame; cur += FRAME_SIZE) {
55
        for (cur = 0; cur < last_frame; cur += FRAME_SIZE) {
55
            page_mapping_insert(PA2KA(cur), cur, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba));
56
            page_mapping_insert(PA2KA(cur), cur, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba));
56
        }
57
        }
57
 
58
 
58
        trap_register(14, page_fault);
59
        exc_register(14, "page_fault", page_fault);
59
        write_cr3(KA2PA(dba));
60
        write_cr3(KA2PA(dba));
60
    }
61
    }
61
    else {
62
    else {
62
        write_cr3(KA2PA(bootstrap_dba));
63
        write_cr3(KA2PA(bootstrap_dba));
63
    }
64
    }