Changeset f74bbaf in mainline for kernel/arch/amd64/src/pm.c


Ignore:
Timestamp:
2007-04-09T06:13:24Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d0b1443
Parents:
261595b
Message:

start shutdown infrastructure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/pm.c

    r261595b rf74bbaf  
    3434 */
    3535
     36#include <arch.h>
    3637#include <arch/pm.h>
    3738#include <arch/asm.h>
     
    228229}
    229230
     231/* Reboot the machine by initiating
     232 * a triple fault
     233 */
     234void 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                "hlt\n"
     246        );
     247}
     248
    230249/** @}
    231250 */
Note: See TracChangeset for help on using the changeset viewer.