Rev 1901 | Rev 1957 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1901 | Rev 1956 | ||
|---|---|---|---|
| Line 55... | Line 55... | ||
| 55 | 55 | ||
| 56 | #include <arch/bios/bios.h> |
56 | #include <arch/bios/bios.h> |
| 57 | 57 | ||
| 58 | #include <arch/mm/memory_init.h> |
58 | #include <arch/mm/memory_init.h> |
| 59 | #include <interrupt.h> |
59 | #include <interrupt.h> |
| - | 60 | #include <ddi/irq.h> |
|
| 60 | #include <arch/debugger.h> |
61 | #include <arch/debugger.h> |
| 61 | #include <proc/thread.h> |
62 | #include <proc/thread.h> |
| 62 | #include <syscall/syscall.h> |
63 | #include <syscall/syscall.h> |
| 63 | #include <console/console.h> |
64 | #include <console/console.h> |
| - | 65 | #include <ddi/device.h> |
|
| 64 | 66 | ||
| 65 | #ifdef CONFIG_SMP |
67 | #ifdef CONFIG_SMP |
| 66 | #include <arch/smp/apic.h> |
68 | #include <arch/smp/apic.h> |
| 67 | #endif |
69 | #endif |
| 68 | 70 | ||
| 69 | void arch_pre_mm_init(void) |
71 | void arch_pre_mm_init(void) |
| 70 | { |
72 | { |
| 71 | pm_init(); |
73 | pm_init(); |
| 72 | 74 | ||
| 73 | if (config.cpu_active == 1) { |
75 | if (config.cpu_active == 1) { |
| - | 76 | interrupt_init(); |
|
| 74 | bios_init(); |
77 | bios_init(); |
| 75 | i8259_init(); /* PIC */ |
- | |
| 76 | i8254_init(); /* hard clock */ |
- | |
| 77 | 78 | ||
| 78 | exc_register(VECTOR_SYSCALL, "syscall", (iroutine) syscall); |
- | |
| 79 | - | ||
| 80 | #ifdef CONFIG_SMP |
79 | /* PIC */ |
| 81 | exc_register(VECTOR_TLB_SHOOTDOWN_IPI, "tlb_shootdown", |
- | |
| 82 | (iroutine) tlb_shootdown_ipi); |
- | |
| 83 | #endif /* CONFIG_SMP */ |
80 | i8259_init(); |
| 84 | } |
81 | } |
| 85 | } |
82 | } |
| 86 | 83 | ||
| 87 | void arch_post_mm_init(void) |
84 | void arch_post_mm_init(void) |
| 88 | { |
85 | { |
| 89 | if (config.cpu_active == 1) { |
86 | if (config.cpu_active == 1) { |
| - | 87 | /* Initialize IRQ routing */ |
|
| - | 88 | irq_init(IRQ_COUNT, IRQ_COUNT); |
|
| - | 89 | ||
| - | 90 | /* hard clock */ |
|
| - | 91 | i8254_init(); |
|
| 90 | 92 | ||
| 91 | #ifdef CONFIG_FB |
93 | #ifdef CONFIG_FB |
| 92 | if (vesa_present()) |
94 | if (vesa_present()) |
| 93 | vesa_init(); |
95 | vesa_init(); |
| 94 | else |
96 | else |
| 95 | #endif |
97 | #endif |
| 96 | ega_init(); /* video */ |
98 | ega_init(); /* video */ |
| 97 | 99 | ||
| 98 | - | ||
| 99 | /* Enable debugger */ |
100 | /* Enable debugger */ |
| 100 | debugger_init(); |
101 | debugger_init(); |
| 101 | /* Merge all memory zones to 1 big zone */ |
102 | /* Merge all memory zones to 1 big zone */ |
| 102 | zone_merge_all(); |
103 | zone_merge_all(); |
| 103 | } |
104 | } |
| Line 124... | Line 125... | ||
| 124 | } |
125 | } |
| 125 | } |
126 | } |
| 126 | 127 | ||
| 127 | void arch_post_smp_init(void) |
128 | void arch_post_smp_init(void) |
| 128 | { |
129 | { |
| 129 | i8042_init(); /* keyboard controller */ |
130 | /* keyboard controller */ |
| - | 131 | i8042_init(device_assign_devno(), IRQ_KBD); |
|
| 130 | } |
132 | } |
| 131 | 133 | ||
| 132 | void calibrate_delay_loop(void) |
134 | void calibrate_delay_loop(void) |
| 133 | { |
135 | { |
| 134 | i8254_calibrate_delay_loop(); |
136 | i8254_calibrate_delay_loop(); |