Rev 4156 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4156 | Rev 4296 | ||
---|---|---|---|
Line 230... | Line 230... | ||
230 | gdt_setbase(&gdt_p[TLS_DES], tls); |
230 | gdt_setbase(&gdt_p[TLS_DES], tls); |
231 | /* Reload gdt register to update GS in CPU */ |
231 | /* Reload gdt register to update GS in CPU */ |
232 | gdtr_load(&cpugdtr); |
232 | gdtr_load(&cpugdtr); |
233 | } |
233 | } |
234 | 234 | ||
235 | /* Reboot the machine by initiating |
- | |
236 | * a triple fault |
- | |
237 | */ |
- | |
238 | void arch_reboot(void) |
- | |
239 | { |
- | |
240 | preemption_disable(); |
- | |
241 | ipl_t ipl = interrupts_disable(); |
- | |
242 | - | ||
243 | memsetb(idt, sizeof(idt), 0); |
- | |
244 | - | ||
245 | ptr_16_32_t idtr; |
- | |
246 | idtr.limit = sizeof(idt); |
- | |
247 | idtr.base = (uintptr_t) idt; |
- | |
248 | idtr_load(&idtr); |
- | |
249 | - | ||
250 | interrupts_restore(ipl); |
- | |
251 | asm volatile ( |
- | |
252 | "int $0x03\n" |
- | |
253 | "cli\n" |
- | |
254 | "hlt\n" |
- | |
255 | ); |
- | |
256 | } |
- | |
257 | - | ||
258 | /** @} |
235 | /** @} |
259 | */ |
236 | */ |