Changeset 5eb1379 in mainline
- Timestamp:
- 2005-09-04T00:05:47Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 005384ad
- Parents:
- dd80fc6
- Location:
- arch/ia32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/boot/boot.h
rdd80fc6 r5eb1379 30 30 #define __ia32_BOOT_H__ 31 31 32 #define BOOTSTRAP_OFFSET 32 #define BOOTSTRAP_OFFSET 0x8000 33 33 #define BOOT_OFFSET 0x100000 34 34 35 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002 36 #define MULTIBOOT_HEADER_FLAGS 0x00010003 35 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002 36 #define MULTIBOOT_HEADER_FLAGS 0x00010003 37 38 #define MULTIBOOT_LOADER_MAGIC 0x2BADB002 37 39 38 40 #endif -
arch/ia32/src/boot/boot.S
rdd80fc6 r5eb1379 104 104 lgdt protected_bootstrap_gdtr - 0x80000000 # initialize Global Descriptor Table register 105 105 106 movw $KDATA, % ax107 movw % ax, %es108 movw % ax, %gs109 movw % ax, %fs110 movw % ax, %ds # kernel data + stack111 movw % ax, %ss106 movw $KDATA, %cx 107 movw %cx, %es 108 movw %cx, %gs 109 movw %cx, %fs 110 movw %cx, %ds # kernel data + stack 111 movw %cx, %ss 112 112 113 113 jmpl $KTEXT, $multiboot_meeting_point + BOOT_OFFSET 114 114 multiboot_meeting_point: 115 115 116 pushl %ebx 117 pushl %eax 118 116 119 call map_kernel # map kernel and turn paging on 120 121 popl %eax 122 popl %ebx 123 cmpl $MULTIBOOT_LOADER_MAGIC, %eax 124 je valid_boot 125 126 # ... 127 128 jmp invalid_boot 129 130 valid_boot: 131 132 movl (%ebx), %eax 133 134 # ... check flags in eax 135 136 movl 4(%ebx), %ecx 137 addl 8(%ebx), %ecx 138 movl %ecx, e801memorysize 139 140 # movl 44(%ebx), %ecx 141 xorl %ecx, %ecx 142 movl %ecx, e820counter 143 # movl 48(%ebx), %esi 144 # movl $e820table, %edi 145 # cld 146 # rep movsb 147 148 invalid_boot: 117 149 118 150 call main_bsp - BOOT_OFFSET # never returns
Note:
See TracChangeset
for help on using the changeset viewer.