Changeset 5dce48b9 in mainline
- Timestamp:
- 2005-09-01T16:40:30Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 399ccd9
- Parents:
- 2793442
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/_link.ld
r2793442 r5dce48b9 23 23 } 24 24 25 .mapped (0x80 000000+SIZEOF(.unmapped)+0x8000) : AT (0x8000+SIZEOF(.unmapped)) {25 .mapped (0x80100000+SIZEOF(.unmapped)+0x8000) : AT (0x8000+SIZEOF(.unmapped)) { 26 26 ktext_start = .; 27 27 *(.text); … … 33 33 *(COMMON); /* global variables */ 34 34 hardcoded_load_address = .; 35 LONG(0x80 008000);35 LONG(0x80108000); 36 36 hardcoded_ktext_size = .; 37 37 LONG(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start)); … … 42 42 kdata_end = .; 43 43 } 44 45 _hardcoded_kernel_size = (ktext_end - ktext_start) + (unmapped_ktext_end - unmapped_ktext_start) + (kdata_end - kdata_start) + (unmapped_kdata_end - unmapped_kdata_start); 46 44 47 } -
arch/ia32/include/boot/boot.h
r2793442 r5dce48b9 30 30 #define __ia32_BOOT_H__ 31 31 32 #define BOOT_OFFSET 0x100000 32 33 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002 33 34 #define MULTIBOOT_HEADER_FLAGS 0x00010003 -
arch/ia32/src/boot/boot.S
r2793442 r5dce48b9 43 43 kernel_image_start: 44 44 cli 45 xorw %ax, %ax46 movw %ax, %ds47 movw %ax, %ss # initialize stack segment register48 movl $0x7c00, %esp # initialize stack pointer45 xorw %ax, %ax 46 movw %ax, %ds 47 movw %ax, %ss # initialize stack segment register 48 movl $0x7c00, %esp # initialize stack pointer 49 49 50 50 call memmap_arch_init … … 52 52 lgdt gdtr # initialize Global Descriptor Table register 53 53 54 movl %cr0,%eax 55 orl $0x1,%eax 56 movl %eax,%cr0 # switch to protected mode 57 jmpl $8,$meeting_point 58 54 movl %cr0, %eax 55 orl $0x1, %eax 56 movl %eax, %cr0 # switch to protected mode 57 58 jmpl $8, $boot_image_start 59 59 60 .code32 60 61 .align 4 … … 63 64 .long MULTIBOOT_HEADER_FLAGS 64 65 .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) # checksum 65 .long multiboot_header 66 .long unmapped_ktext_start 66 .long multiboot_header + BOOT_OFFSET 67 .long unmapped_ktext_start + BOOT_OFFSET 67 68 .long 0 68 69 .long 0 69 .long multiboot_image_start 70 .long multiboot_image_start + BOOT_OFFSET 71 72 boot_image_start: 73 movw $16, %ax 74 movw %ax, %es 75 movw %ax, %gs 76 movw %ax, %fs 77 movw %ax, %ds # kernel data + stack 78 movw %ax, %ss 79 80 call map_kernel # map kernel and turn paging on 81 82 movb $0xd1, %al # enable A20 using the keyboard controller 83 outb %al, $0x64 84 movb $0xdf, %al 85 outb %al, $0x60 86 87 movl $0x8000, %esi 88 movl $0x8000 + BOOT_OFFSET, %edi 89 movl $_hardcoded_kernel_size, %ecx 90 cld 91 rep movsb 92 93 jmp protected 70 94 71 95 multiboot_image_start: … … 74 98 lgdt gdtr 75 99 76 meeting_point: 77 movw $16,%ax 78 movw %ax,%es 79 movw %ax,%gs 80 movw %ax,%fs 81 movw %ax,%ds # kernel data + stack 82 movw %ax,%ss 83 100 movw $16, %ax 101 movw %ax, %es 102 movw %ax, %gs 103 movw %ax, %fs 104 movw %ax, %ds # kernel data + stack 105 movw %ax, %ss 106 84 107 call map_kernel # map kernel and turn paging on 85 108 109 protected: 86 110 call main_bsp # never returns 87 111 -
arch/ia32/src/drivers/i8042.c
r2793442 r5dce48b9 37 37 /* 38 38 * i8042 processor driver. 39 * Its very essential function is enabling the A20.40 39 */ 41 40 42 41 void i8042_init(void) 43 42 { 44 /* A20: deadly if not enabled */45 outb(0x64,0xd1);46 outb(0x60,0xdf);47 48 43 trap_register(VECTOR_KBD, i8042_interrupt); 49 44 } -
arch/ia32/src/ia32.c
r2793442 r5dce48b9 61 61 i8259_init(); /* PIC */ 62 62 i8254_init(); /* hard clock */ 63 63 64 64 trap_register(VECTOR_SYSCALL, syscall); 65 65 -
arch/ia32/src/mm/frame.c
r2793442 r5dce48b9 45 45 frame_region_not_free(0xfec00000,0xffffffff); 46 46 47 /* This is a nasty hack, which should be fixed soon */ 48 frame_region_not_free(0x9000, 0xa000); 49 47 50 for (i=e820counter;i>0;i--) { 48 51 if (e820table[i-1].type!=MEMMAP_MEMORY_AVAILABLE) { -
arch/ia32/src/mm/page.c
r2793442 r5dce48b9 38 38 #include <debug.h> 39 39 #include <memstr.h> 40 #include <print.h> 40 41 41 42 __address bootstrap_dba; … … 51 52 52 53 bootstrap_dba = dba; 53 54 54 55 /* 55 56 * Identity mapping for all frames. -
src/main/main.c
r2793442 r5dce48b9 140 140 141 141 the_initialize(THE); 142 142 143 143 arch_pre_mm_init(); 144 144 heap_init(config.base + hardcoded_ktext_size + hardcoded_kdata_size, CONFIG_HEAP_SIZE + heap_delta);
Note:
See TracChangeset
for help on using the changeset viewer.