io.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. enum {
  10. IrqTIMER = 5,
  11. };
  12. typedef struct Vkey {
  13. int tbdf; /* pci: ioapic or msi sources */
  14. int irq; /* 8259-emulating sources */
  15. } Vkey;
  16. typedef struct Vctl {
  17. Vctl* next; /* handlers on this vector */
  18. int isintr; /* interrupt or fault/trap */
  19. Vkey Vkey; /* source-specific key; tbdf for pci */
  20. void (*f)(Ureg*, void*); /* handler to call */
  21. void* a; /* argument to call it with */
  22. char name[KNAMELEN]; /* of driver */
  23. char *type;
  24. int (*isr)(int); /* get isr bit for this irq */
  25. int (*eoi)(int); /* eoi */
  26. int (*mask)(Vkey*, int); /* interrupt enable returns masked vector */
  27. int vno;
  28. } Vctl;
  29. typedef struct ACVctl {
  30. char* (*f)(Ureg*,void*);
  31. void* a;
  32. int vno;
  33. char name[KNAMELEN]; /* of driver */
  34. } ACVctl;
  35. enum {
  36. BusCBUS = 0, /* Corollary CBUS */
  37. BusCBUSII, /* Corollary CBUS II */
  38. BusEISA, /* Extended ISA */
  39. BusFUTURE, /* IEEE Futurebus */
  40. BusINTERN, /* Internal bus */
  41. BusISA, /* Industry Standard Architecture */
  42. BusMBI, /* Multibus I */
  43. BusMBII, /* Multibus II */
  44. BusMCA, /* Micro Channel Architecture */
  45. BusMPI, /* MPI */
  46. BusMPSA, /* MPSA */
  47. BusNUBUS, /* Apple Macintosh NuBus */
  48. BusPCI, /* Peripheral Component Interconnect */
  49. BusPCMCIA, /* PC Memory Card International Association */
  50. BusTC, /* DEC TurboChannel */
  51. BusVL, /* VESA Local bus */
  52. BusVME, /* VMEbus */
  53. BusXPRESS, /* Express System Bus */
  54. };