Changeset 96e0748d in mainline for kernel/arch/mips32/src/mips32.c
- Timestamp:
- 2009-02-17T22:47:27Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f89979b
- Parents:
- e662a5f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mips32.c
re662a5f r96e0748d 34 34 35 35 #include <arch.h> 36 #include <arch/boot.h>37 36 #include <arch/cp0.h> 38 37 #include <arch/exception.h> … … 59 58 #include <arch/asm/regname.h> 60 59 61 /* Size of the code jumping to the exception handler code 62 * - J+NOP 63 */ 64 #define EXCEPTION_JUMP_SIZE 65 66 #define TLB_EXC ((char *) 0x80000000)67 #define NORM_EXC ((char *) 0x80000180)68 #define CACHE_EXC ((char *) 0x80000100)60 /* Size of the code jumping to the exception handler code 61 * - J+NOP 62 */ 63 #define EXCEPTION_JUMP_SIZE 8 64 65 #define TLB_EXC ((char *) 0x80000000) 66 #define NORM_EXC ((char *) 0x80000180) 67 #define CACHE_EXC ((char *) 0x80000100) 69 68 70 69 71 70 /* Why the linker moves the variable 64K away in assembler 72 * when not in .text section ???????? 73 */ 71 * when not in .text section? 72 */ 73 74 /* Stack pointer saved when entering user mode */ 74 75 uintptr_t supervisor_sp __attribute__ ((section (".text"))); 75 /* Stack pointer saved when entering user mode */ 76 /* TODO: How do we do it on SMP system???? */ 77 bootinfo_t bootinfo __attribute__ ((section (".text"))); 78 79 void arch_pre_main(void) 76 77 count_t cpu_count = 0; 78 79 void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) 80 80 { 81 81 /* Setup usermode */ 82 init.cnt = bootinfo.cnt; 83 84 uint32_t i; 85 86 for (i = 0; i < bootinfo.cnt; i++) { 87 init.tasks[i].addr = bootinfo.tasks[i].addr; 88 init.tasks[i].size = bootinfo.tasks[i].size; 82 init.cnt = bootinfo->cnt; 83 84 count_t i; 85 for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) { 86 init.tasks[i].addr = bootinfo->tasks[i].addr; 87 init.tasks[i].size = bootinfo->tasks[i].size; 88 } 89 90 for (i = 0; i < CPUMAP_MAX_RECORDS; i++) { 91 if ((bootinfo->cpumap & (1 << i)) != 0) 92 cpu_count++; 89 93 } 90 94 }
Note:
See TracChangeset
for help on using the changeset viewer.