Subversion Repositories HelenOS

Rev

Rev 2131 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2131 Rev 2307
Line 31... Line 31...
31
 * @{
31
 * @{
32
 */
32
 */
33
/** @file
33
/** @file
34
 */
34
 */
35
 
35
 
-
 
36
#include <arch.h>
36
#include <arch/pm.h>
37
#include <arch/pm.h>
37
#include <arch/asm.h>
38
#include <arch/asm.h>
38
#include <mm/as.h>
39
#include <mm/as.h>
39
#include <mm/frame.h>
40
#include <mm/frame.h>
40
#include <memstr.h>
41
#include <memstr.h>
Line 225... Line 226...
225
     * to its own TSS. We just need to load the TR register.
226
     * to its own TSS. We just need to load the TR register.
226
     */
227
     */
227
    tr_load(gdtselector(TSS_DES));
228
    tr_load(gdtselector(TSS_DES));
228
}
229
}
229
 
230
 
-
 
231
/* Reboot the machine by initiating
-
 
232
 * a triple fault
-
 
233
 */
-
 
234
void arch_reboot(void)
-
 
235
{
-
 
236
    preemption_disable();
-
 
237
    ipl_t ipl = interrupts_disable();
-
 
238
   
-
 
239
    memsetb((uintptr_t) idt, sizeof(idt), 0);
-
 
240
    idtr_load(&idtr);
-
 
241
   
-
 
242
    interrupts_restore(ipl);
-
 
243
    asm volatile (
-
 
244
        "int $0x03\n"
-
 
245
        "cli\n"
-
 
246
        "hlt\n"
-
 
247
    );
-
 
248
}
-
 
249
 
230
/** @}
250
/** @}
231
 */
251
 */