Rev 1928 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1928 | Rev 1993 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #include <arch/boot/boot.h> |
36 | #include <arch/boot/boot.h> |
37 | #include <arch/drivers/cuda.h> |
37 | #include <arch/drivers/cuda.h> |
38 | #include <arch/mm/memory_init.h> |
38 | #include <arch/mm/memory_init.h> |
39 | #include <arch/interrupt.h> |
39 | #include <arch/interrupt.h> |
40 | #include <genarch/fb/fb.h> |
40 | #include <genarch/fb/fb.h> |
- | 41 | #include <genarch/fb/visuals.h> |
|
41 | #include <userspace.h> |
42 | #include <userspace.h> |
42 | #include <proc/uarg.h> |
43 | #include <proc/uarg.h> |
43 | #include <console/console.h> |
44 | #include <console/console.h> |
44 | #include <ddi/device.h> |
45 | #include <ddi/device.h> |
45 | #include <ddi/irq.h> |
46 | #include <ddi/irq.h> |
Line 73... | Line 74... | ||
73 | 74 | ||
74 | void arch_post_mm_init(void) |
75 | void arch_post_mm_init(void) |
75 | { |
76 | { |
76 | if (config.cpu_active == 1) { |
77 | if (config.cpu_active == 1) { |
77 | /* Initialize framebuffer */ |
78 | /* Initialize framebuffer */ |
- | 79 | unsigned int visual; |
|
- | 80 | ||
- | 81 | switch (bootinfo.screen.bpp) { |
|
- | 82 | case 8: |
|
- | 83 | visual = VISUAL_INDIRECT_8; |
|
- | 84 | break; |
|
- | 85 | case 16: |
|
- | 86 | visual = VISUAL_RGB_5_5_5; |
|
- | 87 | break; |
|
- | 88 | case 24: |
|
- | 89 | visual = VISUAL_RGB_8_8_8; |
|
- | 90 | break; |
|
- | 91 | case 32: |
|
- | 92 | visual = VISUAL_RGB_0_8_8_8; |
|
- | 93 | break; |
|
- | 94 | default: |
|
- | 95 | panic("Unsupported bits per pixel"); |
|
- | 96 | } |
|
78 | fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false); |
97 | fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual); |
79 | 98 | ||
80 | /* Initialize IRQ routing */ |
99 | /* Initialize IRQ routing */ |
81 | irq_init(IRQ_COUNT, IRQ_COUNT); |
100 | irq_init(IRQ_COUNT, IRQ_COUNT); |
82 | 101 | ||
83 | /* Initialize PIC */ |
102 | /* Initialize PIC */ |