#include <command.h>
#include <malloc.h>
#include <devices.h>
-#include <syscall.h>
#ifdef CONFIG_8xx
#include <mpc8xx.h>
#endif
return (buf);
}
-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
-}
-
/*
* All attempts to come up with a "common" initialization sequence
* that works for all boards and architectures failed: some of the
WATCHDOG_RESET();
- memcpy (id, gd, sizeof (gd_t));
+ memcpy (id, (void *)gd, sizeof (gd_t));
relocate_code (addr_sp, id, addr);
puts ("FLASH: ");
if ((flash_size = flash_init ()) > 0) {
-#ifdef CFG_FLASH_CHECKSUM
+# ifdef CFG_FLASH_CHECKSUM
print_size (flash_size, "");
/*
* Compute and print flash CRC if flashchecksum is set to 'y'
);
}
putc ('\n');
-#else
+# else /* !CFG_FLASH_CHECKSUM */
print_size (flash_size, "\n");
-#endif /* CFG_FLASH_CHECKSUM */
+# endif /* CFG_FLASH_CHECKSUM */
} else {
puts (failed);
hang ();
bd->bi_flashstart = CFG_FLASH_BASE; /* update start of FLASH memory */
bd->bi_flashsize = flash_size; /* size of FLASH memory (final value) */
-#if defined(CONFIG_PCU_E) || defined(CONFIG_OXC)
+# if defined(CONFIG_PCU_E) || defined(CONFIG_OXC)
bd->bi_flashoffset = 0;
-#elif CFG_MONITOR_BASE == CFG_FLASH_BASE
+# elif CFG_MONITOR_BASE == CFG_FLASH_BASE
bd->bi_flashoffset = monitor_flash_len; /* reserved area for startup monitor */
-#else
+# else
bd->bi_flashoffset = 0;
-#endif
-#else
+# endif
+#else /* CFG_NO_FLASH */
bd->bi_flashsize = 0;
bd->bi_flashstart = 0;
load_sernum_ethaddr ();
#endif
-#if defined(CFG_GT_6426x) || defined(CONFIG_PN62)
+#if defined(CFG_GT_6426x) || defined(CONFIG_PN62) || defined(CONFIG_PPCHAMELEONEVB)
/* handle the 2nd ethernet address */
s = getenv ("eth1addr");
/* Initialize devices */
devices_init ();
- /* allocate syscalls table (console_init_r will fill it in */
- syscall_tbl = (void **) malloc (NR_SYSCALLS * sizeof (void *));
+ /* Initialize the jump table for applications */
+ jumptable_init ();
/* Initialize the console (after the relocation and devices init) */
console_init_r ();
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
- syscalls_init ();
#if defined(CONFIG_CCM) || \
defined(CONFIG_COGENT) || \