Changeset c7c0b89b in mainline for arch/mips32


Ignore:
Timestamp:
2006-04-22T18:05:16Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
613bc54
Parents:
68091bd
Message:

Added uspace call to enable/disable interrupts.

Location:
arch/mips32/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/ddi/ddi.c

    r68091bd rc7c0b89b  
    3131#include <arch/types.h>
    3232#include <typedefs.h>
     33#include <security/cap.h>
     34#include <arch.h>
     35#include <arch/cp0.h>
    3336
    3437/** Enable I/O space range for task.
     
    4649        return 0;
    4750}
     51
     52/** Enable/disable interrupts form syscall
     53 *
     54 * @param enable If non-zero, interrupts are enabled, otherwise disabled
     55 * @param flags CP0 flags register
     56 */
     57__native ddi_int_control_arch(__native enable, __native *flags)
     58{
     59        if (enable)
     60                *flags |= cp0_status_ie_enabled_bit;
     61        else
     62                *flags &= ~cp0_status_ie_enabled_bit;
     63        return 0;
     64}
  • arch/mips32/src/start.S

    r68091bd rc7c0b89b  
    252252        mtc0 $t0, $status
    253253
     254        li $t4, 2                   # SYS_INT_CONTROL
     255        beq $t4, $v0, sysc_int_control
     256        nop
     257       
    254258        # CALL Syscall handler
    255259        jal syscall_handler
    256260        sw $v0, SS_ARG4($sp)        # save v0 - arg4 to stack
    257261
     262sysc_exit:     
    258263        # restore status
    259264        mfc0 $t0, $status
     
    276281        eret
    277282       
     283sysc_int_control:
     284        jal ddi_int_control
     285        addi $a1, $sp, SS_STATUS
     286       
     287        j sysc_exit
     288        nop
     289       
    278290tlb_refill_handler:
    279291        KERNEL_STACK_TO_K0
Note: See TracChangeset for help on using the changeset viewer.