Rev 3386 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3386 | Rev 4153 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | if (config.cpu_active == 1) { |
62 | if (config.cpu_active == 1) { |
63 | #endif /* CONFIG_SMP */ |
63 | #endif /* CONFIG_SMP */ |
64 | cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count, |
64 | cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count, |
65 | FRAME_ATOMIC); |
65 | FRAME_ATOMIC); |
66 | if (!cpus) |
66 | if (!cpus) |
67 | panic("malloc/cpus"); |
67 | panic("Cannot allocate CPU structures."); |
68 | 68 | ||
69 | /* initialize everything */ |
69 | /* initialize everything */ |
70 | memsetb(cpus, sizeof(cpu_t) * config.cpu_count, 0); |
70 | memsetb(cpus, sizeof(cpu_t) * config.cpu_count, 0); |
71 | 71 | ||
72 | for (i = 0; i < config.cpu_count; i++) { |
72 | for (i = 0; i < config.cpu_count; i++) { |
Line 84... | Line 84... | ||
84 | 84 | ||
85 | #ifdef CONFIG_SMP |
85 | #ifdef CONFIG_SMP |
86 | } |
86 | } |
87 | #endif /* CONFIG_SMP */ |
87 | #endif /* CONFIG_SMP */ |
88 | 88 | ||
89 | CPU = &cpus[config.cpu_active-1]; |
89 | CPU = &cpus[config.cpu_active - 1]; |
90 | 90 | ||
91 | CPU->active = 1; |
91 | CPU->active = 1; |
92 | CPU->tlb_active = 1; |
92 | CPU->tlb_active = 1; |
93 | 93 | ||
94 | cpu_identify(); |
94 | cpu_identify(); |