Rev 3748 | Rev 3783 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3748 | Rev 3770 | ||
|---|---|---|---|
| Line 54... | Line 54... | ||
| 54 | bootinfo_t bootinfo; |
54 | bootinfo_t bootinfo; |
| 55 | 55 | ||
| 56 | /** Perform sparc64 specific initialization before main_bsp() is called. */ |
56 | /** Perform sparc64 specific initialization before main_bsp() is called. */ |
| 57 | void arch_pre_main(void) |
57 | void arch_pre_main(void) |
| 58 | { |
58 | { |
| 59 | /* |
- | |
| 60 | * Initialize Niagara input/output driver. |
- | |
| 61 | * This will be moved to arch_post_mm_init when the memory management |
- | |
| 62 | * is finished for sun4v. |
- | |
| 63 | */ |
- | |
| 64 | niagara_init(); |
- | |
| 65 | - | ||
| 66 | /* Copy init task info. */ |
59 | /* Copy init task info. */ |
| 67 | init.cnt = bootinfo.taskmap.count; |
60 | init.cnt = bootinfo.taskmap.count; |
| 68 | 61 | ||
| 69 | uint32_t i; |
62 | uint32_t i; |
| 70 | 63 | ||
| 71 | for (i = 0; i < bootinfo.taskmap.count; i++) { |
64 | for (i = 0; i < bootinfo.taskmap.count; i++) { |
| 72 | init.tasks[i].addr = (uintptr_t) bootinfo.taskmap.tasks[i].addr; |
65 | init.tasks[i].addr = (uintptr_t) bootinfo.taskmap.tasks[i].addr; |
| 73 | init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
66 | init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
| - | 67 | printf("Task %d starts at %x and its size id %d.\n", i, init.tasks[i].addr, init.tasks[i].size); |
|
| 74 | } |
68 | } |
| 75 | - | ||
| 76 | /* Copy boot allocations info. */ |
- | |
| 77 | ballocs.base = bootinfo.ballocs.base; |
- | |
| 78 | ballocs.size = bootinfo.ballocs.size; |
- | |
| 79 | 69 | ||
| 80 | ofw_tree_init(bootinfo.ofw_root); |
70 | // md_init(); |
| 81 | } |
71 | } |
| 82 | 72 | ||
| 83 | /** Perform sparc64 specific initialization before mm is initialized. */ |
73 | /** Perform sparc64 specific initialization before mm is initialized. */ |
| 84 | void arch_pre_mm_init(void) |
74 | void arch_pre_mm_init(void) |
| 85 | { |
75 | { |
| Line 94... | Line 84... | ||
| 94 | /* |
84 | /* |
| 95 | * We have 2^11 different interrupt vectors. |
85 | * We have 2^11 different interrupt vectors. |
| 96 | * But we only create 128 buckets. |
86 | * But we only create 128 buckets. |
| 97 | */ |
87 | */ |
| 98 | irq_init(1 << 11, 128); |
88 | irq_init(1 << 11, 128); |
| 99 | - | ||
| 100 | standalone_sparc64_console_init(); |
- | |
| 101 | } |
89 | } |
| - | 90 | ||
| - | 91 | /* |
|
| - | 92 | * Initialize Niagara input/output driver. |
|
| - | 93 | */ |
|
| - | 94 | niagara_init(); |
|
| 102 | } |
95 | } |
| 103 | 96 | ||
| 104 | void arch_post_cpu_init(void) |
97 | void arch_post_cpu_init(void) |
| 105 | { |
98 | { |
| 106 | } |
99 | } |