| 64cc6e91 | 08-Nov-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
ARMv7 may not support Virtualization Extensions
ARMv7-A Virtualization extensions brings new instructions and resources that were supported by later architectures. Reference ARM ARM Issue C.c [DDI04
ARMv7 may not support Virtualization Extensions
ARMv7-A Virtualization extensions brings new instructions and resources that were supported by later architectures. Reference ARM ARM Issue C.c [DDI0406C_C].
ERET and extended MSR/MRS instructions, as specified in [DDI0406C_C] in ID_PFR1 description of bits[15:12] (Virtualization Extensions): A value of 0b0001 implies implementation of the HVC, ERET, MRS (Banked register), and MSR (Banked register) instructions. The ID_ISARs do not identify whether these instructions are implemented.
UDIV/SDIV were introduced with the Virtualization extensions, even if not strictly related to the virtualization extensions.
If ARMv7 based platform does not set ARM_CORTEX_Ax=yes, platform shall define ARMV7_SUPPORTS_VIRTUALIZATION to enable virtualization extension related resources.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 908cf705 | 05-Nov-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
ARMv7 does not support SDCR
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> |
| 0147bef5 | 05-Nov-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
ARMv7 does not support STL instruction
Also need to add a SEV instruction in ARMv7 spin_unlock which is implicit in ARMv8.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> |
| c639e8eb | 22-Sep-2017 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
GIC: Allow specifying interrupt properties
The GIC driver initialization currently allows an array of interrupts to be configured as secure. Future use cases would require more interrupt configurati
GIC: Allow specifying interrupt properties
The GIC driver initialization currently allows an array of interrupts to be configured as secure. Future use cases would require more interrupt configuration other than just security, such as priority.
This patch introduces a new interrupt property array as part of both GICv2 and GICv3 driver data. The platform can populate the array with interrupt numbers and respective properties. The corresponding driver initialization iterates through the array, and applies interrupt configuration as required.
This capability, and the current way of supplying array (or arrays, in case of GICv3) of secure interrupts, are however mutually exclusive. Henceforth, the platform should supply either:
- A list of interrupts to be mapped as secure (the current way). Platforms that do this will continue working as they were. With this patch, this scheme is deprecated.
- A list of interrupt properties (properties include interrupt group). Individual interrupt properties are specified via. descriptors of type 'interrupt_prop_desc_t', which can be populated with the macro INTR_PROP_DESC().
A run time assert checks that the platform doesn't specify both.
Henceforth the old scheme of providing list of secure interrupts is deprecated. When built with ERROR_DEPRECATED=1, GIC drivers will require that the interrupt properties are supplied instead of an array of secure interrupts.
Add a section to firmware design about configuring secure interrupts.
Fixes ARM-software/tf-issues#262
Change-Id: I8eec29e72eb69dbb6bce77879febf32c95376942 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 7f56e9a3 | 04-Sep-2017 |
Soby Mathew <soby.mathew@arm.com> |
Implement log framework
This patch gives users control over logging messages printed from the C code using the LOG macros defined in debug.h Users now have the ability to reduce the log_level at run
Implement log framework
This patch gives users control over logging messages printed from the C code using the LOG macros defined in debug.h Users now have the ability to reduce the log_level at run time using the tf_log_set_max_level() function. The default prefix string can be defined by platform by overriding the `plat_log_get_prefix()` platform API which is also introduced in this patch.
The new log framework results in saving of some RO data. For example, when BL1 is built for FVP with LOG_LEVEL=LOG_LEVEL_VERBOSE, resulted in saving 384 bytes of RO data and increase of 8 bytes of RW data. The framework also adds about 108 bytes of code to the release build of FVP.
Fixes ARM-software/tf-issues#462
Change-Id: I476013d9c3deedfdd4c8b0b0f125665ba6250554 Co-authored-by: Eleanor Bonnici <Eleanor.bonnici@arm.com> Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 2d7e8282 | 04-Sep-2017 |
Soby Mathew <soby.mathew@arm.com> |
Introduce tf_vprintf() and tf_string_print()
This patch introduces tf_vprintf() and tf_string_print() APIs which is needed by the logging framework introduced in a later patch.
Change-Id: Ie4240443
Introduce tf_vprintf() and tf_string_print()
This patch introduces tf_vprintf() and tf_string_print() APIs which is needed by the logging framework introduced in a later patch.
Change-Id: Ie4240443d0e04e070502b51e371e546dd469fd33 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 2867ca37 | 06-Sep-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1078 from douglas-raillard-arm/dr/add_cfi_vector_entry
Add CFI debug info to vector entries |
| 413115e1 | 06-Sep-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1019 from etienne-lms/log-size
CPU_DATA_LOG2SIZE depends on cache line size |
| 86606eb5 | 01-Sep-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
cpu log buffer size depends on cache line size
Platform may use specific cache line sizes. Since CACHE_WRITEBACK_GRANULE defines the platform specific cache line size, it is used to define the size
cpu log buffer size depends on cache line size
Platform may use specific cache line sizes. Since CACHE_WRITEBACK_GRANULE defines the platform specific cache line size, it is used to define the size of the cpu data structure CPU_DATA_SIZE aligned on cache line size.
Introduce assembly macro 'mov_imm' for AArch32 to simplify implementation of function '_cpu_data_by_index'.
Change-Id: Ic2d49ffe0c3e51649425fd9c8c99559c582ac5a1 Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 31823b69 | 07-Aug-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
Add CFI debug info to vector entries
Add Call Frame Information assembler directives to vector entries so that debuggers display the backtrace of functions that triggered a synchronous exception. Fo
Add CFI debug info to vector entries
Add Call Frame Information assembler directives to vector entries so that debuggers display the backtrace of functions that triggered a synchronous exception. For example, a function triggering a data abort will be easier to debug if the backtrace can be displayed from a breakpoint at the beginning of the synchronous exception vector.
DS-5 needs CFI otherwise it will not attempt to display the backtrace. Other debuggers might have other needs. These debug information are stored in the ELF file but not in the final binary.
Change-Id: I32dc4e4b7af02546c93c1a45c71a1f6d710d36b1 Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| fed18b3a | 31-Aug-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
asm_macros: set the default assembly code alignment to 4 byte
Assembly routines are usually defined by using "func" and "endfunc":
func foo ... endfunc foo
Currently, the "func" macr
asm_macros: set the default assembly code alignment to 4 byte
Assembly routines are usually defined by using "func" and "endfunc":
func foo ... endfunc foo
Currently, the "func" macro does not specify ".align" directive by default. It causes unaligned instruction under some circumstances.
As far as I tested, this problem happens for GCC 5 or older. It did not happen for GCC 6 or newer. Taking into account that GCC 4.x / 5.x is still used, make sure that assembly code is at least 4 byte aligned.
[ How to reproduce the problem ]
For example, use GCC 5.3 downloaded from Linaro: http://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/ aarch64-linux-gnu/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
Expand mbedtls-2.4.2 to the current directory.
Try the following:
$ git log --oneline -1 77544ef Merge pull request #1071 from jeenu-arm/syntax-fix $ aarch64-linux-gnu-gcc --version | head -1 aarch64-linux-gnu-gcc (Linaro GCC 5.3-2016.05) 5.3.1 20160412 $ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=uniphier \ TRUSTED_BOARD_BOOT=1 MBEDTLS_DIR=mbedtls-2.4.2 ( snip build log ) $ aarch64-linux-gnu-nm build/uniphier/release/bl1/bl1.elf | grep handler 00000000800088f4 T bl1_fwu_smc_handler 00000000800084c8 T bl1_smc_handler 000000008000a6e0 t _panic_handler 000000008000a8e0 W plat_error_handler 000000008000a8e8 W plat_panic_handler 000000008000a8d8 W plat_reset_handler 000000008000a39f T reset_handler 000000008000a367 t smc_handler 000000008000a2ef t smc_handler64
You will notice "smc_handler64", "reset_handler", etc. are not properly aligned.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 64726e6d | 01-Aug-2017 |
Julius Werner <jwerner@chromium.org> |
Add new alignment parameter to func assembler macro
Assembler programmers are used to being able to define functions with a specific aligment with a pattern like this:
.align X myfunction:
H
Add new alignment parameter to func assembler macro
Assembler programmers are used to being able to define functions with a specific aligment with a pattern like this:
.align X myfunction:
However, this pattern is subtly broken when instead of a direct label like 'myfunction:', you use the 'func myfunction' macro that's standard in Trusted Firmware. Since the func macro declares a new section for the function, the .align directive written above it actually applies to the *previous* section in the assembly file, and the function it was supposed to apply to is linked with default alignment.
An extreme case can be seen in Rockchip's plat_helpers.S which contains this code:
[...] endfunc plat_crash_console_putc
.align 16 func platform_cpu_warmboot [...]
This assembles into the following plat_helpers.o:
Sections: Idx Name Size [...] Algn 9 .text.plat_crash_console_putc 00010000 [...] 2**16 10 .text.platform_cpu_warmboot 00000080 [...] 2**3
As can be seen, the *previous* function actually got the alignment constraint, and it is also 64KB big even though it contains only two instructions, because the .align directive at the end of its section forces the assembler to insert a giant sled of NOPs. The function we actually wanted to align has the default constraint. This code only works at all because the linker just happens to put the two functions right behind each other when linking the final image, and since the end of plat_crash_console_putc is aligned the start of platform_cpu_warmboot will also be. But it still wastes almost 64KB of image space unnecessarily, and it will break under certain circumstances (e.g. if the plat_crash_console_putc function becomes unused and its section gets garbage-collected out).
There's no real way to fix this with the existing func macro. Code like
func myfunc .align X
happens to do the right thing, but is still not really correct code (because the function label is inserted before the .align directive, so the assembler is technically allowed to insert padding at the beginning of the function which would then get executed as instructions if the function was called). Therefore, this patch adds a new parameter with a default value to the func macro that allows overriding its alignment.
Also fix up all existing instances of this dangerous antipattern.
Change-Id: I5696a07e2fde896f21e0e83644c95b7b6ac79a10 Signed-off-by: Julius Werner <jwerner@chromium.org>
show more ...
|
| 71fb3964 | 20-Apr-2017 |
Summer Qin <summer.qin@arm.com> |
Support Trusted OS firmware extra images in TF tools
Since Trusted OS firmware may have extra images, need to assign new uuid and image id for them. The TBBR chain of trust has been extended to add
Support Trusted OS firmware extra images in TF tools
Since Trusted OS firmware may have extra images, need to assign new uuid and image id for them. The TBBR chain of trust has been extended to add support for the new images within the existing Trusted OS firmware content certificate.
Change-Id: I678dac7ba1137e85c5779b05e0c4331134c10e06 Signed-off-by: Summer Qin <summer.qin@arm.com>
show more ...
|
| d832aee9 | 23-May-2017 |
dp-arm <dimitris.papastamos@arm.com> |
aarch64: Enable Statistical Profiling Extensions for lower ELs
SPE is only supported in non-secure state. Accesses to SPE specific registers from SEL1 will trap to EL3. During a world switch, befo
aarch64: Enable Statistical Profiling Extensions for lower ELs
SPE is only supported in non-secure state. Accesses to SPE specific registers from SEL1 will trap to EL3. During a world switch, before `TTBR` is modified the SPE profiling buffers are drained. This is to avoid a potential invalid memory access in SEL1.
SPE is architecturally specified only for AArch64.
Change-Id: I04a96427d9f9d586c331913d815fdc726855f6b0 Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 18f2efd6 | 13-Apr-2017 |
David Cunado <david.cunado@arm.com> |
Fully initialise essential control registers
This patch updates the el3_arch_init_common macro so that it fully initialises essential control registers rather then relying on hardware to set the res
Fully initialise essential control registers
This patch updates the el3_arch_init_common macro so that it fully initialises essential control registers rather then relying on hardware to set the reset values.
The context management functions are also updated to fully initialise the appropriate control registers when initialising the non-secure and secure context structures and when preparing to leave EL3 for a lower EL.
This gives better alignement with the ARM ARM which states that software must initialise RES0 and RES1 fields with 0 / 1.
This patch also corrects the following typos:
"NASCR definitions" -> "NSACR definitions"
Change-Id: Ia8940b8351dc27bc09e2138b011e249655041cfc Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| 030567e6 | 26-May-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
include: add U()/ULL() macros for constants
This patch uses the U() and ULL() macros for constants, to fix some of the signed-ness defects flagged by the MISRA scanner.
Signed-off-by: Varun Wadekar
include: add U()/ULL() macros for constants
This patch uses the U() and ULL() macros for constants, to fix some of the signed-ness defects flagged by the MISRA scanner.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 572e1413 | 30-May-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #949 from antonio-nino-diaz-arm/an/printf-memory
Reduce code size when building with Trusted Board Boot enabled |
| da5241cb | 17-May-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Introduce `tf_snprintf`
This is a reduced version of `snprintf` that only supports formats '%d', '%i' and '%u'. It can be used when the full `snprintf` is not needed in order to save memory. If it f
Introduce `tf_snprintf`
This is a reduced version of `snprintf` that only supports formats '%d', '%i' and '%u'. It can be used when the full `snprintf` is not needed in order to save memory. If it finds an unknown format specifier, it prints an error message and panics.
Change-Id: I2cb06fcdf74cda2c43caf73ae0762a91499fc04e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 2a6c1a8f | 08-May-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fip: move headers shared between TF and fiptool to include/tools_share
Some header files need to be shared between TF and host programs. For fiptool, two headers are copied to the tools/fiptool dire
fip: move headers shared between TF and fiptool to include/tools_share
Some header files need to be shared between TF and host programs. For fiptool, two headers are copied to the tools/fiptool directory, but it looks clumsy.
This commit introduces a new directory, include/tools_share, which collects headers that should be shared between TF and host programs.
This will clarify the interface exposed to host tools. We should add new headers to this directory only when we really need to do so.
For clarification, I inserted a blank line between headers from the include/ directory (#include <...>) and ones from a local directory (#include "..." ).
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 82cb2c1a | 03-May-2017 |
dp-arm <dimitris.papastamos@arm.com> |
Use SPDX license identifiers
To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file.
NOTE: Files that have been imported by
Use SPDX license identifiers
To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file.
NOTE: Files that have been imported by FreeBSD have not been modified.
[0]: https://spdx.org/
Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 0f22bef3 | 29-Apr-2017 |
Scott Branden <sbranden@users.noreply.github.com> |
Merge branch 'integration' into tf_issue_461 |
| 53d9c9c8 | 10-Apr-2017 |
Scott Branden <scott.branden@broadcom.com> |
Move defines in utils.h to utils_def.h to fix shared header compile issues
utils.h is included in various header files for the defines in it. Some of the other header files only contain defines. Th
Move defines in utils.h to utils_def.h to fix shared header compile issues
utils.h is included in various header files for the defines in it. Some of the other header files only contain defines. This allows the header files to be shared between host and target builds for shared defines.
Recently types.h has been included in utils.h as well as some function prototypes.
Because of the inclusion of types.h conflicts exist building host tools abd these header files now. To solve this problem, move the defines to utils_def.h and have this included by utils.h and change header files to only include utils_def.h and not pick up the new types.h being introduced.
Fixes ARM-software/tf-issues#461
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Remove utils_def.h from utils.h
This patch removes utils_def.h from utils.h as it is not required. And also makes a minor change to ensure Juno platform compiles.
Change-Id: I10cf1fb51e44a8fa6dcec02980354eb9ecc9fa29
show more ...
|
| 484acce3 | 21-Apr-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #910 from dp-arm/dp/AArch32-juno-port
Add AArch32 support for Juno |
| dc787588 | 10-Nov-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
AArch32: Add support for ARM Cortex-A53/57/72 MPCore Processor
This patch adds AArch32 state support for ARM Cortex-A53, Cortex-A57 and Cortex-A72 MPCore Processor in the CPU specific operations fra
AArch32: Add support for ARM Cortex-A53/57/72 MPCore Processor
This patch adds AArch32 state support for ARM Cortex-A53, Cortex-A57 and Cortex-A72 MPCore Processor in the CPU specific operations framework.
NOTE: CPU errata handling code is not present in this patch.
Change-Id: I01eb3e028e40dde37565707ebc99e06e7a0c113d Signed-off-by: Yatharth Kochar <yatharth.kochar@arm.com> Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 044bb2fa | 20-Apr-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove build option `ASM_ASSERTION`
The build option `ENABLE_ASSERTIONS` should be used instead. That way both C and ASM assertions can be enabled or disabled together.
All occurrences of `ASM_ASSE
Remove build option `ASM_ASSERTION`
The build option `ENABLE_ASSERTIONS` should be used instead. That way both C and ASM assertions can be enabled or disabled together.
All occurrences of `ASM_ASSERTION` in common code and ARM platforms have been replaced by `ENABLE_ASSERTIONS`.
ASM_ASSERTION has been removed from the user guide.
Change-Id: I51f1991f11b9b7ff83e787c9a3270c274748ec6f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|