-static void syscalls_init (void)
-{
- ulong *addr;
-
- syscall_tbl[SYSCALL_MALLOC] = (void *) malloc;
- syscall_tbl[SYSCALL_FREE] = (void *) free;
-
- syscall_tbl[SYSCALL_INSTALL_HDLR] = (void *) irq_install_handler;
- syscall_tbl[SYSCALL_FREE_HDLR] = (void *) irq_free_handler;
- syscall_tbl[SYSCALL_GET_TIMER] = (void *)get_timer;
- syscall_tbl[SYSCALL_UDELAY] = (void *)udelay;
-
- addr = (ulong *) 0xc00; /* syscall ISR addr */
-
- /* patch ISR code */
- *addr++ |= (ulong) syscall_tbl >> 16;
- *addr++ |= (ulong) syscall_tbl & 0xFFFF;
- *addr++ |= NR_SYSCALLS >> 16;
- *addr++ |= NR_SYSCALLS & 0xFFFF;
-
-#ifndef CONFIG_5XX
- flush_cache (0x0C00, 0x10);
-#endif
- /* Initialize syscalls stack pointer */
- addr = (ulong *) 0xCFC;
- *addr = (ulong)addr;
-#ifndef CONFIG_5xx
- flush_cache ((ulong)addr, 0x10);
-#endif
-}
-