| ed81f3eb | 05-Jul-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Introduce utils.h header file
This patch introduces a new header file: include/lib/utils.h. Its purpose is to provide generic macros and helper functions that are independent of any BL image, archit
Introduce utils.h header file
This patch introduces a new header file: include/lib/utils.h. Its purpose is to provide generic macros and helper functions that are independent of any BL image, architecture, platform and even not specific to Trusted Firmware.
For now, it contains only 2 macros: ARRAY_SIZE() and IS_POWER_OF_TWO(). These were previously defined in bl_common.h and xlat_tables.c respectively.
bl_common.h includes utils.h to retain compatibility for platforms that relied on bl_common.h for the ARRAY_SIZE() macro. Upstream platform ports that use this macro have been updated to include utils.h.
Change-Id: I960450f54134f25d1710bfbdc4184f12c049a9a9
show more ...
|
| b9161469 | 14-Jun-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib: Introduce MT_EXECUTE/MT_EXECUTE_NEVER attributes
This patch introduces the MT_EXECUTE/MT_EXECUTE_NEVER memory mapping attributes in the translation table library to specify the access perm
xlat lib: Introduce MT_EXECUTE/MT_EXECUTE_NEVER attributes
This patch introduces the MT_EXECUTE/MT_EXECUTE_NEVER memory mapping attributes in the translation table library to specify the access permissions for instruction execution of a memory region. These new attributes should be used only for normal, read-only memory regions. For other types of memory, the translation table library still enforces the following rules, regardless of the MT_EXECUTE/MT_EXECUTE_NEVER attribute:
- Device memory is always marked as execute-never. - Read-write normal memory is always marked as execute-never.
Change-Id: I8bd27800a8c1d8ac1559910caf4a4840cf25b8b0
show more ...
|
| a31d8983 | 11-Mar-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Add Performance Measurement Framework(PMF)
This patch adds Performance Measurement Framework(PMF) in the ARM Trusted Firmware. PMF is implemented as a library and the SMC interface is provided throu
Add Performance Measurement Framework(PMF)
This patch adds Performance Measurement Framework(PMF) in the ARM Trusted Firmware. PMF is implemented as a library and the SMC interface is provided through ARM SiP service.
The PMF provides capturing, storing, dumping and retrieving the time-stamps, by enabling the development of services by different providers, that can be easily integrated into ARM Trusted Firmware. The PMF capture and retrieval APIs can also do appropriate cache maintenance operations to the timestamp memory when the caller indicates so.
`pmf_main.c` consists of core functions that implement service registration, initialization, storing, dumping and retrieving the time-stamp. `pmf_smc.c` consists SMC handling for registered PMF services. `pmf.h` consists of the macros that can be used by the PMF service providers to register service and declare time-stamp functions. `pmf_helpers.h` consists of internal macros that are used by `pmf.h`
By default this feature is disabled in the ARM trusted firmware. To enable it set the boolean flag `ENABLE_PMF` to 1.
NOTE: The caller is responsible for specifying the appropriate cache maintenance flags and for acquiring/releasing appropriate locks before/after capturing/retrieving the time-stamps.
Change-Id: Ib45219ac07c2a81b9726ef6bd9c190cc55e81854
show more ...
|
| adb1ddf8 | 08-Jun-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #639 from danh-arm/dh/import-libfdt
Import libfdt v1.4.1 and related changes |
| 87e7a9a5 | 06-Jun-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #644 from sandrine-bailleux-arm/sb/rm-outdated-comment
xlat lib: Remove out-dated comment |
| 754d78b1 | 02-Jun-2016 |
Dan Handley <dan.handley@arm.com> |
Minor libfdt changes to enable TF integration
* Move libfdt API headers to include/lib/libfdt * Add libfdt.mk helper makefile * Remove unused libfdt files * Minor changes to fdt.h and libfdt.h to ma
Minor libfdt changes to enable TF integration
* Move libfdt API headers to include/lib/libfdt * Add libfdt.mk helper makefile * Remove unused libfdt files * Minor changes to fdt.h and libfdt.h to make them C99 compliant
Co-Authored-By: Jens Wiklander <jens.wiklander@linaro.org>
Change-Id: I425842c2b111dcd5fb6908cc698064de4f77220e
show more ...
|
| f0b489c1 | 02-Jun-2016 |
Dan Handley <dan.handley@arm.com> |
Move stdlib header files to include/lib/stdlib
* Move stdlib header files from include/stdlib to include/lib/stdlib for consistency with other library headers. * Fix checkpatch paths to continue e
Move stdlib header files to include/lib/stdlib
* Move stdlib header files from include/stdlib to include/lib/stdlib for consistency with other library headers. * Fix checkpatch paths to continue excluding stdlib files. * Create stdlib.mk to define the stdlib source files and include directories. * Include stdlib.mk from the top level Makefile. * Update stdlib header path in the fip_create Makefile. * Update porting-guide.md with the new paths.
Change-Id: Ia92c2dc572e9efb54a783e306b5ceb2ce24d27fa
show more ...
|
| 72b60081 | 31-May-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
xlat lib: Remove out-dated comment
As of commit e1ea9290bb, if the attributes of an inner memory region are different than the outer region, new page tables are generated regardless of how "restrict
xlat lib: Remove out-dated comment
As of commit e1ea9290bb, if the attributes of an inner memory region are different than the outer region, new page tables are generated regardless of how "restrictive" they are. This patch removes an out-dated comment still referring to the old priority system based on which attributes were more restrictive.
Change-Id: Ie7fc1629c90ea91fe50315145f6de2f3995e5e00
show more ...
|
| 2460ac18 | 09-Feb-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Add support for ARM Cortex-A73 MPCore Processor
This patch adds ARM Cortex-A73 MPCore Processor support in the CPU specific operations framework. It also includes this support for the Base FVP port.
Add support for ARM Cortex-A73 MPCore Processor
This patch adds ARM Cortex-A73 MPCore Processor support in the CPU specific operations framework. It also includes this support for the Base FVP port.
Change-Id: I0e26b594f2ec1d28eb815db9810c682e3885716d
show more ...
|
| adeecf92 | 21-Apr-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Add support for Cortex-A57 erratum 833471 workaround
Change-Id: I86ac81ffd7cd094ce68c4cceb01c16563671a063 |
| 07288865 | 14-Apr-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Add support for Cortex-A57 erratum 826977 workaround
Change-Id: Icaacd19c4cef9c10d02adcc2f84a4d7c97d4bcfa |
| 0b77197b | 14-Apr-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Add support for Cortex-A57 erratum 829520 workaround
Change-Id: Ia2ce8aa752efb090cfc734c1895c8f2539e82439 |
| a8b1c769 | 14-Apr-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Add support for Cortex-A57 erratum 828024 workaround
Change-Id: I632a8c5bb517ff89c69268e865be33101059be7d |
| df22d602 | 14-Apr-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Add support for Cortex-A57 erratum 826974 workaround
Change-Id: I45641551474f4c58c638aff8c42c0ab9a8ec78b4 |
| 81b491ff | 18-Apr-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #595 from sandrine-bailleux-arm/sb/unoptimised-build
Add support for unoptimised (-O0) build |
| 10c252c1 | 11-Apr-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Fix build error with optimizations disabled (-O0)
If Trusted Firmware is built with optimizations disabled (-O0), the linker throws the following error:
undefined reference to 'xxx'
Where 'xxx
Fix build error with optimizations disabled (-O0)
If Trusted Firmware is built with optimizations disabled (-O0), the linker throws the following error:
undefined reference to 'xxx'
Where 'xxx' is a raw inline function defined in a header file. The reason is that, with optimizations disabled, GCC may decide to skip the inlining. If that is the case, an external definition to the compilation unit must be provided. Because no external definition is present, the linker throws the error.
This patch fixes the problem by declaring the following inline functions static, so the internal definition is used: - cm_set_next_context() - bakery_lock_init()
Note that building the TF with optimizations disabled when Trusted Board Boot is enabled is currently unsupported, as this makes the BL2 image too big to fit in memory without any adjustment of its base address. Similarly, disabling optimizations for debug builds on FVP is unsupported at the moment.
Change-Id: I284a9f84cc8df96a0c1a52dfe05c9e8544c0cefe
show more ...
|
| 3ca9928d | 22-Mar-2016 |
Soby Mathew <soby.mathew@arm.com> |
Refactor the xlat_tables library code
The AArch32 long descriptor format and the AArch64 descriptor format correspond to each other which allows possible sharing of xlat_tables library code between
Refactor the xlat_tables library code
The AArch32 long descriptor format and the AArch64 descriptor format correspond to each other which allows possible sharing of xlat_tables library code between AArch64 and AArch32. This patch refactors the xlat_tables library code to seperate the common functionality from architecture specific code. Prior to this patch, all of the xlat_tables library code were in `lib/aarch64/xlat_tables.c` file. The refactored code is now in `lib/xlat_tables/` directory. The AArch64 specific programming for xlat_tables is in `lib/xlat_tables/aarch64/xlat_tables.c` and the rest of the code common to AArch64 and AArch32 is in `lib/xlat_tables/xlat_tables_common.c`. Also the data types used in xlat_tables library APIs are reworked to make it compatible between AArch64 and AArch32.
The `lib/aarch64/xlat_tables.c` file now includes the new xlat_tables library files to retain compatibility for existing platform ports. The macros related to xlat_tables library are also moved from `include/lib/aarch64/arch.h` to the header `include/lib/xlat_tables.h`.
NOTE: THE `lib/aarch64/xlat_tables.c` FILE IS DEPRECATED AND PLATFORM PORTS ARE EXPECTED TO INCLUDE THE NEW XLAT_TABLES LIBRARY FILES IN THEIR MAKEFILES.
Change-Id: I3d17217d24aaf3a05a4685d642a31d4d56255a0f
show more ...
|
| c2916417 | 01-Apr-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #577 from antonio-nino-diaz-arm/an/remove-xlat-helpers
Remove xlat_helpers.c |
| f33fbb2f | 31-Mar-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove xlat_helpers.c
lib/aarch64/xlat_helpers.c defines helper functions to build translation descriptors, but no common code or upstream platform port uses them. As the rest of the xlat_tables cod
Remove xlat_helpers.c
lib/aarch64/xlat_helpers.c defines helper functions to build translation descriptors, but no common code or upstream platform port uses them. As the rest of the xlat_tables code evolves, there may be conflicts with these helpers, therefore this code should be removed.
Change-Id: I9f5be99720f929264818af33db8dada785368711
show more ...
|
| 6b836cf9 | 22-Mar-2016 |
Gerald Lejeune <gerald.lejeune@st.com> |
Add ISR_EL1 to crash report
Bring ISR bits definition as a mnemonic for troublershooters as well.
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com> |
| 4ca57535 | 22-Mar-2016 |
Gerald Lejeune <gerald.lejeune@st.com> |
Remove DAIF bits handling macros
These macros are unused and redundant with other CPU system registers functions.
Moreover enable_serror() function implementation may not reach its purpose because
Remove DAIF bits handling macros
These macros are unused and redundant with other CPU system registers functions.
Moreover enable_serror() function implementation may not reach its purpose because it does not handle the value of SCR_EL3.EA.
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com>
show more ...
|
| 5f654975 | 01-Mar-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Extend memory attributes to map non-cacheable memory
At the moment, the memory translation library allows to create memory mappings of 2 types:
- Device nGnRE memory (named MT_DEVICE in the librar
Extend memory attributes to map non-cacheable memory
At the moment, the memory translation library allows to create memory mappings of 2 types:
- Device nGnRE memory (named MT_DEVICE in the library);
- Normal, Inner Write-back non-transient, Outer Write-back non-transient memory (named MT_MEMORY in the library).
As a consequence, the library code treats the memory type field as a boolean: everything that is not device memory is normal memory and vice-versa.
In reality, the ARMv8 architecture allows up to 8 types of memory to be used at a single time for a given exception level. This patch reworks the memory attributes such that the memory type is now defined as an integer ranging from 0 to 7 instead of a boolean. This makes it possible to extend the list of memory types supported by the memory translation library.
The priority system dictating memory attributes for overlapping memory regions has been extended to cope with these changes but the algorithm at its core has been preserved. When a memory region is re-mapped with different memory attributes, the memory translation library examines the former attributes and updates them only if the new attributes create a more restrictive mapping. This behaviour is unchanged, only the manipulation of the value has been modified to cope with the new format.
This patch also introduces a new type of memory mapping in the memory translation library: MT_NON_CACHEABLE, meaning Normal, Inner Non-cacheable, Outer Non-cacheable memory. This can be useful to map a non-cacheable memory region, such as a DMA buffer for example.
The rules around the Execute-Never (XN) bit in a translation table for an MT_NON_CACHEABLE memory mapping have been aligned on the rules used for MT_MEMORY mappings: - If the memory is read-only then it is also executable (XN = 0); - If the memory is read-write then it is not executable (XN = 1).
The shareability field for MT_NON_CACHEABLE mappings is always set as 'Outer-Shareable'. Note that this is not strictly needed since shareability is only relevant if the memory is a Normal Cacheable memory type, but this is to align with the existing device memory mappings setup. All Device and Normal Non-cacheable memory regions are always treated as Outer Shareable, regardless of the translation table shareability attributes.
This patch also removes the 'ATTR_SO' and 'ATTR_SO_INDEX' #defines. They were introduced to map memory as Device nGnRnE (formerly called "Strongly-Ordered" memory in the ARMv7 architecture) but were not used anywhere in the code base. Removing them avoids any confusion about the memory types supported by the library.
Upstream platforms do not currently use the MT_NON_CACHEABLE memory type.
NOTE: THIS CHANGE IS SOURCE COMPATIBLE BUT PLATFORMS THAT RELY ON THE BINARY VALUES OF `mmap_attr_t` or the `attr` argument of `mmap_add_region()` MAY BE BROKEN.
Change-Id: I717d6ed79b4c845a04e34132432f98b93d661d79
show more ...
|
| 85df7e44 | 18-Feb-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #523 from jcastillo-arm/jc/genfw-791
ARM platforms: rationalise memory attributes of shared memory |
| 74eb26e4 | 13-Jan-2016 |
Juan Castillo <juan.castillo@arm.com> |
ARM platforms: rationalise memory attributes of shared memory
The shared memory region on ARM platforms contains the mailboxes and, on Juno, the payload area for communication with the SCP. This sha
ARM platforms: rationalise memory attributes of shared memory
The shared memory region on ARM platforms contains the mailboxes and, on Juno, the payload area for communication with the SCP. This shared memory may be configured as normal memory or device memory at build time by setting the platform flag 'PLAT_ARM_SHARED_RAM_CACHED' (on Juno, the value of this flag is defined by 'MHU_PAYLOAD_CACHED'). When set as normal memory, the platform port performs the corresponding cache maintenance operations. From a functional point of view, this is the equivalent of setting the shared memory as device memory, so there is no need to maintain both options.
This patch removes the option to specify the shared memory as normal memory on ARM platforms. Shared memory is always treated as device memory. Cache maintenance operations are no longer needed and have been replaced by data memory barriers to guarantee that payload and MHU are accessed in the right order.
Change-Id: I7f958621d6a536dd4f0fa8768385eedc4295e79f
show more ...
|
| 54035fc4 | 13-Jan-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Disable non-temporal hint on Cortex-A53/57
The LDNP/STNP instructions as implemented on Cortex-A53 and Cortex-A57 do not behave in a way most programmers expect, and will most probably result in a s
Disable non-temporal hint on Cortex-A53/57
The LDNP/STNP instructions as implemented on Cortex-A53 and Cortex-A57 do not behave in a way most programmers expect, and will most probably result in a significant speed degradation to any code that employs them. The ARMv8-A architecture (see Document ARM DDI 0487A.h, section D3.4.3) allows cores to ignore the non-temporal hint and treat LDNP/STNP as LDP/STP instead.
This patch introduces 2 new build flags: A53_DISABLE_NON_TEMPORAL_HINT and A57_DISABLE_NON_TEMPORAL_HINT to enforce this behaviour on Cortex-A53 and Cortex-A57. They are enabled by default.
The string printed in debug builds when a specific CPU errata workaround is compiled in but skipped at runtime has been generalised, so that it can be reused for the non-temporal hint use case as well.
Change-Id: I3e354f4797fd5d3959872a678e160322b13867a1
show more ...
|