Added a new irq_control system call

This is currently an empty call. It will be used for registering,
receiving and releasing irqs.
This commit is contained in:
Bahadir Balban
2009-11-23 16:46:51 +02:00
parent b994083e27
commit e0c40ece5d
12 changed files with 26 additions and 30 deletions

View File

@@ -3,7 +3,7 @@ Import('env')
Import('symbols')
# The set of source files associated with this SConscript file.
src_local = ['kip.c', 'syscall.c', 'thread.c', 'ipc.c', 'map.c', 'mutex.c', 'cap.c', 'exregs.c']
src_local = ['kip.c', 'syscall.c', 'thread.c', 'ipc.c', 'map.c', 'mutex.c', 'cap.c', 'exregs.c', 'irq.c']
obj = env.Object(src_local)

View File

@@ -36,11 +36,6 @@ int sys_schedule(void)
return 0;
}
int sys_space_control(void)
{
return -ENOSYS;
}
int sys_getid(struct task_ids *ids)
{
struct ktcb *this = current;

View File

@@ -849,7 +849,7 @@ int process_cap_info(struct cap_info *cap,
&kres->virtmem_free,
cap->start, cap->end);
} else if (cap_type(cap) == CAP_TYPE_MAP_PHYSMEM) {
if (cap_is_devmem(cap))
if (!cap_is_devmem(cap))
memcap_unmap(&kres->physmem_used,
&kres->physmem_free,
cap->start, cap->end);

View File

@@ -17,7 +17,7 @@
void kip_init_syscalls(void)
{
kip.space_control = ARM_SYSCALL_PAGE + sys_space_control_offset;
kip.irq_control = ARM_SYSCALL_PAGE + sys_irq_control_offset;
kip.thread_control = ARM_SYSCALL_PAGE + sys_thread_control_offset;
kip.ipc_control = ARM_SYSCALL_PAGE + sys_ipc_control_offset;
kip.map = ARM_SYSCALL_PAGE + sys_map_offset;
@@ -76,9 +76,11 @@ int arch_sys_unmap(syscall_context_t *regs)
(unsigned int)regs->r2);
}
int arch_sys_space_control(syscall_context_t *regs)
int arch_sys_irq_control(syscall_context_t *regs)
{
return sys_space_control();
return sys_irq_control((unsigned int)regs->r0,
(unsigned int)regs->r1,
(l4id_t)regs->r2);
}
int arch_sys_ipc_control(syscall_context_t *regs)
@@ -133,7 +135,7 @@ void syscall_init()
syscall_table[sys_schedule_offset >> 2] = (syscall_fn_t)arch_sys_schedule;
syscall_table[sys_getid_offset >> 2] = (syscall_fn_t)arch_sys_getid;
syscall_table[sys_unmap_offset >> 2] = (syscall_fn_t)arch_sys_unmap;
syscall_table[sys_space_control_offset >> 2] = (syscall_fn_t)arch_sys_space_control;
syscall_table[sys_irq_control_offset >> 2] = (syscall_fn_t)arch_sys_irq_control;
syscall_table[sys_ipc_control_offset >> 2] = (syscall_fn_t)arch_sys_ipc_control;
syscall_table[sys_map_offset >> 2] = (syscall_fn_t)arch_sys_map;
syscall_table[sys_capability_control_offset >> 2] = (syscall_fn_t)arch_sys_capability_control;