aboutsummaryrefslogtreecommitdiffstats
path: root/plat
Commit message (Collapse)AuthorAgeFilesLines
* Sanitise includes across codebaseAntonio Nino Diaz2019-01-04555-2125/+2952
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support"). This problem was introduced in commit 4ecca33988b9 ("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>
* plat/arm: Always define TSP memory regionAntonio Nino Diaz2019-01-041-0/+2
| | | | | | | | | Even though this is not used unless SPD=tspd, only defining it when SPD_tspd is defined doesn't have any advantage and it makes it harder to read the code. Change-Id: I3d93135e05f39be071d16f8a47394a9a3ff54bc8 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
* Tegra: support for native GICv2 driversVarun Wadekar2018-12-189-370/+54
| | | | | | | | | This patch converts Tegra platforms to support native GICv2 drivers. This involves removes Tegra's GIC driver port platforms to use interrupt_props Change-Id: I83d8a690ff276dd97928dc60824a4fd36999bb30 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
* Tegra: support to compile native GICv2 driversVarun Wadekar2018-12-182-1/+68
| | | | | | | | This patch adds a macro to allow platforms to compile native GICv2 drivers along with Tegra handlers. Change-Id: I8281796c09dae5704cff2daab831395d65e261b7 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
* Merge pull request #1721 from marex/arm/master/memsize-passing-v2Antonio Niño Díaz2018-12-181-1/+1
|\ | | | | plat: rcar: Move FDT from x3 to x1
| * plat: rcar: Move FDT from x3 to x1Marek Vasut2018-12-131-1/+1
| | | | | | | | | | | | | | As suggested, pass the FDT to BL 33 via x1 instead of x3 , to be consistent with the other platforms. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
* | Merge pull request #1717 from satheesbalya-arm/sb1/sb1_2629_romlib_ifcAntonio Niño Díaz2018-12-182-0/+34
|\ \ | | | | | | romlib: Add platform specific jump table list
| * | romlib: Add platform specific jump table listSathees Balya2018-12-182-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows platforms to define their own jump table list for library at ROM. The file has the list of functions to be used from library at ROM. It can also include other list files. Change-Id: I721c35d7dad3dcadbb3a7f3277bfd5d3e1f6e00a Signed-off-by: Sathees Balya <sathees.balya@arm.com>
* | | stm32mp1: remove useless compilation flagsYann Gautier2018-12-131-4/+0
|/ / | | | | | | | | | | | | | | | | On AARCH32, thumb is used by default, no need to redefine it. As all our binaries are compiled with thumb, interwork is not needed. The binaries compiled with or without those flags are the same, except of course for the date. Signed-off-by: Yann Gautier <yann.gautier@st.com>
* | Merge pull request #1708 from Yann-lms/warningsSoby Mathew2018-12-126-5/+6
|\ \ | |/ |/| Add possibility to add compilation warnings
| * correct some missing-prototype warningsYann Gautier2018-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This avoids the following warnings: no previous prototype for 'bl2_arch_setup' [-Wmissing-prototypes] no previous prototype for 'plat_log_get_prefix' [-Wmissing-prototypes] Also correct a compilation issue if BL2_IN_XIP_MEM is enabled: uintptr_t is not defined. Signed-off-by: Lionel Debieve <lionel.debieve@st.com> Signed-off-by: Yann Gautier <yann.gautier@st.com>
| * io_block: define MAX_IO_BLOCK_DEVICES as unsignedYann Gautier2018-12-105-5/+5
| | | | | | | | | | | | | | This is used as a table index, and already compared with an unsigned int: block_dev_count. Signed-off-by: Yann Gautier <yann.gautier@st.com>
* | Merge pull request #1707 from antonio-nino-diaz-arm/an/spmAntonio Niño Díaz2018-12-115-9/+430
|\ \ | | | | | | SPM: Initial prototype based on SPCI and SPRT
| * | SPM: Support multiple xlat tables contextsAntonio Nino Diaz2018-12-111-0/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ib7c2529b85bb5930d44907edfc8ead13d3b1ef4d Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
| * | SPM: Map memory regions from RDAntonio Nino Diaz2018-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPM needs to map a number of regions on behalf of the secure partition. Previously, it used to get a list of them from platform code using the plat_get_secure_partition_mmap() API. Now it gets them from the resource description structure. The SPM<->SP shared buffer is mapped dynamically at EL3. This buffer is used to pass information between SPM and SP, so it must be mapped at EL3 as well in order to be used by SPM. Dynamic translation tables have been enabled when the Trusted Firmware is compiled with SPM support. Change-Id: I64ad335e931661812a0a60558e60372e1e5e6b72 Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
| * | SPM: Load image and RD from SP packageAntonio Nino Diaz2018-12-114-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | Load SP and RD from package instead of relying on RD being already loaded in memory and the SP being loaded as a BL32 image. Change-Id: I18d4fbf4597656c6a7e878e1d7c01a8a324f3f8a Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
| * | SPM: Remove SP memory mappings definitionsAntonio Nino Diaz2018-12-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This information is retrieved from the resource description now. Change-Id: Iaae23945eb2c45305cdc6442853e42f4e04fe094 Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
| * | SPM: Deprecate boot info structAntonio Nino Diaz2018-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This information is defined by the Secure Partition in the resource description. Change-Id: Ia7db90c5de8360a596106880d3f6a632a88d3ea8 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
| * | SPM: Introduce functions to load DTB filesAntonio Nino Diaz2018-12-102-0/+321
| | | | | | | | | | | | | | | | | | | | | | | | Introduce helpers to create resource description struct, as well as code to load the information from DTB files. Change-Id: I0f5bb94eb8b01c6cb53fe807a9db0c05a70d7a43 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
| * | fvp: Increase stack size when SPM is enabledAntonio Nino Diaz2018-12-101-1/+1
| |/ | | | | | | | | Change-Id: Iec265dc85d44f35048d1fbcfbe55960d45570027 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
* | Merge pull request #1714 from chandnich/sgiclark-heliosSoby Mathew2018-12-119-1/+214
|\ \ | |/ |/| SGI-Clark.Helios platform support patches
| * plat/arm/sgi: Add board support for SGI-Clark.Helios platformChandni Cherukuri2018-12-066-0/+173
| | | | | | | | | | | | | | | | | | SGI-Clark.Helios platform is similar to SGI-Clark.Ares platform. The difference between these two platforms is the CPU type and the number of CPUs. Add the base support for SGI-Clark.Helios platform. Change-Id: I2b04cb3fb953907848b4fab016e3648899ca4256 Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
| * plat/arm/sgi: override 'plat_psci_ops_t' for SGI-Clark.Helios platformChandni Cherukuri2018-12-061-0/+11
| | | | | | | | | | | | | | | | | | For SGI-Clark.Helios platform, at present, only the CPU power ON/OFF ops are supported. So override the PSCI ops to allow callbacks only for CPU power ON/OFF operations. Change-Id: Idc0a3deb78cb850310cbe849d77604fa9881579c Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
| * plat/arm/sgi: add platform support for SGI-Clark.Helios platformChandni Cherukuri2018-12-062-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | SGI-Clark.Helios platform is based on multi-threaded CPUs and uses an additional thread power domain level as well. Define a power domain tree descriptor 'sgi_clark_helios_pd_tree_desc' for SGI-Clark.Helios platform and let the function 'plat_get_power_domain_tree_desc' pick up the correct power domain tree descriptor based on the platform. Change-Id: Ibc6d551b570bc740053316a3608c455679d9155b Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
* | Merge pull request #1704 from marex/arm/master/memsize-passing-v1Antonio Niño Díaz2018-12-103-33/+324
|\ \ | | | | | | Arm/master/memsize passing v1
| * | plat: rcar: Generate FCNL reserved memory nodeMarek Vasut2018-12-061-4/+77
| | | | | | | | | | | | | | | | | | | | | Generate a /reserved-memory node for FCNL in the DT passed to subsequent stages, so they will know how the FCNL is configured. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Generate platform compatible stringMarek Vasut2018-12-061-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate /compatible string for the platform, so that the subsequent stages know which platform they are running on. This could be useful when ie. building U-Boot that contains DTs for multiple platforms and can thus decide on which platform it is running. This would ultimately allow single bootloader binary for all Gen3 platforms. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Pass DTB with DRAM layout from BL2 to next stagesMarek Vasut2018-12-063-1/+95
| | | | | | | | | | | | | | | | | | | | | | | | Pass DTB containing DRAM layout from BL2 to BL33 via register x3, so that the BL33 can simply consume it and get accurate DRAM layout info. BL33 is in most usecases U-Boot. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Use array in the DRAM size reportingMarek Vasut2018-12-061-16/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use array of start-size tuples for the DRAM banks and call single function which iterates over this array to report the DRAM info. This is in preparation for expanding this to generate FDT for the next stage. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Print DRAM configuration after initMarek Vasut2018-12-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Print the DRAM configuration only after the DRAM was initialized. This will be useful when deduplicating code populating FDT passed to U-Boot, since it will contain the same macros as bl2_advertise_dram_size(). Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Fill in memory information for M3W, M3NMarek Vasut2018-12-061-4/+16
| | | | | | | | | | | | | | | | | | Make the DRAM configuration debug print consistent for all supported SoCs. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Drop H3 v3.0 check on DRAM debug printMarek Vasut2018-12-061-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | There is nothing preventing H3 older than v3.0 from printing the DRAM configuration, just like v3.0 and newer. Drop the check and let all H3 revisions print DRAM configuration in BL2. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Add E3 1GBx4 debug printMarek Vasut2018-12-061-0/+3
| | | | | | | | | | | | | | | | | | | | | RCAR_DRAM_DDR3L_MEMCONF = 2 means E3 with 1GBx4 memory configuration. Add debug print for this configuration for completeness sake. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | plat: rcar: Move DRAM layout print to separate functionMarek Vasut2018-12-061-26/+38
| |/ | | | | | | | | | | | | Just move the DRAM layout information into separate function, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
* | Merge pull request #1700 from jwerner-chromium/JW_crashfixSoby Mathew2018-12-1015-132/+149
|\ \ | | | | | | MULTI_CONSOLE_API fixes and cleanups
| * | drivers/console: Link console framework code by defaultJulius Werner2018-12-0613-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the build system link the console framework code by default, like it already does with other common libraries (e.g. cache helpers). This should not make a difference in practice since TF is linked with --gc-sections, so the linker will garbage collect all functions and data that are not referenced by any other code. Thus, if a platform doesn't want to include console code for size reasons and doesn't make any references to console functions, the code will not be included in the final binary. To avoid compatibility issues with older platform ports, only make this change for the MULTI_CONSOLE_API. Change-Id: I153a9dbe680d57aadb860d1c829759ba701130d3 Signed-off-by: Julius Werner <jwerner@chromium.org>
| * | plat/common/crash_console_helpers.S: Fix MULTI_CONSOLE_API supportJulius Werner2018-12-061-36/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Crash reporting via the default consoles registered by MULTI_CONSOLE_API has been broken since commit d35cc34 (Console: Use callee-saved registers), which was introduced to allow console drivers written in C. It's not really possible with the current crash reporting framework to support console drivers in C, however we should make sure that the existing assembly drivers that do support crash reporting continue to work through the MULTI_CONSOLE_API. This patch fixes the problem by creating custom console_putc() and console_flush() implementations for the crash reporting case that do not use the stack. Platforms that want to use this feature will have to link plat/common/aarch64/crash_console_helpers.S explicitly. Also update the documentation to better reflect the new reality (of this being an option rather than the expected default for most platforms). Change-Id: Id0c761e5e2fddaf25c277bc7b8ab603946ca73cb Signed-off-by: Julius Werner <jwerner@chromium.org>
| * | plat/common: Remove duplication of plat_crash_console functions/stubsJulius Werner2018-12-062-83/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e74afb652 (Deprecate weak crash console functions) deprecated the default inclusion of weak definitions for plat_crash_console functions in plat/common/aarch64/platform_helpers.S. The code was later copied out to plat/common/aarch64/crash_console_helpers.S so platforms can link it explicitly if they want to. However, since deprecation does not mean removal, the same code is also still duplicated in platform_helpers.S. The duplicated code contains both empty stubs for the !MULTI_CONSOLE_API case, and a real implementation that used to work but was broken by commit d35cc34 (Console: Use callee-saved registers) for MULTI_CONSOLE_API. It's not great to have both of these duplicated in two files, so this patch splits them up: in platform_helpers.S we'll only keep the empty stubs (guarded by !ERROR_DEPRECATED), which should not regress functionality since the MULTI_CONSOLE_API implementation was already broken anyway. In crash_console_helpers.S, we'll only keep the MULTI_CONSOLE_API version, which is enough both as an implementation in itself and as a sample for how to reimplement these functions in a platform-specific file. Change-Id: I83d95a90ab6aac597dc2ea2f2797ac2c8ed075d4 Signed-off-by: Julius Werner <jwerner@chromium.org>
* | | Merge pull request #1713 from chandnich/nt-fw-configSoby Mathew2018-12-067-15/+15
|\ \ \ | | | | | | | | plat/arm/sgi: Use NT_FW_CONFIG instead of HW_CONFIG
| * | | plat/arm/sgi: Use NT_FW_CONFIG instead of HW_CONFIGChandni Cherukuri2018-12-057-15/+15
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the two new APIs 'plat_arm_sgi_get_platform_id' and 'plat_arm_sgi_get_config_id' that are available now, BL31 need not depend on hw_config device tree to identify the platform. In addition to this, the existing hardware description in hw_config can be limited to use by BL33 and not by the operating system. So the hardware description from hw_config dts can be moved into nt_fw_config dts and the use of hw_config dts can be removed. Change-Id: I873b7e1e72823d3ec5d253a848e85ae724f09e49 Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
* | | Merge pull request #1706 from Yann-lms/mmc_init_checkAntonio Niño Díaz2018-12-061-1/+5
|\ \ \ | |/ / |/| | MMC init check and STM32MP1 MMC driver improvements
| * | stm32mp: check stm32_sdmmc2_mmc_init returnYann Gautier2018-12-041-1/+5
| | | | | | | | | | | | Signed-off-by: Yann Gautier <yann.gautier@st.com>
* | | Merge pull request #1653 from JackyBai/masterAntonio Niño Díaz2018-12-0510-21/+985
|\ \ \ | | | | | | | | Add NXP i.MX8MQ basic support
| * | | plat: imx: Add i.MX8MQ basic supportBai Ping2018-12-058-0/+976
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i.MX8MQ is new SOC of NXP's i.MX8M family based on A53. It can provide industry-leading audio, voice and video processing for applications that scale from consumer home audio to industrial building automation and mobile computers this patchset add the basic supoort to boot up the 4 X A53. more feature will be added later. Signed-off-by: Bai Ping <ping.bai@nxp.com>
| * | | drivers: add tzc380 supportPeng Fan2018-12-042-21/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tzc380 support. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Bai Ping <ping.bai@nxp.com>
* | | | Merge pull request #1703 from oscardagrach/hikey960-dmac-fixAntonio Niño Díaz2018-12-042-0/+23
|\ \ \ \ | | | | | | | | | | hikey960: initialize EDMAC and channels
| * | | | hikey960: initialize EDMAC and channelsRyan Grachek2018-11-292-0/+23
| |/ / / | | | | | | | | | | | | | | | | | | | | This is needed to utilize the DMA controller on the hikey960 Signed-off-by: Ryan Grachek <ryan@edited.us>
* | | | Merge pull request #1705 from chandnich/platform-idAntonio Nino Diaz2018-12-047-67/+53
|\ \ \ \ | | | | | | | | | | | | | | | plat/arm/sgi: Use platform specific functions to get platform ids
| * | | | plat/arm/sgi: Use platform specific functions to get platform idsChandni Cherukuri2018-12-037-67/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new functions 'plat_arm_sgi_get_platform_id' and 'plat_arm_sgi_get_config_id' which will be implemented by all the SGI platforms. These functions can be used to determine the part number and configuration id of the SGI platforms. In BL2, these functions are used to populate the 'system-id' node. In BL31, these functions are used to populate the 'sgi_plat_info_t' structure with the part number and configuration id of the platform. Change-Id: I3bacda933527724a3b4074ad4ed5b53a81ea4689 Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
* | | | | Merge pull request #1702 from MISL-EBU-System-SW/patches-18.12Antonio Niño Díaz2018-12-048-92/+217
|\ \ \ \ \ | |_|_|/ / |/| | | | Update code with latest changes from Marvell LSP 18.12