summaryrefslogtreecommitdiffstats
path: root/libgloss/aarch64
Commit message (Collapse)AuthorAgeFilesLines
* move ILP32 sanity check on heap base code under ARM_RDI_MONITORAlexander Fedotov-B556132017-08-241-4/+5
|
* Fix crt0 init fini codeSzabolcs Nagy2017-08-171-4/+0
| | | | | __USES_INITFINI__ ifdef was incorrectly copied from arm (it's an arm backend thing in gcc, not meaningful on aarch64)
* fix typo in AArch64 crt0Alexander Fedotov-B556132017-08-151-1/+1
|
* use stack from linker script when nosysAlexander Fedotov-B556132017-08-141-1/+18
|
* Don't fetch command line options without semi-hostingYao Qi2017-08-091-0/+6
| | | | | | | | | | | | | | | | | Nowadays, the code fetching command line options via semi-hosting are unconditionally pulled in, so that the semi-hosting code is still there even I compile with option --specs=nosys.specs. gdb ./aarch64-none-elf/libgloss/aarch64/crt0.o (gdb) disassemble _start 0x0000000000000050 <+80>: ldr x1, 0x128 <_cpu_init_hook+48> 0x0000000000000054 <+84>: mov w0, #0x15 0x0000000000000058 <+88>: hlt #0xf000 This patch fixes this problem by wrapping the code by ARM_RDI_MONITOR. When semi-hosting is not used, set command line options to NULL.
* Fix crt0 overwriting.Tamar Christina2017-08-094-1/+10
| | | | | | | | | | | On AArch64 we currently always link in crt0 regardless of if another one is being provided by something else, like rdimon.a. This was never an issue before as nosys was not supported on AArch64. This updates the specs to supply a different crt0 when a semihosting call is required. Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* Previous patch to support nosys.specs accidentally broke validation specs ↵Tamar Christina2017-07-211-1/+1
| | | | | | | | | | | | because ARM_RDI_MONITOR was never passed to the build rule for crt0. This fixed the compile for nosys and validation specs but nosys won't run because of existing limitations to aarch64's syscalls.c, it requires semihosting to get commandline arguments and heap info without having a fallback method as ARM does. Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* Fix link when nosys.specs is used to linkTamar Christina2017-07-141-0/+2
| | | | | | | | This patch fixes the issue where nosys.specs is used to link. e.g. The use of crt0 without any support for semihosting requested. The AArch64 crt0 was missing an #ifdef for the initialise_monitor_handles which was causing the link to fail. Sorry for missing this before.
* Add support for Semihosting v2 support for AArch64 in libgloss.Tamar Christina2017-07-054-47/+186
| | | | | | | | | | 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>
* Adds the needed build system changes in order to compile and create the new ↵Tamar Christina2017-07-054-16/+49
| | | | | | | | | | | libraries for Semihosting v2. This uses the new recursive build target in multi-build.in For AArch64 no new spec files are needed but the makefiles are modified to keep them in sync with the ARM ones. Signed-off-by: Tamar Christina <tamar.christina@arm.com>
* ARM/AArch64: Fix GetCmdLine semihosting directivesnewlib-snapshot-20170519Laurent ALFONSI2017-05-191-4/+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.
* * aarch64/Makefile.in (RDIMON_SCRIPTS): Rule to build in-tree copiesRichard Earnshaw2014-02-031-2/+5
| | | | | | of scripts. (all): Build the in-tree copies of the scripts. (clean): Also delete the in-tree copies of the scripts.
* * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Use bic-immediateCorinna Vinschen2014-01-281-2/+1
| | | | form to clear WXN bit.
* 2014-01-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>Jeff Johnston2014-01-241-1/+4
| | | | | * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Clear WXN bit in SCTLR_EL3. Add dsb.
* [AArch64] Set errno in ftruncate() and truncate().Marcus Shawcroft2013-11-212-0/+4
|
* [AArch64] Provide ftruncate() and truncate() stubs.Marcus Shawcroft2013-11-183-2/+72
|
* * aarch64/crt0.S: Remove 'start'.Corinna Vinschen2013-08-121-1/+0
| | | | | * arm/crt0.S: Ditto. * arm/redboot-crt0.S: Ditto.
* [AArch64] Ensure vector table is page aligned.Marcus Shawcroft2013-07-121-2/+1
| | | | | | 2013-07-12 Marcus Shawcroft <marcus.shawcroft@arm.com> * aarch64/cpu-init/rdimon-aem-el3.S (vectors): Page align.
* * aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__Corinna Vinschen2013-07-041-0/+4
| | | | is defined.
* * aarch64/syscalls.c (POINTER_TO_PARAM_BLOCK_T): New macro.Corinna Vinschen2013-06-281-10/+14
| | | | | | | | | | | (initialise_monitor_handles): Replace cast with macro POINTER_TO_PARAM_BLOCK_T. (_swiread): Likewise. (_swiwrite): Likewise. (_swiopen): Likewise. (_unlink): Likewise. (_system): Likewise. (_rename): Likewise.
* * aarch64/crt0.S (GEN_DWORD): New macro definition.Corinna Vinschen2013-06-251-17/+75
| | | | | | | | | | | | | | | | (PTR_REG): Ditto. (PTR_SIZE): Ditto. (PTR_LOG_SIZE): Ditto. (start): Use GEN_DWORD to replace the .dword of HeapBase, __bss_start__, __bss_end__, FUNCTION(_fini), env and CommandLine; when __ILP32__ is defined, set the stack base to the top end of the 32-bit address space if the returned value from the Angel API call is larger than or equal to 4 GiB. Also carry out sanity check on the heap base; abort if the base is larger than or equal to 4 GiB. Use other new macros in the instructions that processes the argv arrays. (StackBase): New lable; replace __stack_base__. (__stack_base__): Set with StackBase or StackBase + 4.
* [AArch64] Honour CFLAGS.Marcus Shawcroft2013-04-192-7/+8
| | | | | | | | | | 2013-04-19 Yufeng Zhang <yufeng.zhang@arm.com> * aarch64/Makefile.in (rdimon-crt0.o, rdimon-trap.o) (rdimon-_exit.o, rdimon-_kill.o, rdimon-syscalls.o) (rdimon-libcfunc.o): Add $(CFLAGS) to the compiler command line. * aarch64/cpu-init/Makefile.in (${CPU_INIT_OBJS}): Add $(CFLAGS) to the compiler command line.
* Correcting my previous commit.Marcus Shawcroft2013-01-222-0/+31
| | | | | In my previous commit I forget to cvs add two new files, this commit corrects my mistake.
* 2013-01-18 Marcus Shawcroft <marcus.shawcroft@arm.com>Marcus Shawcroft2013-01-181-1/+1
| | | | | | | * aarch64/Machine.in (RDIMON_SCRIPTS): Add aem-ve.specs and aem-validation.specs. * aarch64/elf-aem-validation.specs: New file. * aarch64/elf-aem-ve.specs: New file.
* * aarch64/configure.in: Replace the direct generation ofCorinna Vinschen2012-11-236-26/+4476
| | | | | | | | | | cpu-init/Makefile.in with AC_CONFIG_SUBDIRS(cpu-init). * aarch64/configure: Re-generate. * aarch64/cpu-init/Makefile.in (objtype): Remove. (Makefile, config.status): Update the rules. * aarch64/cpu-init/aclocal.m4: New file (generated). * aarch64/cpu-init/configure.in: New file. * aarch64/cpu-init/configure: New file (generated).
* 2012-09-26 Ian Bolton <ian.bolton@arm.com>Jeff Johnston2012-09-2613-0/+6046
Jim MacArthur <jim.macarthur@arm.com> Marcus Shawcroft <marcus.shawcroft@arm.com> Nigel Stephens <nigel.stephens@arm.com> Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> Richard Earnshaw <rearnsha@arm.com> Sofiane Naci <sofiane.naci@arm.com> Tejas Belagod <tejas.belagod@arm.com> Yufeng Zhang <yufeng.zhang@arm.com> * aarch64/Makefile.in: New file. * aarch64/_exit.c: New file. * aarch64/_kill.c: New file. * aarch64/aclocal.m4: Generated. * aarch64/configure: Generated. * aarch64/configure.in: New file. * aarch64/cpu-init/Makefile.in: New file. * aarch64/cpu-init/rdimon-aem-el3.S: New file. * aarch64/crt0.S: New file. * aarch64/elf-rdimon.specs: New file. * aarch64/libcfunc.c: New file. * aarch64/svc.h: New file. * aarch64/syscalls.c: New file. * configure.in: Add AArch64. * configure: Re-generated.