Rev 4055 | Rev 4296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4055 | Rev 4156 | ||
|---|---|---|---|
| Line 40... | Line 40... | ||
| 40 | #include <genarch/fb/fb.h> |
40 | #include <genarch/fb/fb.h> |
| 41 | #include <genarch/fb/visuals.h> |
41 | #include <genarch/fb/visuals.h> |
| 42 | #include <userspace.h> |
42 | #include <userspace.h> |
| 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> |
- | |
| 46 | #include <ddi/irq.h> |
45 | #include <ddi/irq.h> |
| 47 | #include <arch/drivers/pic.h> |
46 | #include <arch/drivers/pic.h> |
| 48 | #include <macros.h> |
47 | #include <macros.h> |
| 49 | #include <string.h> |
48 | #include <string.h> |
| 50 | 49 | ||
| Line 77... | Line 76... | ||
| 77 | } |
76 | } |
| 78 | 77 | ||
| 79 | void arch_post_mm_init(void) |
78 | void arch_post_mm_init(void) |
| 80 | { |
79 | { |
| 81 | if (config.cpu_active == 1) { |
80 | if (config.cpu_active == 1) { |
| - | 81 | ||
| - | 82 | #ifdef CONFIG_FB |
|
| 82 | /* Initialize framebuffer */ |
83 | /* Initialize framebuffer */ |
| 83 | if (bootinfo.screen.addr) { |
84 | if (bootinfo.screen.addr) { |
| 84 | unsigned int visual; |
85 | unsigned int visual; |
| 85 | 86 | ||
| 86 | switch (bootinfo.screen.bpp) { |
87 | switch (bootinfo.screen.bpp) { |
| Line 107... | Line 108... | ||
| 107 | .scan = bootinfo.screen.scanline, |
108 | .scan = bootinfo.screen.scanline, |
| 108 | .visual = visual, |
109 | .visual = visual, |
| 109 | }; |
110 | }; |
| 110 | fb_init(&prop); |
111 | fb_init(&prop); |
| 111 | } |
112 | } |
| - | 113 | #endif |
|
| 112 | 114 | ||
| 113 | /* Initialize IRQ routing */ |
115 | /* Initialize IRQ routing */ |
| 114 | irq_init(IRQ_COUNT, IRQ_COUNT); |
116 | irq_init(IRQ_COUNT, IRQ_COUNT); |
| 115 | 117 | ||
| 116 | if (bootinfo.macio.addr) { |
118 | if (bootinfo.macio.addr) { |
| 117 | /* Initialize PIC */ |
119 | /* Initialize PIC */ |
| 118 | pic_init(bootinfo.macio.addr, PAGE_SIZE); |
120 | pic_init(bootinfo.macio.addr, PAGE_SIZE); |
| 119 | 121 | ||
| 120 | /* Initialize I/O controller */ |
122 | /* Initialize I/O controller */ |
| 121 | cuda_init(device_assign_devno(), |
- | |
| 122 | bootinfo.macio.addr + 0x16000, 2 * PAGE_SIZE); |
123 | cuda_init(bootinfo.macio.addr + 0x16000, 2 * PAGE_SIZE); |
| 123 | } |
124 | } |
| 124 | 125 | ||
| 125 | /* Merge all zones to 1 big zone */ |
126 | /* Merge all zones to 1 big zone */ |
| 126 | zone_merge_all(); |
127 | zone_merge_all(); |
| 127 | } |
128 | } |
| Line 157... | Line 158... | ||
| 157 | /** Acquire console back for kernel |
158 | /** Acquire console back for kernel |
| 158 | * |
159 | * |
| 159 | */ |
160 | */ |
| 160 | void arch_grab_console(void) |
161 | void arch_grab_console(void) |
| 161 | { |
162 | { |
| - | 163 | #ifdef CONFIG_FB |
|
| 162 | fb_redraw(); |
164 | fb_redraw(); |
| - | 165 | #endif |
|
| 163 | } |
166 | } |
| 164 | 167 | ||
| 165 | /** Return console to userspace |
168 | /** Return console to userspace |
| 166 | * |
169 | * |
| 167 | */ |
170 | */ |