Commit Graph

3180 Commits

Author SHA1 Message Date
Dimitris Papastamos 02f8c03884
Merge pull request #1327 from npoushin/npoushin/sgi575
ARM platforms: Add support for SGI575
2018-03-29 14:20:42 +01:00
Dimitris Papastamos 6ab136c258
Merge pull request #1313 from jonathanwright-ARM/jw/MISRA-switch-statements
Fix switch statements to comply with MISRA rules
2018-03-29 13:20:05 +01:00
Dimitris Papastamos 875a85aae6
Merge pull request #1333 from jeenu-arm/icfg-fix
GIC: Fix interrupt setting interrupt configuration
2018-03-29 13:19:04 +01:00
Dimitris Papastamos 79c0f525ab
Merge pull request #1325 from michpappas/tf-issues#568_qemu_add_ENABLE_STACK_PROTECTOR
qemu: Add support for stack canary protection
2018-03-29 11:27:36 +01:00
Dimitris Papastamos bd79727c93
Merge pull request #1331 from hzhuang1/reboot_delay
hikey960: add delay before reset
2018-03-29 11:26:10 +01:00
Dimitris Papastamos 469744e6c2
Merge pull request #1329 from antonio-nino-diaz-arm/an/rpi3-multi-console
rpi3: Migrate to the multi console API
2018-03-29 10:04:06 +01:00
Dimitris Papastamos e74af2afd0
Merge pull request #1335 from JoelHutton/jh/cleanup_void_pointers
Clean usage of void pointers to access symbols
2018-03-29 09:59:52 +01:00
Dimitris Papastamos 0b7477234a
Merge pull request #1336 from jonathanwright-ARM/jw/MISRA-init-arrays
psci: initialize array fully to comply with MISRA
2018-03-29 09:59:35 +01:00
Nariman Poushin b44cfc6d21 ARM platforms: Add support for SGI575
Add support for System Guidance for Infrastructure platform SGI575.

Change-Id: I0125c2ed4469fbc8367dafcc8adce770b6b3147d
Signed-off-by: Nariman Poushin <nariman.poushin@linaro.org>
2018-03-28 14:53:26 +01:00
Haojian Zhuang 7dcef5ebbb hikey960: add delay before reset
If system is still accessing storage device, reboot operation
may cause data broken. So add the flush and delay operation
before system reset.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2018-03-28 08:30:31 +08:00
Jonathan Wright 2271cb054d psci: initialize array fully to comply with MISRA
Initializes each element of the last_cpu_in_non_cpu_pd array in PSCI
stat implementation to -1, the reset value. This satisfies MISRA rule
9.3.

Previously, only the first element of the array was initialized to -1.

Change-Id: I666c71e6c073710c67c6d24c07a219b1feb5b773
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
2018-03-27 13:38:08 +01:00
Joel Hutton 9f85f9e379 Clean usage of void pointers to access symbols
Void pointers have been used to access linker symbols, by declaring an
extern pointer, then taking the address of it. This limits symbols
values to aligned pointer values. To remove this restriction an
IMPORT_SYM macro has been introduced, which declares it as a char
pointer and casts it to the required type.

Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
2018-03-27 13:20:27 +01:00
Antonio Nino Diaz e0f21f625f rpi3: Use new console APIs
Switch to the new console APIs enabled by setting MULTI_CONSOLE_API=1.

The crash console doesn't use this API, it uses internally the core
functions of the 16550 console.

`bl31_plat_runtime_setup` is no longer needed. When this platform port
was introduced, that function used to disable the console. It was needed
to override that behaviour. The new behaviour is to switch to the
runtime console. The console is registered for all scopes (boot, crash
and runtime) in `rpi3_console_init` so it is not needed to override the
default behaviour anymore.

Update documentation.

Change-Id: If2ee8f91044216183b7ef142e5c05ad6220ae92f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-03-27 09:39:47 +01:00
Jonathan Wright 185a23ffa3 services: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in services comply with
MISRA rules 16.1 - 16.7.

