Subversion Repositories HelenOS

Rev

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

Rev 1824 Rev 1829
Line 62... Line 62...
62
#include <console/console.h>
62
#include <console/console.h>
63
 
63
 
64
start_info_t start_info;
64
start_info_t start_info;
65
memzone_t meminfo;
65
memzone_t meminfo;
66
 
66
 
-
 
67
extern void xen_callback(void);
-
 
68
extern void xen_failsafe_callback(void);
-
 
69
 
67
void arch_pre_main(void)
70
void arch_pre_main(void)
68
{
71
{
69
    xen_vm_assist(VMASST_CMD_ENABLE, VMASST_TYPE_WRITABLE_PAGETABLES);
72
    xen_vm_assist(VMASST_CMD_ENABLE, VMASST_TYPE_WRITABLE_PAGETABLES);
70
   
73
   
71
    pte_t pte;
74
    pte_t pte;
Line 74... Line 77...
74
    pte.present = 1;
77
    pte.present = 1;
75
    pte.writeable = 1;
78
    pte.writeable = 1;
76
    pte.frame_address = ADDR2PFN((uintptr_t) start_info.shared_info);
79
    pte.frame_address = ADDR2PFN((uintptr_t) start_info.shared_info);
77
    xen_update_va_mapping(&shared_info, pte, UVMF_INVLPG);
80
    xen_update_va_mapping(&shared_info, pte, UVMF_INVLPG);
78
   
81
   
-
 
82
    xen_set_callbacks(XEN_CS, xen_callback, XEN_CS, xen_failsafe_callback);
-
 
83
   
79
    /* Create identity mapping */
84
    /* Create identity mapping */
80
   
85
   
81
    meminfo.start = ADDR2PFN(ALIGN_UP(KA2PA(start_info.ptl0), PAGE_SIZE)) + start_info.pt_frames;
86
    meminfo.start = ADDR2PFN(ALIGN_UP(KA2PA(start_info.ptl0), PAGE_SIZE)) + start_info.pt_frames;
82
    meminfo.size = start_info.frames - meminfo.start;
87
    meminfo.size = start_info.frames - meminfo.start;
83
    meminfo.reserved = 0;
88
    meminfo.reserved = 0;
Line 114... Line 119...
114
    pm_init();
119
    pm_init();
115
 
120
 
116
    if (config.cpu_active == 1) {
121
    if (config.cpu_active == 1) {
117
//      bios_init();
122
//      bios_init();
118
       
123
       
119
//      exc_register(VECTOR_SYSCALL, "syscall", (iroutine) syscall);
124
        exc_register(VECTOR_SYSCALL, "syscall", (iroutine) syscall);
120
       
125
       
121
        #ifdef CONFIG_SMP
126
        #ifdef CONFIG_SMP
122
//      exc_register(VECTOR_TLB_SHOOTDOWN_IPI, "tlb_shootdown",
127
        exc_register(VECTOR_TLB_SHOOTDOWN_IPI, "tlb_shootdown",
123
//               (iroutine) tlb_shootdown_ipi);
128
                 (iroutine) tlb_shootdown_ipi);
124
        #endif /* CONFIG_SMP */
129
        #endif /* CONFIG_SMP */
125
    }
130
    }
126
}
131
}
127
 
132
 
128
void arch_post_mm_init(void)
133
void arch_post_mm_init(void)