summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-28Fix MISRA rule 8.4 in common codeRoberto Vargas
Rule 8.4: A compatible declaration shall be visible when an object or function with external linkage is defined. Change-Id: I26e042cb251a6f9590afa1340fdac73e42f23979 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-02-28Fix MISRA rule 8.3 in common codeRoberto Vargas
Rule 8.3: All declarations of an object or function shall use the same names and type qualifiers. Change-Id: Iff384187c74a598a4e73f350a1893b60e9d16cec Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-02-27Merge pull request #1285 from soby-mathew/sm/fix_win_build_dyn_cfgdavidcunado-arm
FVP: restrict dynamic config to Unix build environment
2018-02-27FVP: restrict dynamic config to Unix build environmentSoby Mathew
This patch restricts building the dynamic config DTBs to the Unix build environment as the Device Tree compiler may not be available on other build environments. Change-Id: Ie690e80010a174300e966240fd977b37561156e0 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Merge pull request #1263 from soby-mathew/sm/dyn_configdavidcunado-arm
Dynamic Configuration Prototype
2018-02-26Dynamic cfg: MISRA fixesSoby Mathew
Change-Id: I1d85b76af002b8b672fcaeca94939b7420bc8243 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26FVP: Add TB_FW_CONFIG and HW_CONFIGSoby Mathew
This patch adds TB_FW_CONFIG for FVP and allows FVP to select the appropriate HW_CONFIG to include in the fip. The HW_CONFIG for FVP is selected via `FVP_HW_CONFIG_DTS` build option. The TB_FW_CONFIG specifies the load address of HW_CONFIG to BL2. Since currently the load address is different between AARCH32 and AARCH64, 2 separate TB_FW_CONFIGs are maintained for the 2 modes. Change-Id: Ide8581e752dfa900087f5895c775073c841c0daf Signed-Off-By: Soby Mathew <soby.mathew@arm.com>
2018-02-26FVP: Fix AArch32 dts for `interrupts` nodeSoby Mathew
The commit 8d2c497 changed the interrupt map in `rtsm_ve-motherboard.dtsi` for the Linux FDT sources to be compatible for FreeBSD. But this also introduced a regression for FVP AArch32 mode but was undetected till now because the corresponding DTB was not updated. This patch creates a new `rtsm_ve-motherboard-aarch32.dtsi` which reverts the change and is now included by the AArch32 DTS files. Change-Id: Ibefbbf43a91c8fb890f0fa7a22be91f0227dad34 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26ARM Platforms: Load HW_CONFIG in BL2Soby Mathew
The patch adds the necessary changes to load HW_CONFIG in BL2 for ARM Platforms : 1. The load address of HW_CONFIG is specified via the `hw_config_addr` property in TB_FW_CONFIG is loaded by BL1. The `hw_config_max_size` property defines the maximum size to be expected for the HW_CONFIG. The `arm_dyn_cfg_helpers.c` and corresponding header implements utility functions to parse these DT properties defined. The `arm_dyn_cfg.c` implements wrappers to these helpers to enable them to be invoked from ARM platform layer. 2. `HW_CONFIG` is added to the `bl2_mem_params_descs[]` array which is the list of images to be loaded by BL2. 3. The `libfdt` sources are now included when BL2 is built 4. A new helper `populate_next_bl_params_config()` is introduced in desc_image_load.c to populate the subsequent executable BL images with the `hw_config` and the corresponding `fw_config` if available. The `plat_get_next_bl_params()` API for ARM platforms is modified to invoke this new helper. 5. The implementation of `bl2_early_platform_setup2()` is modified to consider `arg0` as well in addition to `arg1` passed from BL1. 6. Bump up the BL2 size for Juno to accommodate the inclusion of libfdt. Change-Id: I80f1554adec41753e0d179a5237364f04fe13a3f Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26ARM Platorms: Load TB_FW_CONFIG in BL1Soby Mathew
This patch modifies the bl1_platform_setup() API to load and authenticate TB_FW_CONFIG in BL1. The load address of the same is passed on to BL2 in `arg0` of entrypoint info. The fvp_io_storage.c and arm_io_storage.c also adds entries corresponding to TB_FW_CONFIG. A helper function `arm_load_tb_fw_config()` is added to load and authenticate TB_FW_CONFIG if present. Change-Id: Ie7bce667b3fad2b1a083bbcbc0a773f9f04254b1 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Dynamic cfg: Introduce fdt wrappersSoby Mathew
Change-Id: I9b1cdaf2430a1998a69aa366ea1461224a3d43dc Co-Authoured-by: Jeenu Viswambharan <Jeenu.Viswambharan@arm.com> Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Add dynamic config image IDsSoby Mathew
Change-Id: I147031dea9487dc1976e31ad40c89b221e44edbc Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26BL1: Deprecate the `bl1_init_bl2_mem_layout()` APISoby Mathew
The `bl1_init_bl2_mem_layout()` API is now deprecated. The default weak implementation of `bl1_plat_handle_post_image_load()` calculates the BL2 memory layout and populates the same in x1(r1). This ensures compatibility for the deprecated API. Change-Id: Id44bdc1f572dc42ee6ceef4036b3a46803689315 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26ARM Platforms: Migrate to new BL handover interfaceSoby Mathew
This patch migrates the ARM Standard platforms to the new BL handover interface. The arm_blx_early_platform_setup() functions are also modified to take in 4 arguments. The `ARM_BL31_PLAT_PARAM_VAL` value passed to BL31 from BL2 is now in arg3 in preparation of dynamic configuration arguments. Change-Id: I33e8e61325a19e7a7127b1ff203c3b86921bf153 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Introduce the new BL handover interfaceSoby Mathew
This patch introduces a new BL handover interface. It essentially allows passing 4 arguments between the different BL stages. Effort has been made so as to be compatible with the previous handover interface. The previous blx_early_platform_setup() platform API is now deprecated and the new blx_early_platform_setup2() variant is introduced. The weak compatiblity implementation for the new API is done in the `plat_bl_common.c` file. Some of the new arguments in the new API will be reserved for generic code use when dynamic configuration support is implemented. Otherwise the other registers are available for platform use. Change-Id: Ifddfe2ea8e32497fe1beb565cac155ad9d50d404 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Dynamic cfg: Add HW and TB_FW configs to CoTSoby Mathew
This patch adds image IDs to `hw_config` and `tb_fw_config` and includes them in the default Chain Of Trust (CoT). Change-Id: If7bb3e9be8a5e48be76614b35bf43d58fc7fed12 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Dynamic cfg: Update the toolsSoby Mathew
This patch updates the `fiptool` and `cert_create` for the `hw_config` and `tb_fw_config` dynamic configuration files. The necessary UUIDs and OIDs are assigned to these files and the `cert_create` is updated to generate appropriate hashes and include them in the "Trusted Boot FW Certificate". The `fiptool` is updated to allow the configs to be specified via cmdline and included in the generated FIP. Change-Id: I940e751a49621ae681d14e162aa1f5697eb0cb15 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Makefile: Add `all` target to MAKE_DTBSSoby Mathew
This patch makes some minor changes to `MAKE_DTBS` make macro and adds `dtbs` target to the `all` make target. Change-Id: I1c5b4a603ada31d2dac2ed73da9ff707b410dd11 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Add image_id to bl1_plat_handle_post/pre_image_load()Soby Mathew
This patch adds an argument to bl1_plat_post/pre_image_load() APIs to make it more future proof. The default implementation of these are moved to `plat_bl1_common.c` file. These APIs are now invoked appropriately in the FWU code path prior to or post image loading by BL1 and are not restricted to LOAD_IMAGE_V2. The patch also reorganizes some common platform files. The previous `plat_bl2_el3_common.c` and `platform_helpers_default.c` files are merged into a new `plat_bl_common.c` file. NOTE: The addition of an argument to the above mentioned platform APIs is not expected to have a great impact because these APIs were only recently added and are unlikely to be used. Change-Id: I0519caaee0f774dd33638ff63a2e597ea178c453 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-26Merge pull request #1273 from antonio-nino-diaz-arm/an/fix-tlbi-disable-mmudavidcunado-arm
Ensure the correct execution of TLBI instructions
2018-02-25Merge pull request #1276 from swarren/issue-551davidcunado-arm
Make all build results depend on all makefiles
2018-02-24Merge pull request #1264 from fengbaopeng/integrationdavidcunado-arm
drivers:ufs: fix hynix ufs bug with quirk on hi36xx SoC
2018-02-24drivers:ufs: fix hynix ufs bug with quirk on hi36xx SoCfengbaopeng
Hynix ufs has deviations on hi36xx platform which will result in ufs bursts transfer failures at a very low probability. To fix the problem, the Hynix device must set the register VS_DebugSaveConfigTime to 0x10, which will set time reference for SaveConfigTime is 250 ns. The time reference for SaveConfigTime is 40 ns by default. Signed-off-by: fengbaopeng <fengbaopeng@hisilicon.com>
2018-02-23Merge pull request #1281 from ↵davidcunado-arm
antonio-nino-diaz-arm/an/fix-foundation-instructions Fix Foundation FVP instructions in User Guide
2018-02-23Merge pull request #1262 from ssalko/ssalko_devdavidcunado-arm
qemu: Fix interrupt type check
2018-02-23Merge pull request #1279 from soby-mathew/sm/BL2_base_assertdavidcunado-arm
ARM Platforms: Add assertion for BL2_BASE
2018-02-23Fix Foundation FVP instructions in User GuideAntonio Nino Diaz
The Arm Trusted Firmware is built by default for ARMv8-A version 8.0. However, the Foundation FVP runs by default in the highest version of the architecture it supports. This causes problems when trying to run the Arm Trusted Firmware on it. This patch adds a note to the User Guide about this problem. Change-Id: I0220fe1a9c66c2292149ad4a7ffe5e27ba08ab28 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-02-22Merge pull request #1278 from soby-mathew/sm/aarch32_errata_fixdavidcunado-arm
Fixup AArch32 errata printing framework
2018-02-22Fixup AArch32 errata printing frameworkSoby Mathew
The AArch32 assembly implementation of `print_errata_status` did not save a register which was getting clobbered by a `get_cpu_ops_ptr`. This patch fixes that. Change-Id: Id0711e46b7c685a18a10328d4b513e952a5d860b Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-22ARM Platforms: Add CASSERT for BL2_BASESoby Mathew
Change-Id: I93e491fde2a991fc39584c2762f33cbea40541e3 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-22ARM Platforms: Don't build BL1 and BL2 if RESET_TO_SP_MIN=1Soby Mathew
Change-Id: Iadb21bb56f2e61d7e6aec9b3b3efd30059521def Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-21Make all build results depend on all makefilesStephen Warren
This makes incremental builds work when the only change is to a definition in a makefile. Fixes arm-software/tf-issues#551 Signed-off-by: Stephen Warren <swarren@nvidia.com>
2018-02-21Merge pull request #1275 from soby-mathew/sm/tzc400_fixdavidcunado-arm
Resolve TZC400 build issue when DEBUG=1 and ENABLE_ASSERTIONS=0
2018-02-21Resolve TZC400 build issue when DEBUG=1 and ENABLE_ASSERTIONS=0Soby Mathew
Previously the definition of `_tzc_read_peripheral_id()` was wrapped in ENABLE_ASSERTIONS build flag. This causes build issue for TZC400 driver when DEBUG=1 and ENABLE_ASSERTIONS=0. This patch fixes the same by moving the definitions outside the ENABLE_ASSERTIONS build flag. Change-Id: Ic1cad69f02ce65ac34aefd39eaa96d5781043152 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2018-02-21Ensure the correct execution of TLBI instructionsAntonio Nino Diaz
After executing a TLBI a DSB is needed to ensure completion of the TLBI. rk3328: The MMU is allowed to load TLB entries for as long as it is enabled. Because of this, the correct place to execute a TLBI is right after disabling the MMU. Change-Id: I8280f248d10b49a8c354a4ccbdc8f8345ac4c170 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-02-20Merge pull request #1270 from antonio-nino-diaz-arm/an/smc-unknowndavidcunado-arm
Redefine SMC_UNK as -1 instead of 0xFFFFFFFF
2018-02-19Merge pull request #1271 from afaerber/tegra-fixesdavidcunado-arm
tegra: Fix mmap_region_t struct mismatch
2018-02-17Merge pull request #1259 from hzhuang1/fix_uartdavidcunado-arm
hikey960: avoid hardcode on uart port
2018-02-17tegra: Fix mmap_region_t struct mismatchAndreas Färber
Commit fdb1964c34968921379d3592e7ac6e9a685dbab1 ("xlat: Introduce MAP_REGION2() macro") added a granularity field to mmap_region_t. Tegra platforms were using the v2 xlat_tables implementation in common/tegra_common.mk, but v1 xlat_tables.h headers in soc/*/plat_setup.c where arrays are being defined. This caused the next physical address to be read as granularity, causing EINVAL error and triggering an assert. Consistently use xlat_tables_v2.h header to avoid this. Fixes ARM-software/tf-issues#548. Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-02-17hikey960: avoid hardcode on uart portHaojian Zhuang
Avoid hardcode on uart port. The uart port could be auto detected on HiKey960 platform. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2018-02-17Merge pull request #1268 from jeenu-arm/ehf-pri-fixdavidcunado-arm
EHF: Fix priority check
2018-02-16Merge pull request #1267 from jeenu-arm/console-fixdavidcunado-arm
ARM platforms: Fix console address for flush
2018-02-16Merge pull request #1266 from antonio-nino-diaz-arm/an/misra-urlsdavidcunado-arm
Remove URLs from comments
2018-02-16Merge pull request #1258 from vchong/optee_dbgdavidcunado-arm
optee: print header info before validate
2018-02-15Redefine SMC_UNK as -1 instead of 0xFFFFFFFFAntonio Nino Diaz
According to the SMC Calling Convention (ARM DEN0028B): The Unknown SMC Function Identifier is a sign-extended value of (-1) that is returned in R0, W0 or X0 register. The value wasn't sign-extended because it was defined as a 32-bit unsigned value (0xFFFFFFFF). SMC_PREEMPT has been redefined as -2 for the same reason. NOTE: This might be a compatibility break for some AArch64 platforms that don't follow the previous version of the SMCCC (ARM DEN0028A) correctly. That document specifies that only the bottom 32 bits of the returned value must be checked. If a platform relies on the top 32 bits of the result being 0 (so that SMC_UNK is 0x00000000FFFFFFFF), it will have to fix its code to comply with the SMCCC. Change-Id: I7f7b109f6b30c114fe570aa0ead3c335383cb54d Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-02-14Remove URLs from commentsAntonio Nino Diaz
This fixes all defects according to MISRA Rule 3.1: "The character sequences /* and // shall not be used within a comment". This affects all URLs in comments, so they have been removed: - The link in `sdei_state.c` can also be found in the documentation file `docs/sdei.rst`. - The bug that the file `io_fip.c` talks about doesn't affect the currently supported version of GCC, so it doesn't make sense to keep the comment. Note that the version of GCC officially supported is the one that comes with Linaro Release 17.10, which is GCC 6.2. - The link in `tzc400.c` was broken, and it didn't correctly direct to the Technical Reference Manual it should. The link has been replaced by the title of the document, which is more convenient when looking for the document. Change-Id: I89f60c25f635fd4c008a5d3a14028f814c147bbe Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-02-12EHF: Fix priority checkJeenu Viswambharan
When deactivating, it's not an error if the priority being deactivating is equal to the active priority. Fix this. Change-Id: I66f0e9e775ac9aba8a7cc48cd3ecd3b358be63c0 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
2018-02-12ARM platforms: Fix console address for flushJeenu Viswambharan
The console core flush API expects the base address in the first register, but ARM helpers currently sets the second register with the base address. This causes an assert failure. This patch fixes that. Change-Id: Ic54c423cd60f2756902ab3cfc77b3de2ac45481e Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
2018-02-12Merge pull request #1256 from jeenu-arm/tsp-ehfdavidcunado-arm
TSP changes for EHF
2018-02-09qemu: Fix interrupt type checkSanteri Salko
Function plat_ic_get_pending_interrupt_type() should return interrupt type, not id. The function is used in aarch64 exception handling and currently the irq/fiq forwarding fails if a secure interrupt happens while running normal world. The qemu-specific gic file does not contain any extra functionality so it can be removed and common file can be used instead. fixes arm-software/tf-issues#546 Signed-off-by: Santeri Salko <santeri.salko@gmail.com>