Change-Id: I47bf6ed4a026201e6fe125ce51842482e99e8bb0
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
2018-03-26 12:43:05 +01:00
Jonathan Wright 649c48f5dc plat: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in plat comply with MISRA
rules 16.1 - 16.7.

Change-Id: Ie4a7d2fd10f6141c0cfb89317ea28a755391622f
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
2018-03-26 12:43:05 +01:00
Jonathan Wright 3eacacc0ef lib: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in lib comply with MISRA
rules 16.1 - 16.7.

Change-Id: I52bc896fb7094d2b7569285686ee89f39f1ddd84
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
2018-03-26 12:43:05 +01:00
Jonathan Wright 5aa7498abd drivers: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in drivers comply with
MISRA rules 16.1 - 16.7.

Change-Id: I7a91e04b02af80fbc4673a52293386c0f81a0f7a
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
2018-03-26 12:43:05 +01:00
Jonathan Wright c9662db960 bl1: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in bl1 comply with MISRA
rules 16.1 - 16.7

Return statements inside switch clauses mean that we do not comply with
rule 16.3.

Change-Id: I8342389ba525dfc68b88e67dbb3690a529abfeb1
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
2018-03-26 12:43:05 +01:00
Jonathan Wright 8ae0df93a0 plat/common: remove fall-through on release build
Removes fall-through in switch statement on unknown interrupt type in
release builds.

Previous behaviour was to assert(0) on default case in debug builds but
fall through and interpret the unknown interrupt type as
INTR_TYPE_EL3 in release builds.

Change-Id: I05fb0299608efda0f9eda2288d3e56e5625e05c9
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
2018-03-26 12:43:05 +01:00
Dimitris Papastamos b7229e4919
Merge pull request #1323 from rockchip-linux/Fixes-rk3399-watchdog
rockchip/rk3399: save/restore watchdog register correctly
2018-03-26 10:53:24 +01:00
Jeenu Viswambharan 17e84eedb2 GIC: Fix setting interrupt configuration
- Interrupt configuration is a 2-bit field, so the field shift has to
    be double that of the bit number.

  - Interrupt configuration (level- or edge-trigger) is specified in the
    MSB of the field, not LSB.

Fixes applied to both GICv2 and GICv3 drivers.

Fixes ARM-software/tf-issues#570

Change-Id: Ia6ae6ed9ba9fb0e3eb0f921a833af48e365ba359
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
2018-03-26 09:45:48 +01:00
davidcunado-arm ba7848e283
Merge pull request #1330 from michpappas/tf-issues#571_qemu_fix_MULTI_CONSOLE=0
qemu: MULTI_CONSOLE_API=0 causes build error
2018-03-25 04:20:40 +01:00
Michalis Pappas 4c746fc56c qemu: MULTI_CONSOLE_API=0 causes build error
Add crash_console_init declaration to console.h
Only enable MULTI_CONSOLE_API for AArch64

Fixes ARM-software/tf-issues#571

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
2018-03-24 20:59:34 +08:00
davidcunado-arm 0d48df84b3
Merge pull request #1280 from gitfineon/master
plat/hikey: split boot memory layout to dedicated file
2018-03-23 03:43:29 +00:00
Antonio Nino Diaz 4f8053dd28 drivers: ti: 16550: Implement console flush
Replace placeholder by actual implementation.

