#define SYS_VECTOR0 SYS_VECTOR_CORAX
#define SYS_VECTOR_CORAX 0xCC
+#define SYS_VECTOR_CXNET 0xCD
#if FEATURE(POSIX)
#define SYS_VECTOR_POSIX 0x80
.global _sys_entryPX
#endif /* FEATURE(POSIX) */
.global _sys_entryCC
+.global _sys_entryCN
.global _int_entry_common
.global _int_restore
_sys_entryCC:
pushl $0
- pushl $SYS_VECTOR0
+ pushl $SYS_VECTOR_CORAX
+ jmp _int_entry_common
+
+_sys_entryCN:
+ pushl $0
+ pushl $SYS_VECTOR_CXNET
/* fall through */
_int_entry_common:
#endif /* CONFIG_APIC */
.extern _sys_entryCC
+.extern _sys_entryCN
#if FEATURE(POSIX)
.extern _sys_entryPX
#endif /* FEATURE(POSIX) */
movl %eax, (%esp)
call _segment_descriptor_set
+ /* add an entry for Corax network syscalls */
+ movl $DPL_USER, 16(%esp)
+ movl $_sys_entryCN, 12(%esp)
+ addl $8, (%esp)
+ call _segment_descriptor_set
+
movw $((IDT_ENTRIES * 8) + 1), (%esp)
movl $_cpu, %eax
addl $IDT_OFFSET, %eax
#include "defs.h"
void sched_tick(void);
+extern int sys_cxnet(long, long, long, long, long, long);
static const char *_exc_name[] = {
"#DE", "#DB", "NMI", "#BP", "#OF", "#BR", "#UD", "#NM", "#DF", "#MF",
dbg_printf("_corax_call(0x%x, 0x%x, 0x%x);\n", ctx.eax, ctx.ebx, ctx.ecx);
break;
+ case SYS_VECTOR_CXNET:
+ ret_val = sys_cxnet(ctx.eax, ctx.ebx, ctx.ecx, ctx.edx, ctx.esi, ctx.edi);
+ break;
+
#if FEATURE(POSIX)
case SYS_VECTOR_POSIX:
dbg_printf("_posix_call(0x%x, 0x%x, 0x%x);\n", ctx.eax, ctx.ebx, ctx.ecx);