Commit Graph

33 Commits

Author SHA1 Message Date
Ambroise Vincent 5b6ebeec9c Remove MULTI_CONSOLE_API flag and references to it
The new API becomes the default one.

Change-Id: Ic1d602da3dff4f4ebbcc158b885295c902a24fec
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-06-28 10:52:48 +01:00
Antonio Nino Diaz 5e447816c7 Remove unneeded include paths in PLAT_INCLUDES
Also, update platform_def.h guidelines about includes in the porting
guide.

Change-Id: I1ae338c9dd3242b309f6d53687ba2cb755d488c3
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2019-02-01 12:24:57 +00:00
Antonio Nino Diaz 09d40e0e08 Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.

The following folders inside include/lib have been left unchanged:

- include/lib/cpus/${ARCH}
- include/lib/el3_runtime/${ARCH}

The reason for this change is that having a global namespace for
includes isn't a good idea. It defeats one of the advantages of having
folders and it introduces problems that are sometimes subtle (because
you may not know the header you are actually including if there are two
of them).

For example, this patch had to be created because two headers were
called the same way: e0ea0928d5 ("Fix gpio includes of mt8173 platform
to avoid collision."). More recently, this patch has had similar
problems: 46f9b2c3a2 ("drivers: add tzc380 support").

This problem was introduced in commit 4ecca33988 ("Move include and
source files to logical locations"). At that time, there weren't too
many headers so it wasn't a real issue. However, time has shown that
this creates problems.

Platforms that want to preserve the way they include headers may add the
removed paths to PLAT_INCLUDES, but this is discouraged.

Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2019-01-04 10:43:17 +00:00
Jerome Forissier c779b15992 hikey: Use new console APIs
Switch to the new console APIs enabled by setting MULTI_CONSOLE_API=1.
Enables building with ERROR_DEPRECATED=1.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
2018-11-08 16:29:36 +01:00
Antonio Nino Diaz c3b5800bbb hikey: Migrate to new interfaces
- Migrate to new GIC interfaces.
- Remove unused bl1_init_bl2_mem_layout().
- Migrate to bl31_early_platform_setup2().
- Use PLAT_VIRT_ADDR_SPACE_SIZE and PLAT_PHY_ADDR_SPACE_SIZE.
- Update Makefile paths.
- Remove references to removed build options.

Change-Id: Idd1e99b4864b2a72e9e12ff1fcd73d8285bc1c94
Tested-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-09-28 15:31:53 +01:00
Haojian Zhuang 261e43b78f plat/hikey: migrate to mmc framework
Migrate to mmc framework.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2018-08-10 17:11:12 +08:00
Haojian Zhuang 99eb5ae86d hikey: include TBB in BL1
BL1 is used in recovery mode on HiKey. The TBB implementation
on HiKey is in BL2. It means that user need to build ATF BL2
with TBB and ATF BL1 with non-TBB. It's inconvenient.

So include TBB in BL1, too.

Signed-off-by: Teddy Reed <teddy@prosauce.org>
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2018-07-22 09:35:44 +08:00
Teddy Reed e59a3bffe4 hikey: Add development TBB support
This patch adds experimental support for TRUSTED_BOARD_BOOT to the
Hikey. This is adapted from the RPi3 and QEMU implementations.

Since the Hikey starts from BL2 the TRUSTED_BOARD_BOOT ROT begins there
too. When TRUSTED_BOARD_BOOT is defined, the BL1 build is skipped.

See the following example:

make \
 PLAT=hikey \
 BL33=u-boot.bin \
 SCP_BL2=mcuimage.bin \
 TRUSTED_BOARD_BOOT=1 \
 MBEDTLS_DIR=../../mbedtls \
 GENERATE_COT=1 \
 all fip

Signed-off-by: Teddy Reed <teddy.reed@gmail.com>
2018-07-06 07:54:38 -04:00
davidcunado-arm bf35944bf6
Merge pull request #1277 from hzhuang1/testing/bl2_el3_v0.6
hikey: migrate to BL2_EL3
2018-03-08 10:39:52 +00:00
Haojian Zhuang 054c3e0fa3 hikey: move out duplicated code
Create hikey_bl_common.c to store duplicated initialization
code in BL1 and BL2.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2018-03-05 13:03:53 +08:00
Haojian Zhuang a628b1ab2a hikey: migrate to bl2_el3
Since non-TF ROM is used in HiKey platform (Hisilicon Hi6220 SoC),
replace BL1 by BL2_EL3 in normal boot mode.

When we recovery images in recovery mode, keep to use BL1.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2018-03-05 09:51:43 +08:00
Haojian Zhuang 103c213c0d hikey: drop LOAD_IMAGE v1
Since LOAD_IMAGE_V2 is always enabled in HiKey platform. Drop
LOAD_IMAGE v1 to simplify code.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2018-03-05 09:50:47 +08:00
Victor Chong 3b12a6fc8e hikey*, poplar: platform.mk: Fix typo in variable assignments
Signed-off-by: Victor Chong <victor.chong@linaro.org>
2018-02-08 02:14:46 +09:00
davidcunado-arm 9fd2f13bd6
Merge pull request #1224 from masahir0y/gzip
Support GZIP-compressed images for faster loading and verification
2018-02-06 05:12:28 +00:00
Masahiro Yamada 33950dd8fe Build: change the first parameter of TOOL_ADD_IMG to lowercase
In the next commit, I need the image name in lowercase because
output files are generally named in lowercase.

Unfortunately, TOOL_ADD_IMG takes the first argument in uppercase
since we generally use uppercase Make variables.

make_helpers/build_macros.mk provides 'uppercase' macro to convert
a string into uppercase, but 'lowercase' does not exist.  We can
implement it if we like, but it would be more straightforward to
change the argument of TOOL_ADD_IMG.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-02-01 20:39:38 +09:00
Masahiro Yamada c939d13a8c Build: rename FIP_ADD_IMG to TOOL_ADD_IMG
Now FIP_ADD_IMG takes care of both fiptool and cert_create
symmetrically.  Rename it so that it matches the behavior.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-02-01 20:20:03 +09:00
Dimitris Papastamos 383c808999 Disable workaround for CVE-2017-5715 on unaffected platforms
Change-Id: Ib67b841ab621ca1ace3280e44cf3e1d83052cb73
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2018-01-29 09:58:56 +00:00
davidcunado-arm 5df277800f
Merge pull request #1205 from petegriffin/hikey-protect-memory
Hikey protect optee / sdp memory
2018-01-26 17:29:36 +00:00
Jerome Forissier 3d5d9f5aa8 hikey: configure the top 16MB of DRAM as secure
DRAM region 0x3f000000 - 0x3fffffff is reserved for OP-TEE and should
therefore be accessible only from secure world.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Victor Chong <victor.chong@linaro.org>
2018-01-24 03:30:23 +00:00
davidcunado-arm c14d3dcd47
Merge pull request #1167 from Leo-Yan/hikey-fix-alignment
Set alignment size to 512B for Hikey/Hikey960
2018-01-09 08:58:41 +00:00
David Cunado 3872fc2d1f 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>
2017-11-30 17:45:23 +00:00
Leo Yan 591ff981c6 hikey: Set alignment size 512B for fip building
Set alignment size to 512B so finally we can get fip.bin with 512B
alignment. This can avoid stuck issue for 'fastboot' downloading if
USB driver uses DMA for data transferring.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
2017-11-22 17:11:22 +08:00
Victor Chong b16bb16e3b hikey*: Support Trusted OS extra image (OP-TEE header) parsing
Signed-off-by: Victor Chong <victor.chong@linaro.org>
2017-09-01 22:48:10 +09:00
Victor Chong 2de0c5cc4f hikey*: Add LOAD_IMAGE_V2 support
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
2017-09-01 22:47:50 +09:00
Victor Chong 3b6e88a2b3 hikey: Add BL32 (OP-TEE) support
Signed-off-by: Victor Chong <victor.chong@linaro.org>
2017-07-12 18:23:26 +09:00
Victor Chong c0cde3640a hikey: Remove unnecessary code
PLATFORM_LINKER_FORMAT
and
PLATFORM_LINKER_ARCH
defines are removed from
plat/hisilicon/hikey/include/platform_def.h
since there are already defined in
include/plat/common/common_def.h
which is included by
plat/hisilicon/hikey/hikey_def.h
which is included by
plat/hisilicon/hikey/include/platform_def.h

The line
$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw))
is removed from
plat/hisilicon/hikey/platform.mk
to clear the warning below:

