Commit Graph

2312 Commits

Author SHA1 Message Date
davidcunado-arm b1187232fd Merge pull request #992 from davidcunado-arm/dc/fix-signed-comparisons
xlat_tables_v2: fix signed/unsigned comparisons
2017-06-20 15:34:54 +01:00
Dimitris Papastamos c971143235 juno: Fix AArch32 build
Commit 6de8b24f52 broke Juno AArch32
build.

Change-Id: Ied70d9becb86e53ccb46a2e3245e2a551d1bf701
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2017-06-20 15:14:01 +01:00
Dimitris Papastamos f9688f2755 aarch32: Fix L2CTRL definition for Cortex A57 and A72
Fixes ARM-software/tf-issues#495

Change-Id: I6a0aea78f670cc199873218a18af1d9cc2a6fafd
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2017-06-20 15:14:01 +01:00
Dimitris Papastamos 94f7d1e205 aarch32: Implement errata workarounds for Cortex A57
This brings the implementation on par with the software
errata workarounds for AArch64.

Change-Id: I98a85fd92e32ae4259f4ec5b3e93cffc87090064
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2017-06-20 15:14:01 +01:00
Dimitris Papastamos 3749d853d2 aarch32: Implement errata workarounds for Cortex A53
This brings the implementation on par with the software
errata workarounds for AArch64.

Change-Id: Id103602e35b1c0ad3705a5b2b7cdb34dd8a8c5e2
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2017-06-20 15:14:01 +01:00
Dimitris Papastamos 56e0499971 aarch32: Implement cpu_rev_var_hs()
Helper function to assist with errata workaround application.

Change-Id: Idba42ca238442cc826f43444dbfa754e433a5e5e
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2017-06-20 15:14:01 +01:00
Dimitris Papastamos 10d664ce96 sp_min: Flush console at end of main()
Flush the console so the errata report is printed correctly
before exit to normal world.

Change-Id: Idd6b5199b5fb8bda9d16a7b5c6426cdda7c73167
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2017-06-20 15:14:01 +01:00
Dimitris Papastamos 21568304ef sp_min: Implement `sp_min_plat_runtime_setup()`
On ARM platforms before exiting from SP_MIN ensure that
the default console is switched to the runtime serial port.

Change-Id: I0ca0d42cc47e345d56179eac16aa3d6712767c9b
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2017-06-20 15:14:01 +01:00
Varun Wadekar 2676f6a9be xlat_tables_v2: fix signed/unsigned comparisons
This patch changes input param level in xlat_tables_print_internal() to
an unsigned int to fix the signed/unsigned comparison warnings. The
compiler complains about these warnings, thus halting the build flow
for Tegra platforms.

Change-Id: Ieccc262a63daca7a26ca6a14d81466397af8b89f
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Signed-off-by: David Cunado <david.cunado@arm.com>
2017-06-20 14:39:34 +01:00
davidcunado-arm 3705cd47b2 Merge pull request #966 from davidcunado-arm/dc/build_with_gcc6.2
Resolve build errors flagged by GCC 6.2
2017-06-20 12:20:08 +01:00
David Cunado 568ac1f730 Resolve build errors flagged by GCC 6.2
With GCC 6.2 compiler, more C undefined behaviour is being flagged as
warnings, which result in build errors in ARM TF build.

This patch addresses issue caused by enums with values that exceed
maximum value for an int. For these cases the enum is converted to
a set of defines.

Change-Id: I5114164be10d86d5beef3ea1ed9be5863855144d
Signed-off-by: David Cunado <david.cunado@arm.com>
2017-06-20 11:40:33 +01:00
davidcunado-arm 3465ab602a Merge pull request #991 from davidcunado-arm/dc/update_hikey
hikey960: migrate to use A53 specific defines
2017-06-20 10:21:38 +01:00
David Cunado 0d5eb656f7 hikey960: migrate to use A53 specific defines
The patch fb7d32e588 migrated the CPU
libraries to have unique defines, prefixing them with the CPU name.