Change-Id: I0861b1ac5304b0d2d7c32d7d9a48bd985e258e92
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-03-22 20:13:44 +00:00
Dimitris Papastamos 6f0b253b6f
Merge pull request #1324 from michpappas/tf-issues#567Platforms_cannot_override_ENABLE_STACK_PROTECTOR
Platforms cannot override ENABLE_STACK_PROTECTOR
2018-03-22 14:47:15 +00:00
davidcunado-arm b74774751b
Merge pull request #1321 from sandrine-bailleux-arm/topics/sb/fix-trusty-setup
Trusty: Fix sanity check on NS entry point
2018-03-22 09:22:13 +00:00
davidcunado-arm f13ef37a38
Merge pull request #1299 from michpappas/tf-issues#561_qemu_support_MULTI_CONSOLE
qemu: Support MULTI_CONSOLE_API
2018-03-22 07:57:55 +00:00
davidcunado-arm 0f66bbf2fd
Merge pull request #1307 from wangfeng-64/master
FVP: change the method for translating MPIDR values to a linear indices
2018-03-22 07:57:19 +00:00
davidcunado-arm fbdadd015d
Merge pull request #1311 from jonathanwright-ARM/jw/MISRA-EOF-usage
stdlib: remove comparison with EOF macro to comply with MISRA
2018-03-22 06:17:37 +00:00
Michalis Pappas 6a55f6aae9 [PATCH 2/2] qemu: Support MULTI_CONSOLE_API
Add support for the new MULTI_CONSOLE_API

Crash information is now displayed in both the runtime and crash consoles,
if a crash occurs after the runtime console has been enabled

Enable MULTI_CONSOLE_API by default on qemu builds

Fixes ARM-software/tf-issues#561

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
2018-03-22 10:34:39 +08:00
davidcunado-arm ff48086b32
Merge pull request #1293 from swarren/issue-551-followup
Don't make build results depend on dependency files
2018-03-21 20:11:19 +00:00
davidcunado-arm 60bb5258f9
Merge pull request #1294 from iwishguo/master
Change PLATFORM_ROOT to TF_PLATFORM_ROOT
2018-03-21 19:20:43 +00:00
davidcunado-arm 6d8db46bec
Merge pull request #1314 from antonio-nino-diaz-arm/an/smccc-header
Rename 'smcc' to 'smccc'
2018-03-21 19:18:29 +00:00
davidcunado-arm 363328063b
Merge pull request #1304 from antonio-nino-diaz-arm/an/fix-copyright
tegra: Use SPDX license identifier
2018-03-21 19:15:40 +00:00
Antonio Nino Diaz 085e80ec11 Rename 'smcc' to 'smccc'
When the source code says 'SMCC' it is talking about the SMC Calling
Convention. The correct acronym is SMCCC. This affects a few definitions
and file names.

Some files have been renamed (smcc.h, smcc_helpers.h and smcc_macros.S)
but the old files have been kept for compatibility, they include the
new ones with an ERROR_DEPRECATED guard.

