Rev 1901 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1901 | Rev 1993 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | #include <arch.h> |
35 | #include <arch.h> |
36 | #include <arch/boot/boot.h> |
36 | #include <arch/boot/boot.h> |
37 | #include <arch/mm/memory_init.h> |
37 | #include <arch/mm/memory_init.h> |
38 | #include <arch/interrupt.h> |
38 | #include <arch/interrupt.h> |
39 | #include <genarch/fb/fb.h> |
39 | #include <genarch/fb/fb.h> |
- | 40 | #include <genarch/fb/visuals.h> |
|
40 | #include <userspace.h> |
41 | #include <userspace.h> |
41 | #include <proc/uarg.h> |
42 | #include <proc/uarg.h> |
42 | #include <console/console.h> |
43 | #include <console/console.h> |
43 | 44 | ||
44 | bootinfo_t bootinfo; |
45 | bootinfo_t bootinfo; |
Line 66... | Line 67... | ||
66 | } |
67 | } |
67 | 68 | ||
68 | void arch_post_mm_init(void) |
69 | void arch_post_mm_init(void) |
69 | { |
70 | { |
70 | if (config.cpu_active == 1) { |
71 | if (config.cpu_active == 1) { |
- | 72 | /* Initialize framebuffer */ |
|
- | 73 | unsigned int visual; |
|
- | 74 | ||
- | 75 | switch (bootinfo.screen.bpp) { |
|
- | 76 | case 8: |
|
- | 77 | visual = VISUAL_INDIRECT_8; |
|
- | 78 | break; |
|
- | 79 | case 16: |
|
- | 80 | visual = VISUAL_RGB_5_5_5; |
|
- | 81 | break; |
|
- | 82 | case 24: |
|
- | 83 | visual = VISUAL_RGB_8_8_8; |
|
- | 84 | break; |
|
- | 85 | case 32: |
|
- | 86 | visual = VISUAL_RGB_0_8_8_8; |
|
- | 87 | break; |
|
- | 88 | default: |
|
- | 89 | panic("Unsupported bits per pixel"); |
|
- | 90 | } |
|
71 | fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false); |
91 | fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual); |
- | 92 | ||
72 | 93 | ||
73 | /* Merge all zones to 1 big zone */ |
94 | /* Merge all zones to 1 big zone */ |
74 | zone_merge_all(); |
95 | zone_merge_all(); |
75 | } |
96 | } |
76 | } |
97 | } |