Changeset a35b458 in mainline for kernel/arch/ia32/src/boot/multiboot2.S
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/boot/multiboot2.S
r3061bc1 ra35b458 45 45 .long multiboot2_header_end - multiboot2_header_start 46 46 .long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT2_HEADER_ARCH_I386 + (multiboot2_header_end - multiboot2_header_start)) 47 47 48 48 /* Information request tag */ 49 49 .align 8 … … 59 59 #endif 60 60 tag_info_req_end: 61 61 62 62 /* Address tag */ 63 63 .align 8 … … 71 71 .long 0 72 72 tag_address_end: 73 73 74 74 /* Entry address tag */ 75 75 .align 8 … … 80 80 .long multiboot2_image_start 81 81 tag_entry_address_end: 82 82 83 83 /* Flags tag */ 84 84 .align 8 … … 89 89 .long MULTIBOOT2_FLAGS_CONSOLE 90 90 tag_flags_end: 91 91 92 92 #ifdef CONFIG_FB 93 93 /* Framebuffer tag */ … … 102 102 tag_framebuffer_end: 103 103 #endif 104 104 105 105 /* Module alignment tag */ 106 106 .align 8 … … 111 111 .long 0 112 112 tag_module_align_end: 113 113 114 114 /* Tag terminator */ 115 115 .align 8 … … 124 124 cli 125 125 cld 126 126 127 127 /* Initialize stack pointer */ 128 128 movl $START_STACK, %esp 129 129 130 130 /* 131 131 * Initialize Global Descriptor Table and … … 134 134 lgdtl bootstrap_gdtr 135 135 lidtl bootstrap_idtr 136 136 137 137 /* Kernel data + stack */ 138 138 movw $GDT_SELECTOR(KDATA_DES), %cx … … 142 142 movw %cx, %ds 143 143 movw %cx, %ss 144 144 145 145 jmpl $GDT_SELECTOR(KTEXT_DES), $multiboot2_meeting_point 146 146 multiboot2_meeting_point: 147 147 148 148 /* Save multiboot arguments */ 149 149 movl %eax, multiboot_eax 150 150 movl %ebx, multiboot_ebx 151 151 152 152 #ifndef PROCESSOR_i486 153 153 154 154 movl $(INTEL_CPUID_LEVEL), %eax 155 155 cpuid 156 156 cmp $0x0, %eax /* any function > 0? */ 157 157 jbe pse_unsupported 158 158 159 159 movl $(INTEL_CPUID_STANDARD), %eax 160 160 cpuid 161 161 bt $(INTEL_PSE), %edx 162 162 jnc pse_unsupported 163 163 164 164 /* Map kernel and turn paging on */ 165 165 call map_kernel_pse 166 166 jmp stack_init 167 167 168 168 #endif /* PROCESSOR_i486 */ 169 169 170 170 pse_unsupported: 171 171 172 172 /* Map kernel and turn paging on */ 173 173 call map_kernel_non_pse 174 174 175 175 stack_init: 176 176 177 177 /* Create the first stack frame */ 178 178 pushl $0 179 179 movl %esp, %ebp 180 180 181 181 /* Call ia32_pre_main(multiboot_eax, multiboot_ebx) */ 182 182 pushl multiboot_ebx 183 183 pushl multiboot_eax 184 184 call ia32_pre_main 185 185 186 186 /* Call main_bsp() */ 187 187 call main_bsp 188 188 189 189 /* Not reached */ 190 190 cli
Note:
See TracChangeset
for help on using the changeset viewer.