Changeset 983cd374 in mainline
- Timestamp:
- 2006-07-17T21:13:49Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0356274
- Parents:
- ba5e618
- Location:
- kernel/arch/xen32
- Files:
-
- 15 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/xen32/Makefile.inc
rba5e618 r983cd374 110 110 arch/$(ARCH)/src/proc/thread.c \ 111 111 arch/$(ARCH)/src/bios/bios.c \ 112 arch/$(ARCH)/src/smp/ap.S \113 112 arch/$(ARCH)/src/smp/apic.c \ 114 113 arch/$(ARCH)/src/smp/mps.c \ -
kernel/arch/xen32/_link.ld.in
rba5e618 r983cd374 3 3 4 4 #define __ASM__ 5 #include <arch/boot/boot.h>6 5 #include <arch/mm/page.h> 6 7 ENTRY(kernel_image_start) 7 8 8 9 SECTIONS { -
kernel/arch/xen32/src/boot/boot.S
rba5e618 r983cd374 40 40 .byte 0 41 41 42 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE)43 44 42 .section K_TEXT_START, "ax" 45 43 … … 49 47 .code32 50 48 .align 4 51 .global multiboot_image_start 52 multiboot_header: 53 .long MULTIBOOT_HEADER_MAGIC 54 .long MULTIBOOT_HEADER_FLAGS 55 .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) # checksum 56 .long multiboot_header 57 .long unmapped_ktext_start 58 .long 0 59 .long 0 60 .long multiboot_image_start 61 62 multiboot_image_start: 63 movl $START_STACK, %esp # initialize stack pointer 49 .global kernel_image_start 50 51 kernel_image_start: 64 52 lgdt KA2PA(bootstrap_gdtr) # initialize Global Descriptor Table register 65 53 … … 102 90 popl %eax 103 91 popl %ebx 104 cmpl $MULTIBOOT_LOADER_MAGIC, %eax # compare GRUB signature105 je valid_boot106 107 xorl %ecx, %ecx # no memory size or map available108 movl %ecx, e801memorysize109 movl %ecx, e820counter110 111 jmp invalid_boot112 113 valid_boot:114 115 movl (%ebx), %eax # ebx = physical address of struct multiboot_info116 117 bt $0, %eax # mbi->flags[0] (mem_lower, mem_upper valid)118 jc mem_valid119 120 xorl %ecx, %ecx121 jmp mem_invalid122 123 mem_valid:124 movl 4(%ebx), %ecx # mbi->mem_lower125 addl 8(%ebx), %ecx # mbi->mem_upper126 127 mem_invalid:128 movl %ecx, e801memorysize129 130 bt $3, %eax # mbi->flags[3] (mods_count, mods_addr valid)131 jc mods_valid132 133 xorl %ecx, %ecx134 movl %ecx, init135 jmp mods_end136 137 mods_valid:138 139 movl 20(%ebx), %ecx # mbi->mods_count140 movl %ecx, init141 142 cmpl $0, %ecx143 je mods_end144 145 movl 24(%ebx), %esi # mbi->mods_addr146 movl $init, %edi147 148 mods_loop:149 150 movl 0(%esi), %edx # mods->mod_start151 addl $0x80000000, %edx152 movl %edx, 4(%edi)153 154 movl 4(%esi), %edx155 subl 0(%esi), %edx # mods->mod_end - mods->mod_start156 movl %edx, 8(%edi)157 158 addl $16, %esi159 addl $8 , %edi160 161 loop mods_loop162 163 mods_end:164 165 invalid_boot:166 167 #ifdef CONFIG_SMP168 169 # copy AP bootstrap routines below 1 MB170 171 movl $BOOT_OFFSET, %esi172 movl $AP_BOOT_OFFSET, %edi173 movl $_hardcoded_unmapped_size, %ecx174 cld175 rep movsb176 177 #endif178 92 179 93 call main_bsp # never returns
Note:
See TracChangeset
for help on using the changeset viewer.