Changeset 149d14e5 in mainline for kernel/arch/ia32/src/pm.c


Ignore:
Timestamp:
2009-04-06T16:18:41Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
Children:
13a638d
Parents:
415d272
Message:

ia32, amd64: do not reboot via a triple fault (which is nasty), but use the i8042 controller to trigger CPU reset

File:
1 edited

Legend:

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

    r415d272 r149d14e5  
    233233}
    234234
    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 
    258235/** @}
    259236 */
Note: See TracChangeset for help on using the changeset viewer.