davidcunado-arm [Fri, 15 Sep 2017 13:32:08 +0000 (14:32 +0100)]
Merge pull request #1094 from douglas-raillard-arm/dr/fix_mmap_add_dynamic_region
xlat: Use MAP_REGION macro as compatibility layer
davidcunado-arm [Fri, 15 Sep 2017 10:29:03 +0000 (11:29 +0100)]
Merge pull request #1089 from Leo-Yan/hikey_enable_debug_module
Hikey: enable CPU debug module
davidcunado-arm [Fri, 15 Sep 2017 08:37:05 +0000 (09:37 +0100)]
Merge pull request #1096 from davidcunado-arm/im/mair_attributes_helper
Helper macro to create MAIR encodings
davidcunado-arm [Thu, 14 Sep 2017 08:37:53 +0000 (09:37 +0100)]
Merge pull request #1098 from vchong/boot_without_spd
hikey*: boot without spd
davidcunado-arm [Thu, 14 Sep 2017 08:37:32 +0000 (09:37 +0100)]
Merge pull request #1095 from soby-mathew/sm/fix_cert_create_build
Set default value of USE_TBBR_DEFS
Victor Chong [Wed, 13 Sep 2017 16:27:19 +0000 (01:27 +0900)]
hikey*: Undef BL32_BASE when building without SPD
Otherwise, BL2 tries to load a BL32 image and triggers
assert(result == 0)
in
plat_get_image_source()
in hikey{960}_io_storage.c
in a debug build, or displays
ERROR: BL2: Failed to load image
in a release build.
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Victor Chong [Wed, 13 Sep 2017 16:22:14 +0000 (01:22 +0900)]
hikey*: Fix typo
Signed-off-by: Victor Chong <victor.chong@linaro.org>
davidcunado-arm [Wed, 13 Sep 2017 13:52:24 +0000 (14:52 +0100)]
Merge pull request #1092 from jeenu-arm/errata-workarounds
Errata workarounds
davidcunado-arm [Wed, 13 Sep 2017 09:59:04 +0000 (10:59 +0100)]
Merge pull request #1097 from davidcunado-arm/dc/reset_bl31
plat/arm: Fix BL31_BASE when RESET_TO_BL31=1
Qixiang Xu [Thu, 31 Aug 2017 03:45:32 +0000 (11:45 +0800)]
plat/arm: Fix BL31_BASE when RESET_TO_BL31=1
The value of BL31_BASE currently depends on the size of BL31. This
causes problems in the RESET_TO_BL31 case because the value of
BL31_BASE is used in the model launch parameters, which often changes.
Therefore, this patch fixes BL31_BASE to the middle of Trusted SRAM,
to avoid further model parameter changes in future.
Change-Id: I6d7fa4fe293717d84768974679539c0e0cb6d935
Signed-off-by: David Cunado <david.cunado@arm.com>
davidcunado-arm [Tue, 12 Sep 2017 07:44:40 +0000 (08:44 +0100)]
Merge pull request #1091 from geesun/qx/el3_payload_base_cfg_check
Filter out invalid configure for EL3_PAYLOAD_BASE
davidcunado-arm [Tue, 12 Sep 2017 07:43:38 +0000 (08:43 +0100)]
Merge pull request #1088 from soby-mathew/sm/sds_scmi
Introduce SDS Driver
Isla Mitchell [Fri, 21 Jul 2017 13:44:36 +0000 (14:44 +0100)]
Helper macro to create MAIR encodings
This patch provides helper macros for both Device and Normal memory MAIR
encodings as defined by the ARM Architecture Reference Manual for ARMv8-A
(ARM DDI0487B.A).
Change-Id: I5faae7f2cf366390ad4ba1d9253c6f3b60fd5e20
Signed-off-by: David Cunado <david.cunado@arm.com>
davidcunado-arm [Mon, 11 Sep 2017 17:19:03 +0000 (18:19 +0100)]
Merge pull request #1087 from robertovargas-arm/psci_do_cpu_off
Reduce time lock in psci_do_cpu_off
Soby Mathew [Fri, 8 Sep 2017 09:54:12 +0000 (10:54 +0100)]
Set default value of USE_TBBR_DEFS
Using the OIDs defined in tbbr_oids.h is the recommended way to build
the cert_create tool. This patch hence sets default value of the build
flag USE_TBBR_DEFS to 1 in the Makefile in `tools/cert_create` folder
when cert_create is built from this folder.
Fixes ARM-software/tf-issues#482
Change-Id: Id1d224826b3417770bccbefa1b68d9bdb3b567f0
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Douglas Raillard [Thu, 31 Aug 2017 15:20:25 +0000 (16:20 +0100)]
xlat: Use MAP_REGION macro as compatibility layer
Use the MAP_REGION to build the mmap_region_t argument in wrappers like
mmap_add_region(). Evolution of the mmap_region_t might require adding
new members with a non-zero default value. Users of MAP_REGION are
protected against such evolution. This commit also protects users of
mmap_add_region() and mmap_add_dynamic_region() functions against these
evolutions.
Also make the MAP_REGION macro implementation more explicit and make it
a mmap_region_t compound literal to make it useable as a function
parameter on its own and to prevent using it in initialization of
variables of different type.
Change-Id: I7bfc4689f6dd4dd23c895b65f628d8ee991fc161
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
davidcunado-arm [Mon, 11 Sep 2017 10:21:08 +0000 (11:21 +0100)]
Merge pull request #1084 from davidcunado-arm/dc/warmboot_a32
Set NS version SCTLR during warmboot path
davidcunado-arm [Mon, 11 Sep 2017 08:50:11 +0000 (09:50 +0100)]
Merge pull request #1086 from robertovargas-arm/dead_loop
juno: Fix bug in plat_get_my_entrypoint
Qixiang Xu [Thu, 24 Aug 2017 03:03:23 +0000 (11:03 +0800)]
Filter out invalid configure for EL3_PAYLOAD_BASE
TRUSTED_BOARD_BOOT and GENERATE_COT is not
compatible with EL3_PAYLOAD_BASE
Change-Id: I538c77e1f6c7da400d30ae4d633b8fcc55742202
Signed-off-by: Qixiang Xu <qixiang.xu@arm.com>
Eleanor Bonnici [Fri, 4 Aug 2017 14:03:51 +0000 (15:03 +0100)]
Juno: Disable 859971 and 859972 errata workarounds
Earlier patches added errata workarounds 859972 for Cortex-A72, and
859972 for Cortex-A57 CPUs. Explicitly disable the workaround for Juno.
Also reorganize errata workaround flags.
No functional changes.
Change-Id: I3fe3745de57d77e5bf52012826d3969fe5d4844e
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Eleanor Bonnici [Wed, 2 Aug 2017 17:33:41 +0000 (18:33 +0100)]
Cortex-A72: Implement workaround for erratum 859971
Erratum 855971 applies to revision r0p3 or earlier Cortex-A72 CPUs. The
recommended workaround is to disable instruction prefetch.
Change-Id: I7fde74ee2a8a23b2a8a1891b260f0eb909fad4bf
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Eleanor Bonnici [Wed, 2 Aug 2017 15:35:04 +0000 (16:35 +0100)]
Cortex-A57: Implement workaround for erratum 859972
Erratum 855972 applies to revision r1p3 or earlier Cortex-A57 CPUs. The
recommended workaround is to disable instruction prefetch.
Change-Id: I56eeac0b753eb1432bd940083372ad6f7e93b16a
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Leo Yan [Thu, 7 Sep 2017 06:56:32 +0000 (14:56 +0800)]
Hikey: enable CPU debug module
Every CPU has its own debug module and this module is used by JTAG
debugging and coresight tracing. If without enabling it, it's easily to
introduce lockup issue when we enable debugging features.
This patch is to enable CPU debug module when power on CPU; this allows
connecting to all cores through JTAG and used by kernel coresight
driver.
Signed-off-by: Matthias Welwarsky <maw@sysgo.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
davidcunado-arm [Thu, 7 Sep 2017 07:46:47 +0000 (08:46 +0100)]
Merge pull request #1082 from vchong/load_img_v2_parse_optee_header
hikey*: Add LOAD_IMAGE_V2 and OP-TEE header parsing support
davidcunado-arm [Thu, 7 Sep 2017 00:14:24 +0000 (01:14 +0100)]
Merge pull request #1080 from soby-mathew/eb/RSA-PKCS1-5_support_1
Support legacy RSA PKCS#1 v1.5 in cert create
davidcunado-arm [Wed, 6 Sep 2017 23:45:59 +0000 (00:45 +0100)]
Merge pull request #1078 from douglas-raillard-arm/dr/add_cfi_vector_entry
Add CFI debug info to vector entries
davidcunado-arm [Wed, 6 Sep 2017 23:40:59 +0000 (00:40 +0100)]
Merge pull request #1019 from etienne-lms/log-size
CPU_DATA_LOG2SIZE depends on cache line size
Soby Mathew [Mon, 12 Jun 2017 11:37:10 +0000 (12:37 +0100)]
CSS: Changes for SDS framework
This patch does the required changes to enable CSS platforms
to build and use the SDS framework. Since SDS is always coupled with
SCMI protocol, the preexisting SCMI build flag is now renamed to
`CSS_USE_SCMI_SDS_DRIVER` which will enable both SCMI and SDS on
CSS platforms. Also some of the workarounds applied for SCMI are
now removed with SDS in place.
Change-Id: I94e8b93f05e3fe95e475c5501c25bec052588a9c
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Soby Mathew [Mon, 12 Jun 2017 11:13:04 +0000 (12:13 +0100)]
SDS: Introduce the sds drivers
This patch introduces the driver for Shared-Data-Structure (SDS)
framework which will be used for communication between SCP and AP
CPU. The SDS framework is intended to replace the Boot-Over-MHU
(BOM) protocol used currently for the communication
Change-Id: Ic174291121f4e581b174cce3389d22d6435f7269
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Soby Mathew [Mon, 12 Jun 2017 11:15:01 +0000 (12:15 +0100)]
Split CSS makefile for sp_min on Juno
This patch factors out common files required for sp_min for all CSS
platforms from the JUNO specific makefile to a the new `css_sp_min.mk`
makefile. This also allows the common build options that affect CSS
platforms to be configured in a central makefile for sp_min.
Change-Id: Ida952d8833b1aa5eda77ae0a6664a4632aeab24c
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Soby Mathew [Wed, 5 Jul 2017 14:07:05 +0000 (15:07 +0100)]
Fix JUNO AArch32 build
This patch fixes the inconsistency with regards as to how
BL2_BASE/BL2U_BASE and BL2_LIMIT/BL2U_LIMIT macros are defined
when building Juno to run in AArch32 mode at EL3. In this case,
BL32 is compiled for AArch32 whereas BL1 and BL2 are compiled
for AArch64. This resulted in BL32 conditionally compiling a
different definition of the above mentioned macros from BL1/BL2.
This is fixed by taking into consideration the
JUNO_AARCH32_EL3_RUNTIME build flag as well in the conditional
compilation check.
Change-Id: I27ac68aa4df0502089c1739c05366a9c509eb5be
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Roberto Vargas [Mon, 4 Sep 2017 15:49:41 +0000 (16:49 +0100)]
Reduce time lock in psci_do_cpu_off
psci_set_power_off_state only initializes a local variable, so there
isn't any reason why it should be done while the lock is held.
Change-Id: I1c62f4cd5d860d102532e5a5350152180d41d127
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Roberto Vargas [Fri, 1 Sep 2017 14:08:47 +0000 (15:08 +0100)]
juno: Fix bug in plat_get_my_entrypoint
plat_get_my_entrypoint was branching to juno_do_reset_to_aarch_32_state,
which is not supposed to return, and in case of returning it implemented
an infinite loop. The problem was that plat_get_my_entrypoint was using
"b" instead of "bl", so juno_do_reset_to_aarch_32_state was returning to
the caller of plat_get_my_entrypoint instead of stop the system with a
panic.
To avoid this problem juno_do_reset_to_aarch_32_state was modified to
call directly to plat_panic_handler if it tries to return.
Change-Id: I591cf2dd78d27d8568fb15b91366e4b3dce027b5
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
davidcunado-arm [Wed, 6 Sep 2017 08:16:17 +0000 (09:16 +0100)]
Merge pull request #1076 from masahir0y/asm_macro
asm_macros: set the default assembly code alignment to 4 byte
David Cunado [Mon, 4 Sep 2017 15:41:37 +0000 (16:41 +0100)]
Set NS version SCTLR during warmboot path
When ARM TF executes in AArch32 state, the NS version of SCTLR
is not being set during warmboot flow. This results in secondary
CPUs entering the Non-secure world with the default reset value
in SCTLR.
This patch explicitly sets the value of the NS version of SCTLR
during the warmboot flow rather than relying on the h/w.
Change-Id: I86bf52b6294baae0a5bd8af0cd0358cc4f55c416
Signed-off-by: David Cunado <david.cunado@arm.com>
davidcunado-arm [Tue, 5 Sep 2017 20:32:50 +0000 (21:32 +0100)]
Merge pull request #1083 from soby-mathew/sm/fix_optee_map
Fix BL2 memory map when OP-TEE is the Secure Payload
Soby Mathew [Fri, 1 Sep 2017 12:43:50 +0000 (13:43 +0100)]
Fix BL2 memory map when OP-TEE is the Secure Payload
The commit
3eb2d67 optimizes the memory map for BL2 when TSP
is not present. But this also broke OP-TEE as it was reusing
the TSP mapping. This patch fixes this problem by adding a
separate mapping for OP-TEE in the BL2 memory map table.
Change-Id: I130a2ea552b7b62d8478081feb1f4ddf5292a118
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
davidcunado-arm [Mon, 4 Sep 2017 08:35:13 +0000 (09:35 +0100)]
Merge pull request #1081 from masahir0y/uniphier
uniphier: fix-up for PXs3 SoC
Victor Chong [Wed, 16 Aug 2017 04:53:56 +0000 (13:53 +0900)]
hikey*: Support Trusted OS extra image (OP-TEE header) parsing
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Victor Chong [Thu, 17 Aug 2017 06:21:10 +0000 (15:21 +0900)]
hikey*: Add LOAD_IMAGE_V2 support
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Victor Chong [Sun, 27 Aug 2017 08:46:03 +0000 (17:46 +0900)]
docs: hikey: Fix typo
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Etienne Carriere [Fri, 1 Sep 2017 08:22:20 +0000 (10:22 +0200)]
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>
Masahiro Yamada [Thu, 31 Aug 2017 07:30:47 +0000 (16:30 +0900)]
uniphier: work around Boot ROM bug for USB boot mode of PXs3 SoC
Due to a bug in the Boot ROM, the USB load API turned out not working
as expected. It is unfixable because the Boot ROM is hard-wired.
Add work around code in TF to bypass the problematic Boot ROM code.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Thu, 31 Aug 2017 10:58:11 +0000 (19:58 +0900)]
uniphier: fix code indent for conditional statement
checkpatch.pl from Linux reports tons of coding style errors and
warnings. I am just fixing under plat/socionext/uniphier/.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
danh-arm [Thu, 31 Aug 2017 17:55:21 +0000 (18:55 +0100)]
Merge pull request #1072 from sandrine-bailleux-arm/sb/tsp-mapping
ARM platforms: Map TSP only when TSPD is included
Soby Mathew [Thu, 31 Aug 2017 10:50:29 +0000 (11:50 +0100)]
cert_tool: Support for legacy RSA PKCS#1 v1.5
This patch enables choice of RSA version at run time to be used for
generating signatures by the cert_tool. The RSA PSS as defined in
PKCS#1 v2.1 becomes the default version and this patch enables to specify
the RSA PKCS#1 v1.5 algorithm to `cert_create` through the command line
-a option. Also, the build option `KEY_ALG` can be used to pass this
option from the build system. Please note that RSA PSS is mandated
by Trusted Board Boot requirements (TBBR) and legacy RSA support is
being added for compatibility reasons.
Fixes ARM-Software/tf-issues#499
Change-Id: Ifaa3f2f7c9b43f3d7b3effe2cde76bf6745a5d73
Co-Authored-By: Eleanor Bonnici <Eleanor.bonnici@arm.com>
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Soby Mathew [Thu, 31 Aug 2017 10:49:32 +0000 (11:49 +0100)]
Export KEY_ALG as a user build option
The `KEY_ALG` variable is used to select the algorithm for key
generation by `cert_create` tool for signing the certificates. This
variable was previously undocumented and did not have a global default
value. This patch corrects this and also adds changes to derive the
value of `TF_MBEDTLS_KEY_ALG` based on `KEY_ALG` if it not set by the
platform. The corresponding assignment of these variables are also now
removed from the `arm_common.mk` makefile.
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I78e2d6f4fc04ed5ad35ce2266118afb63127a5a4
Sandrine Bailleux [Wed, 30 Aug 2017 09:59:22 +0000 (10:59 +0100)]
ARM platforms: Map TSP only when TSPD is included
This patch ensures that the ARM_MAP_TSP_SEC_MEM memory region is mapped
in BL2 only if the TSPD has been included in the build. This saves one
entry in the plat_arm_mmap[] array and avoids to map extra memory when
it's not needed.
Change-Id: I6ae60822ff8f0de198145925b0b0d45355179a94
Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
danh-arm [Thu, 31 Aug 2017 13:21:21 +0000 (14:21 +0100)]
Merge pull request #1079 from douglas-raillard-arm/dr/doc_fix_typo
porting-guide.rst: Fix some sections' level
danh-arm [Thu, 31 Aug 2017 13:20:31 +0000 (14:20 +0100)]
Merge pull request #1077 from soby-mathew/sm/fix_juno_assert_lvl
Juno: Define PLAT_LOG_LEVEL_ASSERT to LOG_LEVEL_INFO
Douglas Raillard [Wed, 2 Aug 2017 13:44:42 +0000 (14:44 +0100)]
porting-guide.rst: Fix some sections' level
Fix the level of the section
"13. Function : plat_setup_psci_ops() [mandatory]",
including all the subsections.
Fix the level of the section
"12.7. plat_psci_ops.pwr_domain_suspend_pwrdown_early() [optional]"
to lower it like the surrounding functions.
Change-Id: I781823bc96ece669f8fde4bd39c4e333c7bf4d1a
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
Douglas Raillard [Mon, 7 Aug 2017 15:20:46 +0000 (16:20 +0100)]
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>
Soby Mathew [Tue, 22 Aug 2017 13:06:19 +0000 (14:06 +0100)]
Juno: Define PLAT_LOG_LEVEL_ASSERT to LOG_LEVEL_INFO
This patch fixes the PLAT_LOG_LEVEL_ASSERT to 40 which corresponds
to LOG_LEVEL_INFO. Having this level of log for assertions means that the
`assert()` will not generate the strings implied in the expression taken
as parameter. This allows to save some memory when Juno is built for
LOG_LEVEL = LOG_LEVEL_VERBOSE and DEBUG = 1.
Fixes ARM-software/tf-issues#511
Change-Id: Id84a40f803ab07a5a8f6e587167af96694a07d04
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Masahiro Yamada [Thu, 31 Aug 2017 05:29:34 +0000 (14:29 +0900)]
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>
danh-arm [Thu, 31 Aug 2017 08:37:47 +0000 (09:37 +0100)]
Merge pull request #1069 from Leo-Yan/hikey_enable_watchdog_reset
Hikey: enable watchdog reset
davidcunado-arm [Wed, 30 Aug 2017 17:12:28 +0000 (18:12 +0100)]
Merge pull request #1074 from EvanLloyd/ejll/62_file_mode
fiptool: Update file open modes with 'b' (for Windows)
danh-arm [Wed, 30 Aug 2017 17:04:02 +0000 (18:04 +0100)]
Merge pull request #1075 from robertovargas-arm/fix_el3_payload
Don't use zero_normalmem in bl2_platform_setup
Roberto Vargas [Wed, 30 Aug 2017 07:24:48 +0000 (08:24 +0100)]
Don't use zero_normalmem in bl2_platform_setup
zero_normalmem only can zero memory when caches are enabled
and the target memory is a normal memory, otherwise an abort is
generated. In the case of EL3_PAYLOAD_BASE bl2_platform_setup was
calling zero_normalmem with device memory and it generated an abort.
Change-Id: If013603f209a12af488a9c54481f97a8f395b26a
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Evan Lloyd [Fri, 13 Jan 2017 14:13:09 +0000 (14:13 +0000)]
fiptool: Update file open modes with 'b' (for Windows)
Unix does not distinguish binary and text modes.
On Windows the 'b' flag (e.g. "rb" instead of "r") is used to
indicate that files should be opened in binary mode.
This has no impact on Unix, but is needed on Windows to avoid
end-of-line issues.
Change-Id: I69424c55735d5d563d36c50bedd6357b8e05137e
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
danh-arm [Wed, 30 Aug 2017 13:37:15 +0000 (14:37 +0100)]
Merge pull request #1073 from davidcunado-arm/dc/update_docs
Add usage note for FVP model versions 11.0 and 8.5
danh-arm [Wed, 30 Aug 2017 13:34:57 +0000 (14:34 +0100)]
Merge pull request #1066 from islmit01/im/enable_cnp_bit
Enable CnP bit for ARMv8.2 CPUs
danh-arm [Wed, 30 Aug 2017 13:34:17 +0000 (14:34 +0100)]
Merge pull request #1062 from jeenu-arm/cpu-fixes
Cpu macro fixes
David Cunado [Mon, 31 Jul 2017 11:24:51 +0000 (12:24 +0100)]
Add usage note for FVP model versions 11.0 and 8.5
The internal synchronisation timings of the FVP model version
11.0 build 11.0.34 and version 8.5 build 0.8.5202 has been
changed compared to older version of the models.
This change may have an impact on how the model behaves depending
on the workload being run on the model. For example test failures
have been seen where the primary core has powered on a secondary
core but was then starved of host CPU time and so was not able to
update power status, resulting a test failure due to an incorrect
status. This, or similar behaviour, is not to be expected from
real hardware platforms.
This patch adds a usage note on how to launch these models so
that internal synchronisation timing matches that of the older
version of the models, specifically adding the -Q 100 option.
Change-Id: If922afddba1581b7246ec889b3f1598533ea1b7e
Signed-off-by: David Cunado <david.cunado@arm.com>
danh-arm [Tue, 29 Aug 2017 14:25:36 +0000 (15:25 +0100)]
Merge pull request #1071 from jeenu-arm/syntax-fix
plat/arm: Fix ARM_INSTANTIATE_LOCK syntax anomaly
Eleanor Bonnici [Thu, 10 Aug 2017 13:46:26 +0000 (14:46 +0100)]
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>
Eleanor Bonnici [Thu, 10 Aug 2017 13:26:36 +0000 (14:26 +0100)]
HiKey: Rename CPUACTRL reg constants
Constants named as *ACTLR* refer in fact to the CPUACTRL_EL1 register.
Since ACTLR and ACTRL_EL1 are different registers this patch renames
these constants for clarity.
Change-Id: I2a9e402dab7b0fcb6e481ee0d8a11eda943ed299
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
Eleanor Bonnici [Wed, 9 Aug 2017 15:42:40 +0000 (16:42 +0100)]
CPU: Correct names of implementation-defined aux regs
At present, various CPU register macros that refer to CPUACTLR are named
ACTLR. This patch fixes that.
The previous register names are retained, but guarded by the
ERROR_DEPRECATED macro, so as not to break platforms that continue using
the old names.
Change-Id: Ia872196d81803f8f390b887d149e0fd054df519b
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
Eleanor Bonnici [Wed, 9 Aug 2017 09:36:08 +0000 (10:36 +0100)]
CPU: Make shifted constants unsigned
In order to avoid Undefined behavior, left operand in left-shift
expressions needs to be unsigned, and of sufficient size. The safest and
most consistent approach is to use unsigned long long type.
Change-Id: I9612f16a6e6ea4c7df62a02497d862abf19b8e1b
Signed-off-by: Eleanor Bonnici <Eleanor.bonnici@arm.com>
Jeenu Viswambharan [Wed, 23 Aug 2017 13:12:59 +0000 (14:12 +0100)]
plat/arm: Fix ARM_INSTANTIATE_LOCK syntax anomaly
The current definition of ARM_INSTANTIATE_LOCK macro includes a
semicolon, which means it's omitted where it's used. This is anomalous
for a C statement in global scope.
Fix this by removing semicolon from the definition; and where it's a
NOP, declare a file-scoped variable explicitly tagged as unused to avoid
compiler warning.
No functional changes.
Change-Id: I2c1d92ece4777e272a025011e03b8003f3543335
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
danh-arm [Tue, 29 Aug 2017 10:52:04 +0000 (11:52 +0100)]
Merge pull request #1070 from rockchip-linux/rk3399-fixes-logic
rockchip/rk3399: Support Turning off VD_LOGIC during suspend-to-ram
danh-arm [Tue, 29 Aug 2017 10:51:32 +0000 (11:51 +0100)]
Merge pull request #1068 from jenswi-linaro/optee_arm_plat
Optee arm platform common
danh-arm [Tue, 29 Aug 2017 10:49:59 +0000 (11:49 +0100)]
Merge pull request #1056 from geesun/qx/interrupt-diags
update the interrupt diagrams
Lin Huang [Wed, 14 Jun 2017 09:24:29 +0000 (17:24 +0800)]
rockchip/rk3399: reinitilize secure sgrf when resume
when shutdown logic power rail, the some sgrf register
value will reset, so need to reinitilize secure.
Change-Id: I8ad0570432e54441fe1c60dd2960a81fd58f7163
Signed-off-by: Lin Huang <hl@rock-chips.com>
Lin Huang [Sat, 27 May 2017 09:47:01 +0000 (17:47 +0800)]
rockchip/rk3399: do secure timer init in pmusram
we will use timer in pmusarm, when logic power rail shutdown,
the secure timer will gone, so need to initial it in pmusram.
Change-Id: I472e7eec3fc197f56223e6fff9167556c1c5e3bc
Signed-off-by: Lin Huang <hl@rock-chips.com>
Lin Huang [Fri, 26 May 2017 08:17:11 +0000 (16:17 +0800)]
rockchip/rk3399: use slice1 to restore ddr slice1 ~ slice4
we do not have enough pmusram space now, so use slice1 to restore
ddr slice1 ~ slice4, that's will save more pmusram space.
Change-Id: Id54a7944f33d01a8f244cee6a8a0707bfe4d42da
Signed-off-by: Lin Huang <hl@rock-chips.com>
Lin Huang [Mon, 22 May 2017 02:29:59 +0000 (10:29 +0800)]
rockchip/rk3399: disable more powerdomain prepare for shutdown logic rail
Change-Id: Ia59adf48cf14eb627721264765bce50cb31065ef
Signed-off-by: Lin Huang <hl@rock-chips.com>
Lin Huang [Thu, 18 May 2017 10:04:25 +0000 (18:04 +0800)]
rockchip/rk3399: save and restore pd_alive register
pd_alive control cru, grf, timer, gpio and wdt, when
turn off logic power rail, these register value will
back to reset value, we need to save them value in suspend
and restore them when resuem, since timer will reinitial
in kernel, so it not need to save/restore.
Change-Id: I0fc2a011d3cdc04b66ffbf728e769eb28b51ee38
Signed-off-by: Lin Huang <hl@rock-chips.com>
Leo Yan [Tue, 29 Aug 2017 06:38:06 +0000 (14:38 +0800)]
Hikey: enable watchdog reset
At the system boot time we need enable watchdog reset, otherwise after
the watchdog is timeout it cannot reset the SoC. We need set the bit 0
and bit 16 together, the bit 16 is mask bit so after set bit 16 we have
permission to operate bit 0 and bit 0 is watchdog reset enabling bit.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Lin Huang [Wed, 17 May 2017 08:14:37 +0000 (16:14 +0800)]
rockchip/rk3399: set ddr clock source back to dpll when ddr resume
when logic power rail shutdown, CRU register will back to reset
value, ddr use abpll as clock source when do suspend, we need to save
and dpll value in pmusram, then set back these ddr clock back to dpll
when dddr resume.
Change-Id: I95dc0173649e8515859cfa46b40a606e0cc2fe3f
Signed-off-by: Lin Huang <hl@rock-chips.com>
Lin Huang [Fri, 16 Jun 2017 02:43:40 +0000 (10:43 +0800)]
rockchip/rk3399: reinitilize debug uart when resume
when shutdown logic power rail, the uart register value will reset,
so need to reinitilize debug uart.
Change-Id: I48d3535c0068fd671dea6ea32e908612992faf62
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
davidcunado-arm [Fri, 25 Aug 2017 16:26:22 +0000 (17:26 +0100)]
Merge pull request #1064 from islmit01/im/shifted_afinity
FVP: Always assume shifted affinity with MT bit
davidcunado-arm [Fri, 25 Aug 2017 16:25:39 +0000 (17:25 +0100)]
Merge pull request #1059 from kenkuang/intergration
fix a typo abort sctlr_el2
davidcunado-arm [Fri, 25 Aug 2017 12:37:45 +0000 (13:37 +0100)]
Merge pull request #1067 from jeenu-arm/rst-fix
firmware-design.rst: Fix formatting
davidcunado-arm [Fri, 25 Aug 2017 12:37:30 +0000 (13:37 +0100)]
Merge pull request #1061 from robertovargas-arm/norflash
nor-flash
davidcunado-arm [Fri, 25 Aug 2017 10:38:56 +0000 (11:38 +0100)]
Merge pull request #1065 from jenswi-linaro/optee_qemu
qemu: Add OP-TEE extra image parsing support
davidcunado-arm [Fri, 25 Aug 2017 09:52:44 +0000 (10:52 +0100)]
Merge pull request #1058 from alistair23/alistair/master
psci_common: Resolve GCC static analysis false positive
Jens Wiklander [Fri, 25 Aug 2017 08:07:20 +0000 (10:07 +0200)]
FVP: bl2: optionally map ARM_OPTEE_PAGEABLE_LOAD_MEM
If SPD_opteed is defined map ARM_OPTEE_PAGEABLE_LOAD_MEM in bl2 to
allow loading of OP-TEE paged part.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Jens Wiklander [Thu, 24 Aug 2017 13:39:09 +0000 (15:39 +0200)]
ARM plat: change OP-TEE pageable load base
Changes ARM_OPTEE_PAGEABLE_LOAD_BASE to end of ARM_AP_TZC_DRAM1.
ARM_OPTEE_PAGEABLE_LOAD_SIZE is also increased to 4MB to optimize
translation table usage.
This change makes loading of paged part easier inside OP-TEE OS as the
previous location of ARM_OPTEE_PAGEABLE_LOAD_BASE normally isn't mapped
if paging is enabled.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Isla Mitchell [Mon, 7 Aug 2017 10:20:13 +0000 (11:20 +0100)]
Enable CnP bit for ARMv8.2 CPUs
This patch enables the CnP (Common not Private) bit for secure page
tables so that multiple PEs in the same Inner Shareable domain can use
the same translation table entries for a given stage of translation in
a particular translation regime. This only takes effect when ARM
Trusted Firmware is built with ARM_ARCH_MINOR >= 2.
ARM Trusted Firmware Design has been updated to include a description
of this feature usage.
Change-Id: I698305f047400119aa1900d34c65368022e410b8
Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
Jeenu Viswambharan [Wed, 16 Aug 2017 10:44:25 +0000 (11:44 +0100)]
Add macro to test for minimum architecture version
The macro concisely expresses and requires architecture version to be at
least as required by its arguments. This would be useful when extending
Trusted Firmware functionality for future architecture revisions.
Replace similar usage in the current code base with the new macro.
Change-Id: I9dcd0aa71a663eabd02ed9632b8ce87611fa5a57
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Jeenu Viswambharan [Thu, 24 Aug 2017 14:43:44 +0000 (15:43 +0100)]
firmware-design.rst: Fix formatting
The format conversion wrongly formatted a couple of sections. These were
also missing from the Table of Contents.
Change-Id: I324216c27e7b4711e6cc5e25782f4b53842140cc
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Jens Wiklander [Thu, 24 Aug 2017 11:16:26 +0000 (13:16 +0200)]
qemu: Add OP-TEE extra image parsing support
OP-TEE may have extra images to be loaded. Load them one by one and do
the parsing. In this patch, ARM TF need to load up to 3 images for
OP-TEE: header, pager and pages images. Header image is the info about
optee os and images. Pager image include pager code and data. Paged
image include the paging parts using virtual memory.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Jens Wiklander [Thu, 24 Aug 2017 11:16:22 +0000 (13:16 +0200)]
opteed: pass device tree pointer in x2
Pass device tree pointer to OP-TEE in x2. bl2 is expected to fill in the
device tree pointer in args.arg3. Passing 0 means that device tree is
unavailable.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Jens Wiklander [Thu, 24 Aug 2017 11:16:20 +0000 (13:16 +0200)]
qemu: replace deprecated plat_psci_common.c
Change to compile with new plat/common/plat_psci_common.c instead of the old
deprecated plat/common/aarch64/plat_psci_common.c
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Jens Wiklander [Thu, 24 Aug 2017 11:16:16 +0000 (13:16 +0200)]
qemu: replace deprecated ADDR_SPACE_SIZE
Replaces the deprecated ADDR_SPACE_SIZE with PLAT_PHY_ADDR_SPACE_SIZE
and PLAT_VIRT_ADDR_SPACE_SIZE.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Alistair Francis [Wed, 23 Aug 2017 20:55:21 +0000 (13:55 -0700)]
psci_common: Resolve GCC static analysis false positive
Previously commit
555ebb34db8f3424c1b394df2f10ecf9c1f70901 attmpted to fix this
GCC issue:
services/std_svc/psci/psci_common.c: In function 'psci_do_state_coordination':
services/std_svc/psci/psci_common.c:220:27: error: array subscript is above
array bounds [-Werror=array-bounds]
psci_req_local_pwr_states[pwrlvl - 1][cpu_idx] = req_pwr_state;
This fix doesn't work as asserts aren't built in non-debug build flows.
Let's use GCCs #pragma option (documented here:
https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html) to avoid
this false positive instead.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Isla Mitchell [Thu, 17 Aug 2017 11:25:34 +0000 (12:25 +0100)]
FVP: Always assume shifted affinity with MT bit
At present, the MPIDR validation on FVP relies on MT bit set along
with shifted affinities. This currently is additionally dependent
on the FVP model being of variant C. This however should be based
on the presence of MT bit alone.
This patch makes the change to always assume that the affinities
are shifted in the FVP model when MT bit is present.
Change-Id: I09fcb0126e1b38d29124bdeaf3450a60b95d485d
Signed-off-by: Isla Mitchell <isla.mitchell@arm.com>
davidcunado-arm [Wed, 23 Aug 2017 16:23:15 +0000 (17:23 +0100)]
Merge pull request #1017 from etienne-lms/minor-docs
Minor docs
Etienne Carriere [Wed, 23 Aug 2017 13:44:01 +0000 (15:44 +0200)]
Makefile: correct path for CHECKPATCH warnings
Change-Id: I08c9789d3fd2b034b08de663d151023ca005f77f
Reported-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Etienne Carriere [Wed, 23 Aug 2017 13:43:33 +0000 (15:43 +0200)]
doc: minor typo fix
Change-Id: I00fae047dea0eaf7e60037598af020817c66f659
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>