#include <arch/m68k/arch_cpu.h>
#include <asm_defs.h>
.text
FUNCTION(reboot):
reset
rts
FUNCTION_END(reboot)
FUNCTION(arch_int_enable_interrupts):
andi #0xf8ff,%sr
rts
FUNCTION_END(arch_int_enable_interrupts)
FUNCTION(arch_int_disable_interrupts):
clr.l %d0
move %sr,%d0
move.l %d0,%d1
ori.w #0x0700,%d1
move %d1,%sr
lsr.l #8,%d0
andi.l #7,%d0
rts
FUNCTION_END(arch_int_disable_interrupts)
FUNCTION(arch_int_restore_interrupts):
move.l (4,%a7),%d0
andi.w #7,%d0
lsl.w #8,%d0
move %sr,%d1
andi.w #0xf8ff,%d1
or.w %d0,%d1
move %d1,%sr
rts
FUNCTION_END(arch_int_restore_interrupts)
FUNCTION(arch_int_are_interrupts_enabled):
clr.l %d0
move %sr,%d1
andi.w #0x0700,%d1
bne arch_int_are_interrupts_enabled_no
moveq.l #1,%d0
arch_int_are_interrupts_enabled_no:
rts
FUNCTION_END(arch_int_are_interrupts_enabled)
FUNCTION(dbg_save_registers):
#warning M68K: implement dbx_save_registers!
rts
FUNCTION_END(dbg_save_registers)
FUNCTION(get_time_base):
#warning M68K: implement get_time_base!
clr.l %d0
clr.l %d1
rts
FUNCTION_END(get_time_base)
#warning M68K: FIX m68k_context_switch
FUNCTION(m68k_context_switch):
movem.l %d0-%d7/%a0-%a7,-(%sp)
fmovem %fp0-%fp7,-(%sp)
fsave -(%sp)
#warning M68K: use fixed size for fsave
frestore (%sp)+
fmovem (%sp)+,%fp0-%fp7
movem.l (%sp)+,%d0-%d7/%a0-%a7
rts
FUNCTION_END(m68k_context_switch)
FUNCTION(m68k_kernel_thread_root):
#warning M68K: check
move.l 4(%sp),%a0
jsr (%a0)
move.l 8(%sp),%a0
jsr (%a0)
move.l 12(%sp),%a0
jsr (%a0)
clr.l -(%sp)
jmp kernel_debugger
FUNCTION_END(m68k_kernel_thread_root)