This patch migrates the hikey960 platform port to use the A53 specific
defines.

Change-Id: Id76f544b0b236bbd4974ab5ffa1203f073c20021
Signed-off-by: David Cunado <david.cunado@arm.com>
2017-06-20 09:39:17 +01:00
Leo Yan 0aedca7173 plat: Hikey960: fix the CPU hotplug
In CPU off callback function, the old code uses the function
hisi_test_pwrdn_allcores() to check if all CPUs in cluster have been
powered off and if it's valid then power off the whole cluster. But the
function hisi_test_pwrdn_allcores() only maintains the different power
states only for CPU suspend/resume flow, so it cannot return correct
states for CPU on/off flow.

This patch is to change use hisi_test_cpu_down() to check if all CPUs
have been powered off, so that can power off the whole cluster properly
when all CPUs in cluster have been hotplugged off.

Signed-off-by: Tao Wang <kevin.wangtao@hisilicon.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
2017-06-19 08:00:46 +08:00
davidcunado-arm 6de8b24f52 Merge pull request #953 from vwadekar/tegra-misra-fixes-v1
Tegra misra fixes v1
2017-06-16 12:06:24 +01:00
davidcunado-arm 0dc3c35305 Merge pull request #984 from masahir0y/uniphier
uniphier memory-overrun bug fix
2017-06-16 09:17:45 +01:00
davidcunado-arm 3b6947ec55 Merge pull request #986 from jagadeeshujja/jagujj/fix-get-power-state
CSS:Fix scpi "get_power_state" when ARM_PLAT_MT is set
2017-06-16 09:17:28 +01:00
davidcunado-arm 5808ed8502 Merge pull request #980 from dp-arm/dp/make-fix
tools: Use exported quiet flag from top-level Makefile
2017-06-15 23:57:04 +01:00
davidcunado-arm 500c0edac6 Merge pull request #981 from soby-mathew/sm/cov_scmi
Fix coverity error in CSS SCMI driver
2017-06-15 23:50:30 +01:00
davidcunado-arm b4ebf54593 Merge pull request #985 from hzhuang1/remove_mailbox
hikey960: remove mailbox driver
2017-06-15 23:26:01 +01:00
jagadeesh ujja 878a8bdfde CSS:Fix scpi "get_power_state" when ARM_PLAT_MT is set
The ARM_PLAT_MT bit enables the support for MT bit in
MPIDR format. This means that the level 0 affinity
represents the thread and CPU / Cluster levels are
at affinity level 1 and 2 respectively.
This was not catered for in the scpi 'css_scp_get_power_state, API.
Since the SCPI driver can only cater for single threaded CPUs,
this patch fixes the problem by catering for this shift by
effectively ignoring the Thread (level 0) affinity level.

