Subversion Repositories HelenOS

Rev

Rev 4420 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4420 Rev 4537
Line 74... Line 74...
74
 */
74
 */
75
 
75
 
76
/* Stack pointer saved when entering user mode */
76
/* Stack pointer saved when entering user mode */
77
uintptr_t supervisor_sp __attribute__ ((section (".text")));
77
uintptr_t supervisor_sp __attribute__ ((section (".text")));
78
 
78
 
79
count_t cpu_count = 0;
79
size_t cpu_count = 0;
80
 
80
 
81
/** Performs mips32-specific initialization before main_bsp() is called. */
81
/** Performs mips32-specific initialization before main_bsp() is called. */
82
void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
82
void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
83
{
83
{
84
    /* Setup usermode */
84
    /* Setup usermode */
85
    init.cnt = bootinfo->cnt;
85
    init.cnt = bootinfo->cnt;
86
   
86
   
87
    count_t i;
87
    size_t i;
88
    for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) {
88
    for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) {
89
        init.tasks[i].addr = bootinfo->tasks[i].addr;
89
        init.tasks[i].addr = bootinfo->tasks[i].addr;
90
        init.tasks[i].size = bootinfo->tasks[i].size;
90
        init.tasks[i].size = bootinfo->tasks[i].size;
91
        str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN,
91
        str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN,
92
            bootinfo->tasks[i].name);
92
            bootinfo->tasks[i].name);