Changeset 8cd140f2 in mainline for kernel/arch/ia32xen/src
- Timestamp:
- 2006-12-11T14:14:46Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 134877d
- Parents:
- b82a13c
- Location:
- kernel/arch/ia32xen/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32xen/src/boot/boot.S
rb82a13c r8cd140f2 49 49 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long, kernel_image_start) 50 50 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long, hypercall_page) 51 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, " writable_page_tables|writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel")51 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "auto_translated_physmap|supervisor_mode_kernel") 52 52 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz, "no") 53 53 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic") -
kernel/arch/ia32xen/src/drivers/xconsole.c
rb82a13c r8cd140f2 43 43 #define MASK_INDEX(index, ring) ((index) & (sizeof(ring) - 1)) 44 44 45 static bool asynchronous = false;46 45 static void xen_putchar(chardev_t *d, const char ch); 47 46 … … 55 54 chardev_initialize("xen_out", &xen_console, &xen_ops); 56 55 stdout = &xen_console; 57 if (!(start_info.flags & SIF_INITDOMAIN))58 asynchronous = true;59 56 } 60 57 61 58 void xen_putchar(chardev_t *d, const char ch) 62 59 { 63 if ( asynchronous) {60 if (start_info.console.domU.evtchn != 0) { 64 61 uint32_t cons = console_page.out_cons; 65 62 uint32_t prod = console_page.out_prod; … … 78 75 console_page.out_prod = prod; 79 76 80 xen_notify_remote(start_info.console _evtchn);77 xen_notify_remote(start_info.console.domU.evtchn); 81 78 } else 82 79 xen_console_io(CONSOLE_IO_WRITE, 1, &ch); -
kernel/arch/ia32xen/src/ia32xen.c
rb82a13c r8cd140f2 72 72 void arch_pre_main(void) 73 73 { 74 xen_vm_assist(VMASST_CMD_ENABLE, VMASST_TYPE_WRITABLE_PAGETABLES);75 76 74 pte_t pte; 77 75 memsetb((uintptr_t) &pte, sizeof(pte), 0); … … 80 78 pte.writeable = 1; 81 79 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); 90 92 91 93 /* Create identity mapping */ … … 94 96 meminfo.size = start_info.frames - meminfo.start; 95 97 meminfo.reserved = 0; 96 98 97 99 uintptr_t pa; 98 100 index_t last_ptl0 = 0; … … 108 110 109 111 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); 111 113 SET_PTL1_ADDRESS(start_info.ptl0, PTL0_INDEX(va), tpa); 114 SET_FRAME_ADDRESS(tptl3, PTL3_INDEX(tva), tpa); 112 115 113 116 last_ptl0 = PTL0_INDEX(va);
Note:
See TracChangeset
for help on using the changeset viewer.