Changeset 84afc7b in mainline
- Timestamp:
- 2009-03-18T10:53:12Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e749794
- Parents:
- 8015eeec
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/amd64.c
r8015eeec r84afc7b 66 66 #include <console/console.h> 67 67 #include <ddi/irq.h> 68 #include <ddi/device.h>69 68 #include <sysinfo/sysinfo.h> 70 69 … … 195 194 { 196 195 #ifdef CONFIG_PC_KBD 197 devno_t devno = device_assign_devno();198 199 196 /* 200 197 * Initialize the i8042 controller. Then initialize the keyboard 201 198 * module and connect it to i8042. Enable keyboard interrupts. 202 199 */ 203 indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno,IRQ_KBD);200 indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); 204 201 if (kbrdin) { 205 202 kbrd_init(kbrdin); … … 212 209 */ 213 210 sysinfo_set_item_val("kbd", NULL, true); 214 sysinfo_set_item_val("kbd.devno", NULL, devno);215 211 sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); 216 212 sysinfo_set_item_val("kbd.address.physical", NULL, -
kernel/arch/arm32/src/arm32.c
r8015eeec r84afc7b 37 37 #include <config.h> 38 38 #include <arch/console.h> 39 #include <ddi/device.h>40 39 #include <genarch/fb/fb.h> 41 40 #include <genarch/fb/visuals.h> … … 129 128 { 130 129 #ifdef CONFIG_ARM_KBD 131 devno_t devno = device_assign_devno();132 133 130 /* 134 131 * Initialize the msim/GXemul keyboard port. Then initialize the serial line 135 132 * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. 136 133 */ 137 indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) gxemul_kbd, devno,GXEMUL_KBD_IRQ);134 indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) gxemul_kbd, GXEMUL_KBD_IRQ); 138 135 if (kbrdin) 139 136 srln_init(kbrdin); … … 144 141 */ 145 142 sysinfo_set_item_val("kbd", NULL, true); 146 sysinfo_set_item_val("kbd.devno", NULL, devno);147 143 sysinfo_set_item_val("kbd.inr", NULL, GXEMUL_KBD_IRQ); 148 144 sysinfo_set_item_val("kbd.address.virtual", NULL, (unative_t) gxemul_kbd); -
kernel/arch/ia32/src/drivers/i8254.c
r8015eeec r84afc7b 27 27 */ 28 28 29 /** @addtogroup ia32 29 /** @addtogroup ia32 30 30 * @{ 31 31 */ 32 32 /** 33 33 * @file 34 * @brief 34 * @brief i8254 chip driver. 35 35 * 36 36 * Low level time functions. -
kernel/arch/ia32/src/ia32.c
r8015eeec r84afc7b 66 66 #include <syscall/syscall.h> 67 67 #include <console/console.h> 68 #include <ddi/device.h>69 68 #include <sysinfo/sysinfo.h> 70 69 #include <arch/boot/boot.h> … … 153 152 { 154 153 #ifdef CONFIG_PC_KBD 155 devno_t devno = device_assign_devno();156 157 154 /* 158 155 * Initialize the i8042 controller. Then initialize the keyboard 159 156 * module and connect it to i8042. Enable keyboard interrupts. 160 157 */ 161 indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno,IRQ_KBD);158 indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); 162 159 if (kbrdin) { 163 160 kbrd_init(kbrdin); … … 170 167 */ 171 168 sysinfo_set_item_val("kbd", NULL, true); 172 sysinfo_set_item_val("kbd.devno", NULL, devno);173 169 sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); 174 170 sysinfo_set_item_val("kbd.address.physical", NULL, -
kernel/arch/ia32/src/smp/apic.c
r8015eeec r84afc7b 27 27 */ 28 28 29 /** @addtogroup ia32 29 /** @addtogroup ia32 30 30 * @{ 31 31 */ -
kernel/arch/ia64/src/drivers/it.c
r8015eeec r84afc7b 27 27 */ 28 28 29 /** @addtogroup ia64 29 /** @addtogroup ia64 30 30 * @{ 31 31 */ -
kernel/arch/ia64/src/ia64.c
r8015eeec r84afc7b 51 51 #include <syscall/syscall.h> 52 52 #include <ddi/irq.h> 53 #include <ddi/device.h>54 53 #include <arch/bootinfo.h> 55 54 #include <genarch/drivers/legacy/ia32/io.h> … … 163 162 164 163 #ifdef CONFIG_NS16550 165 devno_t devno_ns16550 = device_assign_devno();166 164 indev_t *kbrdin_ns16550 167 = ns16550_init((ns16550_t *) NS16550_BASE, devno_ns16550,NS16550_IRQ, NULL, NULL);165 = ns16550_init((ns16550_t *) NS16550_BASE, NS16550_IRQ, NULL, NULL); 168 166 if (kbrdin_ns16550) 169 167 srln_init(kbrdin_ns16550); 170 168 171 169 sysinfo_set_item_val("kbd", NULL, true); 172 sysinfo_set_item_val("kbd.devno", NULL, devno_ns16550);173 170 sysinfo_set_item_val("kbd.inr", NULL, NS16550_IRQ); 174 171 sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); … … 180 177 181 178 #ifdef CONFIG_I8042 182 devno_t devno_i8042 = device_assign_devno(); 183 indev_t *kbrdin_i8042 = i8042_init((i8042_t *) I8042_BASE, devno_i8042, IRQ_KBD); 179 indev_t *kbrdin_i8042 = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); 184 180 if (kbrdin_i8042) 185 181 kbrd_init(kbrdin_i8042); 186 182 187 183 sysinfo_set_item_val("kbd", NULL, true); 188 sysinfo_set_item_val("kbd.devno", NULL, devno_i8042);189 184 sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); 190 185 sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); -
kernel/arch/mips32/src/mips32.c
r8015eeec r84afc7b 57 57 #include <genarch/srln/srln.h> 58 58 #include <macros.h> 59 #include <ddi/device.h>60 59 #include <config.h> 61 60 #include <string.h> … … 167 166 { 168 167 #ifdef CONFIG_MIPS_KBD 169 devno_t devno = device_assign_devno();170 171 168 /* 172 169 * Initialize the msim/GXemul keyboard port. Then initialize the serial line 173 170 * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. 174 171 */ 175 indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, devno,MSIM_KBD_IRQ);172 indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) MSIM_KBD_ADDRESS, MSIM_KBD_IRQ); 176 173 if (kbrdin) { 177 174 srln_init(kbrdin); … … 184 181 */ 185 182 sysinfo_set_item_val("kbd", NULL, true); 186 sysinfo_set_item_val("kbd.devno", NULL, devno);187 183 sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ); 188 184 sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS); -
kernel/arch/ppc32/include/drivers/cuda.h
r8015eeec r84afc7b 39 39 #include <typedefs.h> 40 40 41 extern void cuda_init( devno_t devno,uintptr_t base, size_t size);41 extern void cuda_init(uintptr_t base, size_t size); 42 42 extern int cuda_get_scancode(void); 43 43 -
kernel/arch/ppc32/src/drivers/cuda.c
r8015eeec r84afc7b 41 41 #include <interrupt.h> 42 42 #include <stdarg.h> 43 #include <ddi/device.h> 43 44 44 45 #define CUDA_IRQ 10 … … 242 243 } 243 244 244 void cuda_init( devno_t devno,uintptr_t base, size_t size)245 void cuda_init(uintptr_t base, size_t size) 245 246 { 246 247 cuda = (uint8_t *) hw_map(base, size); … … 250 251 251 252 irq_initialize(&cuda_irq); 252 cuda_irq.devno = dev no;253 cuda_irq.devno = device_assign_devno(); 253 254 cuda_irq.inr = CUDA_IRQ; 254 255 cuda_irq.claim = cuda_claim; … … 259 260 260 261 sysinfo_set_item_val("kbd", NULL, true); 261 sysinfo_set_item_val("kbd.devno", NULL, devno);262 262 sysinfo_set_item_val("kbd.inr", NULL, CUDA_IRQ); 263 263 sysinfo_set_item_val("kbd.address.virtual", NULL, base); -
kernel/arch/ppc32/src/ppc32.c
r8015eeec r84afc7b 43 43 #include <proc/uarg.h> 44 44 #include <console/console.h> 45 #include <ddi/device.h>46 45 #include <ddi/irq.h> 47 46 #include <arch/drivers/pic.h> … … 122 121 123 122 /* Initialize I/O controller */ 124 cuda_init(device_assign_devno(), 125 bootinfo.macio.addr + 0x16000, 2 * PAGE_SIZE); 123 cuda_init(bootinfo.macio.addr + 0x16000, 2 * PAGE_SIZE); 126 124 } 127 125 -
kernel/arch/sparc64/src/drivers/kbd.c
r8015eeec r84afc7b 47 47 48 48 #include <console/console.h> 49 #include <ddi/device.h>50 49 #include <ddi/irq.h> 51 50 #include <arch/mm/page.h> … … 75 74 cir_t cir; 76 75 void *cir_arg; 77 76 78 77 #ifdef CONFIG_NS16550 79 78 ns16550_t *ns16550; … … 116 115 uintptr_t pa; 117 116 size_t size; 118 devno_t devno;119 117 inr_t inr; 120 118 … … 165 163 #ifdef CONFIG_Z8530 166 164 case KBD_Z8530: 167 devno = device_assign_devno();168 165 z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) + 169 166 offset; 170 167 171 indev_t *kbrdin_z8530 = z8530_init(z8530, devno,inr, cir, cir_arg);168 indev_t *kbrdin_z8530 = z8530_init(z8530, inr, cir, cir_arg); 172 169 if (kbrdin_z8530) 173 170 kbrd_init(kbrdin_z8530); … … 179 176 sysinfo_set_item_val("kbd", NULL, true); 180 177 sysinfo_set_item_val("kbd.type", NULL, KBD_Z8530); 181 sysinfo_set_item_val("kbd.devno", NULL, devno);182 178 sysinfo_set_item_val("kbd.inr", NULL, inr); 183 179 sysinfo_set_item_val("kbd.address.kernel", NULL, … … 188 184 #ifdef CONFIG_NS16550 189 185 case KBD_NS16550: 190 devno = device_assign_devno();191 186 ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) + 192 187 offset; 193 188 194 indev_t *kbrdin_ns16550 = ns16550_init(ns16550, devno,inr, cir, cir_arg);189 indev_t *kbrdin_ns16550 = ns16550_init(ns16550, inr, cir, cir_arg); 195 190 if (kbrdin_ns16550) 196 191 kbrd_init(kbrdin_ns16550); … … 202 197 sysinfo_set_item_val("kbd", NULL, true); 203 198 sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); 204 sysinfo_set_item_val("kbd.devno", NULL, devno);205 199 sysinfo_set_item_val("kbd.inr", NULL, inr); 206 200 sysinfo_set_item_val("kbd.address.kernel", NULL, -
kernel/genarch/include/drivers/dsrln/dsrlnin.h
r8015eeec r84afc7b 48 48 49 49 typedef struct { 50 devno_t devno;51 50 irq_t irq; 52 51 dsrlnin_t *dsrlnin; … … 54 53 } dsrlnin_instance_t; 55 54 56 extern indev_t *dsrlnin_init(dsrlnin_t *, devno_t,inr_t);55 extern indev_t *dsrlnin_init(dsrlnin_t *, inr_t); 57 56 58 57 #endif -
kernel/genarch/include/drivers/i8042/i8042.h
r8015eeec r84afc7b 48 48 49 49 typedef struct { 50 devno_t devno;51 50 irq_t irq; 52 51 i8042_t *i8042; … … 54 53 } i8042_instance_t; 55 54 56 extern indev_t *i8042_init(i8042_t *, devno_t,inr_t);55 extern indev_t *i8042_init(i8042_t *, inr_t); 57 56 58 57 #endif -
kernel/genarch/include/drivers/ns16550/ns16550.h
r8015eeec r84afc7b 63 63 /** Structure representing the ns16550 device. */ 64 64 typedef struct { 65 devno_t devno;66 65 ns16550_t *ns16550; 67 66 irq_t irq; … … 69 68 } ns16550_instance_t; 70 69 71 extern indev_t *ns16550_init(ns16550_t *, devno_t,inr_t, cir_t, void *);70 extern indev_t *ns16550_init(ns16550_t *, inr_t, cir_t, void *); 72 71 73 72 #endif -
kernel/genarch/include/drivers/z8530/z8530.h
r8015eeec r84afc7b 115 115 /** Structure representing the z8530 device. */ 116 116 typedef struct { 117 devno_t devno;118 117 irq_t irq; 119 118 z8530_t *z8530; … … 121 120 } z8530_instance_t; 122 121 123 extern indev_t *z8530_init(z8530_t *, devno_t,inr_t, cir_t, void *);122 extern indev_t *z8530_init(z8530_t *, inr_t, cir_t, void *); 124 123 125 124 #endif -
kernel/genarch/src/drivers/dsrln/dsrlnin.c
r8015eeec r84afc7b 39 39 #include <mm/slab.h> 40 40 #include <arch/asm.h> 41 #include <ddi/device.h> 41 42 42 43 static indev_operations_t kbrdin_ops = { … … 57 58 } 58 59 59 indev_t *dsrlnin_init(dsrlnin_t *dev, devno_t devno,inr_t inr)60 indev_t *dsrlnin_init(dsrlnin_t *dev, inr_t inr) 60 61 { 61 62 dsrlnin_instance_t *instance … … 66 67 indev_initialize("dsrlnin", &instance->kbrdin, &kbrdin_ops); 67 68 68 instance->devno = devno;69 69 instance->dsrlnin = dev; 70 70 71 71 irq_initialize(&instance->irq); 72 instance->irq.devno = dev no;72 instance->irq.devno = device_assign_devno(); 73 73 instance->irq.inr = inr; 74 74 instance->irq.claim = dsrlnin_claim; -
kernel/genarch/src/drivers/i8042/i8042.c
r8015eeec r84afc7b 42 42 #include <console/chardev.h> 43 43 #include <mm/slab.h> 44 #include <ddi/device.h> 44 45 45 46 static indev_operations_t kbrdin_ops = { … … 77 78 78 79 /** Initialize i8042. */ 79 indev_t *i8042_init(i8042_t *dev, devno_t devno,inr_t inr)80 indev_t *i8042_init(i8042_t *dev, inr_t inr) 80 81 { 81 82 i8042_instance_t *instance … … 86 87 indev_initialize("i8042", &instance->kbrdin, &kbrdin_ops); 87 88 88 instance->devno = devno;89 89 instance->i8042 = dev; 90 90 91 91 irq_initialize(&instance->irq); 92 instance->irq.devno = dev no;92 instance->irq.devno = device_assign_devno(); 93 93 instance->irq.inr = inr; 94 94 instance->irq.claim = i8042_claim; -
kernel/genarch/src/drivers/ns16550/ns16550.c
r8015eeec r84afc7b 40 40 #include <console/chardev.h> 41 41 #include <mm/slab.h> 42 #include <ddi/device.h> 42 43 43 44 #define LSR_DATA_READY 0x01 … … 80 81 * 81 82 */ 82 indev_t *ns16550_init(ns16550_t *dev, devno_t devno,inr_t inr, cir_t cir, void *cir_arg)83 indev_t *ns16550_init(ns16550_t *dev, inr_t inr, cir_t cir, void *cir_arg) 83 84 { 84 85 ns16550_instance_t *instance … … 89 90 indev_initialize("ns16550", &instance->kbrdin, &kbrdin_ops); 90 91 91 instance->devno = devno;92 92 instance->ns16550 = dev; 93 93 94 94 irq_initialize(&instance->irq); 95 instance->irq.devno = dev no;95 instance->irq.devno = device_assign_devno(); 96 96 instance->irq.inr = inr; 97 97 instance->irq.claim = ns16550_claim; -
kernel/genarch/src/drivers/z8530/z8530.c
r8015eeec r84afc7b 40 40 #include <arch/asm.h> 41 41 #include <mm/slab.h> 42 #include <ddi/device.h> 42 43 43 44 static indev_operations_t kbrdin_ops = { … … 88 89 89 90 /** Initialize z8530. */ 90 indev_t *z8530_init(z8530_t *dev, devno_t devno,inr_t inr, cir_t cir, void *cir_arg)91 indev_t *z8530_init(z8530_t *dev, inr_t inr, cir_t cir, void *cir_arg) 91 92 { 92 93 z8530_instance_t *instance … … 97 98 indev_initialize("z8530", &instance->kbrdin, &kbrdin_ops); 98 99 99 instance->devno = devno;100 100 instance->z8530 = dev; 101 101 102 102 irq_initialize(&instance->irq); 103 instance->irq.devno = dev no;103 instance->irq.devno = device_assign_devno(); 104 104 instance->irq.inr = inr; 105 105 instance->irq.claim = z8530_claim; -
kernel/generic/include/ddi/device.h
r8015eeec r84afc7b 40 40 41 41 extern devno_t device_assign_devno(void); 42 extern unative_t sys_device_assign_devno(void); 42 43 43 44 #endif -
kernel/generic/include/syscall/syscall.h
r8015eeec r84afc7b 73 73 SYS_CAP_REVOKE, 74 74 75 SYS_DEVICE_ASSIGN_DEVNO, 75 76 SYS_PHYSMEM_MAP, 76 77 SYS_IOSPACE_ENABLE, -
kernel/generic/src/console/kconsole.c
r8015eeec r84afc7b 135 135 void kconsole_notify_init(void) 136 136 { 137 devno_t devno = device_assign_devno();138 139 137 sysinfo_set_item_val("kconsole.present", NULL, true); 140 sysinfo_set_item_val("kconsole.devno", NULL, devno);141 138 sysinfo_set_item_val("kconsole.inr", NULL, KCONSOLE_VIRT_INR); 142 139 143 140 irq_initialize(&kconsole_irq); 144 kconsole_irq.devno = dev no;141 kconsole_irq.devno = device_assign_devno(); 145 142 kconsole_irq.inr = KCONSOLE_VIRT_INR; 146 143 kconsole_irq.claim = kconsole_claim; -
kernel/generic/src/ddi/device.c
r8015eeec r84afc7b 32 32 /** 33 33 * @file 34 * @brief 34 * @brief Device numbers. 35 35 */ 36 36 … … 48 48 devno_t device_assign_devno(void) 49 49 { 50 devno_t devno; 50 devno_t devno = (devno_t) atomic_postinc(&last); 51 ASSERT(devno >= 0); 52 53 return devno; 54 } 51 55 52 devno = (devno_t) atomic_postinc(&last); 53 ASSERT(devno >= 0); 54 55 return devno; 56 unative_t sys_device_assign_devno(void) 57 { 58 return (unative_t) device_assign_devno(); 56 59 } 57 60 -
kernel/generic/src/syscall/syscall.c
r8015eeec r84afc7b 33 33 /** 34 34 * @file 35 * @brief 35 * @brief Syscall table and syscall wrappers. 36 36 */ 37 37 38 38 #include <syscall/syscall.h> 39 39 #include <proc/thread.h> … … 43 43 #include <print.h> 44 44 #include <putchar.h> 45 #include <errno.h>46 45 #include <arch.h> 47 46 #include <debug.h> 47 #include <ddi/device.h> 48 48 #include <ipc/sysipc.h> 49 49 #include <synch/futex.h> … … 51 51 #include <ddi/ddi.h> 52 52 #include <security/cap.h> 53 #include <syscall/copy.h>54 53 #include <sysinfo/sysinfo.h> 55 54 #include <console/console.h> 56 55 #include <udebug/udebug.h> 57 58 /** Print using kernel facility59 *60 * Print to kernel log.61 *62 */63 static unative_t sys_klog(int fd, const void * buf, size_t count)64 {65 char *data;66 int rc;67 68 if (count > PAGE_SIZE)69 return ELIMIT;70 71 if (count > 0) {72 data = (char *) malloc(count + 1, 0);73 if (!data)74 return ENOMEM;75 76 rc = copy_from_uspace(data, buf, count);77 if (rc) {78 free(data);79 return rc;80 }81 data[count] = 0;82 83 printf("%s", data);84 free(data);85 } else86 klog_update();87 88 return count;89 }90 91 /** Tell kernel to get keyboard/console access again */92 static unative_t sys_debug_enable_console(void)93 {94 #ifdef CONFIG_KCONSOLE95 grab_console();96 return true;97 #else98 return false;99 #endif100 }101 102 /** Tell kernel to relinquish keyboard/console access */103 static unative_t sys_debug_disable_console(void)104 {105 release_console();106 return true;107 }108 56 109 57 /** Dispatch system call */ … … 112 60 { 113 61 unative_t rc; 114 62 115 63 #ifdef CONFIG_UDEBUG 116 64 udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false); 117 65 #endif 118 if (id < SYSCALL_END) { 66 67 if (id < SYSCALL_END) { 119 68 rc = syscall_table[id](a1, a2, a3, a4, a5, a6); 120 69 } else { … … 123 72 thread_exit(); 124 73 } 125 74 126 75 if (THREAD->interrupted) 127 76 thread_exit(); 128 77 129 78 #ifdef CONFIG_UDEBUG 130 79 udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true); 131 80 132 81 /* 133 82 * Stopping point needed for tasks that only invoke non-blocking … … 136 85 udebug_stoppable_begin(); 137 86 udebug_stoppable_end(); 138 #endif 87 #endif 88 139 89 return rc; 140 90 } … … 183 133 184 134 /* DDI related syscalls. */ 135 (syshandler_t) sys_device_assign_devno, 185 136 (syshandler_t) sys_physmem_map, 186 137 (syshandler_t) sys_iospace_enable, -
uspace/app/klog/klog.c
r8015eeec r84afc7b 82 82 } 83 83 84 int devno = sysinfo_value("klog.devno"); 85 int inr = sysinfo_value("klog.inr"); 86 if (ipc_register_irq(inr, devno, 0, NULL) != EOK) { 87 printf(NAME ": Error registering klog notifications\n"); 88 return -1; 89 } 84 // int inr = sysinfo_value("klog.inr"); 85 // if (ipc_register_irq(inr, devno, 0, NULL) != EOK) { 86 // printf(NAME ": Error registering klog notifications\n"); 87 // return -1; 88 // } 90 89 91 90 async_set_interrupt_received(interrupt_received); -
uspace/lib/libc/generic/ddi.c
r8015eeec r84afc7b 41 41 #include <libarch/config.h> 42 42 #include <kernel/ddi/ddi_arg.h> 43 44 /** Return unique device number. 45 * 46 * @return New unique device number. 47 * 48 */ 49 int device_assign_devno(void) 50 { 51 return __SYSCALL0(SYS_DEVICE_ASSIGN_DEVNO); 52 } 43 53 44 54 /** Map piece of physical memory to task. -
uspace/lib/libc/include/ddi.h
r8015eeec r84afc7b 38 38 #include <task.h> 39 39 40 extern int device_assign_devno(void); 40 41 extern int physmem_map(void *, void *, unsigned long, int); 41 42 extern int iospace_enable(task_id_t, void *, unsigned long); -
uspace/srv/console/console.c
r8015eeec r84afc7b 587 587 588 588 /* Receive kernel notifications */ 589 if (sysinfo_value("kconsole.present")) { 590 int devno = sysinfo_value("kconsole.devno"); 591 int inr = sysinfo_value("kconsole.inr"); 592 if (ipc_register_irq(inr, devno, 0, NULL) != EOK) 593 printf(NAME ": Error registering kconsole notifications\n"); 594 595 async_set_interrupt_received(interrupt_received); 596 } 589 // if (sysinfo_value("kconsole.present")) { 590 // int inr = sysinfo_value("kconsole.inr"); 591 // if (ipc_register_irq(inr, device_assign_devno(), 0, NULL) != EOK) 592 // printf(NAME ": Error registering kconsole notifications\n"); 593 // 594 // async_set_interrupt_received(interrupt_received); 595 // } 597 596 598 597 // FIXME: avoid connectiong to itself, keep using klog -
uspace/srv/kbd/port/gxemul.c
r8015eeec r84afc7b 40 40 #include <kbd_port.h> 41 41 #include <kbd.h> 42 #include <ddi.h> 42 43 43 44 static irq_cmd_t gxemul_cmds[] = { … … 64 65 async_set_interrupt_received(gxemul_irq_handler); 65 66 gxemul_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual"); 66 ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),67 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 67 68 0, &gxemul_kbd); 68 69 return 0; -
uspace/srv/kbd/port/i8042.c
r8015eeec r84afc7b 44 44 #include <kbd_port.h> 45 45 #include <kbd.h> 46 #include <ddi.h> 46 47 #include "i8042.h" 47 48 … … 137 138 i8042_kbd.cmds[0].addr = &((i8042_t *) i8042_kernel)->status; 138 139 i8042_kbd.cmds[3].addr = &((i8042_t *) i8042_kernel)->data; 139 ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &i8042_kbd);140 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 0, &i8042_kbd); 140 141 141 142 int newcontrol = i8042_KBD_IE | i8042_KBD_TRANSLATE; -
uspace/srv/kbd/port/msim.c
r8015eeec r84afc7b 40 40 #include <kbd_port.h> 41 41 #include <kbd.h> 42 #include <ddi.h> 42 43 43 44 irq_cmd_t msim_cmds[] = { … … 64 65 async_set_interrupt_received(msim_irq_handler); 65 66 msim_cmds[0].addr = sysinfo_value("kbd.address.virtual"); 66 ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),67 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 67 68 0, &msim_kbd); 68 69 return 0; -
uspace/srv/kbd/port/ns16550.c
r8015eeec r84afc7b 100 100 ns16550_kbd.cmds[0].addr = (void *) (ns16550_kernel + LSR_REG); 101 101 ns16550_kbd.cmds[3].addr = (void *) (ns16550_kernel + RBR_REG); 102 ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),102 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 103 103 0, &ns16550_kbd); 104 104 return pio_enable((void *) ns16550_physical, 8, &vaddr); -
uspace/srv/kbd/port/z8530.c
r8015eeec r84afc7b 90 90 z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.kernel") + 91 91 CHAN_A_DATA; 92 ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),92 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 93 93 sysinfo_value("kbd.inr"), &z8530_kbd); 94 94 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.