Changeset 4533601 in mainline
- Timestamp:
- 2005-09-03T17:24:17Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5e2455a
- Parents:
- b6d20a7
- Location:
- arch/ia32/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/boot/boot.S
rb6d20a7 r4533601 108 108 movw %ax, %ss 109 109 110 jmpl $KTEXT, $multiboot_meeting_point 111 multiboot_meeting_point: 112 110 113 call map_kernel # map kernel and turn paging on 111 114 -
arch/ia32/src/pm.c
rb6d20a7 r4533601 73 73 struct ptr_16_32 bsp_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) }; 74 74 struct ptr_16_32 ap_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) }; 75 struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) }; 76 struct ptr_16_32 idtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(idt), .base = KA2PA((__address) idt) }; 75 struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = (__address) gdt }; 77 76 78 77 void gdt_setbase(struct descriptor *d, __address base) … … 167 166 void pm_init(void) 168 167 { 169 struct descriptor *gdt_p = (struct descriptor *) PA2KA(gdtr.base);170 168 struct descriptor *gdt_p = (struct descriptor *) gdtr.base; 169 struct ptr_16_32 idtr; 171 170 172 171 /* 173 172 * Update addresses in GDT and IDT to their virtual counterparts. 174 173 */ 175 if (config.cpu_active == 1) 176 gdtr.base = (__address) gdt; 174 idtr.limit = sizeof(idt); 177 175 idtr.base = (__address) idt; 178 176 __asm__ volatile ("lgdt %0\n" : : "m" (gdtr));
Note:
See TracChangeset
for help on using the changeset viewer.