Changeset 36df4109 in mainline
- Timestamp:
- 2016-06-06T16:29:56Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7510326
- Parents:
- 7f0580d
- Location:
- kernel
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/src/abs32le.c
r7f0580d r36df4109 51 51 #include <memstr.h> 52 52 53 static void abs32le_post_mm_init(void); 54 55 arch_ops_t abs32le_ops = { 56 .post_mm_init = abs32le_post_mm_init, 57 }; 58 59 arch_ops_t *arch_ops = &abs32le_ops; 60 53 61 char memcpy_from_uspace_failover_address; 54 62 char memcpy_to_uspace_failover_address; 55 63 56 void arch_pre_mm_init(void) 57 { 58 } 59 60 void arch_post_mm_init(void) 64 void abs32le_post_mm_init(void) 61 65 { 62 66 if (config.cpu_active == 1) { … … 67 71 zone_merge_all(); 68 72 } 69 }70 71 void arch_post_cpu_init(void)72 {73 }74 75 void arch_pre_smp_init(void)76 {77 }78 79 void arch_post_smp_init(void)80 {81 73 } 82 74 -
kernel/arch/amd64/include/arch/arch.h
r7f0580d r36df4109 36 36 #define KERN_amd64_ARCH_H_ 37 37 38 #include <genarch/multiboot/multiboot.h> 39 40 extern void arch_pre_main(uint32_t, void *); 38 extern void amd64_pre_main(uint32_t, void *); 41 39 42 40 #endif -
kernel/arch/amd64/src/amd64.c
r7f0580d r36df4109 34 34 35 35 #include <arch.h> 36 #include <arch/arch.h> 36 37 #include <typedefs.h> 37 38 #include <errno.h> … … 64 65 #endif 65 66 67 static void amd64_pre_mm_init(void); 68 static void amd64_post_mm_init(void); 69 static void amd64_post_cpu_init(void); 70 static void amd64_pre_smp_init(void); 71 static void amd64_post_smp_init(void); 72 73 arch_ops_t amd64_ops = { 74 .pre_mm_init = amd64_pre_mm_init, 75 .post_mm_init = amd64_post_mm_init, 76 .post_cpu_init = amd64_post_cpu_init, 77 .pre_smp_init = amd64_pre_smp_init, 78 .post_smp_init = amd64_post_smp_init 79 }; 80 81 arch_ops_t *arch_ops = &amd64_ops; 82 66 83 /** Perform amd64-specific initialization before main_bsp() is called. 67 84 * … … 70 87 * 71 88 */ 72 void a rch_pre_main(uint32_t signature, void *info)89 void amd64_pre_main(uint32_t signature, void *info) 73 90 { 74 91 /* Parse multiboot information obtained from the bootloader. */ … … 83 100 } 84 101 85 void a rch_pre_mm_init(void)102 void amd64_pre_mm_init(void) 86 103 { 87 104 /* Enable no-execute pages */ … … 107 124 } 108 125 109 110 void arch_post_mm_init(void) 126 void amd64_post_mm_init(void) 111 127 { 112 128 vreg_init(); … … 144 160 } 145 161 146 void a rch_post_cpu_init(void)162 void amd64_post_cpu_init(void) 147 163 { 148 164 #ifdef CONFIG_SMP … … 154 170 } 155 171 156 void a rch_pre_smp_init(void)172 void amd64_pre_smp_init(void) 157 173 { 158 174 if (config.cpu_active == 1) { … … 163 179 } 164 180 165 void a rch_post_smp_init(void)181 void amd64_post_smp_init(void) 166 182 { 167 183 /* Currently the only supported platform for amd64 is 'pc'. */ -
kernel/arch/amd64/src/boot/multiboot.S
r7f0580d r36df4109 427 427 long_status $status_long 428 428 429 /* Call a rch_pre_main(multiboot_eax, multiboot_ebx) */429 /* Call amd64_pre_main(multiboot_eax, multiboot_ebx) */ 430 430 movl multiboot_eax, %edi 431 431 movl multiboot_ebx, %esi 432 callq a rch_pre_main432 callq amd64_pre_main 433 433 434 434 long_status $status_main -
kernel/arch/amd64/src/boot/multiboot2.S
r7f0580d r36df4109 250 250 movq %rsp, %rbp 251 251 252 /* Call a rch_pre_main(multiboot_eax, multiboot_ebx) */252 /* Call amd64_pre_main(multiboot_eax, multiboot_ebx) */ 253 253 movl multiboot_eax, %edi 254 254 movl multiboot_ebx, %esi 255 callq a rch_pre_main255 callq amd64_pre_main 256 256 257 257 /* Call main_bsp() */ -
kernel/arch/arm32/include/arch/arch.h
r7f0580d r36df4109 55 55 } bootinfo_t; 56 56 57 extern void ar ch_pre_main(void *entry, bootinfo_t *bootinfo);57 extern void arm32_pre_main(void *entry, bootinfo_t *bootinfo); 58 58 59 59 #endif -
kernel/arch/arm32/src/arm32.c
r7f0580d r36df4109 35 35 36 36 #include <arch.h> 37 #include <arch/arch.h> 37 38 #include <config.h> 38 39 #include <genarch/fb/fb.h> … … 51 52 #include <sysinfo/sysinfo.h> 52 53 54 static void arm32_pre_mm_init(void); 55 static void arm32_post_mm_init(void); 56 static void arm32_post_smp_init(void); 57 58 arch_ops_t arm32_ops = { 59 .pre_mm_init = arm32_pre_mm_init, 60 .post_mm_init = arm32_post_mm_init, 61 .post_smp_init = arm32_post_smp_init, 62 }; 63 64 arch_ops_t *arch_ops = &arm32_ops; 65 66 53 67 /** Performs arm32-specific initialization before main_bsp() is called. */ 54 void ar ch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)68 void arm32_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) 55 69 { 56 70 init.cnt = min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); … … 69 83 70 84 /** Performs arm32 specific initialization before mm is initialized. */ 71 void ar ch_pre_mm_init(void)85 void arm32_pre_mm_init(void) 72 86 { 73 87 /* It is not assumed by default */ … … 76 90 77 91 /** Performs arm32 specific initialization afterr mm is initialized. */ 78 void ar ch_post_mm_init(void)92 void arm32_post_mm_init(void) 79 93 { 80 94 machine_init(); … … 90 104 } 91 105 92 /** Performs arm32 specific tasks needed after cpu is initialized.93 *94 * Currently the function is empty.95 */96 void arch_post_cpu_init(void)97 {98 }99 100 101 /** Performs arm32 specific tasks needed before the multiprocessing is102 * initialized.103 *104 * Currently the function is empty because SMP is not supported.105 */106 void arch_pre_smp_init(void)107 {108 }109 110 111 106 /** Performs arm32 specific tasks needed after the multiprocessing is 112 107 * initialized. … … 114 109 * Currently the function is empty because SMP is not supported. 115 110 */ 116 void ar ch_post_smp_init(void)111 void arm32_post_smp_init(void) 117 112 { 118 113 machine_input_init(); -
kernel/arch/arm32/src/start.S
r7f0580d r36df4109 63 63 ldr sp, =temp_stack 64 64 65 bl ar ch_pre_main65 bl arm32_pre_main 66 66 67 67 # -
kernel/arch/ia32/include/arch/arch.h
r7f0580d r36df4109 38 38 #include <typedefs.h> 39 39 40 extern void arch_pre_main(uint32_t, void *);40 extern void ia32_pre_main(uint32_t, void *); 41 41 42 42 #endif -
kernel/arch/ia32/src/boot/multiboot.S
r7f0580d r36df4109 142 142 pm2_status $status_prot3 143 143 144 /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */144 /* Call ia32_pre_main(multiboot_eax, multiboot_ebx) */ 145 145 pushl multiboot_ebx 146 146 pushl multiboot_eax 147 call arch_pre_main147 call ia32_pre_main 148 148 149 149 pm2_status $status_main -
kernel/arch/ia32/src/boot/multiboot2.S
r7f0580d r36df4109 178 178 movl %esp, %ebp 179 179 180 /* Call arch_pre_main(multiboot_eax, multiboot_ebx) */180 /* Call ia32_pre_main(multiboot_eax, multiboot_ebx) */ 181 181 pushl multiboot_ebx 182 182 pushl multiboot_eax 183 call arch_pre_main183 call ia32_pre_main 184 184 185 185 /* Call main_bsp() */ -
kernel/arch/ia32/src/ia32.c
r7f0580d r36df4109 36 36 37 37 #include <arch.h> 38 #include <arch/arch.h> 38 39 #include <typedefs.h> 39 40 #include <errno.h> … … 64 65 #endif 65 66 67 static void ia32_pre_mm_init(void); 68 static void ia32_post_mm_init(void); 69 static void ia32_post_cpu_init(void); 70 static void ia32_pre_smp_init(void); 71 static void ia32_post_smp_init(void); 72 73 arch_ops_t ia32_ops = { 74 .pre_mm_init = ia32_pre_mm_init, 75 .post_mm_init = ia32_post_mm_init, 76 .post_cpu_init = ia32_post_cpu_init, 77 .pre_smp_init = ia32_pre_smp_init, 78 .post_smp_init = ia32_post_smp_init, 79 }; 80 81 arch_ops_t *arch_ops = &ia32_ops; 82 66 83 /** Perform ia32-specific initialization before main_bsp() is called. 67 84 * … … 70 87 * 71 88 */ 72 void arch_pre_main(uint32_t signature, void *info)89 void ia32_pre_main(uint32_t signature, void *info) 73 90 { 74 91 /* Parse multiboot information obtained from the bootloader. */ … … 83 100 } 84 101 85 void arch_pre_mm_init(void)102 void ia32_pre_mm_init(void) 86 103 { 87 104 pm_init(); … … 96 113 } 97 114 98 void arch_post_mm_init(void)115 void ia32_post_mm_init(void) 99 116 { 100 117 vreg_init(); … … 129 146 } 130 147 131 void arch_post_cpu_init(void)148 void ia32_post_cpu_init(void) 132 149 { 133 150 #ifdef CONFIG_SMP … … 139 156 } 140 157 141 void arch_pre_smp_init(void)158 void ia32_pre_smp_init(void) 142 159 { 143 160 if (config.cpu_active == 1) { … … 148 165 } 149 166 150 void arch_post_smp_init(void)167 void ia32_post_smp_init(void) 151 168 { 152 169 /* Currently the only supported platform for ia32 is 'pc'. */ -
kernel/arch/ia64/include/arch/arch.h
r7f0580d r36df4109 36 36 #define KERN_ia64_ARCH_H_ 37 37 38 extern void arch_pre_main(void);38 extern void ia64_pre_main(void); 39 39 40 40 #endif -
kernel/arch/ia64/src/ia64.c
r7f0580d r36df4109 34 34 35 35 #include <arch.h> 36 #include <arch/arch.h> 36 37 #include <typedefs.h> 37 38 #include <errno.h> … … 60 61 #endif 61 62 63 static void ia64_pre_mm_init(void); 64 static void ia64_post_mm_init(void); 65 static void ia64_post_smp_init(void); 66 67 arch_ops_t ia64_ops = { 68 .pre_mm_init = ia64_pre_mm_init, 69 .post_mm_init = ia64_post_mm_init, 70 .post_smp_init = ia64_post_smp_init, 71 }; 72 73 arch_ops_t *arch_ops = &ia64_ops; 74 62 75 /* NS16550 as a COM 1 */ 63 76 #define NS16550_IRQ (4 + LEGACY_INTERRUPT_BASE) … … 69 82 70 83 /** Performs ia64-specific initialization before main_bsp() is called. */ 71 void arch_pre_main(void)84 void ia64_pre_main(void) 72 85 { 73 86 init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, … … 84 97 } 85 98 86 void arch_pre_mm_init(void)99 void ia64_pre_mm_init(void) 87 100 { 88 101 if (config.cpu_active == 1) … … 117 130 } 118 131 119 void arch_post_mm_init(void)132 void ia64_post_mm_init(void) 120 133 { 121 134 if (config.cpu_active == 1) { … … 130 143 } 131 144 132 void arch_post_cpu_init(void) 133 { 134 } 135 136 void arch_pre_smp_init(void) 137 { 138 } 139 140 void arch_post_smp_init(void) 145 void ia64_post_smp_init(void) 141 146 { 142 147 static const char *platform; -
kernel/arch/ia64/src/start.S
r7f0580d r36df4109 158 158 srlz.d ;; 159 159 160 br.call.sptk.many b0 = arch_pre_main160 br.call.sptk.many b0 = ia64_pre_main 161 161 0: 162 162 br.call.sptk.many b0 = main_bsp -
kernel/arch/mips32/include/arch/arch.h
r7f0580d r36df4109 63 63 } bootinfo_t; 64 64 65 extern void arch_pre_main(void *entry, bootinfo_t *bootinfo);65 extern void mips32_pre_main(void *entry, bootinfo_t *bootinfo); 66 66 67 67 #endif -
kernel/arch/mips32/src/mips32.c
r7f0580d r36df4109 34 34 35 35 #include <arch.h> 36 #include <arch/arch.h> 36 37 #include <typedefs.h> 37 38 #include <errno.h> … … 56 57 #define CACHE_EXC ((char *) 0x80000100) 57 58 59 static void mips32_pre_mm_init(void); 60 static void mips32_post_mm_init(void); 61 static void mips32_post_smp_init(void); 62 63 arch_ops_t mips32_ops = { 64 .pre_mm_init = mips32_pre_mm_init, 65 .post_mm_init = mips32_post_mm_init, 66 .post_smp_init = mips32_post_smp_init, 67 }; 68 69 arch_ops_t *arch_ops = &mips32_ops; 58 70 59 71 /* Why the linker moves the variable 64K away in assembler … … 71 83 72 84 /** Performs mips32-specific initialization before main_bsp() is called. */ 73 void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)85 void mips32_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) 74 86 { 75 87 init.cnt = min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); … … 96 108 } 97 109 98 void arch_pre_mm_init(void)110 void mips32_pre_mm_init(void) 99 111 { 100 112 /* It is not assumed by default */ … … 127 139 } 128 140 129 void arch_post_mm_init(void)141 void mips32_post_mm_init(void) 130 142 { 131 143 interrupt_init(); … … 135 147 } 136 148 137 void arch_post_cpu_init(void) 138 { 139 } 140 141 void arch_pre_smp_init(void) 142 { 143 } 144 145 void arch_post_smp_init(void) 149 void mips32_post_smp_init(void) 146 150 { 147 151 /* Set platform name. */ -
kernel/arch/mips32/src/start.S
r7f0580d r36df4109 196 196 197 197 /* $a1 contains physical address of bootinfo_t */ 198 jal arch_pre_main198 jal mips32_pre_main 199 199 addiu $sp, -ABI_STACK_FRAME 200 200 -
kernel/arch/ppc32/include/arch/arch.h
r7f0580d r36df4109 38 38 #include <arch/boot/boot.h> 39 39 40 extern void arch_pre_main(bootinfo_t *);40 extern void ppc32_pre_main(bootinfo_t *); 41 41 42 42 #endif -
kernel/arch/ppc32/src/boot/boot.S
r7f0580d r36df4109 48 48 49 49 addis r3, r3, 0x8000 50 bl arch_pre_main50 bl ppc32_pre_main 51 51 b main_bsp 52 52 -
kernel/arch/ppc32/src/ppc32.c
r7f0580d r36df4109 33 33 */ 34 34 35 #include <arch.h> 36 #include <arch/arch.h> 35 37 #include <config.h> 36 #include <arch.h>37 38 #include <arch/boot/boot.h> 38 39 #include <genarch/drivers/via-cuda/cuda.h> … … 61 62 #define IRQ_CUDA 10 62 63 64 static void ppc32_pre_mm_init(void); 65 static void ppc32_post_mm_init(void); 66 static void ppc32_post_smp_init(void); 67 68 arch_ops_t ppc32_ops = { 69 .pre_mm_init = ppc32_pre_mm_init, 70 .post_mm_init = ppc32_post_mm_init, 71 .post_smp_init = ppc32_post_smp_init, 72 }; 73 74 arch_ops_t *arch_ops = &ppc32_ops; 75 63 76 bootinfo_t bootinfo; 64 77 … … 67 80 68 81 /** Performs ppc32-specific initialization before main_bsp() is called. */ 69 void arch_pre_main(bootinfo_t *bootinfo)82 void ppc32_pre_main(bootinfo_t *bootinfo) 70 83 { 71 84 /* Copy tasks map. */ … … 95 108 } 96 109 97 void arch_pre_mm_init(void)110 void ppc32_pre_mm_init(void) 98 111 { 99 112 /* Initialize dispatch table */ … … 192 205 #endif 193 206 194 void arch_post_mm_init(void)207 void ppc32_post_mm_init(void) 195 208 { 196 209 if (config.cpu_active == 1) { … … 207 220 zone_merge_all(); 208 221 } 209 }210 211 void arch_post_cpu_init(void)212 {213 }214 215 void arch_pre_smp_init(void)216 {217 222 } 218 223 … … 273 278 } 274 279 275 void arch_post_smp_init(void)280 void ppc32_post_smp_init(void) 276 281 { 277 282 /* Currently the only supported platform for ppc32 is 'mac'. */ -
kernel/arch/sparc32/include/arch/arch.h
r7f0580d r36df4109 75 75 } bootinfo_t; 76 76 77 extern void arch_pre_main(void *, bootinfo_t *);77 extern void sparc32_pre_main(void *, bootinfo_t *); 78 78 extern void write_to_invalid(uint32_t, uint32_t, uint32_t); 79 79 extern void read_from_invalid(uint32_t *, uint32_t *, uint32_t *); -
kernel/arch/sparc32/include/arch/machine_func.h
r7f0580d r36df4109 42 42 #define KERN_sparc32_MACHINE_FUNC_H_ 43 43 44 #include <arch .h>44 #include <arch/arch.h> 45 45 46 46 #include <console/console.h> -
kernel/arch/sparc32/src/debug/stacktrace.c
r7f0580d r36df4109 37 37 #include <syscall/copy.h> 38 38 #include <typedefs.h> 39 #include <arch .h>39 #include <arch/arch.h> 40 40 #include <arch/stack.h> 41 41 #include <proc/thread.h> -
kernel/arch/sparc32/src/machine_func.c
r7f0580d r36df4109 40 40 #include <arch/machine_func.h> 41 41 #include <arch/machine/leon3/leon3.h> 42 #include <arch/arch.h> 42 43 43 44 /** Pointer to machine_ops structure being used. */ -
kernel/arch/sparc32/src/mm/page.c
r7f0580d r36df4109 46 46 #include <func.h> 47 47 #include <arch/interrupt.h> 48 #include <arch/arch.h> 48 49 #include <arch/asm.h> 49 50 #include <debug.h> -
kernel/arch/sparc32/src/sparc32.c
r7f0580d r36df4109 34 34 35 35 #include <arch.h> 36 #include <arch/arch.h> 36 37 #include <typedefs.h> 37 38 #include <arch/interrupt.h> … … 54 55 #include <str.h> 55 56 57 static void sparc32_post_mm_init(void); 58 static void sparc32_post_smp_init(void); 59 60 arch_ops_t sparc32_ops = { 61 .post_mm_init = sparc32_post_mm_init, 62 .post_smp_init = sparc32_post_smp_init, 63 }; 64 65 arch_ops_t *arch_ops = &sparc32_ops; 66 56 67 char memcpy_from_uspace_failover_address; 57 68 char memcpy_to_uspace_failover_address; … … 59 70 static bootinfo_t machine_bootinfo; 60 71 61 void arch_pre_main(void *unused, bootinfo_t *bootinfo)72 void sparc32_pre_main(void *unused, bootinfo_t *bootinfo) 62 73 { 63 74 init.cnt = min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); … … 74 85 } 75 86 76 void arch_pre_mm_init(void) 77 { 78 } 79 80 extern void func1(void); 81 82 void arch_post_mm_init(void) 87 void sparc32_post_mm_init(void) 83 88 { 84 89 machine_init(&machine_bootinfo); … … 95 100 } 96 101 97 98 void arch_post_cpu_init(void) 99 { 100 } 101 102 void arch_pre_smp_init(void) 103 { 104 } 105 106 void arch_post_smp_init(void) 102 void sparc32_post_smp_init(void) 107 103 { 108 104 machine_input_init(); -
kernel/arch/sparc32/src/start.S
r7f0580d r36df4109 59 59 60 60 mov %l1, %o1 61 call arch_pre_main61 call sparc32_pre_main 62 62 nop 63 63 -
kernel/arch/sparc32/src/userspace.c
r7f0580d r36df4109 35 35 #include <userspace.h> 36 36 #include <typedefs.h> 37 #include <arch .h>37 #include <arch/arch.h> 38 38 #include <arch/asm.h> 39 39 #include <abi/proc/uarg.h> -
kernel/arch/sparc64/include/arch/arch.h
r7f0580d r36df4109 53 53 #ifndef __ASM__ 54 54 55 extern void arch_pre_main(bootinfo_t *);55 extern void sparc64_pre_main(bootinfo_t *); 56 56 57 57 #endif /* __ASM__ */ -
kernel/arch/sparc64/src/sun4u/sparc64.c
r7f0580d r36df4109 34 34 35 35 #include <arch.h> 36 #include <arch/arch.h> 36 37 #include <debug.h> 37 38 #include <config.h> … … 52 53 #include <sysinfo/sysinfo.h> 53 54 55 static void sparc64_pre_mm_init(void); 56 static void sparc64_post_mm_init(void); 57 static void sparc64_post_smp_init(void); 58 59 arch_ops_t sparc64_ops = { 60 .pre_mm_init = sparc64_pre_mm_init, 61 .post_mm_init = sparc64_post_mm_init, 62 .post_smp_init = sparc64_post_smp_init, 63 }; 64 65 arch_ops_t *arch_ops = &sparc64_ops; 66 54 67 memmap_t memmap; 55 68 56 69 /** Perform sparc64-specific initialization before main_bsp() is called. */ 57 void arch_pre_main(bootinfo_t *bootinfo)70 void sparc64_pre_main(bootinfo_t *bootinfo) 58 71 { 59 72 /* Copy init task info. */ … … 84 97 85 98 /** Perform sparc64 specific initialization before mm is initialized. */ 86 void arch_pre_mm_init(void)99 void sparc64_pre_mm_init(void) 87 100 { 88 101 if (config.cpu_active == 1) { … … 93 106 94 107 /** Perform sparc64 specific initialization afterr mm is initialized. */ 95 void arch_post_mm_init(void)108 void sparc64_post_mm_init(void) 96 109 { 97 110 if (config.cpu_active == 1) { … … 107 120 } 108 121 109 void arch_post_cpu_init(void) 110 { 111 } 112 113 void arch_pre_smp_init(void) 114 { 115 } 116 117 void arch_post_smp_init(void) 122 void sparc64_post_smp_init(void) 118 123 { 119 124 /* Currently the only supported platform for sparc64/sun4u is 'sun4u'. */ -
kernel/arch/sparc64/src/sun4u/start.S
r7f0580d r36df4109 292 292 293 293 /* 294 * Call arch_pre_main(bootinfo)295 */ 296 call arch_pre_main294 * Call sparc64_pre_main(bootinfo) 295 */ 296 call sparc64_pre_main 297 297 mov %o1, %o0 298 298 -
kernel/arch/sparc64/src/sun4v/sparc64.c
r7f0580d r36df4109 34 34 35 35 #include <arch.h> 36 #include <arch/arch.h> 36 37 #include <debug.h> 37 38 #include <config.h> … … 54 55 #include <sysinfo/sysinfo.h> 55 56 57 static void sparc64_pre_mm_init(void); 58 static void sparc64_post_mm_init(void); 59 static void sparc64_post_smp_init(void); 60 61 arch_ops_t sparc64_ops = { 62 .pre_mm_init = sparc64_pre_mm_init, 63 .post_mm_init = sparc64_post_mm_init, 64 .post_smp_init = sparc64_post_smp_init, 65 }; 66 67 arch_ops_t *arch_ops = &sparc64_ops; 68 56 69 memmap_t memmap; 57 70 58 71 /** Perform sparc64-specific initialization before main_bsp() is called. */ 59 void arch_pre_main(bootinfo_t *bootinfo)72 void sparc64_pre_main(bootinfo_t *bootinfo) 60 73 { 61 74 /* Copy init task info. */ … … 82 95 83 96 /** Perform sparc64 specific initialization before mm is initialized. */ 84 void arch_pre_mm_init(void)97 void sparc64_pre_mm_init(void) 85 98 { 86 99 if (config.cpu_active == 1) { … … 91 104 92 105 /** Perform sparc64 specific initialization afterr mm is initialized. */ 93 void arch_post_mm_init(void)106 void sparc64_post_mm_init(void) 94 107 { 95 108 if (config.cpu_active == 1) { … … 105 118 } 106 119 107 void arch_post_cpu_init(void) 108 { 109 } 110 111 void arch_pre_smp_init(void) 112 { 113 } 114 115 void arch_post_smp_init(void) 120 void sparc64_post_smp_init(void) 116 121 { 117 122 /* Currently the only supported platform for sparc64/sun4v is 'sun4v'. */ -
kernel/arch/sparc64/src/sun4v/start.S
r7f0580d r36df4109 248 248 249 249 /* 250 * Call arch_pre_main(bootinfo)251 */ 252 call arch_pre_main250 * Call sparc64_pre_main(bootinfo) 251 */ 252 call sparc64_pre_main 253 253 or %l1, %g0, %o0 254 254 -
kernel/genarch/include/genarch/drivers/grlib/irqmp.h
r7f0580d r36df4109 39 39 40 40 #include <typedefs.h> 41 #include <arch .h>41 #include <arch/arch.h> 42 42 43 43 #define GRLIB_IRQMP_MASK_OFFSET 0x40 -
kernel/genarch/src/drivers/grlib/irqmp.c
r7f0580d r36df4109 36 36 37 37 #include <genarch/drivers/grlib/irqmp.h> 38 #include <arch/arch.h> 38 39 #include <arch/asm.h> 39 40 #include <mm/km.h> -
kernel/generic/include/arch.h
r7f0580d r36df4109 36 36 #define KERN_ARCH_H_ 37 37 38 #include <arch/arch.h> /* arch_pre_main() */39 38 #include <arch/asm.h> /* get_stack_base() */ 40 39 #include <config.h> … … 80 79 } the_t; 81 80 81 typedef struct { 82 void (* pre_mm_init)(void); 83 void (* post_mm_init)(void); 84 void (* post_cpu_init)(void); 85 void (* pre_smp_init)(void); 86 void (* post_smp_init)(void); 87 } arch_ops_t; 88 89 extern arch_ops_t *arch_ops; 90 91 #define ARCH_OP(op) \ 92 do { \ 93 if (arch_ops->op) \ 94 arch_ops->op(); \ 95 } while (0) 96 82 97 extern void the_initialize(the_t *); 83 98 extern void the_copy(the_t *, the_t *); 84 85 extern void arch_pre_mm_init(void);86 extern void arch_post_mm_init(void);87 extern void arch_post_cpu_init(void);88 extern void arch_pre_smp_init(void);89 extern void arch_post_smp_init(void);90 99 91 100 extern void calibrate_delay_loop(void); … … 95 104 extern void *arch_construct_function(fncptr_t *, void *, void *); 96 105 97 98 106 #endif 99 107 -
kernel/generic/src/main/kinit.c
r7f0580d r36df4109 160 160 * At this point SMP, if present, is configured. 161 161 */ 162 arch_post_smp_init();162 ARCH_OP(post_smp_init); 163 163 164 164 /* Start thread computing system load */ -
kernel/generic/src/main/main.c
r7f0580d r36df4109 238 238 * Memory management subsystems initialization. 239 239 */ 240 arch_pre_mm_init();240 ARCH_OP(pre_mm_init); 241 241 km_identity_init(); 242 242 frame_init(); … … 250 250 km_non_identity_init(); 251 251 ddi_init(); 252 arch_post_mm_init();252 ARCH_OP(post_mm_init); 253 253 reserve_init(); 254 arch_pre_smp_init();254 ARCH_OP(pre_smp_init); 255 255 smp_init(); 256 256 … … 266 266 cpu_init(); 267 267 calibrate_delay_loop(); 268 arch_post_cpu_init();268 ARCH_OP(post_cpu_init); 269 269 270 270 smp_call_init(); … … 341 341 the_initialize(THE); 342 342 343 arch_pre_mm_init();343 ARCH_OP(pre_mm_init); 344 344 frame_init(); 345 345 page_init(); 346 346 tlb_init(); 347 arch_post_mm_init();347 ARCH_OP(post_mm_init); 348 348 349 349 cpu_init(); 350 350 calibrate_delay_loop(); 351 arch_post_cpu_init();351 ARCH_OP(post_cpu_init); 352 352 353 353 the_copy(THE, (the_t *) CPU->stack);
Note:
See TracChangeset
for help on using the changeset viewer.