Changeset 8cd140f2 in mainline for kernel/arch/ia32xen/src/ia32xen.c


Ignore:
Timestamp:
2006-12-11T14:14:46Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
134877d
Parents:
b82a13c
Message:

update for Xen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32xen/src/ia32xen.c

    rb82a13c r8cd140f2  
    7272void arch_pre_main(void)
    7373{
    74         xen_vm_assist(VMASST_CMD_ENABLE, VMASST_TYPE_WRITABLE_PAGETABLES);
    75        
    7674        pte_t pte;
    7775        memsetb((uintptr_t) &pte, sizeof(pte), 0);
     
    8078        pte.writeable = 1;
    8179        pte.frame_address = ADDR2PFN((uintptr_t) start_info.shared_info);
    82         xen_update_va_mapping(&shared_info, pte, UVMF_INVLPG);
    83        
    84         pte.present = 1;
    85         pte.writeable = 1;
    86         pte.frame_address = start_info.console_mfn;
    87         xen_update_va_mapping(&console_page, pte, UVMF_INVLPG);
    88        
    89         xen_set_callbacks(XEN_CS, xen_callback, XEN_CS, xen_failsafe_callback);
     80        ASSERT(xen_update_va_mapping(&shared_info, pte, UVMF_INVLPG) == 0);
     81       
     82        if (!(start_info.flags & SIF_INITDOMAIN)) {
     83                /* Map console frame */
     84                pte.present = 1;
     85                pte.writeable = 1;
     86                pte.frame_address = start_info.console.domU.mfn;
     87                ASSERT(xen_update_va_mapping(&console_page, pte, UVMF_INVLPG) == 0);
     88        } else
     89                start_info.console.domU.evtchn = 0;
     90       
     91        ASSERT(xen_set_callbacks(XEN_CS, xen_callback, XEN_CS, xen_failsafe_callback) == 0);
    9092       
    9193        /* Create identity mapping */
     
    9496        meminfo.size = start_info.frames - meminfo.start;
    9597        meminfo.reserved = 0;
    96        
     98
    9799        uintptr_t pa;
    98100        index_t last_ptl0 = 0;
     
    108110                       
    109111                        pte_t *tptl3 = (pte_t *) PA2KA(GET_PTL1_ADDRESS(start_info.ptl0, PTL0_INDEX(tva)));
    110                         SET_FRAME_FLAGS(tptl3, PTL3_INDEX(tva), PAGE_PRESENT);
     112                        SET_FRAME_ADDRESS(tptl3, PTL3_INDEX(tva), 0);
    111113                        SET_PTL1_ADDRESS(start_info.ptl0, PTL0_INDEX(va), tpa);
     114                        SET_FRAME_ADDRESS(tptl3, PTL3_INDEX(tva), tpa);
    112115                       
    113116                        last_ptl0 = PTL0_INDEX(va);
Note: See TracChangeset for help on using the changeset viewer.