Makefile:544: warning: overriding commands for target `check_SCP_BL2'
plat/hisilicon/hikey/platform.mk:19: warning: ignoring old commands for target `check_SCP_BL2'

$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp-fw))
already exists in
Makefile
and applies to plat hikey so is redundant in
plat/hisilicon/hikey/platform.mk

Signed-off-by: Victor Chong <victor.chong@linaro.org>
2017-07-12 17:27:44 +09:00
Haojian Zhuang fa8e8068aa hikey: enable options to fix errata
Fix cortex a53 errata issues: #836870, #843419, #855873.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-07-10 09:43:08 +01:00
danh-arm 0437c421cd Merge pull request #970 from vingu-linaro/enable-pmf-rt-instr-hikey
Enable pmf rt instr hikey
2017-06-08 11:46:34 +01:00
Vincent Guittot 9f505cc22a hikey: enable PMF and instrumentations
enable PMF service call and instrumetion for hikey platform

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
2017-06-07 10:14:27 +02:00
Leo Yan 1e54813afc hikey: pm: finish PSCI hook functions
This patch is to enable CPU suspend/resume and system level's
suspend/resume; also enable system power off state.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2017-05-31 13:22:02 +08:00
Haojian Zhuang 127793daba hikey: support BL31
Support BL31 and PSCI. Enable multiple cores in PSCI.

Change-Id: I66c39e1e9c4c45ac41a0142ed2070d79a3ac5ba3
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Dan Handley <dan.handley@arm.com>
2017-05-24 17:34:41 +01:00
Haojian Zhuang 32e9fc1a32 hikey: support BL2
BL2 is used to load BL31 and SCP_BL2. In HiKey platform, SCP_BL2
is the mcu firmware that is used to scale cpu frequency and switch
low power mode.

Change-Id: I1621aa65bea989fd125ee8502fd56ef72362bf97
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Dan Handley <dan.handley@arm.com>
2017-05-24 17:34:41 +01:00
Haojian Zhuang 08b167e93f hikey: support BL1
Initialize regulators, pins and eMMC in BL1. Only SRAM could be used in BL1.
So BL2 will be loaded from eMMC into SRAM later.

Change-Id: I8e7ef82ffa29a3c647c9d2d2981e8759ee85d833
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Dan Handley <dan.handley@arm.com>
2017-05-24 17:34:35 +01:00