Subversion Repositories HelenOS

Rev

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

Rev 2235 Rev 2245
Line 40... Line 40...
40
#include <ddi/device.h>
40
#include <ddi/device.h>
41
 
41
 
42
#include "aux_print/printf.h"
42
#include "aux_print/printf.h"
43
#include <print.h>
43
#include <print.h>
44
#include <config.h>
44
#include <config.h>
-
 
45
#include <interrupt.h>
-
 
46
 
45
bootinfo_t bootinfo;
47
bootinfo_t bootinfo;
46
 
48
 
47
void arch_pre_main(void)
49
void arch_pre_main(void)
48
{
50
{
49
    aux_printf("arch_pre_main\n");
51
    aux_printf("arch_pre_main\n");
Line 57... Line 59...
57
        init.tasks[i].size = bootinfo.tasks[i].size;
59
        init.tasks[i].size = bootinfo.tasks[i].size;
58
 
60
 
59
//      aux_printf("%L, %d\n", bootinfo.tasks[i].addr, bootinfo.tasks[i].size);
61
//      aux_printf("%L, %d\n", bootinfo.tasks[i].addr, bootinfo.tasks[i].size);
60
    }
62
    }
61
 
63
 
62
    /* TODO this code just setups irq testing bed
64
    /* TODO this code just setups irq testing bed */
63
     */
-
 
64
    setup_exception_stacks();
65
    setup_exception_stacks();
65
    exception_init();
-
 
66
    install_exception_handlers();  
-
 
67
    interrupts_enable();
-
 
68
    /* activate timer interrupts */
-
 
69
    *(uint32_t*)0x15000100 = 1;
-
 
70
 
-
 
71
    while(1) ;
-
 
72
 
-
 
73
}
66
}
74
 
67
 
75
#include <ddi/irq.h>
68
#include <ddi/irq.h>
76
void arch_pre_mm_init(void)
69
void arch_pre_mm_init(void)
77
{
70
{
78
    aux_printf("arch_pre_mm_init\n");
71
    aux_printf("arch_pre_mm_init\n");
-
 
72
 
-
 
73
    /* It is not assumed by default */
-
 
74
    interrupts_disable();
-
 
75
   
-
 
76
    /* Initialize dispatch table */
-
 
77
    exception_init();
79
 
78
 
80
 
79
 
81
}
80
}
82
 
81
 
83
void arch_post_mm_init(void)
82
void arch_post_mm_init(void)
84
{
83
{
85
    aux_printf("arch_post_mm_init\n");
84
    aux_printf("arch_post_mm_init\n");
86
 //   irq_init(8, 8); /// needs malloc ... so after mm init
85
    interrupt_init(); // needs malloc ... so after mm init
87
//  console_init(device_assign_devno()); // need hash table of irq ... so after irq_init 
86
    console_init(device_assign_devno()); // need hash table of irq ... so after irq_init 
88
   
87
   
89
    /* TODO */
88
    /* TODO */
-
 
89
 
-
 
90
    interrupts_enable();
-
 
91
    while(1);
90
}
92
}
91
 
93
 
92
void arch_post_cpu_init(void)
94
void arch_post_cpu_init(void)
93
{
95
{
94
    /* TODO */
96
    /* TODO */