/trunk/kernel/arch/mips32/src/mips32.c |
---|
178,11 → 178,5 |
return 0; |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ppc32/src/drivers/cuda.c |
---|
48,8 → 48,7 |
#define PACKET_ADB 0x00 |
#define PACKET_CUDA 0x01 |
#define CUDA_POWERDOWN 0x0a |
#define CUDA_RESET 0x11 |
#define CUDA_POWERDOWN 0x0a |
#define RS 0x200 |
#define B (0 * RS) |
192,6 → 191,9 |
}; |
void send_packet(const uint8_t kind, index_t count, ...); |
static void receive_packet(uint8_t *kind, index_t count, uint8_t data[]) |
{ |
cuda[B] = cuda[B] & ~TIP; |
314,7 → 316,7 |
} |
static void send_packet(const uint8_t kind, count_t count, ...) |
void send_packet(const uint8_t kind, index_t count, ...) |
{ |
index_t i; |
va_list va; |
339,17 → 341,13 |
void cpu_halt(void) { |
#ifdef CONFIG_POWEROFF |
send_packet(PACKET_CUDA, 1, CUDA_POWERDOWN); |
#endif |
asm volatile ( |
"b 0\n" |
); |
} |
void arch_reboot(void) { |
send_packet(PACKET_CUDA, 1, CUDA_RESET); |
asm volatile ( |
"b 0\n" |
); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ia32xen/src/ia32xen.c |
---|
211,11 → 211,5 |
{ |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/trunk/kernel/arch/amd64/src/pm.c |
---|
33,7 → 33,6 |
/** @file |
*/ |
#include <arch.h> |
#include <arch/pm.h> |
#include <arch/asm.h> |
#include <mm/as.h> |
228,23 → 227,5 |
tr_load(gdtselector(TSS_DES)); |
} |
/* Reboot the machine by initiating |
* a triple fault |
*/ |
void arch_reboot(void) |
{ |
preemption_disable(); |
ipl_t ipl = interrupts_disable(); |
memsetb((uintptr_t) idt, sizeof(idt), 0); |
idtr_load(&idtr); |
interrupts_restore(ipl); |
asm volatile ( |
"int $0x03\n" |
"hlt\n" |
); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ppc64/src/ppc64.c |
---|
128,7 → 128,6 |
void arch_grab_console(void) |
{ |
} |
/** Return console to userspace |
* |
*/ |
136,11 → 135,5 |
{ |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ia32/src/pm.c |
---|
121,7 → 121,7 |
void idt_init(void) |
{ |
idescriptor_t *d; |
unsigned int i; |
int i; |
for (i = 0; i < IDT_ITEMS; i++) { |
d = &idt[i]; |
230,27 → 230,5 |
gdtr_load(&cpugdtr); |
} |
/* Reboot the machine by initiating |
* a triple fault |
*/ |
void arch_reboot(void) |
{ |
preemption_disable(); |
ipl_t ipl = interrupts_disable(); |
memsetb((uintptr_t) idt, sizeof(idt), 0); |
ptr_16_32_t idtr; |
idtr.limit = sizeof(idt); |
idtr.base = (uintptr_t) idt; |
idtr_load(&idtr); |
interrupts_restore(ipl); |
asm volatile ( |
"int $0x03\n" |
"hlt\n" |
); |
} |
/** @} |
*/ |
/trunk/kernel/arch/sparc64/src/sparc64.c |
---|
155,11 → 155,5 |
/* not reached */ |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/trunk/kernel/arch/ia64/src/ia64.c |
---|
176,11 → 176,5 |
#endif |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |
/trunk/kernel/arch/arm32/src/arm32.c |
---|
82,11 → 82,5 |
/* TODO */ |
} |
void arch_reboot(void) |
{ |
// TODO |
while (1); |
} |
/** @} |
*/ |