|
|
1.1 ! root 1: {\rtf0\ansi{\fonttbl\f0\fmodern Ohlfs;\f1\fswiss Helvetica;} ! 2: \paperw13040 ! 3: \paperh10200 ! 4: \margl120 ! 5: \margr120 ! 6: {\colortbl\red0\green0\blue0;} ! 7: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\f0\b0\i0\ul0\fs24 Here's a proposal for an interface between the NRW DMA module (which I'm writing) and the interrupt module. Note that there is no access checking a la dev_port or the device_master port; these functions are only used by the kernel's DMA module. \ ! 8: \ ! 9: ! 10: \pard\tx1040\tx2100\tx3160\tx4220\tx5280\tx6320\tx7380\tx8440\tx9500\tx10560\f1 ! 11: \b kern_return_t ! 12: \b0 \ ! 13: ! 14: \b kern_intr_map(\ ! 15: dev_num_t * ! 16: \b0 global_dev_num, ! 17: \b \ ! 18: kern_port_t ! 19: \b0 intr_port ! 20: \b );\ ! 21: ! 22: \b0 \ ! 23: ! 24: \b kern_intr_map ! 25: \b0\i ! 26: \i0 causes interrupts detected for device global_dev_num to be \ ! 27: dispatched to ! 28: \i intr_port ! 29: \i0 .\ ! 30: ! 31: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520 \ ! 32: ! 33: \pard\tx1040\tx2100\tx3160\tx4220\tx5280\tx6320\tx7380\tx8440\tx9500\tx10560 ! 34: \b kern_return_t ! 35: \b0 \ ! 36: ! 37: \b kern_intr_unmap(\ ! 38: ! 39: \b0\i ! 40: \b\i0 dev_num_t ! 41: \b0\i ! 42: \i0 global_dev_num ! 43: \b );\ ! 44: ! 45: \b0 \ ! 46: ! 47: \b kern_intr_unmap ! 48: \b0\i ! 49: \i0 causes the interrupt-to-port mapping established in \ ! 50: kern_intr_map() to be deleted.\ ! 51: \ ! 52: Returns ! 53: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 KERN_NO_ACCESS ! 54: \pard\tx1040\tx2100\tx3160\tx4220\tx5280\tx6320\tx7380\tx8440\tx9500\tx10560\fc0 if ! 55: \i global_dev_num ! 56: \i0 currently has no valid mapping,\ ! 57: else returns KERN_SUCCESS. \ ! 58: ! 59: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520 \ ! 60: ! 61: \pard\tx1040\tx2100\tx3160\tx4220\tx5280\tx6320\tx7380\tx8440\tx9500\tx10560 ! 62: \b kern_return_t ! 63: \b0 \ ! 64: ! 65: \b kern_intr_enable(\ ! 66: ! 67: \b0\i ! 68: \b\i0 dev_num_t ! 69: \b0\i ! 70: \i0 global_dev_num ! 71: \b );\ ! 72: ! 73: \b0 \ ! 74: ! 75: \b kern_intr_enable ! 76: \b0\i ! 77: \i0 causes interrupts from ! 78: \i global_dev_num ! 79: \i0 to be enabled. To\ ! 80: enable interrupts for a given global_dev_num, the device's bit in IACTIVE must be\ ! 81: cleared. <What about the device's bit in the two IACCEPT registers?>\ ! 82: \ ! 83: Returns ! 84: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 KERN_NO_ACCESS ! 85: \pard\tx1040\tx2100\tx3160\tx4220\tx5280\tx6320\tx7380\tx8440\tx9500\tx10560\fc0 if ! 86: \i global_dev_num ! 87: \i0 currently has no valid mapping,\ ! 88: else returns KERN_SUCCESS. \ ! 89: \ ! 90: ! 91: \b kern_return_t ! 92: \b0 \ ! 93: ! 94: \b kern_intr_disable(\ ! 95: ! 96: \b0\i ! 97: \b\i0 dev_num_t ! 98: \b0\i ! 99: \i0 global_dev_num ! 100: \b );\ ! 101: ! 102: \b0 \ ! 103: ! 104: \b kern_intr_disable ! 105: \b0\i ! 106: \i0 causes interrupts from ! 107: \i global_dev_num ! 108: \i0 to be disabled. \ ! 109: <What happends here - is this device's bit in both IACCEPT registers cleared?>\ ! 110: \ ! 111: Returns ! 112: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc0 KERN_NO_ACCESS ! 113: \pard\tx1040\tx2100\tx3160\tx4220\tx5280\tx6320\tx7380\tx8440\tx9500\tx10560\fc0 if ! 114: \i global_dev_num ! 115: \i0 currently has no valid mapping,\ ! 116: else returns KERN_SUCCESS. \ ! 117: ! 118: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.