Change-Id: I78f94052a502436fdd97ca32c0fe86bd58173f2f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-03-21 10:49:27 +00:00
Sandrine Bailleux 0d3feba930 Trusty: Fix sanity check on NS entry point
This patch fixes the sanity check on the non-secure entrypoint value
returned by bl31_plat_get_next_image_ep_info(). This issue has been
reported by Coverity Scan Online:

  CID 264893 (#1 of 1): Dereference null return value (NULL_RETURNS)
  Dereferencing a null pointer ns_ep_info.

Change-Id: Ia0f64d8c8b005f042608f1422ecbd42bc90b2fb4
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2018-03-21 08:29:31 +01:00
danh-arm ed8112606c
Fix SDEI link in readme.rst 2018-03-20 17:01:39 +00:00
danh-arm 8f3418b92f
Merge pull request #1316 from davidcunado-arm/dc/version_update
Release v1.5: Update minor version number to 5
2018-03-20 16:50:44 +00:00
danh-arm cefa8c4390
Merge pull request #1322 from danh-arm/dh/v1.5-readme
Update readme.rst for v1.5 release
2018-03-20 16:50:29 +00:00
danh-arm 1adde117f6
Merge pull request #1326 from JoelHutton/jh/user_guide_updates
Update user guide
2018-03-20 15:19:48 +00:00
Joel Hutton bf7008a8df Update user guide
Following Out of Box testing for v1.5 release:

    Update host OS version to Ubuntu 16.04
    Clarify configuration files needed for checkpatch
    Add note on using Linaro precompiled binaries

Change-Id: Ia4ae61e01128ddff1a288972ddf84b79370fa52c
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
2018-03-20 10:54:44 +00:00
Michalis Pappas f68d22e879 qemu: Add support for stack canary protection
Allow qemu users to enable stack protection. Since the virt platform
does not provide an RNG, use a basic, timer-based, canary generation,
similarly to FVP.

Increase SRAM size and BL2 size to fit images when stack protection is
enabled.

Notice that stack protection is not enabled by default in qemu.

Fixes ARM-software/tf-issues#568

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
2018-03-20 14:35:47 +08:00
Michalis Pappas 46e5e035ab Platforms cannot override ENABLE_STACK_PROTECTOR
Include stack_protector's makefile after including platform.mk
to allow platforms override ENABLE_STACK_PROTECTOR

Fixes ARM-software/tf-issues#567

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
2018-03-20 13:11:12 +08:00
Lin Huang 56bf940730 rockchip/rk3399: save/restore watchdog register correctly
there are two fix for save/restore watchdog register:
1. watchdog plck will shutdown after secure_watchdog_disable(), so need
   to save register before it and restore after secure_watchdog_enable().
2. need write 0x76 to cnt_restart to keep watchdog alive when restore
   watchdog register.

Change-Id: I1f6fbceae22186e3b72a87df6332a110adf37479
Signed-off-by: Lin Huang <hl@rock-chips.com>
2018-03-20 09:42:27 +08:00
Dan Handley 5b0b72760b Update readme.rst for v1.5 release
Change-Id: Id9bd0c20a5af4f41269a51a675018dcc59e93f6c
Signed-off-by: Dan Handley <dan.handley@arm.com>
2018-03-19 18:06:03 +00:00
Wang Feng 39b21d19a0 FVP: change the method for translating MPIDR values to a linear indices
x3 will be assigned by the folloing instructions.
So the first instruction is not needed any more.

old method:
  (ClusterId * FVP_MAX_CPUS_PER_CLUSTER)
+ (CPUId * FVP_MAX_PE_PER_CPU)
+ ThreadId

it should be
  (ClusterId * FVP_MAX_CPUS_PER_CLUSTER) * FVP_MAX_PE_PER_CPU
+ (CPUId * FVP_MAX_PE_PER_CPU)
+ ThreadId

which can be simplified as:
(ClusterId * FVP_MAX_CPUS_PER_CLUSTER + CPUId) * FVP_MAX_PE_PER_CPU + ThreadId

Signed-off-by: Wang Feng <feng_feng.wang@spreadtrum.com>
2018-03-17 14:51:58 +08:00
David Cunado 4a577f9628 Release v1.5: Update minor version number to 5
Change-Id: Ib215150272acc2ecec43f9b69624ebbbd5d7492d
Signed-off-by: David Cunado <david.cunado@arm.com>
2018-03-16 21:04:51 +00:00
davidcunado-arm fb45044bc5
Merge pull request #1312 from davidcunado-arm/dc/update_docs
Docs: Update various for v1.5 release
2018-03-15 20:41:16 +00:00
David Cunado 855ac025f1 Update model support in User Guide
The CI has been updated to run tests against the AEMv8-A RevC
model, FVP_Base_RevC-2xAEMv8A, which is available from the Fast
Model releases on Connected Community [1].

Additionally, the CI now also includes the Cortex-A55x4, Cortex-A75x4
and Cortex-A55x4-A75x4 Base models.

[1] https://developer.arm.com/products/system-design/fixed-virtual-platforms

Change-Id: I57806f3b2a8121211490a7aa0089dcae566d8635
Signed-off-by: David Cunado <david.cunado@arm.com>
2018-03-15 17:00:34 +00:00