Subversion Repositories HelenOS

Rev

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

Rev 4342 Rev 4343
Line 43... Line 43...
43
#include <proc/uarg.h>
43
#include <proc/uarg.h>
44
#include <console/console.h>
44
#include <console/console.h>
45
#include <ddi/device.h>
45
#include <ddi/device.h>
46
#include <ddi/irq.h>
46
#include <ddi/irq.h>
47
#include <arch/drivers/pic.h>
47
#include <arch/drivers/pic.h>
-
 
48
#include <macros.h>
48
 
49
 
49
#define IRQ_COUNT   64
50
#define IRQ_COUNT  64
50
 
51
 
51
bootinfo_t bootinfo;
52
bootinfo_t bootinfo;
52
 
53
 
53
void arch_pre_main(void)
54
void arch_pre_main(void)
54
{
55
{
55
    /* Setup usermode */
-
 
56
    init.cnt = bootinfo.taskmap.count;
56
    init.cnt = bootinfo.taskmap.count;
57
   
57
   
58
    uint32_t i;
58
    uint32_t i;
59
   
59
   
60
    for (i = 0; i < bootinfo.taskmap.count; i++) {
60
    for (i = 0; i < min3(bootinfo.taskmap.count, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); i++) {
61
        init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr);
61
        init.tasks[i].addr = PA2KA(bootinfo.taskmap.tasks[i].addr);
62
        init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
62
        init.tasks[i].size = bootinfo.taskmap.tasks[i].size;
63
    }
63
    }
64
}
64
}
65
 
65