aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2019-09-12fwk: Rename fwk_errno.h to fwk_status.hNicola Mazzucato
This patch renames the header file for the return values to fwk_status.h. This is to reflect the recent addition of positive values that do not fall into the error category. Change-Id: I283b945c39d3ad31702db0dc7687dbe99e81ed19 Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
2019-09-11arch/armv7-m: Split exception table from handlersChris Kay
This commit splits out the exception table from the handlers it links to. We need to do this in order to wrap the reset handler function, which is needed for Juno (see the next commit). The current situation is that, when compiling the exception table, the compiler can determine the address of the reset function statically. This means that by the the time the linker has had a chance to wrap the reset handler function, the link between the exception table and the function has already occurred, making it impossible for the linker to link to our wrapper function instead. We need to alter this situation so that when the linker comes to a reference to the reset handler, it can link it to the wrapped handler instead. To do this, we need to make sure that the compiler cannot determine the location of the function by itself, which requires putting the table and the handler in separate compilation units. Change-Id: Id17ddea28a3f26323bef45f4ce8961d50b866c59 Signed-off-by: Chris Kay <chris.kay@arm.com>
2019-07-23Clean-up stdlib.h inclusionRonald Cron
Include stdlib.h only to get the prototype of bsearch() Change-Id: Ifba75477426cc621eade3d2bf2440f07e8a46d07 Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2019-04-11linker: Add support for init hooksNicola Mazzucato
Co-authored-by Chris Kay <chris.kay@arm.com> Change-Id: I08e9d18fa31d119d4b57df067ebb7e0d9483915e Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
2019-01-03copyright: Extend to 2019Ronald Cron
Change-Id: I73e35e5caa53544c7f3bcb0097f2ad79fb0e2122 Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2018-10-08arm: Enable garbage collection of unused functions/dataChris Kay
This patch adds flags enabling the linker to remove functions and data that are not referenced, substantially reducing the size of the final binary. Change-Id: I4b276eb27fed776de78f2dd22c9658609643cb6b Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-10-08arm: Place RO data in the correct RAMChris Kay
The use case for the dual region memory layout without .data relocation is for firmware with dual RAMs - one on the instruction bus and one on the data bus. The linker scripts currently incorrectly place read-only data in the instruction-optimized RAM when it belongs in the data- optimized RAM. Change-Id: I742ab6907327cd8399b6faf3d3a34507ae1002de Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-10-08arm: Move linker script configuration to independent headerChris Kay
This commit moves common linker script configuration options to an independent header file that is now included from both the Arm Compiler and LD linker scripts. Change-Id: I0ad252cfbbb28cc482a9612da0dac87bb8e9f471 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-10-08arm: Clean up GNU linker script symbolsChris Kay
Change-Id: I97f6736d56d3e1f42a219547833abb1a5f54d03c Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-10-08arm: Convert assembly files to CChris Kay
Minimizing the amount of assembly we use makes it easier to understand the early boot flow and how objects are placed in the ELF image. Additionally, arm_init_ccr() is no longer called before the C runtime initialization is done, and is instead called by main(). Change-Id: Ib539bd45fb707d6948cc925a024cce803051ff8a Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-10-08arm: Prefix exception functions with "arm_"Chris Kay
This is in order to avoid conflicts with other names in the global namespace. Change-Id: I18f2ec432ef4cc02254e94a4cd02b3c1e789a6fe Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-10-08build: Disable -Wdollar-in-identifier-extension warning flagChris Kay
This flag stops Arm Compiler 6 from complaining about the linker-defined symbols. Change-Id: Ide8b3c0315129d04fe1aa1d126cb7131dfd1d553 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-09-17bs: Add support for Arm Compiler 6Chris Kay
Change-Id: Ib5a9f055b147433a55bbd09be69ae86e6dbf62f9 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-09-17arch: Simplify handling of the stack and the heapChris Kay
The stack/heap separation has been removed, allowing us to treat the stack and the heap as a single block of memory. This allows us to grow them towards each other rather than giving them both a fixed, non- overlapping size. Change-Id: I537535eeb21c947dc657daaacb75ebf2d9eeb7c5 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-09-17arch: Apply appropriate ELF attributes to the ARMv7-M exceptions tableChris Kay
Change-Id: I8b054eba5c58edf18dfb372addea5bb36946a501 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-09-17arch: Simplify linker script region management using region aliasesChris Kay
Region aliases allow us to specify alternative names for memory regions. This is particularly useful for sections that are not located in mem0, as it allows us to conditionally alias the mem1 region based on the firmware configuration. Change-Id: I490c513758caa8580fd1d633dcf8f774290b45cc Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-09-17arch: Move to Newlib's crt0Chris Kay
- Remove the custom crt0 initialization routines - Implement required Newlib symbols This includes _exit() and main() as well as __bss_start__, __bss_end__ and __stack, which are all used by newlib's crt0 routines. Change-Id: I229509c56bcccbfdbdf5700a5f048767aa9ecea5 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-09-17misc: Implement alignof, alignas, noreturn and static_assert manuallyChris Kay
The headers these constructs belong in were introduced with C11 standard library, but don't appear to be supported by the Arm Compiler 6's. We work around this by implementing them ourselves. Change-Id: I601701c0a8e2b5df02e7c2c95c5b0667aac6cff4 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-09-17arm: Use alternative assembly function declaration syntaxChris Kay
We need to transition to this style in order to support armclang's assembly parser. Change-Id: Id08f21196ed411e1022484fb0876770d210136d8 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-08-23misc: Replace `<assert.h>` includes with `<fwk_assert.h>`Chris Kay
This commit moves all inclusions of <assert.h> into <fwk_assert.h>, which now includes it instead. This allows us to keep all assert-related logic under one roof. Change-Id: I4ec0d950dfd9264733645bc14da952b8c1619501 Signed-off-by: Chris Kay <chris.kay@arm.com>
2018-06-08Add ARMv7-M architecture supportRonald Cron
The framework relies on some code specific to the architecture of the processor it is running on. This patch adds the code specific to the ARMv7-M based processors. Co-authored-by: Filipe Rinaldi <filipe.rinaldi@arm.com> Co-authored-by: Paul Beesley <paul.beesley@arm.com> Co-authored-by: Chris Kay <chris.kay@arm.com> Co-authored-by: Elieva Pignat <elieva.pignat@arm.com> Co-authored-by: Pedro Custodio <pedro.krewinkelcustodio@arm.com> Change-Id: If60f7f6a8907336bca90fe01394dab586b5c9a42 Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2018-06-08Add the SCP-firmware frameworkRonald Cron
Please see doc/framework.md for details. Co-authored-by: Filipe Rinaldi <filipe.rinaldi@arm.com> Co-authored-by: Paul Beesley <paul.beesley@arm.com> Co-authored-by: Chris Kay <chris.kay@arm.com> Co-authored-by: Elieva Pignat <elieva.pignat@arm.com> Co-authored-by: Pedro Custodio <pedro.krewinkelcustodio@arm.com> Change-Id: I1744c60eca295c60b3fabcfafb522fbff5d7306c Signed-off-by: Ronald Cron <ronald.cron@arm.com>