Changeset cecb0789 in mainline for kernel/generic/include/ddi/irq.h


Ignore:
Timestamp:
2009-02-21T17:27:59Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9688513
Parents:
0cb9fa0
Message:

This is the evil commit. In particular, it does:

  • introduces more powerful pseudo code for userspace IRQ top-half handlers
  • changes the internals of IRQ dispatching
  • simplifies the kernel's i8042 driver
  • adapts the uspace i8042 driver to make use of the new pseudocode
  • breaks all other architectures except ia32
  • breaks almost all existing drivers
  • breaks switching between uspace and kernel drivers
File:
1 edited

Legend:

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

    r0cb9fa0 rcecb0789  
    3737
    3838typedef enum {
    39         CMD_MEM_READ_1 = 0,
    40         CMD_MEM_READ_2,
    41         CMD_MEM_READ_4,
    42         CMD_MEM_READ_8,
    43         CMD_MEM_WRITE_1,
    44         CMD_MEM_WRITE_2,
    45         CMD_MEM_WRITE_4,
    46         CMD_MEM_WRITE_8,
    47         CMD_PORT_READ_1,
    48         CMD_PORT_WRITE_1,
     39        CMD_PIO_READ_8 = 1,
     40        CMD_PIO_READ_16,
     41        CMD_PIO_READ_32,
     42        CMD_PIO_WRITE_8,
     43        CMD_PIO_WRITE_16,
     44        CMD_PIO_WRITE_32,
     45        CMD_BTEST,
     46        CMD_PREDICATE,
     47        CMD_ACCEPT,
     48        CMD_DECLINE,
    4949        CMD_LAST
    5050} irq_cmd_type;
     
    5353        irq_cmd_type cmd;
    5454        void *addr;
    55         unsigned long long value;
    56         int dstarg;
     55        unsigned long long value;
     56        unsigned int srcarg;
     57        unsigned int dstarg;
    5758} irq_cmd_t;
    5859
     
    6667#include <arch/types.h>
    6768#include <adt/list.h>
     69#include <adt/hash_table.h>
    6870#include <synch/spinlock.h>
    6971#include <proc/task.h>
     72#include <ipc/ipc.h>
    7073
    7174typedef enum {
     
    97100        /** Method to be used for the notification. */
    98101        unative_t method;
     102        /** Arguments that will be sent if the IRQ is claimed. */
     103        unative_t scratch[IPC_CALL_LEN];
    99104        /** Top-half pseudocode. */
    100105        irq_code_t *code;
     
    155160} irq_t;
    156161
     162SPINLOCK_EXTERN(irq_uspace_hash_table_lock);
     163extern hash_table_t irq_uspace_hash_table;
     164
    157165extern void irq_init(count_t, count_t);
    158166extern void irq_initialize(irq_t *);
    159167extern void irq_register(irq_t *);
    160168extern irq_t *irq_dispatch_and_lock(inr_t);
    161 extern irq_t *irq_find_and_lock(inr_t, devno_t);
    162169
    163170#endif
Note: See TracChangeset for help on using the changeset viewer.