diff options
author | wdenk <wdenk> | 2003-07-24 23:38:38 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-07-24 23:38:38 +0000 |
commit | 27b207fd0a0941b03f27e2a82c0468b1a090c745 (patch) | |
tree | 4d339d7a2a00889f09a876425ce430be57de56e9 /examples/syscall.S | |
parent | 2535d60277cc295adf75cd5721dcecd840c69a63 (diff) | |
download | u-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 'examples/syscall.S')
-rw-r--r-- | examples/syscall.S | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/examples/syscall.S b/examples/syscall.S deleted file mode 100644 index f319409..0000000 --- a/examples/syscall.S +++ /dev/null @@ -1,114 +0,0 @@ -#include <ppc_asm.tmpl> -#include <ppc_defs.h> -#include <syscall.h> - -#ifdef CONFIG_ARM /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ -#warning ARM version not implemented yet /* XXXXXXXXXXXXXXXXXXXXXXXXXXXX */ - .global mon_getc - .type mon_getc,function -mon_getc: - .global mon_tstc - .type mon_tstc,function -mon_tstc: - .global mon_putc - .type mon_putc,function -mon_putc: - .global mon_puts - .type mon_puts,function -mon_puts: - .global mon_printf - .type mon_printf,function -mon_printf: - .global mon_install_hdlr - .type mon_install_hdlr,function -mon_install_hdlr: - .global mon_free_hdlr - .type mon_free_hdlr,function -mon_free_hdlr: - .global mon_malloc - .type mon_malloc,function -mon_malloc: - .global mon_free - .type mon_free,function -mon_free: - @ args = 0, pretend = 0, frame = 0 - @ frame_needed = 1, current_function_anonymous_args = 0 - mov ip, sp - stmfd sp!, {fp, ip, lr, pc} - sub fp, ip, #4 - ldmea fp, {fp, sp, pc} -#elif defined(CONFIG_MIPS)/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ -#warning MIPS version not implemented yet - .global mon_getc - .type mon_getc,function -mon_getc: - .global mon_tstc - .type mon_tstc,function -mon_tstc: - .global mon_putc - .type mon_putc,function -mon_putc: - .global mon_puts - .type mon_puts,function -mon_puts: - .global mon_printf - .type mon_printf,function -mon_printf: - .global mon_install_hdlr - .type mon_install_hdlr,function -mon_install_hdlr: - .global mon_free_hdlr - .type mon_free_hdlr,function -mon_free_hdlr: - .global mon_malloc - .type mon_malloc,function -mon_malloc: - .global mon_free - .type mon_free,function -mon_free: - -#else - -#ifdef CONFIG_I386 /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ -#define SYMBOL_NAME(X) X -#define SYMBOL_NAME_LABEL(X) X##: - -#define SYSCALL(name,n) \ - .globl SYMBOL_NAME(name) ; \ -SYMBOL_NAME_LABEL(name) ; \ - movl $n, %eax ;\ - pushl %ebx; \ - pushl %ecx; \ - int $0x40 ;\ - - -#endif /* CONFIG_I386 */ - -#ifdef CONFIG_PPC -#define SYSCALL(name,n) \ - .globl name ; \ -name: ; \ - li r0,n ; \ - sc ; \ - blr -#endif /* CONFIG_PPC */ - - .text - - /* - * Make sure these functions are in the same order as they - * appear in the "include/syscall.h" header file !!! - */ - - SYSCALL(mon_getc,SYSCALL_GETC) - SYSCALL(mon_tstc,SYSCALL_TSTC) - SYSCALL(mon_putc,SYSCALL_PUTC) - SYSCALL(mon_puts,SYSCALL_PUTS) - SYSCALL(mon_printf,SYSCALL_PRINTF) - SYSCALL(mon_install_hdlr,SYSCALL_INSTALL_HDLR) - SYSCALL(mon_free_hdlr,SYSCALL_FREE_HDLR) - SYSCALL(mon_malloc,SYSCALL_MALLOC) - SYSCALL(mon_free,SYSCALL_FREE) - SYSCALL(mon_udelay,SYSCALL_UDELAY) - SYSCALL(mon_get_timer,SYSCALL_GET_TIMER) -#endif /* CONFIG_ARM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ |