Changes in kernel/arch/ia32/src/boot/multiboot2.S [bae43dc:17aa6d1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/multiboot2.S
rbae43dc r17aa6d1 32 32 #include <arch/cpuid.h> 33 33 #include <genarch/multiboot/multiboot2.h> 34 35 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE)36 34 37 35 .section K_TEXT_START, "ax" … … 78 76 .word MULTIBOOT2_FLAGS_REQUIRED 79 77 .long tag_entry_address_end - tag_entry_address_start 80 .long multiboot 2_image_start78 .long multiboot_image_start 81 79 tag_entry_address_end: 82 80 … … 120 118 tag_terminator_end: 121 119 multiboot2_header_end: 122 123 SYMBOL(multiboot2_image_start)124 cli125 cld126 127 /* Initialize stack pointer */128 movl $START_STACK, %esp129 130 /*131 * Initialize Global Descriptor Table and132 * Interrupt Descriptor Table registers133 */134 lgdtl bootstrap_gdtr135 lidtl bootstrap_idtr136 137 /* Kernel data + stack */138 movw $GDT_SELECTOR(KDATA_DES), %cx139 movw %cx, %es140 movw %cx, %fs141 movw %cx, %gs142 movw %cx, %ds143 movw %cx, %ss144 145 jmpl $GDT_SELECTOR(KTEXT_DES), $multiboot2_meeting_point146 multiboot2_meeting_point:147 148 /* Save multiboot arguments */149 movl %eax, multiboot_eax150 movl %ebx, multiboot_ebx151 152 #ifndef PROCESSOR_i486153 154 movl $(INTEL_CPUID_LEVEL), %eax155 cpuid156 cmp $0x0, %eax /* any function > 0? */157 jbe pse_unsupported158 159 movl $(INTEL_CPUID_STANDARD), %eax160 cpuid161 bt $(INTEL_PSE), %edx162 jnc pse_unsupported163 164 /* Map kernel and turn paging on */165 call map_kernel_pse166 jmp stack_init167 168 #endif /* PROCESSOR_i486 */169 170 pse_unsupported:171 172 /* Map kernel and turn paging on */173 call map_kernel_non_pse174 175 stack_init:176 177 /* Create the first stack frame */178 pushl $0179 movl %esp, %ebp180 181 /* Call ia32_pre_main(multiboot_eax, multiboot_ebx) */182 pushl multiboot_ebx183 pushl multiboot_eax184 call ia32_pre_main185 186 /* Call main_bsp() */187 call main_bsp188 189 /* Not reached */190 cli191 hlt0:192 hlt193 jmp hlt0
Note:
See TracChangeset
for help on using the changeset viewer.