summaryrefslogtreecommitdiff
path: root/lib_ppc
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-07-24 23:38:38 +0000
committerwdenk <wdenk>2003-07-24 23:38:38 +0000
commit27b207fd0a0941b03f27e2a82c0468b1a090c745 (patch)
tree4d339d7a2a00889f09a876425ce430be57de56e9 /lib_ppc
parent2535d60277cc295adf75cd5721dcecd840c69a63 (diff)
downloadu-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.zip
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.gz
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.bz2
* Implement new mechanism to export U-Boot's functions to standalone
applications: instead of using (PPC-specific) system calls we now use a jump table; please see doc/README.standalone for details * Patch by Dave Westwood, 24 Jul 2003: added support for Unity OS (a proprietary OS)
Diffstat (limited to 'lib_ppc')
-rw-r--r--lib_ppc/board.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 278357d..977d03e 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -26,7 +26,6 @@
#include <command.h>
#include <malloc.h>
#include <devices.h>
-#include <syscall.h>
#ifdef CONFIG_8xx
#include <mpc8xx.h>
#endif
@@ -156,37 +155,6 @@ char *strmhz (char *buf, long hz)
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
@@ -543,7 +511,7 @@ void board_init_f (ulong bootflag)
WATCHDOG_RESET();
- memcpy (id, gd, sizeof (gd_t));
+ memcpy (id, (void *)gd, sizeof (gd_t));
relocate_code (addr_sp, id, addr);
@@ -798,13 +766,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
/* 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) || \