Rev 2214 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2214 | Rev 2235 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #include <arch.h> |
36 | #include <arch.h> |
37 | #include <arch/boot.h> |
37 | #include <arch/boot.h> |
38 | #include <config.h> |
38 | #include <config.h> |
39 | #include <arch/console.h> |
39 | #include <arch/console.h> |
40 | #include <ddi/device.h> |
40 | #include <ddi/device.h> |
- | 41 | ||
41 | #include <arch/interrupt.h> |
42 | #include "aux_print/printf.h" |
42 | #include <genarch/fb/fb.h> |
- | |
43 | #include <genarch/fb/visuals.h> |
- | |
44 | #include <print.h> |
43 | #include <print.h> |
45 | #include <config.h> |
44 | #include <config.h> |
46 | #include "aux_print/printf.h" |
- | |
47 | - | ||
48 | bootinfo_t bootinfo; |
45 | bootinfo_t bootinfo; |
49 | 46 | ||
50 | void arch_pre_main(void) |
47 | void arch_pre_main(void) |
51 | { |
48 | { |
52 | aux_printf("arch_pre_main\n"); |
49 | aux_printf("arch_pre_main\n"); |
53 | int i; |
50 | int i; |
54 | 51 | ||
55 | init.cnt = bootinfo.cnt; |
52 | init.cnt = bootinfo.cnt; |
56 | 53 | ||
- | 54 | printf("Used memmory\n"); |
|
57 | for (i = 0; i < bootinfo.cnt; ++i) { |
55 | for (i = 0; i < bootinfo.cnt; ++i) { |
58 | init.tasks[i].addr = bootinfo.tasks[i].addr; |
56 | init.tasks[i].addr = bootinfo.tasks[i].addr; |
59 | init.tasks[i].size = bootinfo.tasks[i].size; |
57 | init.tasks[i].size = bootinfo.tasks[i].size; |
- | 58 | ||
60 | // aux_printf("%L, %d\n", bootinfo.tasks[i].addr, bootinfo.tasks[i].size); |
59 | // aux_printf("%L, %d\n", bootinfo.tasks[i].addr, bootinfo.tasks[i].size); |
61 | } |
60 | } |
62 | 61 | ||
- | 62 | /* TODO this code just setups irq testing bed |
|
- | 63 | */ |
|
- | 64 | 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 | ||
63 | } |
73 | } |
64 | 74 | ||
65 | #include <ddi/irq.h> |
75 | #include <ddi/irq.h> |
66 | void arch_pre_mm_init(void) |
76 | void arch_pre_mm_init(void) |
67 | { |
77 | { |
Line 71... | Line 81... | ||
71 | } |
81 | } |
72 | 82 | ||
73 | void arch_post_mm_init(void) |
83 | void arch_post_mm_init(void) |
74 | { |
84 | { |
75 | aux_printf("arch_post_mm_init\n"); |
85 | aux_printf("arch_post_mm_init\n"); |
76 | - | ||
77 | interrupt_init(); |
- | |
78 | console_init(device_assign_devno()); |
86 | // irq_init(8, 8); /// needs malloc ... so after mm init |
79 | // fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8); |
87 | // console_init(device_assign_devno()); // need hash table of irq ... so after irq_init |
80 | 88 | ||
- | 89 | /* TODO */ |
|
81 | } |
90 | } |
82 | 91 | ||
83 | void arch_post_cpu_init(void) |
92 | void arch_post_cpu_init(void) |
84 | { |
93 | { |
85 | /* TODO */ |
94 | /* TODO */ |