Subversion Repositories HelenOS

Rev

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

Rev 4343 Rev 4345
Line 52... Line 52...
52
#include <arch/debugger.h>
52
#include <arch/debugger.h>
53
#include <genarch/fb/fb.h>
53
#include <genarch/fb/fb.h>
54
#include <genarch/fb/visuals.h>
54
#include <genarch/fb/visuals.h>
55
#include <macros.h>
55
#include <macros.h>
56
#include <ddi/device.h>
56
#include <ddi/device.h>
-
 
57
#include <config.h>
-
 
58
#include <string.h>
57
 
59
 
58
#include <arch/asm/regname.h>
60
#include <arch/asm/regname.h>
59
 
61
 
60
/* Size of the code jumping to the exception handler code
62
/* Size of the code jumping to the exception handler code
61
 * - J+NOP
63
 * - J+NOP
Line 74... Line 76...
74
/* Stack pointer saved when entering user mode */
76
/* Stack pointer saved when entering user mode */
75
uintptr_t supervisor_sp __attribute__ ((section (".text")));
77
uintptr_t supervisor_sp __attribute__ ((section (".text")));
76
 
78
 
77
count_t cpu_count = 0;
79
count_t cpu_count = 0;
78
 
80
 
-
 
81
/** Performs mips32-specific initialization before main_bsp() is called. */
79
void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
82
void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo)
80
{
83
{
81
    /* Setup usermode */
84
    /* Setup usermode */
82
    init.cnt = bootinfo->cnt;
85
    init.cnt = bootinfo->cnt;
83
   
86
   
84
    count_t i;
87
    count_t i;
85
    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++) {
86
        init.tasks[i].addr = bootinfo->tasks[i].addr;
89
        init.tasks[i].addr = bootinfo->tasks[i].addr;
87
        init.tasks[i].size = bootinfo->tasks[i].size;
90
        init.tasks[i].size = bootinfo->tasks[i].size;
-
 
91
        strncpy(init.tasks[i].name, bootinfo->tasks[i].name,
-
 
92
            CONFIG_TASK_NAME_BUFLEN);
88
    }
93
    }
89
   
94
   
90
    for (i = 0; i < CPUMAP_MAX_RECORDS; i++) {
95
    for (i = 0; i < CPUMAP_MAX_RECORDS; i++) {
91
        if ((bootinfo->cpumap & (1 << i)) != 0)
96
        if ((bootinfo->cpumap & (1 << i)) != 0)
92
            cpu_count++;
97
            cpu_count++;