Rev 3022 | Rev 4156 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3022 | Rev 4055 | ||
|---|---|---|---|
| Line 32... | Line 32... | ||
| 32 | /** @file |
32 | /** @file |
| 33 | * @brief ARM32 architecture specific functions. |
33 | * @brief ARM32 architecture specific functions. |
| 34 | */ |
34 | */ |
| 35 | 35 | ||
| 36 | #include <arch.h> |
36 | #include <arch.h> |
| 37 | #include <arch/boot.h> |
- | |
| 38 | #include <config.h> |
37 | #include <config.h> |
| 39 | #include <arch/console.h> |
38 | #include <arch/console.h> |
| 40 | #include <ddi/device.h> |
39 | #include <ddi/device.h> |
| 41 | #include <genarch/fb/fb.h> |
40 | #include <genarch/fb/fb.h> |
| 42 | #include <genarch/fb/visuals.h> |
41 | #include <genarch/fb/visuals.h> |
| Line 46... | Line 45... | ||
| 46 | #include <config.h> |
45 | #include <config.h> |
| 47 | #include <interrupt.h> |
46 | #include <interrupt.h> |
| 48 | #include <arch/regutils.h> |
47 | #include <arch/regutils.h> |
| 49 | #include <arch/machine.h> |
48 | #include <arch/machine.h> |
| 50 | #include <userspace.h> |
49 | #include <userspace.h> |
| - | 50 | #include <macros.h> |
|
| - | 51 | #include <string.h> |
|
| 51 | 52 | ||
| 52 | /** Information about loaded tasks. */ |
- | |
| 53 | bootinfo_t bootinfo; |
- | |
| 54 | - | ||
| 55 | /** Performs arm32 specific initialization before main_bsp() is called. */ |
53 | /** Performs arm32-specific initialization before main_bsp() is called. */ |
| 56 | void arch_pre_main(void) |
54 | void arch_pre_main(void *entry __attribute__((unused)), bootinfo_t *bootinfo) |
| 57 | { |
55 | { |
| 58 | unsigned int i; |
56 | unsigned int i; |
| 59 | - | ||
| 60 | init.cnt = bootinfo.cnt; |
- | |
| 61 | - | ||
| 62 | for (i = 0; i < bootinfo.cnt; ++i) { |
- | |
| 63 | init.tasks[i].addr = bootinfo.tasks[i].addr; |
- | |
| 64 | init.tasks[i].size = bootinfo.tasks[i].size; |
- | |
| 65 | } |
- | |
| 66 | 57 | ||
| - | 58 | init.cnt = bootinfo->cnt; |
|
| - | 59 | ||
| - | 60 | for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); ++i) { |
|
| - | 61 | init.tasks[i].addr = bootinfo->tasks[i].addr; |
|
| - | 62 | init.tasks[i].size = bootinfo->tasks[i].size; |
|
| - | 63 | strncpy(init.tasks[i].name, bootinfo->tasks[i].name, |
|
| - | 64 | CONFIG_TASK_NAME_BUFLEN); |
|
| - | 65 | } |
|
| 67 | } |
66 | } |
| 68 | 67 | ||
| 69 | /** Performs arm32 specific initialization before mm is initialized. */ |
68 | /** Performs arm32 specific initialization before mm is initialized. */ |
| 70 | void arch_pre_mm_init(void) |
69 | void arch_pre_mm_init(void) |
| 71 | { |
70 | { |
| Line 81... | Line 80... | ||
| 81 | /* Initialize exception dispatch table */ |
80 | /* Initialize exception dispatch table */ |
| 82 | exception_init(); |
81 | exception_init(); |
| 83 | 82 | ||
| 84 | interrupt_init(); |
83 | interrupt_init(); |
| 85 | 84 | ||
| 86 | console_init(device_assign_devno()); |
85 | machine_console_init(device_assign_devno()); |
| 87 | 86 | ||
| 88 | #ifdef CONFIG_FB |
87 | #ifdef CONFIG_FB |
| - | 88 | fb_properties_t prop = { |
|
| 89 | fb_init(machine_get_fb_address(), 640, 480, 1920, VISUAL_RGB_8_8_8); |
89 | .addr = machine_get_fb_address(), |
| - | 90 | .offset = 0, |
|
| - | 91 | .x = 640, |
|
| - | 92 | .y = 480, |
|
| - | 93 | .scan = 1920, |
|
| - | 94 | .visual = VISUAL_BGR_8_8_8, |
|
| - | 95 | }; |
|
| - | 96 | fb_init(&prop); |
|
| 90 | #endif |
97 | #endif |
| 91 | } |
98 | } |
| 92 | 99 | ||
| 93 | /** Performs arm32 specific tasks needed after cpu is initialized. |
100 | /** Performs arm32 specific tasks needed after cpu is initialized. |
| 94 | * |
101 | * |
| Line 154... | Line 161... | ||
| 154 | 161 | ||
| 155 | /** Reboot. */ |
162 | /** Reboot. */ |
| 156 | void arch_reboot() |
163 | void arch_reboot() |
| 157 | { |
164 | { |
| 158 | /* not implemented */ |
165 | /* not implemented */ |
| 159 | for (;;) |
166 | while (1); |
| - | 167 | } |
|
| - | 168 | ||
| - | 169 | /** Construct function pointer |
|
| - | 170 | * |
|
| - | 171 | * @param fptr function pointer structure |
|
| - | 172 | * @param addr function address |
|
| - | 173 | * @param caller calling function address |
|
| - | 174 | * |
|
| - | 175 | * @return address of the function pointer |
|
| - | 176 | * |
|
| 160 | ; |
177 | */ |
| - | 178 | void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
|
| - | 179 | { |
|
| - | 180 | return addr; |
|
| 161 | } |
181 | } |
| 162 | 182 | ||
| 163 | /** @} |
183 | /** @} |
| 164 | */ |
184 | */ |