Changeset dd80fc6 in mainline
- Timestamp:
- 2005-09-03T22:26:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5eb1379
- Parents:
- 5260478
- Location:
- arch/ia32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/Makefile.inc.cross
r5260478 rdd80fc6 7 7 AS=$(IA-32_BINUTILS_DIR)/$(IA-32_TARGET)-as 8 8 LD=$(IA-32_BINUTILS_DIR)/$(IA-32_TARGET)-ld 9 OBJCOPY=$(IA-32_BINUTILS_DIR)/$(IA-32_TARGET)-objcopy 10 11 BFD_NAME=elf32-i386 12 BFD_ARCH=i386 9 13 10 14 DEFS:=-DARCH=$(ARCH) -
arch/ia32/include/pm.h
r5260478 rdd80fc6 130 130 131 131 extern struct ptr_16_32 gdtr; 132 extern struct ptr_16_32 bsp_bootstrap_gdtr;133 extern struct ptr_16_32 ap_bootstrap_gdtr;132 extern struct ptr_16_32 real_bootstrap_gdtr; 133 extern struct ptr_16_32 protected_bootstrap_gdtr; 134 134 extern struct tss *tss_p; 135 135 -
arch/ia32/src/boot/boot.S
r5260478 rdd80fc6 53 53 call memmap_arch_init 54 54 55 lgdt bsp_bootstrap_gdtr# initialize Global Descriptor Table register55 lgdt real_bootstrap_gdtr # initialize Global Descriptor Table register 56 56 57 57 movl %cr0, %eax … … 94 94 rep movsb 95 95 96 jmp protected 96 call main_bsp # never returns 97 98 cli 99 hlt 97 100 98 101 multiboot_image_start: 99 movl BOOTSTRAP_OFFSET - 0x400, %esp# initialize stack pointer102 movl $BOOTSTRAP_OFFSET - 0x400, %esp # initialize stack pointer 100 103 101 lgdt gdtr# initialize Global Descriptor Table register104 lgdt protected_bootstrap_gdtr - 0x80000000 # initialize Global Descriptor Table register 102 105 103 106 movw $KDATA, %ax … … 105 108 movw %ax, %gs 106 109 movw %ax, %fs 107 movw %ax, %ds # kernel data + stack110 movw %ax, %ds # kernel data + stack 108 111 movw %ax, %ss 109 112 110 jmpl $KTEXT, $multiboot_meeting_point 113 jmpl $KTEXT, $multiboot_meeting_point + BOOT_OFFSET 111 114 multiboot_meeting_point: 112 115 113 call map_kernel # map kernel and turn paging on116 call map_kernel # map kernel and turn paging on 114 117 115 protected: 116 call main_bsp # never returns 118 call main_bsp - BOOT_OFFSET # never returns 117 119 118 120 cli -
arch/ia32/src/pm.c
r5260478 rdd80fc6 71 71 72 72 /* gdtr is changed by kmp before next CPU is initialized */ 73 struct ptr_16_32 bsp_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };74 struct ptr_16_32 ap_bootstrap_gdtr __attribute__ ((section ("K_DATA_START")))= { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) };73 struct ptr_16_32 real_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) }; 74 struct ptr_16_32 protected_bootstrap_gdtr = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) }; 75 75 struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = (__address) gdt }; 76 76 -
arch/ia32/src/smp/ap.S
r5260478 rdd80fc6 51 51 movw %ax, %ds 52 52 53 lgdt ap_bootstrap_gdtr # initialize Global Descriptor Table register53 lgdt real_bootstrap_gdtr # initialize Global Descriptor Table register 54 54 55 55 movl %cr0, %eax 56 56 orl $1, %eax 57 movl %eax, %cr0 # switch to protected mode57 movl %eax, %cr0 # switch to protected mode 58 58 jmpl $KTEXT, $jump_to_kernel 59 59 -
arch/ia32/src/smp/smp.c
r5260478 rdd80fc6 145 145 memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor)); 146 146 memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0); 147 ap_bootstrap_gdtr.base = KA2PA((__address) gdt_new);147 real_bootstrap_gdtr.base = KA2PA((__address) gdt_new); 148 148 gdtr.base = (__address) gdt_new; 149 149
Note:
See TracChangeset
for help on using the changeset viewer.