Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ddi/irq.h

    r9cdac5a rc0699467  
    3333 */
    3434
    35 #ifndef KERN_IRQ_H_
    36 #define KERN_IRQ_H_
    37 
    38 #ifdef KERNEL
     35#ifndef KERN_DDI_IRQ_H_
     36#define KERN_DDI_IRQ_H_
    3937
    4038#include <typedefs.h>
     39#include <abi/ddi/irq.h>
    4140#include <adt/list.h>
    4241#include <adt/hash_table.h>
     
    4443#include <proc/task.h>
    4544#include <ipc/ipc.h>
    46 
    47 #endif /* KERNEL */
    48 
    49 typedef enum {
    50         /** Read 1 byte from the I/O space. */
    51         CMD_PIO_READ_8 = 1,
    52         /** Read 2 bytes from the I/O space. */
    53         CMD_PIO_READ_16,
    54         /** Read 4 bytes from the I/O space. */
    55         CMD_PIO_READ_32,
    56        
    57         /** Write 1 byte to the I/O space. */
    58         CMD_PIO_WRITE_8,
    59         /** Write 2 bytes to the I/O space. */
    60         CMD_PIO_WRITE_16,
    61         /** Write 4 bytes to the I/O space. */
    62         CMD_PIO_WRITE_32,
    63        
    64         /**
    65          * Write 1 byte from the source argument
    66          * to the I/O space.
    67          */
    68         CMD_PIO_WRITE_A_8,
    69         /**
    70          * Write 2 bytes from the source argument
    71          * to the I/O space.
    72          */
    73         CMD_PIO_WRITE_A_16,
    74         /**
    75          * Write 4 bytes from the source argument
    76          * to the I/O space.
    77          */
    78         CMD_PIO_WRITE_A_32,
    79        
    80         /**
    81          * Perform a bit masking on the source argument
    82          * and store the result into the destination argument.
    83          */
    84         CMD_BTEST,
    85        
    86         /**
    87          * Predicate the execution of the following
    88          * N commands by the boolean value of the source
    89          * argument.
    90          */
    91         CMD_PREDICATE,
    92        
    93         /** Accept the interrupt. */
    94         CMD_ACCEPT,
    95        
    96         /** Decline the interrupt. */
    97         CMD_DECLINE,
    98         CMD_LAST
    99 } irq_cmd_type;
    100 
    101 typedef struct {
    102         irq_cmd_type cmd;
    103         void *addr;
    104         uint32_t value;
    105         uintptr_t srcarg;
    106         uintptr_t dstarg;
    107 } irq_cmd_t;
    108 
    109 typedef struct {
    110         size_t cmdcount;
    111         irq_cmd_t *cmds;
    112 } irq_code_t;
    113 
    114 #ifdef KERNEL
    11545
    11646typedef enum {
     
    12555
    12656struct irq;
     57
    12758typedef void (* irq_handler_t)(struct irq *);
    12859
     
    203134        /** Notification configuration structure. */
    204135        ipc_notif_cfg_t notif_cfg;
     136       
     137        as_t *driver_as;
    205138} irq_t;
    206139
     
    215148extern irq_t *irq_dispatch_and_lock(inr_t);
    216149
    217 #endif /* KERNEL */
    218 
    219150#endif
    220151
Note: See TracChangeset for help on using the changeset viewer.