Changes in kernel/arch/ia32/src/boot/multiboot2.S [17aa6d1:bae43dc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/multiboot2.S
r17aa6d1 rbae43dc 32 32 #include <arch/cpuid.h> 33 33 #include <genarch/multiboot/multiboot2.h> 34 35 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) 34 36 35 37 .section K_TEXT_START, "ax" … … 76 78 .word MULTIBOOT2_FLAGS_REQUIRED 77 79 .long tag_entry_address_end - tag_entry_address_start 78 .long multiboot _image_start80 .long multiboot2_image_start 79 81 tag_entry_address_end: 80 82 … … 118 120 tag_terminator_end: 119 121 multiboot2_header_end: 122 123 SYMBOL(multiboot2_image_start) 124 cli 125 cld 126 127 /* Initialize stack pointer */ 128 movl $START_STACK, %esp 129 130 /* 131 * Initialize Global Descriptor Table and 132 * Interrupt Descriptor Table registers 133 */ 134 lgdtl bootstrap_gdtr 135 lidtl bootstrap_idtr 136 137 /* Kernel data + stack */ 138 movw $GDT_SELECTOR(KDATA_DES), %cx 139 movw %cx, %es 140 movw %cx, %fs 141 movw %cx, %gs 142 movw %cx, %ds 143 movw %cx, %ss 144 145 jmpl $GDT_SELECTOR(KTEXT_DES), $multiboot2_meeting_point 146 multiboot2_meeting_point: 147 148 /* Save multiboot arguments */ 149 movl %eax, multiboot_eax 150 movl %ebx, multiboot_ebx 151 152 #ifndef PROCESSOR_i486 153 154 movl $(INTEL_CPUID_LEVEL), %eax 155 cpuid 156 cmp $0x0, %eax /* any function > 0? */ 157 jbe pse_unsupported 158 159 movl $(INTEL_CPUID_STANDARD), %eax 160 cpuid 161 bt $(INTEL_PSE), %edx 162 jnc pse_unsupported 163 164 /* Map kernel and turn paging on */ 165 call map_kernel_pse 166 jmp stack_init 167 168 #endif /* PROCESSOR_i486 */ 169 170 pse_unsupported: 171 172 /* Map kernel and turn paging on */ 173 call map_kernel_non_pse 174 175 stack_init: 176 177 /* Create the first stack frame */ 178 pushl $0 179 movl %esp, %ebp 180 181 /* Call ia32_pre_main(multiboot_eax, multiboot_ebx) */ 182 pushl multiboot_ebx 183 pushl multiboot_eax 184 call ia32_pre_main 185 186 /* Call main_bsp() */ 187 call main_bsp 188 189 /* Not reached */ 190 cli 191 hlt0: 192 hlt 193 jmp hlt0
Note:
See TracChangeset
for help on using the changeset viewer.