Mercurial > flash_v2
diff packages/hal/sh/arch/current/src/hal_syscall.c @ 1423:440ddbf97b39
2003-09-21 Jonathan Larmour <jifl@eCosCentric.com>
* cdl/hal_sh.cdl: CYGHWR_HAL_SH_FPU_REGS is only needed if there's an
FPU.
* include/hal_var_bank.h (HAL_THREAD_INIT_CONTEXT_FPU): Use FPSCR
init value from HAL register definitions.
2003-09-19 John Dallaway <jld@ecoscentric.com>
* cdl/hal_sh.cdl: Specify default CDL values for sh4_202_md target.
2003-09-11 Nick Garnett <nickg@ecoscentric.com>
* include/hal_var_bank.h (HAL_THREAD_INIT_CONTEXT_FPU): Changed
initial value of fpscr to do round-to-nearest rather than
round-to-zero.
2003-09-08 Nick Garnett <nickg@ecoscentric.com>
* src/vectors.S (cyg_hal_default_exception_vsr): Added code to
switch to interrupt stack when fielding exceptions from RedBoot or
some other ROM monitor. Without this we get potential stack
overflows when debugging via the network.
2003-09-05 Nick Garnett <nickg@ecoscentric.com>
* include/hal_arch.h:
* include/hal_var_bank.h:
* include/hal_var_bank.inc:
* src/context.S:
Added support for floating point state save and restore and GDB
* src/hal_misc.c (hal_delay_us): Fixed implementation of this
routine so that it actually works.
* src/hal_syscall.c:
Added support for all supportable syscalls.
* src/sh_stub.c:
Added check in __is_bsp_syscall() for trap 34 traps using the TRA
register.
* src/vectors.S: Set startup stack size to the same as the
interrupt stack size. In some configurations of RedBoot the
previous value was too small.
* include/sh_stub.h:
Fixed HAL_STUB_PLATFORM_STUBS_FIXUP() to only rewind for a
breakpoint. Traps are not rewound.
* cdl/hal_sh.cdl: Added option for SH architecture FP register
count.
| author | nickg |
|---|---|
| date | Fri, 05 Dec 2003 17:06:23 +0000 |
| parents | f2b5df359050 |
| children |
line wrap: on
line diff
--- a/packages/hal/sh/arch/current/src/hal_syscall.c +++ b/packages/hal/sh/arch/current/src/hal_syscall.c @@ -9,6 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc. +// Copyright (C) 2003 Nick Garnett // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -41,7 +42,7 @@ //#####DESCRIPTIONBEGIN#### // // Author(s): msalter -// Contributors:msalter, jskov +// Contributors:msalter, jskov, nickg // Date: 2002-02-28 // Purpose: // Description: @@ -98,6 +99,10 @@ extern int __do_syscall(int func, // sy #define _shnewlib_SYS_pipe 42 #define _shnewlib_SYS_execve 59 +#define _shnewlib_SYS_argc 172 /* == 0xAC, for Argument Count :-) */ +#define _shnewlib_SYS_argnlen 173 +#define _shnewlib_SYS_argn 174 + #define _shnewlib_SYS_utime 201 /* not really a system call */ #define _shnewlib_SYS_wait 202 /* nor is this */ @@ -114,6 +119,9 @@ hal_syscall_handler(void) arg4 = *(unsigned int *)(get_register(SP)); switch (func) { + case _shnewlib_SYS_exit: + func = SYS_exit; + break; case _shnewlib_SYS_read: func = SYS_read; break; @@ -129,8 +137,36 @@ hal_syscall_handler(void) case _shnewlib_SYS_lseek: func = SYS_lseek; break; + case _shnewlib_SYS_unlink: + func = SYS_unlink; + break; + case _shnewlib_SYS_getpid: + func = SYS_getpid; + break; + case _shnewlib_SYS_fstat: + func = SYS_fstat; + break; + case _shnewlib_SYS_chdir: + func = SYS_chdir; + break; + case _shnewlib_SYS_stat: + func = SYS_stat; + break; + case _shnewlib_SYS_chmod: + func = SYS_chmod; + break; + case _shnewlib_SYS_time: + func = SYS_time; + break; + case _shnewlib_SYS_isatty: + func = SYS_isatty; + break; case _shnewlib_SYS_utime: func = SYS_utime; + case _shnewlib_SYS_argc: + put_register( R0, 0 ); + put_register( R1, 0 ); + return 0; default: return SIGTRAP; }
