Commit Graph

3191 Commits

Author SHA1 Message Date
Roberto Vargas 735181b634 Fix MISRA rule 8.3 Part 4
Rule 8.3: All declarations of an object or function shall
          use the same names and type qualifiers

Fixed for:
	make DEBUG=1 PLAT=fvp SPD=tspd TRUSTED_BOARD_BOOT=1 \
	     GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \
	     ROT_KEY=arm_rotprivk_rsa.pem MBEDTLS_DIR=mbedtls all

Change-Id: Ia34fe1ae1f142e89c9a6c19831e3daf4d28f5831
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-04-13 14:01:56 +01:00
Roberto Vargas 1a29f93815 Fix MISRA rule 8.4 Part 3
Rule 8.4: A compatible declaration shall be visible when
          an object or function with external linkage is defined

Fixed for:
	make DEBUG=1 PLAT=fvp SPD=tspd all

Change-Id: I0a16cf68fef29cf00ec0a52e47786f61d02ca4ae
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-04-13 14:01:56 +01:00
Roberto Vargas a27163bc70 Fix MISRA rule 8.3 Part 3
Rule 8.3: All declarations of an object or function shall
          use the same names and type qualifiers

Fixed for:
	make DEBUG=1 PLAT=fvp SPD=tspd all

Change-Id: I4e31c93d502d433806dfc521479d5d428468b37c
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-04-13 14:01:56 +01:00
Roberto Vargas f37704bcfb Fix MISRA rule 8.3 Part 2
Rule 8.3: All declarations of an object or function shall
          use the same names and type qualifiers.

Fixed for:
	make DEBUG=1 PLAT=juno LOG_LEVEL=50 all

Change-Id: I0e4a03a0d2170cb1c632e079112a972091994a39
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-04-13 14:01:56 +01:00
Roberto Vargas c28b765893 Fix MISRA rule 8.5 in common code
Rule 8.5: An external object or function shall be declared
          once in one and only one file.

Change-Id: I7c3d4ec7d3ba763fdb4600008ba10b4b93ecdfce
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-04-13 14:01:56 +01:00
Roberto Vargas 35a3eeb6fd Fix MISRA rule 8.4 Part 1
Rule 8.4: A compatible declaration shall be visible when
          an object or function with external linkage is defined

Fixed for:
	make DEBUG=1 PLAT=fvp LOG_LEVEL=50 all

Change-Id: I32b223251b8bf5924149d89431a65d3405a73d3e
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-04-13 14:01:56 +01:00
Roberto Vargas 8cb4762841 Fix MISRA rule 8.3 Part 1
Rule 8.3: All declarations of an object or function shall
          use the same names and type qualifiers.

Fixed for:

	make DEBUG=1 PLAT=fvp LOG_LEVEL=50 all

Change-Id: I32d6fbce03bb4830ed5bf521afe7063505c6ed79
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-04-13 14:01:56 +01:00
Dimitris Papastamos 93883a2931
Merge pull request #1338 from antonio-nino-diaz-arm/an/spm-flag-check
SPM: Assert value of `ENABLE_SPM` build flag
2018-04-04 09:58:24 +01:00
Dimitris Papastamos f11916bf1d
Merge pull request #1334 from michpappas/tf-issues#572_qemu_dont_use_C_for_crash_console
qemu: don't use C functions for the crash console callbacks
2018-04-03 11:59:55 +01:00
Antonio Nino Diaz aafd8e1c9f SPM: Assert value of `ENABLE_SPM` build flag
The Makefile was missing a check to verify that the value of
`ENABLE_SPM` is boolean.

Change-Id: I97222e4df9ae2fbd89cdb3263956dca52d360993
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-04-03 11:39:15 +01:00
Michalis Pappas 0e24ea8156 qemu: don't use C functions for the crash console callbacks
Use the console_pl011_core_* functions directly in the crash console
callbacks.

This bypasses the MULTI_CONSOLE_API for the crash console (UART1), but
allows using the crash console before the C runtime has been initialized
(eg to call ASM_ASSERT). This retains backwards compatibility with respect
to functionality when the old API is used.

Use the MULTI_CONSOLE_API to register UART0 as the boot and runtime
console.

Fixes ARM-software/tf-issues#572

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
2018-03-31 16:26:18 +08:00
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