Files
codezero/tasks/libl4/include/l4lib/arch-arm/syscalls.h
Bahadir Balban dce3a9a47c Merged some libl4 utcb headers, moved mr defs to kernel message.h
Headers 3 headers related to message registers and utcbs are now merged under
utcb.h in libl4. Some message register definitions used by the kernel are now
moved into kernel's glue/message.h. This avoids the duplication of same
definitions. Also the total number of mregs are now determined by arch-specific
kernel header, which is good.
2008-02-11 11:45:21 +00:00

83 lines
2.6 KiB
C

/*
* System call prototypes.
*
* Copyright (C) 2007 Bahadir Balban
*/
#ifndef __ARM_SYSCALLS_H__
#define __ARM_SYSCALLS_H__
#include <l4lib/arch/types.h>
#include <l4lib/arch/utcb.h>
#include <l4/generic/space.h>
#include <l4/api/space.h>
#include <l4/api/kip.h>
#include <l4/api/ipc.h>
#include <l4/api/thread.h>
static inline void *
l4_kernel_interface(unsigned int *api_version, unsigned int *api_flags,
unsigned int *kernel_id)
{
return (void *)L4_KIP_ADDRESS;
}
typedef unsigned int (*__l4_thread_switch_t)(u32);
extern __l4_thread_switch_t __l4_thread_switch;
unsigned int l4_thread_switch (u32 dest);
typedef int (*__l4_getid_t)(struct task_ids *ids);
extern __l4_getid_t __l4_getpid;
int l4_getid(struct task_ids *ids);
typedef int (*__l4_ipc_t)(l4id_t to, l4id_t from);
extern __l4_ipc_t __l4_ipc;
int l4_ipc(l4id_t to, l4id_t from);
typedef int (*__l4_kread_t)(u32 rd, void *addr);
extern __l4_kread_t __l4_kread;
int l4_kread(u32 rd, void *addr);
typedef int (*__l4_map_t)(void *phys, void *virt,
u32 npages, u32 flags, l4id_t tid);
extern __l4_map_t __l4_map;
int l4_map(void *p, void *v, u32 npages, u32 flags, l4id_t tid);
typedef int (*__l4_unmap_t)(void *virt, unsigned long npages, l4id_t tid);
extern __l4_unmap_t __l4_unmap;
int l4_unmap(void *virtual, unsigned long numpages, l4id_t tid);
typedef int (*__l4_thread_control_t)(unsigned int action, struct task_ids *ids);
extern __l4_thread_control_t __l4_thread_control;
int l4_thread_control(unsigned int action, struct task_ids *ids);
typedef int (*__l4_space_control_t)(unsigned int action, void *kdata);
extern __l4_space_control_t __l4_space_control;
int l4_space_control(unsigned int action, void *kdata);
typedef int (*__l4_ipc_control_t)(unsigned int action, l4id_t blocked_sender,
u32 blocked_tag);
extern __l4_ipc_control_t __l4_ipc_control;
int l4_ipc_control(unsigned int, l4id_t blocked_sender, u32 blocked_tag);
typedef int (*__l4_exchange_registers_t)(unsigned int pc, unsigned int sp,
l4id_t pager, l4id_t tid);
extern __l4_exchange_registers_t __l4_exchange_registers;
int l4_exchange_registers(unsigned int pc, unsigned int sp, int pager, l4id_t tid);
typedef int (*__l4_kmem_reclaim_t)(unsigned long *pfn, int *npages);
extern __l4_kmem_reclaim_t __l4_kmem_reclaim;
int l4_kmem_reclaim(unsigned long *pfn, int *npages);
typedef int (*__l4_kmem_grant_t)(unsigned long pfn, int npages);
extern __l4_kmem_grant_t __l4_kmem_grant;
int l4_kmem_grant(unsigned long pfn, int npages);
/* To be supplied by server tasks. */
void *virt_to_phys(void *);
void *phys_to_virt(void *);
#endif /* __ARM_SYSCALLS_H__ */