Rev 1062 | Rev 1109 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1062 | Rev 1063 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | #include <arch/arch.h> |
53 | #include <arch/arch.h> |
54 | #include <arch.h> |
54 | #include <arch.h> |
55 | #include <arch/faddr.h> |
55 | #include <arch/faddr.h> |
56 | #include <typedefs.h> |
56 | #include <typedefs.h> |
57 | #include <ipc/ipc.h> |
57 | #include <ipc/ipc.h> |
- | 58 | #include <macros.h> |
|
58 | 59 | ||
59 | #ifdef CONFIG_SMP |
60 | #ifdef CONFIG_SMP |
60 | #include <arch/smp/apic.h> |
61 | #include <arch/smp/apic.h> |
61 | #include <arch/smp/mps.h> |
62 | #include <arch/smp/mps.h> |
62 | #endif /* CONFIG_SMP */ |
63 | #endif /* CONFIG_SMP */ |
Line 114... | Line 115... | ||
114 | 115 | ||
115 | /* Avoid placing kernel on top of init */ |
116 | /* Avoid placing kernel on top of init */ |
116 | count_t i; |
117 | count_t i; |
117 | bool overlap = false; |
118 | bool overlap = false; |
118 | for (i = 0; i < init.cnt; i++) |
119 | for (i = 0; i < init.cnt; i++) |
119 | if (overlaps(stackaddr, CONFIG_STACK_SIZE, init.tasks[i].addr, init.tasks[i].size)) { |
120 | if (PA_overlaps(stackaddr, CONFIG_STACK_SIZE, init.tasks[i].addr, init.tasks[i].size)) { |
120 | stackaddr = ALIGN_UP(init.tasks[i].addr + init.tasks[i].size, CONFIG_STACK_SIZE); |
121 | stackaddr = ALIGN_UP(init.tasks[i].addr + init.tasks[i].size, CONFIG_STACK_SIZE); |
121 | init.tasks[i].size = ALIGN_UP(init.tasks[i].size, CONFIG_STACK_SIZE) + CONFIG_STACK_SIZE; |
122 | init.tasks[i].size = ALIGN_UP(init.tasks[i].size, CONFIG_STACK_SIZE) + CONFIG_STACK_SIZE; |
122 | overlap = true; |
123 | overlap = true; |
123 | } |
124 | } |
124 | 125 |