| dbf9f283 | 07-Mar-2018 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1239 from arve-android/trusty-fixes
Trusty fixes |
| 06ff251e | 22-Feb-2018 |
Arve Hjønnevåg <arve@android.com> |
tegra/trusty: Setup tegra specific trusty args in platform code
Fixes tegra build with SPD=trusty. Not tested.
Change-Id: I851a2b00b8b1cc65112b6088980a811d8eda1a99 |
| 28db3e96 | 17-Feb-2018 |
Andreas Färber <afaerber@suse.de> |
tegra: Fix mmap_region_t struct mismatch
Commit fdb1964c34968921379d3592e7ac6e9a685dbab1 ("xlat: Introduce MAP_REGION2() macro") added a granularity field to mmap_region_t.
Tegra platforms were usi
tegra: Fix mmap_region_t struct mismatch
Commit fdb1964c34968921379d3592e7ac6e9a685dbab1 ("xlat: Introduce MAP_REGION2() macro") added a granularity field to mmap_region_t.
Tegra platforms were using the v2 xlat_tables implementation in common/tegra_common.mk, but v1 xlat_tables.h headers in soc/*/plat_setup.c where arrays are being defined. This caused the next physical address to be read as granularity, causing EINVAL error and triggering an assert.
Consistently use xlat_tables_v2.h header to avoid this.
Fixes ARM-software/tf-issues#548.
Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
| 3872fc2d | 31-Oct-2017 |
David Cunado <david.cunado@arm.com> |
Do not enable SVE on pre-v8.2 platforms
Pre-v8.2 platforms such as the Juno platform does not have the Scalable Vector Extensions implemented and so the build option ENABLE_SVE is set to zero.
This
Do not enable SVE on pre-v8.2 platforms
Pre-v8.2 platforms such as the Juno platform does not have the Scalable Vector Extensions implemented and so the build option ENABLE_SVE is set to zero.
This has a minor performance improvement with no functional impact.
Change-Id: Ib072735db7a0247406f8b60e325b7e28b1e04ad1 Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| e47ac1fd | 14-Sep-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Fix type of `unsigned long` constants
The type `unsigned long` is 32 bit wide in AArch32, but 64 bit wide in AArch64. This is inconsistent and that's why we avoid using it as per the Coding Guidelin
Fix type of `unsigned long` constants
The type `unsigned long` is 32 bit wide in AArch32, but 64 bit wide in AArch64. This is inconsistent and that's why we avoid using it as per the Coding Guidelines. This patch changes all `UL` occurrences to `U` or `ULL` depending on the context so that the size of the constant is clear.
This problem affected the macro `BIT(nr)`. As long as this macro is used to fill fields of registers, that's not a problem, since all registers are 32 bit wide in AArch32 and 64 bit wide in AArch64. However, if the macro is used to fill the fields of a 64-bit integer, it won't be able to set the upper 32 bits in AArch32.
By changing the type of this macro to `unsigned long long` the behaviour is always the same regardless of the architecture, as this type is 64-bit wide in both cases.
Some Tegra platform files have been modified by this patch.
Change-Id: I918264c03e7d691a931f0d1018df25a2796cc221 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| d0e1094e | 10-Aug-2017 |
Eleanor Bonnici <Eleanor.bonnici@arm.com> |
Tegra: Rename CORTEX_A57_ACTLR_EL1 to *CPUACTLR*
CORTEX_A57_ACTLR_EL1 macro refers to the CPUACTLR_EL1 register. Since ACTLR_EL1 is a different register (not implemented in Cortex-A57) this patch re
Tegra: Rename CORTEX_A57_ACTLR_EL1 to *CPUACTLR*
CORTEX_A57_ACTLR_EL1 macro refers to the CPUACTLR_EL1 register. Since ACTLR_EL1 is a different register (not implemented in Cortex-A57) this patch renames this macro for clarity.
Change-Id: I94d7d564cd2423ae032bbdd59a99d2dc535cdff6 Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.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 ...
|
| cb95a19a | 06-Jul-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: implement the early suspend handler
This patch implements the early suspend handler for Tegra SoCs. This handler is empty for now and the actual support for a particular platform would be add
Tegra: implement the early suspend handler
This patch implements the early suspend handler for Tegra SoCs. This handler is empty for now and the actual support for a particular platform would be added later.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| ee1ebbd1 | 14-Jul-2017 |
Isla Mitchell <isla.mitchell@arm.com> |
Fix order of remaining platform #includes
This fix modifies the order of system includes to meet the ARM TF coding standard. There are some exceptions to this change in order to retain header groupi
Fix order of remaining platform #includes
This fix modifies the order of system includes to meet the ARM TF coding standard. There are some exceptions to this change in order to retain header groupings and where there are headers within #if statements.
Change-Id: Ib5b668c992d817cc860e97b29e16ef106d17e404 Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
show more ...
|
| 2ba62de5 | 22-Jun-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
Fix Tegra CFLAGS usage
Use TF_CFLAGS instead of CFLAGS, to allow CFLAGS to be overriden from the make command line.
Change-Id: I3e5726c04bcd0176f232581b8be2c94413374ac7 Signed-off-by: Douglas Raill
Fix Tegra CFLAGS usage
Use TF_CFLAGS instead of CFLAGS, to allow CFLAGS to be overriden from the make command line.
Change-Id: I3e5726c04bcd0176f232581b8be2c94413374ac7 Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| ab712fd8 | 06-Mar-2017 |
Anthony Zhou <anzhou@nvidia.com> |
Tegra186: mce: fix MISRA defects
Main fixes:
* Added explicit casts (e.g. 0U) to integers in order for them to be compatible with whatever operation they're used in [Rule 10.1] * Force operands o
Tegra186: mce: fix MISRA defects
Main fixes:
* Added explicit casts (e.g. 0U) to integers in order for them to be compatible with whatever operation they're used in [Rule 10.1] * Force operands of an operator to the same type category [Rule 10.4] * Added curly braces ({}) around if/while statements in order to make them compound [Rule 15.6] * Added parentheses [Rule 12.1] * Voided non C-library functions whose return types are not used [Rule 17.7]
Change-Id: I91404edec2e2194b1ce2672d2a3fc6a1f5bf41f1 Signed-off-by: Anthony Zhou <anzhou@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 3436089d | 27-Apr-2017 |
Anthony Zhou <anzhou@nvidia.com> |
Tegra: delay_timer: fix MISRA defects
Main fixes:
* Include header file for function declarations [Rule 8.4] * Move global object into function [Rule 8.9]
Change-Id: I1bc9f3f0ebd4ffc0b8444ac856cd9
Tegra: delay_timer: fix MISRA defects
Main fixes:
* Include header file for function declarations [Rule 8.4] * Move global object into function [Rule 8.9]
Change-Id: I1bc9f3f0ebd4ffc0b8444ac856cd97b0cb56bda4 Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
show more ...
|
| 9a8f05e4 | 26-May-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: gic: fix MISRA defects
Main fixes:
* Use int32_t replace int, use uint32_t replace unsign int [Rule 4.6] * Added explicit casts (e.g. 0U) to integers in order for them to be compatible wit
Tegra: gic: fix MISRA defects
Main fixes:
* Use int32_t replace int, use uint32_t replace unsign int [Rule 4.6] * Added explicit casts (e.g. 0U) to integers in order for them to be compatible with whatever operation they're used in [Rule 10.1] * Force operands of an operator to the same type category [Rule 10.4] * Fixed assert/if statements conditions to be essentially boolean [Rule 14.4] * Added curly braces ({}) around if statements in order to make them compound [Rule 15.6] * Convert macros form headers to unsigned ints
Change-Id: I8051cc16499cece2039c9751bd347645f40f0901 Signed-off-by: Anthony Zhou <anzhou@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 5bd1a177 | 24-Feb-2017 |
Anthony Zhou <anzhou@nvidia.com> |
Tegra: fiq_glue: fix MISRA defects
Main fixes:
* Added explicit casts (e.g. 0U) to integers in order for them to be compatible with whatever operation they're used in [Rule 10.1]
* Convert objec
Tegra: fiq_glue: fix MISRA defects
Main fixes:
* Added explicit casts (e.g. 0U) to integers in order for them to be compatible with whatever operation they're used in [Rule 10.1]
* Convert object type to match the type of function parameters [Rule 10.3]
* Added curly braces ({}) around if statements in order to make them compound [Rule 15.6]
* Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses[Rule 20.7]
Change-Id: I5cf83caafcc1650b545ca731bf3eb8f0bfeb362b Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
show more ...
|
| 31d97dc2 | 13-Mar-2017 |
Anthony Zhou <anzhou@nvidia.com> |
Tegra: pmc: fix defects flagged during MISRA analysis
Main fixes:
* Fixed if/while statement conditional to be essentially boolean [Rule 14.4]
* Added curly braces ({}) around if/for/while stateme
Tegra: pmc: fix defects flagged during MISRA analysis
Main fixes:
* Fixed if/while statement conditional to be essentially boolean [Rule 14.4]
* Added curly braces ({}) around if/for/while statements in order to make them compound [Rule 15.6]
* Added explicit casts (e.g. 0U) to integers in order for them to be compatible with whatever operation they're used in [Rule 10.1]
Change-Id: Ic72b248aeede6cf18bf85051188ea7b8fd8ae829 Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
show more ...
|
| f5f64e4d | 26-Apr-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: memctrl: check GPU reset state from common place
This patch moves the GPU reset state check, during VideoMem resize, to the common SiP handler, to reduce code duplication.
Change-Id: I3818c5
Tegra: memctrl: check GPU reset state from common place
This patch moves the GPU reset state check, during VideoMem resize, to the common SiP handler, to reduce code duplication.
Change-Id: I3818c5f104b809da83dc2a61d6a8149606f81c13 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 368d5450 | 18-Apr-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: memctrl_v2: fix software logic to check "flush complete"
This patch fixes the logic to check if the command written to the MC_CLIENT_HOTRESET_CTRLx registers, was accepted by the hardware mod
Tegra: memctrl_v2: fix software logic to check "flush complete"
This patch fixes the logic to check if the command written to the MC_CLIENT_HOTRESET_CTRLx registers, was accepted by the hardware module.
Change-Id: If94fff9424555cb4688042eda17b4b20f4eb399a Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 70cb692e | 24-Apr-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: add explicit casts for integer macros
This patch adds explicit casts (U(x)) to integers in the tegra_def.h headers, to make them compatible with whatever operation they're used in [MISRA-C Ru
Tegra: add explicit casts for integer macros
This patch adds explicit casts (U(x)) to integers in the tegra_def.h headers, to make them compatible with whatever operation they're used in [MISRA-C Rule 10.1]
Change-Id: Ic5fc611aad986a2c6e6e6f625e0753ab9b69eb02 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| fb7d32e5 | 05-Jun-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Unique names for defines in the CPU libraries
This patch makes all the defines in the CPU libraries unique, by prefixing them with the CPU name.
NOTE: PLATFORMS USING THESE MACROS WILL HAVE TO UPDA
Unique names for defines in the CPU libraries
This patch makes all the defines in the CPU libraries unique, by prefixing them with the CPU name.
NOTE: PLATFORMS USING THESE MACROS WILL HAVE TO UPDATE THEIR CODE TO START USING THE UPDATED NAMES
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 6311f63d | 07-Jun-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: enable 'signed-comparison' compilation warning/errors
This patch enables the 'sign-compare' flag, to enable warning/errors for comparisons between signed/unsigned variables. The warning has b
Tegra: enable 'signed-comparison' compilation warning/errors
This patch enables the 'sign-compare' flag, to enable warning/errors for comparisons between signed/unsigned variables. The warning has been enabled for all the Tegra platforms, to start with.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| d20f189d | 07-Jun-2017 |
Soren Brinkmann <soren.brinkmann@xilinx.com> |
tegra: Fix build errors
The 'impl' variable is guarded by the symbol DEBUG, but used in an INFO level print statement. INFO is defined based on LOG_LEVEL. Hence, builds would fail when - DEBUG=0 &&
tegra: Fix build errors
The 'impl' variable is guarded by the symbol DEBUG, but used in an INFO level print statement. INFO is defined based on LOG_LEVEL. Hence, builds would fail when - DEBUG=0 && LOG_LEVEL>=LOG_LEVEL_INFO with a variable used but not defined - DEBUG=1 && LOG_LEVEL<LOG_LEVEL_INFO with a variable defined but not used
Fixing this by guarding impl with the same condition that guards INFO.
Fixes ARM-software/tf-issues#490 Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
show more ...
|
| 24c287be | 11-May-2017 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Tegra: Break circular dependency in platform header files
For SoCs T132 and T210, the header file 'platform_def.h' used to include 'tegra_def.h' and vice versa. This patch breaks this circular depen
Tegra: Break circular dependency in platform header files
For SoCs T132 and T210, the header file 'platform_def.h' used to include 'tegra_def.h' and vice versa. This patch breaks this circular dependency by making 'tegra_def.h' independent.
Change-Id: I45a00a84e6ab8b93d5e9242a9ff65f03e9102a96 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.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 ...
|
| 7c1d4342 | 18-Apr-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra210: implement 'get_target_pwr_state' handler
This patch implements the handler to calculate the cluster and system power states for the Tegra210 SoC. The power states returned by this handler
Tegra210: implement 'get_target_pwr_state' handler
This patch implements the handler to calculate the cluster and system power states for the Tegra210 SoC. The power states returned by this handler are used by the PSCI library to decide cache maintenance operations - cluster v cpu.
Change-Id: I93e4139d4cd8a086b51f328e9a76e91428ebcdab Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 14a1c0ed | 25-Jan-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: fix the NS DRAM address calculation logic
This patch fixes the logic used to calculate the end of NS memory aperture. The functions allows zero sized NS apertures as that is a valid requireme
Tegra: fix the NS DRAM address calculation logic
This patch fixes the logic used to calculate the end of NS memory aperture. The functions allows zero sized NS apertures as that is a valid requirement for some use cases. e.g. VPR resize.
Change-Id: Ie966e0ea2f9c6888d21c38e734003704094b3720 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|