summaryrefslogtreecommitdiffstats
path: root/libgloss/arm
Commit message (Collapse)AuthorAgeFilesLines
* Add support for Semihosting v2 support for ARM in libgloss.Tamar Christina2017-07-053-65/+231
| | | | | | | | | | Semihosting v2 changes are documented here: https://developer.arm.com/docs/100863/latest/ The biggest change is the addition of an extensions mechanism to add more extensions in the future. Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* Add the needed build system changes in order to compile and create the new ↵Tamar Christina2017-07-059-17/+147
| | | | | | | | | | | | | | | | | | libraries for Semihosting v2 for ARM. This uses the new recursive build target in multi-build.in The new spec files are: For AArch32/ARM (m for mixed mode): - rdimon-v2m.specs - aprofile-validation-v2m.specs - aprofile-ve-v2m.specs These spec files will be using the new libraries generated by multi-build.in. Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* ARM/AArch64: Fix GetCmdLine semihosting directivesnewlib-snapshot-20170519Laurent ALFONSI2017-05-191-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When simulating arm code, the target program startup code (crt0) uses semihosting invocations to get the command line from the simulator. The simulator returns the command line and its size into the area passed in parameter. (ARM 32-bit specifications : http://infocenter.arm.com/help/topic/com.arm.doc.dui0058d/DUI0058.pdf chapter "5.4.19 SYS_GET_CMDLINE"). The memory area pointed by the semihosting register argument is located in .text section (usually not writtable (RX)). If we run this code on a simulator that respects this rights properties (qemu user-mode for instance), the command line will not be written to the .text program memory, in particular the length of the string. The program runs with an empty command line. This problem hasn't been seen earlier probably because qemu user-mode is not so much used, but this can happen with another simulator that refuse to write in a read-only segment. With this modification, the command line can be correctly passed to the target program. Changes: - libgloss/arm/crt0.S : Arguments passed to the AngelSWI_Reason_GetCmdLine semihosting invocation are placed into .data section instead of .text - libgloss/aarch64/crt0.S : Idem for aarch64 AngelSVC_Reason_GetCmdLine semihosting.
* libgloss/arm: fix discovery of "eabihf" toolchainsCarlos Santos2017-04-182-2/+2
| | | | | | | | | | | | | ARM EABI toolchains can optionally use the "hf" suffix to identify hardware floating point support. Use the "*-*-eabi*" pattern to match these toolchains. Original patch by Bryan Hundven for the Crosstool-NG project. Improved by Alexey Neyman. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> CC: Bryan Hundven <bryanhundven@gmail.com CC: Alexey Neyman <stilor@att.net>
* Fix elf-nano.specs to work without -save-tempsThomas Preud'homme2017-02-151-3/+3
| | | | | | | | | | | | The changes in af272aca591fe1dc0f1be64ae5bda147ea98a047 only works when using gcc/g++ with -E or -save-temps, otherwise newlib's newlib.h gets used even if -specs=nano.specs is specified. This is because the driver only use cpp_options spec for the external cpp tool, not for the integrated one. This patch uses instead cpp_unique_options which is used in all cases: it is used directly when the integrated preprocessor is used, and indirectly by expansion of cpp_options otherwise.
* Fix cpp invocation for C++ in nano specThomas Preudhomme2017-02-131-3/+3
| | | | | | | | | | | Hi, The changes in c028685518a261f6d0dab0d7ed15f9570ab9b3d0 to use newlib-nano's include directory work for cc1 but not cc1plus. cc1plus comes with its own cpp spec which does not have a name attached to it. This patch uses the renaming trick on cpp_options instead of cpp, as cpp_options is used both by cc1 and cc1plus.
* Fixed semihosting for ARM when heapinfo not provided by debugger.David Hoover2016-04-211-1/+3
|
* Initializing TTBR0 to inner/outer WBJiong Wang2016-03-261-1/+10
| | | | | | | | | | | | | | | | | | | | | While running tests on internal systems, we identified an issue in the startup code for newlib on AArch32 systems with Multiprocessor Extensions to the architecture. The issue is we were configuring page table flags to be Inner cacheable/Outer non-cacheable, while for at least architectures with Multiprocessor Extension, we'd configure it to Inner/Outer write-back, no write-allocate, and cacheable. The attached patch fixes this, and no regression on arm-none-eabi bare-metal tests. Adopted suggestion given by Richard offline to avoid using jump. libgloss/ * arm/cpu-init/rdimon-aem.S: Set TTBR0 to inner/outer cacheable WB, and no allocate on WB for arch with multiprocessor extension.
* Make macro checks ARMv8-M baseline proofThomas Preud'homme2016-01-287-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libgloss: * arm/Makefile.in: Add newlib/libc/machine/arm to the include path if newlib is present. * arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macros __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * arm/crt0.S: Use THUMB1_ONLY rather than __ARM_ARCH_6M__, !__ARM_ARCH_ISA_ARM rather than THUMB_V7M_V6M for fp enabling, and PREFER_THUMB rather than THUMB_V7_V6M. Rename other occurences of THUMB_V7M_V6M to THUMB_VXM. * arm/linux-crt0.c: Likewise. * arm/redboot-crt0.S: Likewise. * arm/swi.h: Likewise. * arm/trap.S: Likewise. newlib: * libc/machine/arm/memcpy-stub.c: Use ACLE macros __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to check for Thumb-2 only targets rather than __ARM_ARCH and __ARM_ARCH_PROFILE. * libc/machine/arm/memcpy.S: Likewise. * libc/machine/arm/setjmp.S: Likewise for Thumb-1 only target and include acle-compat.h. * libc/machine/arm/strcmp.S: Likewise for Thumb-1 and Thumb-2 only target and include acle-compat.h. * libc/sys/arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macro __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * libc/sys/arm/crt0.S: Use PREFER_THUMB rather than THUMB_V7_V6M and rename THUMB_V7M_V6M into THUMB_VXM. * libc/sys/arm/swi.h: Likewise.
* Change to nano.specs to add nano's include dircygwin-2_1_0-releaseAndre Simoes Dias Vieira2015-07-141-0/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* libgloss: arm: fix copy & paste in syscall.hMike Frysinger2015-04-231-3/+3
| | | | | | This header was clearly copied from the common syscall.h and customized, but the header comment is no longer accurate -- this isn't the general file anymore.
* * arm/crt0.S: Initialise __heap_limit when ARM_RDI_MONITOR is defined.Corinna Vinschen2015-02-172-1/+11
| | | | | * arm/syscalls.c: define __heap_limit global symbol. * arm/syscalls.c (_sbrk): Honour __heap_limit.
* Add missing file from last patchCorinna Vinschen2014-08-151-0/+18
|
* * arm/elf-nano.specs: New file.Corinna Vinschen2014-08-142-8/+17
| | | | | | * arm/elf-rdimon.specs: Support nano.specs. * arm/Makefile.in: Support nano.specs. * libnosys/nosys.specs: Support nano.specs.
* * arm/elf-aprofile-validation.specs (*link): Make text segmentCorinna Vinschen2014-07-162-2/+2
| | | | | 64k-aligned. * arm/elf-aprofile-ve.specs (*link): Likewise.
* 2014-04-04 Ashish Kapania <akapania@ti.com>Jeff Johnston2014-04-042-2/+2
| | | | | | * arm/configure.in: (*-*-tirtos*) Accept TIRTOS target when setting objtype * arm/configure: Regenerated.
* 2014-02-11 Joey Ye <joey.ye@arm.com>Jeff Johnston2014-02-111-4/+4
| | | | | * arm/syscalls.c (_sbrk): Define as weak symbols. (_read, _write): Ditto.
* 2014-01-10 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2014-01-102-2/+2
| | | | | | * arm/configure.in: Revert previous fix and change host_makefile_frag to calculate the absolute location of srcdir/../config/default.mh. * arm/configure: Regenerated.
* 2014-01-07 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2014-01-072-1323/+1431
| | | | | * arm/configure.in: Fix host_makefile_frag to use ac_abs_srcdir. * arm/configure: Regenerated.
* [ARM] set errno in ftruncate and truncate stubs.Marcus Shawcroft2013-11-212-0/+4
|
* [ARM] Provide ftruncate() and truncate() stubs.Marcus Shawcroft2013-11-183-1/+71
|
* 2013-10-14 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>Richard Earnshaw2013-10-143-8/+27
| | | | | | * arm/cpu-init/rdimon-aem.S: Disable for M class cores. * arm/crt0.S: Don't call _rdimon_hw_init_hook for non-A class cores. * arm/cpu-init/Makefile.in (CPU_INIT_OBJS): Use CFLAGS.
* [ARM] Add SPECS file for ARM validation model.Marcus Shawcroft2013-09-272-1/+23
|
* 2013-09-20 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>Richard Earnshaw2013-09-207-2/+698
| | | | | | | | | | | | | | | Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> Greta Yorsh <greta.yorsh@arm.com> * arm/Makefile.in: Add support for cpu-init directory and add elf-aprofile-ve.specs. * arm/configure.in: Likewise. * arm/configure: Regenerate. * arm/cpu-init: New directory. * arm/cpu-init/Makefile.in: New file. * arm/cpu-init/rdimon-aem.S: Likewise. * arm/crt0.S: Call _rdimon_init_hook * arm/elf-aprofile-ve.specs: New file.
* * aarch64/crt0.S: Remove 'start'.Corinna Vinschen2013-08-122-2/+0
| | | | | * arm/crt0.S: Ditto. * arm/redboot-crt0.S: Ditto.
* 2013-07-02 Joey Ye <joey.ye@arm.com>Jeff Johnston2013-07-021-1/+17
| | | | | * arm/crt0.S (_mainCRTStartup): Weak reference to atexit and _fini when lite exit is enabled.
* Fix wrongly applied patchCorinna Vinschen2013-02-121-1/+1
|
* * arm/elf-rdimon.specs (-lrdimon): Change link to lib.Corinna Vinschen2013-02-101-2/+5
|
* * arm/redboot-crt0.S (__change_mode): Replace mov with movs.Corinna Vinschen2012-05-021-1/+1
|
* * arm/linux-crt0.c: Use ldr instead of adr to get address ofCorinna Vinschen2012-01-171-1/+3
| | | | _start_thumb.
* 2011-12-13 Richard Earnshaw <rearnsha@arm.com>Jeff Johnston2011-12-131-7/+31
| | | | | | | | Thomas Klein <th.r.klein@web.de> * arm/crt0.S: Manually set the target architecture when compiling for Thumb1 on EABI targets. Avoid v6-only Thumb-1 MOV instruction.
* * arm/crt0.s: Support 0 heap base response from HeapInfo syscall.Nick Clifton2011-09-291-0/+13
|
* * arm/arm.h (HAVE_CALL_INDIRECT): Define.Nick Clifton2011-09-292-12/+21
| | | | | * arm/crt0.S (indirect_call): New macro. Encodes indirect function calls. Does not use blx for pre-armv5 targets.
* * arm/crt0.S: Support armv6-m processors in libgloss.Nick Clifton2011-07-136-45/+154
| | | | | | | | * arm/swi.h: Likewise. * arm/trap.S: Likewise. * arm/redboot-crt0.S: Likewise. * arm/linux-crt0.c: Likewise. * arm/arm.h: New.
* 2011-06-29 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2011-06-291-7/+7
| | | | * arm/Makefile.in: Add $CFLAGS to compile commands for specified .o targets.
* * syscalls.c (_isatty): Fix return value.Corinna Vinschen2010-08-271-3/+9
|
* * arm/linux-syscalls0.S (SYSCALL0, SYSCALL3, SYSCALL6, SYSCALL4):Nick Clifton2009-10-261-44/+0
| | | | | Delete Thumb definitions - the ARM versions work correctly in Thumb mode.
* 2008-10-06 Bill Tompkins <bill+newlib@key-square.com>Jeff Johnston2008-10-061-0/+9
| | | | | * arm/crt0.S: Fix calling hardware_init_hook() or software_init_hook() under thumb and thumb2.
* * libc/machine/arm/setjmp.S: Fix thumb2 support.Nick Clifton2008-04-251-1/+8
| | | | | * arm/crt0.S: Allow assembly under ARMv7 ISA. Support for initializing stack pointers for interrupt modes is still pending.
* [newlib]DJ Delorie2008-04-041-1190/+1789
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libm/machine/spu/configure: Regenerate with autoconf 2.61. * libc/sys/configure: Regenerate with autoconf 2.61. * libc/machine/configure: Regenerate with autoconf 2.61. [libgloss] * hp74x/configure: Regenerate with autoconf 2.61. * fr30/configure: Regenerate with autoconf 2.61. * mips/configure: Regenerate with autoconf 2.61. * xstormy16/configure: Regenerate with autoconf 2.61. * rs6000/configure: Regenerate with autoconf 2.61. * d30v/configure: Regenerate with autoconf 2.61. * i386/configure: Regenerate with autoconf 2.61. * configure: Regenerate with autoconf 2.61. * wince/configure: Regenerate with autoconf 2.61. * pa/configure: Regenerate with autoconf 2.61. * m32r/configure: Regenerate with autoconf 2.61. * mn10200/configure: Regenerate with autoconf 2.61. * iq2000/configure: Regenerate with autoconf 2.61. * cris/configure: Regenerate with autoconf 2.61. * m68k/configure: Regenerate with autoconf 2.61. * spu/configure: Regenerate with autoconf 2.61. * m32c/configure: Regenerate with autoconf 2.61. * mn10300/configure: Regenerate with autoconf 2.61. * i960/configure: Regenerate with autoconf 2.61. * arm/configure: Regenerate with autoconf 2.61. * libnosys/configure: Regenerate with autoconf 2.61. * m68hc11/configure: Regenerate with autoconf 2.61. * bfin/configure: Regenerate with autoconf 2.61. * crx/configure: Regenerate with autoconf 2.61. * mt/configure: Regenerate with autoconf 2.61. * sparc/configure: Regenerate with autoconf 2.61. * sparc/libsys/configure: Regenerate with autoconf 2.61. * mcore/configure: Regenerate with autoconf 2.61. * mep/configure: Regenerate with autoconf 2.61. * frv/configure: Regenerate with autoconf 2.61. * doc/configure: Regenerate with autoconf 2.61.
* 2008-01-03 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2008-01-031-1/+1
| | | | | | | | | | | | | | | * arm/redboot-syscalls.c: Consistently supply _isatty if syscalls dir is used in newlib. * bfin/syscalls.c: Ditto. * cris/gensyscalls: Ditto. * fr30/syscalls.c: Ditto. * frv/isatty.c: Ditto. * iq2000/isatty.c: Ditto. * libnosys/isatty.c: Ditto. * m32r/isatty.c: Ditto. * mn10200/isatty.c: Ditto. * mn10300/isatty.c: Ditto. * xstormy16/isatty.c: New file with _isatty function.
* 2007-08-13 Carlos O'Donell <carlos@codesourcery.com>Jeff Johnston2007-08-131-4/+0
| | | | | * arm/crt0.S: Remove '.set' for __stack, hardware_init_hook, and software_init_hook.
* 2007-08-10 Carlos O'Donell <carlos@codesourcery.com>Jeff Johnston2007-08-101-161/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com> * arm/syscalls.c (_stat): Use _close * arm/syscalls.c (struct poslog): Rename to... (struct fdent): ... this. (FILE_HANDLE_OFFSET): Remove. (findslot): Return a struct fdent* if fd is valid, otherwise return NULL. (newslot): New function. (remap_handle): Remove. (initialise_monitor_handles): Use stdout as fallback for stderr. (wrap): Rename to... (checkerror): ... this. (_swiread): Use checkerror() for the return of SWI calls. Correct the use of r0. (_read): Use findslot(). Return EBADF on bad handle. (_swilseek): Call findslot(). Check for valid whence. Check for negative offset when using SEEK_CUR, and check for overflow. Use checkerror(). Check *_Flen calls for errors. (_swiwrite): Correct the use of r0. (_write): Call findslot(). (_swiopen): Call findslot(). Check for valid flags. Use checkerror(). Call newslot(). Handle O_TRUNC, and O_WRONLY. Return index into openfiles[] for fd. (_swiclose): Correct the use of r0. (_close): Handle stderr == stdout case. Only reclaim handle if _swiclose succeeded. (_getpid): Use __attribute__((unused)). (_sbrk): Fix formatting. (_swistat): New function. (_stat): Call _swistat(). (_fstat): Call _swistat(). (_unlink): Correct the use of r0. (isatty): Call finslot(). Correct the use of r0. (_system): Call checkerror(). Correct the use of r0. (_rename): Correct the use of r0.
* 2007-07-06 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2007-07-061-3/+3
| | | | | | | | | | | | | | | * arm/syscalls.c (gettimeofday): Change to POSIX signature where second argument is passed as void *. * bfin/syscalls.c (gettimeofday): Ditto. * cris/gensyscalls (gettimeofday): Ditto. * cris/linunistd.h (gettimeofday): Ditto. * crx/time.c (gettimeofday): Ditto. * frv/sim-time.c (gettimeofday): Ditto. * i386/cygmon-salib.c (gettimeofday): Ditto. * libnosys/gettod.c (gettimeofday): Ditto. * m68k/io-gettimeofday.c (gettimeofday): Ditto. * sparc/cygmon-salib.c (gettimeofday): Ditto. * spu/gettimeofday.c (gettimeofday): Ditto.
* 2006-01-03 Kazu Hirata <kazu@codesourcery.com>Jeff Johnston2007-01-034-35/+48
| | | | | | | | * arm/Makefile (RDPMON_OBJS): Add _exit.o and _kill.o. (RDIMON_OBJS): Define in terms of RDPMON_OBJS. (rdimon-_exit.o, rdimon-_kill.o): New. * arm/_exit.c, arm/_kill.c: New. * arm/syscalls.c (_exit, _kill): Remove.
* * arm/licfunc.c (do_AngelSWI): Remove.Kazu Hirata2006-12-253-35/+21
| | | | | * arm/syscalls.c (do_AngelSWI): Remove. * arm/swi.h (do_AngelSWI): New.
* * arm/syscalls.c (_unlink, _system, _rename): Cast argumentsKazu Hirata2006-12-251-4/+4
| | | | to do_AngelSWI to int.
* 2006-10-03 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston2006-10-031-3/+4
| | | | * arm/linux-syscalls0.c: Rewrite bx insn architecture flag check to avoid use of __ARM_ARCH__.
* 2006-10-02 Nick Clifton <nickc@redhat.com>Jeff Johnston2006-10-021-0/+4
| | | | | * arm/linux-syscalls0.c: Add arm architecture flag checks around bx insn.
* 2006-08-24 Paul Brook <paul@codesourcery.com>Jeff Johnston2006-08-241-1/+1
| | | | * arm/linux-crt0.c: Disable Arm stub for Thumb-2.