Rev 294 | Rev 300 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 294 | Rev 298 | ||
---|---|---|---|
Line 141... | Line 141... | ||
141 | if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor)))) |
141 | if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor)))) |
142 | panic("couldn't allocate memory for GDT\n"); |
142 | panic("couldn't allocate memory for GDT\n"); |
143 | 143 | ||
144 | memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor)); |
144 | memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor)); |
145 | memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0); |
145 | memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0); |
146 | real_bootstrap_gdtr.base = KA2PA((__address) gdt_new); |
146 | ((struct ptr_16_32 *) PA2KA((__address) &real_bootstrap_gdtr))->base = KA2PA((__address) gdt_new); |
147 | gdtr.base = (__address) gdt_new; |
147 | gdtr.base = (__address) gdt_new; |
148 | 148 | ||
149 | if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) { |
149 | if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) { |
150 | /* |
150 | /* |
151 | * There may be just one AP being initialized at |
151 | * There may be just one AP being initialized at |
152 | * the time. After it comes completely up, it is |
152 | * the time. After it comes completely up, it is |
153 | * supposed to wake us up. |
153 | * supposed to wake us up. |
154 | */ |
154 | */ |
155 | if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_BLOCKING) == ESYNCH_TIMEOUT) |
155 | if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_BLOCKING) == ESYNCH_TIMEOUT) |
156 | printf("%s: waiting for cpu%d (APIC ID = %d) timed out\n", __FUNCTION__, config.cpu_active > i ? config.cpu_active : i, ops->cpu_apic_id(i)); |
156 | printf("%s: waiting for cpu%d (APIC ID = %d) timed out\n", __FUNCTION__, config.cpu_active > i ? config.cpu_active : i, ops->cpu_apic_id(i)); |
157 | } |
- | |
158 | else { |
157 | } else |
159 | printf("INIT IPI for l_apic%d failed\n", ops->cpu_apic_id(i)); |
158 | printf("INIT IPI for l_apic%d failed\n", ops->cpu_apic_id(i)); |
160 | } |
159 | } |
161 | } |
- | |
162 | 160 | ||
163 | /* |
161 | /* |
164 | * Wakeup the kinit thread so that |
162 | * Wakeup the kinit thread so that |
165 | * system initialization can go on. |
163 | * system initialization can go on. |
166 | */ |
164 | */ |