Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1211 → Rev 1212

//kernel/trunk/arch/mips32/src/start.S
251,10 → 251,15
sw $t2,SS_STATUS($sp)
mtc0 $t0, $status
 
li $t4, 2 # SYS_INT_CONTROL
beq $t4, $v0, sysc_int_control
nop
# CALL Syscall handler
jal syscall_handler
sw $v0, SS_ARG4($sp) # save v0 - arg4 to stack
 
sysc_exit:
# restore status
mfc0 $t0, $status
lw $t1,SS_STATUS($sp)
275,6 → 280,13
eret
sysc_int_control:
jal ddi_int_control
addi $a1, $sp, SS_STATUS
j sysc_exit
nop
tlb_refill_handler:
KERNEL_STACK_TO_K0
sub $k0, REGISTER_SPACE
//kernel/trunk/arch/mips32/src/ddi/ddi.c
30,6 → 30,9
#include <proc/task.h>
#include <arch/types.h>
#include <typedefs.h>
#include <security/cap.h>
#include <arch.h>
#include <arch/cp0.h>
 
/** Enable I/O space range for task.
*
45,3 → 48,17
{
return 0;
}
 
/** Enable/disable interrupts form syscall
*
* @param enable If non-zero, interrupts are enabled, otherwise disabled
* @param flags CP0 flags register
*/
__native ddi_int_control_arch(__native enable, __native *flags)
{
if (enable)
*flags |= cp0_status_ie_enabled_bit;
else
*flags &= ~cp0_status_ie_enabled_bit;
return 0;
}