- Timestamp:
- 2011-01-09T12:18:00Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 54de5ebd
- Parents:
- a3eeef45 (diff), 9d12059 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel
- Files:
-
- 18 edited
-
arch/amd64/include/interrupt.h (modified) (1 diff)
-
arch/amd64/src/amd64.c (modified) (1 diff)
-
arch/amd64/src/interrupt.c (modified) (1 diff)
-
arch/ia32/include/interrupt.h (modified) (2 diffs)
-
arch/ia32/src/drivers/i8259.c (modified) (1 diff)
-
arch/ia32/src/ia32.c (modified) (1 diff)
-
arch/ia32/src/interrupt.c (modified) (1 diff)
-
arch/ia32/src/smp/apic.c (modified) (1 diff)
-
generic/include/ddi/irq.h (modified) (3 diffs)
-
generic/include/interrupt.h (modified) (1 diff)
-
generic/include/proc/task.h (modified) (1 diff)
-
generic/include/syscall/syscall.h (modified) (1 diff)
-
generic/src/interrupt/interrupt.c (modified) (1 diff)
-
generic/src/ipc/ipc.c (modified) (1 diff)
-
generic/src/ipc/irq.c (modified) (1 diff)
-
generic/src/main/main.c (modified) (2 diffs)
-
generic/src/proc/task.c (modified) (1 diff)
-
generic/src/syscall/syscall.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/interrupt.h
ra3eeef45 ra676574 74 74 extern void (* enable_irqs_function)(uint16_t); 75 75 extern void (* eoi_function)(void); 76 extern const char *irqs_info; 76 77 77 78 extern void interrupt_init(void); -
kernel/arch/amd64/src/amd64.c
ra3eeef45 ra676574 235 235 #endif 236 236 237 /* 238 * This nasty hack should also go away ASAP. 239 */ 240 trap_virtual_enable_irqs(1 << IRQ_DP8390); 237 if (irqs_info != NULL) 238 sysinfo_set_item_val(irqs_info, NULL, true); 239 241 240 sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390); 242 241 } -
kernel/arch/amd64/src/interrupt.c
ra3eeef45 ra676574 62 62 void (* enable_irqs_function)(uint16_t irqmask) = NULL; 63 63 void (* eoi_function)(void) = NULL; 64 const char *irqs_info = NULL; 64 65 65 66 void istate_decode(istate_t *istate) -
kernel/arch/ia32/include/interrupt.h
ra3eeef45 ra676574 55 55 #define IRQ_PIC_SPUR 7 56 56 #define IRQ_MOUSE 12 57 #define IRQ_DP8390 957 #define IRQ_DP8390 5 58 58 59 59 /* This one must have four least significant bits set to ones */ … … 74 74 extern void (* enable_irqs_function)(uint16_t); 75 75 extern void (* eoi_function)(void); 76 extern const char *irqs_info; 76 77 77 78 extern void interrupt_init(void); -
kernel/arch/ia32/src/drivers/i8259.c
ra3eeef45 ra676574 86 86 disable_irqs_function = pic_disable_irqs; 87 87 eoi_function = pic_eoi; 88 irqs_info = "i8259"; 88 89 89 90 pic_disable_irqs(0xffff); /* disable all irq's */ -
kernel/arch/ia32/src/ia32.c
ra3eeef45 ra676574 193 193 #endif 194 194 195 /* 196 * This nasty hack should also go away ASAP. 197 */ 198 trap_virtual_enable_irqs(1 << IRQ_DP8390); 195 if (irqs_info != NULL) 196 sysinfo_set_item_val(irqs_info, NULL, true); 197 199 198 sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390); 200 199 } -
kernel/arch/ia32/src/interrupt.c
ra3eeef45 ra676574 62 62 void (* enable_irqs_function)(uint16_t irqmask) = NULL; 63 63 void (* eoi_function)(void) = NULL; 64 const char *irqs_info = NULL; 64 65 65 66 void istate_decode(istate_t *istate) -
kernel/arch/ia32/src/smp/apic.c
ra3eeef45 ra676574 178 178 disable_irqs_function = io_apic_disable_irqs; 179 179 eoi_function = l_apic_eoi; 180 irqs_info = "apic"; 180 181 181 182 /* -
kernel/generic/include/ddi/irq.h
ra3eeef45 ra676574 54 54 /** Read 4 bytes from the I/O space. */ 55 55 CMD_PIO_READ_32, 56 56 57 /** Write 1 byte to the I/O space. */ 57 58 CMD_PIO_WRITE_8, … … 62 63 63 64 /** 64 * Perform a bit test on the source argument and store the result into 65 * the destination argument. 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. 66 83 */ 67 84 CMD_BTEST, 68 85 69 86 /** 70 * Predicate the execution of the following N commands by the boolean 71 * value of the source argument. 87 * Predicate the execution of the following 88 * N commands by the boolean value of the source 89 * argument. 72 90 */ 73 91 CMD_PREDICATE, … … 75 93 /** Accept the interrupt. */ 76 94 CMD_ACCEPT, 95 77 96 /** Decline the interrupt. */ 78 97 CMD_DECLINE, -
kernel/generic/include/interrupt.h
ra3eeef45 ra676574 60 60 extern void fault_if_from_uspace(istate_t *, const char *, ...) 61 61 PRINTF_ATTRIBUTE(2, 3); 62 extern istate_t *istate_get(thread_t *); 62 63 extern iroutine_t exc_register(unsigned int, const char *, bool, iroutine_t); 63 64 extern void exc_dispatch(unsigned int, istate_t *); -
kernel/generic/include/proc/task.h
ra3eeef45 ra676574 154 154 155 155 extern sysarg_t sys_task_set_name(const char *, size_t); 156 extern sysarg_t sys_task_kill(task_id_t *); 156 157 157 158 #endif -
kernel/generic/include/syscall/syscall.h
ra3eeef45 ra676574 47 47 SYS_TASK_GET_ID, 48 48 SYS_TASK_SET_NAME, 49 SYS_TASK_KILL, 49 50 SYS_PROGRAM_SPAWN_LOADER, 50 51 -
kernel/generic/src/interrupt/interrupt.c
ra3eeef45 ra676574 209 209 } 210 210 211 /** Get istate structure of a thread. 212 * 213 * Get pointer to the istate structure at the bottom of the kernel stack. 214 * 215 * This function can be called in interrupt or user context. In interrupt 216 * context the istate structure is created by the low-level exception 217 * handler. In user context the istate structure is created by the 218 * low-level syscall handler. 219 */ 220 istate_t *istate_get(thread_t *thread) 221 { 222 /* 223 * The istate structure should be right at the bottom of the kernel 224 * stack. 225 */ 226 return (istate_t *) ((uint8_t *) thread->kstack + THREAD_STACK_SIZE - 227 sizeof(istate_t)); 228 } 229 211 230 #ifdef CONFIG_KCONSOLE 212 231 -
kernel/generic/src/ipc/ipc.c
ra3eeef45 ra676574 706 706 break; 707 707 case IPC_PHONE_CONNECTED: 708 printf("connected to: %p ", 709 task->phones[i].callee); 708 printf("connected to: %p (%" PRIu64 ") ", 709 task->phones[i].callee, 710 task->phones[i].callee->task->taskid); 710 711 break; 711 712 case IPC_PHONE_SLAMMED: -
kernel/generic/src/ipc/irq.c
ra3eeef45 ra676574 404 404 (uint32_t) code->cmds[i].value); 405 405 break; 406 case CMD_PIO_WRITE_A_8: 407 if (srcarg) { 408 pio_write_8((ioport8_t *) code->cmds[i].addr, 409 (uint8_t) scratch[srcarg]); 410 } 411 break; 412 case CMD_PIO_WRITE_A_16: 413 if (srcarg) { 414 pio_write_16((ioport16_t *) code->cmds[i].addr, 415 (uint16_t) scratch[srcarg]); 416 } 417 break; 418 case CMD_PIO_WRITE_A_32: 419 if (srcarg) { 420 pio_write_32((ioport32_t *) code->cmds[i].addr, 421 (uint32_t) scratch[srcarg]); 422 } 423 break; 406 424 case CMD_BTEST: 407 425 if ((srcarg) && (dstarg)) { -
kernel/generic/src/main/main.c
ra3eeef45 ra676574 185 185 LOG("\nconfig.base=%p config.kernel_size=%zu" 186 186 "\nconfig.stack_base=%p config.stack_size=%zu", 187 config.base, config.kernel_size, config.stack_base,188 config.stack_size);187 (void *) config.base, config.kernel_size, 188 (void *) config.stack_base, config.stack_size); 189 189 190 190 #ifdef CONFIG_KCONSOLE … … 242 242 for (i = 0; i < init.cnt; i++) 243 243 LOG("init[%zu].addr=%p, init[%zu].size=%zu", 244 i, init.tasks[i].addr, i, init.tasks[i].size);244 i, (void *) init.tasks[i].addr, i, init.tasks[i].size); 245 245 } else 246 246 printf("No init binaries found.\n"); -
kernel/generic/src/proc/task.c
ra3eeef45 ra676574 360 360 } 361 361 362 /** Syscall to forcefully terminate a task 363 * 364 * @param uspace_taskid Pointer to task ID in user space. 365 * 366 * @return 0 on success or an error code from @ref errno.h. 367 * 368 */ 369 sysarg_t sys_task_kill(task_id_t *uspace_taskid) 370 { 371 task_id_t taskid; 372 int rc; 373 374 rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(taskid)); 375 if (rc != 0) 376 return (sysarg_t) rc; 377 378 return (sysarg_t) task_kill(taskid); 379 } 380 362 381 /** Find task structure corresponding to task ID. 363 382 * -
kernel/generic/src/syscall/syscall.c
ra3eeef45 ra676574 45 45 #include <debug.h> 46 46 #include <ddi/device.h> 47 #include <interrupt.h> 47 48 #include <ipc/sysipc.h> 48 49 #include <synch/futex.h> … … 66 67 #ifdef CONFIG_UDEBUG 67 68 /* 69 * An istate_t-compatible record was created on the stack by the 70 * low-level syscall handler. This is the userspace space state 71 * structure. 72 */ 73 THREAD->udebug.uspace_state = istate_get(THREAD); 74 75 /* 68 76 * Early check for undebugged tasks. We do not lock anything as this 69 77 * test need not be precise in either direction. 70 *71 78 */ 72 79 if (THREAD->udebug.active) … … 98 105 udebug_stoppable_end(); 99 106 } 107 108 /* Clear userspace state pointer */ 109 THREAD->udebug.uspace_state = NULL; 100 110 #endif 101 111 … … 120 130 (syshandler_t) sys_task_get_id, 121 131 (syshandler_t) sys_task_set_name, 132 (syshandler_t) sys_task_kill, 122 133 (syshandler_t) sys_program_spawn_loader, 123 134
Note:
See TracChangeset
for help on using the changeset viewer.
