Rev 72 | Rev 113 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 72 | Rev 110 | ||
---|---|---|---|
Line 156... | Line 156... | ||
156 | 156 | ||
157 | frame_not_free((__address) fs); |
157 | frame_not_free((__address) fs); |
158 | 158 | ||
159 | if (fs->config_type == 0 && fs->configuration_table) { |
159 | if (fs->config_type == 0 && fs->configuration_table) { |
160 | if (fs->mpfib2 >> 7) { |
160 | if (fs->mpfib2 >> 7) { |
161 | printf("mps_init: PIC mode not supported\n"); |
161 | printf("%s: PIC mode not supported\n", __FUNCTION__); |
162 | return; |
162 | return; |
163 | } |
163 | } |
164 | 164 | ||
165 | ct = fs->configuration_table; |
165 | ct = fs->configuration_table; |
166 | frame_not_free((__address) ct); |
166 | frame_not_free((__address) ct); |
Line 186... | Line 186... | ||
186 | { |
186 | { |
187 | __u8 *cur; |
187 | __u8 *cur; |
188 | int i, cnt; |
188 | int i, cnt; |
189 | 189 | ||
190 | if (ct->signature != CT_SIGNATURE) { |
190 | if (ct->signature != CT_SIGNATURE) { |
191 | printf("configure_via_ct: bad ct->signature\n"); |
191 | printf("%s: bad ct->signature\n", __FUNCTION__); |
192 | return 1; |
192 | return 1; |
193 | } |
193 | } |
194 | if (!mps_ct_check()) { |
194 | if (!mps_ct_check()) { |
195 | printf("configure_via_ct: bad ct checksum\n"); |
195 | printf("%s: bad ct checksum\n", __FUNCTION__); |
196 | return 1; |
196 | return 1; |
197 | } |
197 | } |
198 | if (ct->oem_table) { |
198 | if (ct->oem_table) { |
199 | printf("configure_via_ct: ct->oem_table not supported\n"); |
199 | printf("%s: ct->oem_table not supported\n", __FUNCTION__); |
200 | return 1; |
200 | return 1; |
201 | } |
201 | } |
202 | 202 | ||
203 | l_apic = ct->l_apic; |
203 | l_apic = ct->l_apic; |
204 | 204 | ||
Line 249... | Line 249... | ||
249 | default: |
249 | default: |
250 | /* |
250 | /* |
251 | * Something is wrong. Fallback to UP mode. |
251 | * Something is wrong. Fallback to UP mode. |
252 | */ |
252 | */ |
253 | 253 | ||
254 | printf("configure_via_ct: ct badness\n"); |
254 | printf("%s: ct badness\n", __FUNCTION__); |
255 | return 1; |
255 | return 1; |
256 | } |
256 | } |
257 | } |
257 | } |
258 | 258 | ||
259 | /* |
259 | /* |
Line 266... | Line 266... | ||
266 | int configure_via_default(__u8 n) |
266 | int configure_via_default(__u8 n) |
267 | { |
267 | { |
268 | /* |
268 | /* |
269 | * Not yet implemented. |
269 | * Not yet implemented. |
270 | */ |
270 | */ |
271 | printf("configure_via_default: not supported\n"); |
271 | printf("%s: not supported\n", __FUNCTION__); |
272 | return 1; |
272 | return 1; |
273 | } |
273 | } |
274 | 274 | ||
275 | 275 | ||
276 | int ct_processor_entry(struct __processor_entry *pr) |
276 | int ct_processor_entry(struct __processor_entry *pr) |
Line 423... | Line 423... | ||
423 | 423 | ||
424 | /* |
424 | /* |
425 | * Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot() |
425 | * Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot() |
426 | */ |
426 | */ |
427 | *((__u16 *) (frame + 0x467+0)) = ((__address) ap_boot) >> 4; /* segment */ |
427 | *((__u16 *) (frame + 0x467+0)) = ((__address) ap_boot) >> 4; /* segment */ |
428 | *((__u16 *) (frame + 0x467+2)) = 0x0; /* offset */ |
428 | *((__u16 *) (frame + 0x467+2)) = 0; /* offset */ |
429 | 429 | ||
430 | /* |
430 | /* |
431 | * Give back the borrowed frame and restore identity mapping for it. |
431 | * Give back and unmap the borrowed frame. |
432 | */ |
432 | */ |
433 | map_page_to_frame(frame,frame,PAGE_CACHEABLE,0); |
433 | map_page_to_frame(frame,0,PAGE_NOT_PRESENT,0); |
434 | frame_free(frame); |
434 | frame_free(frame); |
435 | 435 | ||
436 | /* |
436 | /* |
437 | * Save 0xa to address 0xf of the CMOS RAM. |
437 | * Save 0xa to address 0xf of the CMOS RAM. |
438 | * BIOS will not do the POST after the INIT signal. |
438 | * BIOS will not do the POST after the INIT signal. |
Line 470... | Line 470... | ||
470 | */ |
470 | */ |
471 | if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor)))) |
471 | if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor)))) |
472 | panic("couldn't allocate memory for GDT\n"); |
472 | panic("couldn't allocate memory for GDT\n"); |
473 | 473 | ||
474 | memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor)); |
474 | memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor)); |
475 | gdtr.base = (__address) gdt_new; |
475 | gdtr.base = KA2PA((__address) gdt_new); |
476 | 476 | ||
477 | if (l_apic_send_init_ipi(pr[i].l_apic_id)) { |
477 | if (l_apic_send_init_ipi(pr[i].l_apic_id)) { |
478 | /* |
478 | /* |
479 | * There may be just one AP being initialized at |
479 | * There may be just one AP being initialized at |
480 | * the time. After it comes completely up, it is |
480 | * the time. After it comes completely up, it is |