Changeset 8f2153b in mainline
- Timestamp:
- 2005-09-05T12:41:45Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b492b5
- Parents:
- 2c55af3
- Location:
- arch/ia32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/_link.ld
r2c55af3 r8f2153b 59 59 e820table_boot = e820table - _map_address; 60 60 e820counter_boot = e820counter - _map_address; 61 real_bootstrap_gdtr = real_bootstrap_gdtr_boot + 0x80000000; 61 62 } -
arch/ia32/include/mm/page.h
r2c55af3 r8f2153b 30 30 #define __ia32_PAGE_H__ 31 31 32 #include <mm/page.h>33 #include <arch/types.h>34 #include <arch/mm/frame.h>35 #include <typedefs.h>36 37 32 #define PAGE_SIZE FRAME_SIZE 38 33 39 #define KA2PA(x) (((__address) (x)) - 0x80000000) 40 #define PA2KA(x) (((__address) (x)) + 0x80000000) 34 #ifndef __ASM__ 35 # define KA2PA(x) (((__address) (x)) - 0x80000000) 36 # define PA2KA(x) (((__address) (x)) + 0x80000000) 37 #else 38 # define KA2PA(x) ((x) - 0x80000000) 39 # define PA2KA(x) ((x) + 0x80000000) 40 #endif 41 41 42 42 /* … … 70 70 #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) 71 71 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) 72 73 #ifndef __ASM__ 74 75 #include <mm/page.h> 76 #include <arch/types.h> 77 #include <arch/mm/frame.h> 78 #include <typedefs.h> 72 79 73 80 struct page_specifier { … … 112 119 extern void page_arch_init(void); 113 120 121 #endif /* __ASM__ */ 122 114 123 #endif -
arch/ia32/include/pm.h
r2c55af3 r8f2153b 30 30 #define __PM_H__ 31 31 32 #include <arch/types.h>33 #include <typedefs.h>34 #include <arch/context.h>35 36 32 #define IDT_ITEMS 64 37 33 #define GDT_ITEMS 6 … … 60 56 61 57 #define IO_MAP_BASE (104) 58 59 #ifndef __ASM__ 60 61 #include <arch/types.h> 62 #include <typedefs.h> 63 #include <arch/context.h> 62 64 63 65 struct ptr_16_32 { … … 146 148 extern void tss_initialize(struct tss *t); 147 149 150 #endif /* __ASM__ */ 151 148 152 #endif -
arch/ia32/src/boot/boot.S
r2c55af3 r8f2153b 27 27 # 28 28 29 #define __ASM__ 30 29 31 #include <arch/boot/boot.h> 30 32 #include <arch/boot/memmapasm.h> 33 #include <arch/mm/page.h> 34 #include <arch/pm.h> 31 35 32 36 .section K_TEXT_START … … 54 58 call memmap_arch_init 55 59 56 lgdt real_bootstrap_gdtr 60 lgdt real_bootstrap_gdtr_boot # initialize Global Descriptor Table register 57 61 58 62 movl %cr0, %eax … … 236 240 page_directory: 237 241 .space 4096, 0 242 243 .global real_bootstrap_gdtr_boot 244 real_bootstrap_gdtr_boot: 245 .word selector(GDT_ITEMS) 246 .long KA2PA(gdt)-BOOT_OFFSET 247 -
arch/ia32/src/pm.c
r2c55af3 r8f2153b 70 70 struct tss *tss_p = NULL; 71 71 72 /* TODO: Does not compile correctly if it does not exist ???? */ 73 int __attribute__ ((section ("K_DATA_START"))) __fake; 74 72 75 /* gdtr is changed by kmp before next CPU is initialized */ 73 struct ptr_16_32 real_bootstrap_gdtr __attribute__ ((section ("K_DATA_START"))) = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt - BOOT_OFFSET) };74 76 struct ptr_16_32 protected_bootstrap_gdtr = { .limit = sizeof(gdt), .base = KA2PA((__address) gdt) }; 75 77 struct ptr_16_32 gdtr = { .limit = sizeof(gdt), .base = (__address) gdt }; -
arch/ia32/src/smp/ap.S
r2c55af3 r8f2153b 51 51 movw %ax, %ds 52 52 53 lgdt real_bootstrap_gdtr # initialize Global Descriptor Table register53 lgdt real_bootstrap_gdtr_boot # initialize Global Descriptor Table register 54 54 55 55 movl %cr0, %eax -
arch/ia32/src/smp/smp.c
r2c55af3 r8f2153b 144 144 memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor)); 145 145 memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0); 146 ((struct ptr_16_32 *) PA2KA((__address) &real_bootstrap_gdtr))->base = KA2PA((__address) gdt_new);146 real_bootstrap_gdtr.base = KA2PA((__address) gdt_new); 147 147 gdtr.base = (__address) gdt_new; 148 148
Note:
See TracChangeset
for help on using the changeset viewer.