Changeset c7c0b89b in mainline for arch/ia32


Ignore:
Timestamp:
2006-04-22T18:05:16Z (20 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/ia32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/cpu.h

    r68091bd rc7c0b89b  
    3434#include <arch/asm.h>
    3535
     36#define EFLAGS_IF       (1 << 9)
    3637#define EFLAGS_RF       (1 << 16)
    3738
  • arch/ia32/src/asm.S

    r68091bd rc7c0b89b  
    8787# and call exc_dispatch().
    8888#
    89 #define INTERRUPT_ALIGN 64
     89#define INTERRUPT_ALIGN 128
    9090.macro handler i n
    9191
     
    109109       
    110110        sti
     111        cmp $2, %edi           # Is this SYS_INT_CONTROL?
     112        je sys_int_ctrl
     113       
    111114        call syscall_handler   # syscall_handler(ax,cx,dx,si,di)
     115sysc_end:               
    112116        cli
    113117        addl $20, %esp         # clean-up of parameters
     
    120124        CLEAR_NT_FLAG
    121125        iret
     126sys_int_ctrl:               # Interrupt control
     127        mov %esp, %eax
     128        add $44, %eax
     129        mov %eax, 4(%esp)   # Pointer to flags - 2nd argument
     130        call ddi_int_control
     131        jmp sysc_end
    122132.else   
    123133        /*
  • arch/ia32/src/ddi/ddi.c

    r68091bd rc7c0b89b  
    3535#include <arch/pm.h>
    3636#include <errno.h>
     37#include <arch/cpu.h>
    3738
    3839/** Enable I/O space range for task.
     
    9192        return 0;
    9293}
     94
     95/** Enable/disable interrupts form syscall
     96 *
     97 * @param enable If non-zero, interrupts are enabled, otherwise disabled
     98 * @param flags CP0 flags register
     99 */
     100__native ddi_int_control_arch(__native enable, __native *flags)
     101{
     102        if (enable)
     103                *flags |= EFLAGS_IF;
     104        else
     105                *flags &= ~EFLAGS_IF;
     106        return 0;
     107}
Note: See TracChangeset for help on using the changeset viewer.