Change-Id: If44f55c9fb2773c8d3f8a9bbcf5420a6f7409dfe
Signed-off-by: jagadeesh ujja <jagadeesh.ujja@arm.com>
2017-06-15 16:51:56 +05:30
Haojian Zhuang a2b17c2192 hikey960: remove mailbox driver
Since this mailbox driver is abandoned, remove it.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-15 10:30:37 +08:00
Masahiro Yamada 3eba78d3c8 uniphier: fix memory over-run bug
Check the array index before the write.  This issue was found by a
static analysis tool.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-15 09:39:37 +09:00
Anthony Zhou ab712fd86b 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>
2017-06-14 17:02:01 -07:00
Anthony Zhou 3436089d67 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>
2017-06-14 17:01:51 -07:00
Varun Wadekar 9a8f05e47d 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>
2017-06-14 17:01:39 -07:00
Anthony Zhou 5bd1a177dd 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>
2017-06-14 17:01:27 -07:00
Anthony Zhou 31d97dc2d8 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>
2017-06-14 17:01:15 -07:00
Varun Wadekar f5f64e4dbc 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>
2017-06-14 17:01:04 -07:00
Varun Wadekar 368d54502c 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>
2017-06-14 17:00:53 -07:00
Varun Wadekar 70cb692e23 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>
2017-06-14 17:00:42 -07:00
Varun Wadekar 030567e6f5 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>
2017-06-14 17:00:30 -07:00
Varun Wadekar 6176b4fcb4 Add U() macro to share constants between C and other sources
This patch adds the U(_x) macros to utils_def.h to allow constants to
be shared between C and other sources.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2017-06-14 16:58:46 -07:00
Varun Wadekar fb7d32e588 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>
2017-06-14 15:00:13 -07:00
Varun Wadekar 6311f63de0 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>
2017-06-14 14:59:07 -07:00
davidcunado-arm dfe30efb1d Merge pull request #979 from soby-mathew/sm/aarch32_macro_fix
Fix stdlib defines for AArch32
2017-06-14 14:59:36 +01:00
davidcunado-arm 1502c4e157 Merge pull request #974 from masahir0y/uniphier
UniPhier Initial Support
2017-06-13 22:18:17 +01:00
davidcunado-arm 42fb35a8e6 Merge pull request #982 from hzhuang1/fix_hikey960
Fix hikey960
2017-06-13 09:21:09 +01:00
Haojian Zhuang 8aa928accf hikey960: fix the calculation in boardid
Since the type of ADC value is always unsigned int, don't
need to check the value with negative value.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-13 14:33:49 +08:00
Haojian Zhuang 101afa02b7 ufs: fix the and operator
Should use AND (&), not &&.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-06-13 14:33:49 +08:00
Masahiro Yamada 63b3a28ebb uniphier: add TSP support
Add TSP to test BL32 without relying on external projects.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-13 00:32:57 +09:00
Masahiro Yamada d8e919c7b8 uniphier: support Socionext UniPhier platform
Initial commit for Socionext UniPhier SoC support.  BL1, Bl2, and
BL31 are supported.  Refer to docs/plat/socionext-uniphier.md for
more detais.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-13 00:32:57 +09:00
dp-arm a967390062 tools: Use exported quiet flag from top-level Makefile
When V is set from the command line, the value is passed to the tools'
Makefiles as well.

Change-Id: I91a1f66de5c1ae6f36b6c9f0a9bd550d4a30f092
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2017-06-12 09:54:08 +01:00
Soby Mathew b78c402dd3 Fix coverity error in CSS SCMI driver
Change-Id: Ia7d731f429e452e4bc9f9a553d7105b6394c621c
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-09 15:31:57 +01:00
Soby Mathew 81bccbfff2 Fix stdlib defines for AArch32
Some of the macro defines in the header files of `include/lib/stdlib/machine/`
folder are not correct for AArch32. This patch fixes the same.

Change-Id: I8bfaf638a7986fd902648d2074537bd26c313cb3
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-09 14:47:52 +01:00
davidcunado-arm c396b7368a Merge pull request #972 from achingupta/ag/freebsd-dt-change
Device tree changes to boot FreeBSD on FVPs
2017-06-09 13:49:39 +01:00
davidcunado-arm c0a70dbd4a Merge pull request #971 from Xilinx/tegra
tegra: Fix build errors
2017-06-09 13:49:25 +01:00
davidcunado-arm 2f73f48e0a Merge pull request #973 from danh-arm/dh/add-maintainers
Docs: Clarify copyright requirements
2017-06-09 12:03:52 +01:00
davidcunado-arm b91926fd50 Merge pull request #968 from antonio-nino-diaz-arm/an/snprintf-alt
mbedtls: Don't use tf_snprintf if option not defined
2017-06-09 12:03:35 +01:00
davidcunado-arm c906d2a849 Merge pull request #967 from rockchip-linux/rockchip-cleanup-20170606
RK3399: Shrink M0 SRAM code to fit in PMUSRAM
2017-06-08 17:34:44 +01:00