Rev 4346 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4346 | Rev 4348 | ||
---|---|---|---|
Line 228... | Line 228... | ||
228 | * to its own TSS. We just need to load the TR register. |
228 | * to its own TSS. We just need to load the TR register. |
229 | */ |
229 | */ |
230 | tr_load(gdtselector(TSS_DES)); |
230 | tr_load(gdtselector(TSS_DES)); |
231 | } |
231 | } |
232 | 232 | ||
233 | /* Reboot the machine by initiating |
- | |
234 | * a triple fault |
- | |
235 | */ |
- | |
236 | void arch_reboot(void) |
- | |
237 | { |
- | |
238 | preemption_disable(); |
- | |
239 | ipl_t ipl = interrupts_disable(); |
- | |
240 | - | ||
241 | memsetb(idt, sizeof(idt), 0); |
- | |
242 | idtr_load(&idtr); |
- | |
243 | - | ||
244 | interrupts_restore(ipl); |
- | |
245 | asm volatile ( |
- | |
246 | "int $0x03\n" |
- | |
247 | "cli\n" |
- | |
248 | "hlt\n" |
- | |
249 | ); |
- | |
250 | } |
- | |
251 | - | ||
252 | /** @} |
233 | /** @} |
253 | */ |
234 | */ |