| d4dc8311 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Build intermediate files in $(BUILD_PLAT) directory
Currently a3700_common.mk makefile builds intermediate files in TF-A top level directory and also outside of the TF-A
plat: marvell: armada: a3k: Build intermediate files in $(BUILD_PLAT) directory
Currently a3700_common.mk makefile builds intermediate files in TF-A top level directory and also outside of the TF-A tree. This change fixes this issue and builds all intermediate files in $(BUILD_PLAT) directory.
Part of this change is also removal of 'rm' and 'mv' commands as there is no need to remove or move intermediate files from outside of the TF-A build tree.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I72e3a3024bd3fdba1b991a220184d750029491e9
show more ...
|
| b50c715b | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Correctly set DDR_TOPOLOGY and CLOCKSPRESET for WTMI
When building WTMI image we need to correctly set DDR_TOPOLOGY and CLOCKSPRESET variables which WTMI build system exp
plat: marvell: armada: a3k: Correctly set DDR_TOPOLOGY and CLOCKSPRESET for WTMI
When building WTMI image we need to correctly set DDR_TOPOLOGY and CLOCKSPRESET variables which WTMI build system expect. Otherwise it use default values.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ib83002194c8a6c64a2014899ac049bd319e1652f
show more ...
|
| 8708a884 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Allow use of the system Crypto++ library
This change introduces two new A3720 parameters, CRYPTOPP_LIBDIR and CRYPTOPP_INCDIR, which can be used to specify directory path
plat: marvell: armada: a3k: Allow use of the system Crypto++ library
This change introduces two new A3720 parameters, CRYPTOPP_LIBDIR and CRYPTOPP_INCDIR, which can be used to specify directory paths to pre-compiled Crypto++ library and header files.
When both new parameters are specified then the source code of Crypto++ via CRYPTOPP_PATH parameter is not needed. And therefore it allows TF-A build process to use system Crypto++ library.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I6d440f86153373b11b8d098bb68eb7325e86b20b
show more ...
|
| edb4a8a2 | 26-Jan-2021 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Add checks that WTP, MV_DDR_PATH and CRYPTOPP_PATH are correctly defined
These variables must contain a path to a valid directory (not a file) which really exists. Also W
plat: marvell: armada: a3k: Add checks that WTP, MV_DDR_PATH and CRYPTOPP_PATH are correctly defined
These variables must contain a path to a valid directory (not a file) which really exists. Also WTP and MV_DDR_PATH must point to either a valid Marvell release tarball or git repository.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I1ad80c41092cf3ea6a625426df62b7d9d6f37815
show more ...
|
| 036e9c17 | 25-Jan-2021 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge changes I635cf82e,Iee3b4e0d into integration
* changes: Makefile: Fix ${FIP_NAME} to be rebuilt only when needed Makefile: Do not mark file targets as .PHONY target |
| b04921f7 | 07-Jan-2021 |
Marek Behún <marek.behun@nic.cz> |
plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB
The current configuration of CPU windows on Armada 37x0 with 4 GB DRAM can only utilize 3.375 GB of memory. This is becaus
plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB
The current configuration of CPU windows on Armada 37x0 with 4 GB DRAM can only utilize 3.375 GB of memory. This is because there are only 5 configuration windows, configured as such (in hexadecimal, also showing ranges not configurable by CPU windows):
0 - 80000000 | 2 GB | DDR | CPU window 0 80000000 - C0000000 | 1 GB | DDR | CPU window 1 C0000000 - D0000000 | 256 MB | DDR | CPU window 2 D0000000 - D2000000 | 32 MB | | Internal regs empty space | | | D8000000 - D8010000 | 64 KB | | CCI regs empty space | | | E0000000 - E8000000 | 128 MB | DDR | CPU window 3 E8000000 - F0000000 | 128 MB | PCIe | CPU window 4 empty space | | | FFF00000 - end | 64 KB | | Boot ROM
This can be improved by taking into account that: - CCI window can be moved (the base address is only hardcoded in TF-A; U-Boot and Linux will not break with changing of this address) - PCIe window can be moved (upstream U-Boot can change device-tree ranges of PCIe if PCIe window is moved)
Change the layout after the Internal regs as such:
D2000000 - F2000000 | 512 MB | DDR | CPU window 3 F2000000 - FA000000 | 128 MB | PCIe | CPU window 4 empty space | | | FE000000 - FE010000 | 64 KB | | CCI regs empty space | | | FFF00000 - end | 64 KB | | Boot ROM
(Note that CCI regs base address is moved from D8000000 to FE000000 in all cases, not only for the configuration with 4 GB of DRAM. This is because TF-A is built with this address as a constant, so we cannot change this address at runtime only on some boards.)
This yields 3.75 GB of usable RAM.
Moreover U-Boot can theoretically reconfigure the PCIe window to DDR if it discovers that no PCIe card is connected. This can add another 128 MB of DRAM (resulting only in 128 MB of DRAM not being used).
Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I4ca1999f852f90055fac8b2c4f7e80275a13ad7e
show more ...
|
| a9812206 | 24-Nov-2020 |
Pali Rohár <pali@kernel.org> |
Makefile: Do not mark file targets as .PHONY target
Only non-file targets should be set a .PHONY. Otherwise if file target is set as .PHONY then targets which depends on those file .PHONY targets wo
Makefile: Do not mark file targets as .PHONY target
Only non-file targets should be set a .PHONY. Otherwise if file target is set as .PHONY then targets which depends on those file .PHONY targets would be always rebuilt even when their prerequisites are not changed.
File target which needs to be always rebuilt can be specified in Make system via having a prerequisite on some .PHONY target, instead of marking whole target as .PHONY. In Makefile projects it is common to create empty .PHONY target named FORCE for this purpose.
This patch changes all file targets which are set as .PHONY to depends on new .PHONY target FORCE, to ensure that these file targets are always rebuilt (as before). Basically they are those targets which calls external make subprocess.
After FORCE target is specified in main Makefile, remove it from other Makefile files to prevent duplicate definitions.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Iee3b4e0de93879b95eb29a1745a041538412e69e
show more ...
|
| d9243f26 | 05-Jan-2021 |
Marek Behún <marek.behun@nic.cz> |
plat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor
Introduce a new build option CM3_SYSTEM_RESET for A3700 platform, which, when enabled, adds code to the PSCI reset h
plat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor
Introduce a new build option CM3_SYSTEM_RESET for A3700 platform, which, when enabled, adds code to the PSCI reset handler to try to do system reset by the WTMI firmware running on the Cortex-M3 secure coprocessor. (This function is exposed via the mailbox interface.)
The reason is that the Turris MOX board has a HW bug which causes reset to hang unpredictably. This issue can be solved by putting the board in a specific state before reset.
Signed-off-by: Marek Behún <marek.behun@nic.cz> Change-Id: I3f60b9f244f334adcd33d6db6a361fbc8b8d209f
show more ...
|
| e3337082 | 03-Dec-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Simplify check if WTP variable is defined
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ieb352f0765882efdcb64ef54e6b2a39768590a06 |
| bc1f3687 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Split building $(WTMI_MULTI_IMG) and $(TIMDDRTOOL)
These two targets are build by make subprocesses and are independent. So splitting them into own targets allow make to
plat: marvell: armada: a3k: Split building $(WTMI_MULTI_IMG) and $(TIMDDRTOOL)
These two targets are build by make subprocesses and are independent. So splitting them into own targets allow make to build them in parallel. $(TIMBUILD) script depends on $(TIMDDRTOOL) so specify it in Makefile.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I139fc7fe64d8de275b01a853e15bfb88c4ff840d
show more ...
|
| 23b1be79 | 03-Dec-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Maximal size of bl1 image in mrvl_bootimage is 128kB
Add check when building mrvl_bootimage that size of bl1 image is not bigger than maximal size.
Signed-off-by: Pali Rohár
plat: marvell: armada: Maximal size of bl1 image in mrvl_bootimage is 128kB
Add check when building mrvl_bootimage that size of bl1 image is not bigger than maximal size.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ib873debd3cfdba9acd4c168ee37edab3032e9f25
show more ...
|
| e4bbd39c | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Add missing FORCE, .PHONY and clean targets
FORCE target is used as a dependency for other file targets which needs to be always rebuilt. .PHONY target is standard Makefile ta
plat: marvell: armada: Add missing FORCE, .PHONY and clean targets
FORCE target is used as a dependency for other file targets which needs to be always rebuilt. .PHONY target is standard Makefile target which specify non-file targets and therefore needs to be always rebuilt.
Targets clean, realclean and distclean are .PHONY targets used to remove built files. Correctly set that mrvl_clean target is prerequisite for these clean targets to ensure that built files are removed.
Finally this change with usage of FORCE target allows to remove mrvl_clean hack from the prerequisites of a8k ${DOIMAGETOOL} target which was used just to ensure that ${DOIMAGETOOL} is always rebuilt via make subprocess.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I2fa8971244b43f101d846fc433ef7b0b6f139c92
show more ...
|
| ed9bae6a | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Use make ifeq/endif syntax for $(MARVELL_SECURE_BOOT) code
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Id766db4a900a56c795fe5ffdd8a2b80b1aaa2132 |
| bafc9476 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Build $(WTMI_ENC_IMG) in $(BUILD_PLAT) directory
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Iaecd6c24bf334a959ac2bf395c3ee49c810b01a7 |
| 2f852b89 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Do not remove external WTMI image files outside of TF-A repository
Create copy of WTMI images instead of moving them into TF-A build directory.
Signed-off-by: Pali Rohár
plat: marvell: armada: a3k: Do not remove external WTMI image files outside of TF-A repository
Create copy of WTMI images instead of moving them into TF-A build directory.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I2dc24c33b9ce540e4acde51fc1a5c946ae66a5d7
show more ...
|
| 13aa8956 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Do not modify $(WTMI_MULTI_IMG)
Rather create a temporary copy in $(BUILD_PLAT) and modify only copy.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I256c029106e
plat: marvell: armada: a3k: Do not modify $(WTMI_MULTI_IMG)
Rather create a temporary copy in $(BUILD_PLAT) and modify only copy.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I256c029106ea6f69faa086fc4e5bee9f68cd257f
show more ...
|
| bdcd1bd0 | 23-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Do not modify $(WTMI_IMG)
$(WTMI_IMG) is used only by $(MAKE) subprocess in $(DOIMAGEPATH) directory. So calling truncate on $(WTMI_IMG) after $(MAKE) in $(DOIMAGEPATH) h
plat: marvell: armada: a3k: Do not modify $(WTMI_IMG)
$(WTMI_IMG) is used only by $(MAKE) subprocess in $(DOIMAGEPATH) directory. So calling truncate on $(WTMI_IMG) after $(MAKE) in $(DOIMAGEPATH) has no effect and can just damage input file for future usage. Therefore remove this truncate call.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I9925c54c5d3d10eadc19825c5565ad4598a739a7
show more ...
|
| d22db1b0 | 10-Nov-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: Update SUBVERSION to match Marvell's forked version
Marvell's TF-A fork has SUBVERSION set to devel-18.12.2.
The only differences between Marvell's devel-18.12.0 and devel-18.12.2 ve
plat: marvell: Update SUBVERSION to match Marvell's forked version
Marvell's TF-A fork has SUBVERSION set to devel-18.12.2.
The only differences between Marvell's devel-18.12.0 and devel-18.12.2 versions are documentation updates and cherry-picked patches from TF-A upstream repository.
So upstream TF-A has already all changes from Marvell's TF-A devel-18.12.2 fork and therefore update SUBVERSION to reflect this state.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I5ce946a5176a5cbf124acd8037392463d586b072
show more ...
|
| 91bc2da7 | 29-Oct-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Add new target mrvl_bootimage
This new target builds boot-image.bin binary as described in documentation. This image does not contain WTMI image and therefore WTP repository i
plat: marvell: armada: Add new target mrvl_bootimage
This new target builds boot-image.bin binary as described in documentation. This image does not contain WTMI image and therefore WTP repository is not required for building.
Having ability to build just this boot-image.bin binary without full flash-image.bin is useful for A3720 Turris MOX board which does not use Marvell's WTP and a3700_utils.
To reduce duplicity between a8k and a3k code, define this new target and also definitions for $(BUILD_PLAT)/$(BOOT_IMAGE) in common include file marvell_common.mk.
For this purpose it is needed to include plat/marvell/marvell.mk file from a3700_common.mk unconditionally (and not only when WTP is defined). Now when common file plat/marvell/marvell.mk does not contain definition for building $(DOIMAGETOOL), it is possible to move its inclusion at the top of the a3700_common.mk file.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Ic58303b37a1601be9a06ff83b7a279cb7cfc8280
show more ...
|
| c6a7ab77 | 29-Oct-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: a3k: Add support for building $(DOIMAGETOOL)
Current binary wtptp/linux/tbb_linux which is specified in $(DOIMAGETOOL) variable points to external pre-compiled Marvell x86_64
plat: marvell: armada: a3k: Add support for building $(DOIMAGETOOL)
Current binary wtptp/linux/tbb_linux which is specified in $(DOIMAGETOOL) variable points to external pre-compiled Marvell x86_64 ELF linux binary from A3700-utils-marvell WTP repository.
It means that currently it is not possible to compile TF-A for A3720 on other host platform then linux x86_64.
Part of the A3700-utils-marvell WTP repository is also source code of $(DOIMAGETOOL) TBB_Linux tool.
This change adds support for building $(DOIMAGETOOL) also for a3k platform.
After running $(MAKE) at appropriate subdirectory of A3700-utils-marvell WTP repository, compiled TBB_linux tool will appear in WTP subdirectory wtptp/src/TBB_Linux/release/. So update also $(DOIMAGETOOL) variable to point to the correct location where TBB_linux was built.
To build TBB_linux it is required to compile external Crypto++ library which is available at: https://github.com/weidai11/cryptopp.git
User needs to set CRYPTOPP_PATH option to specify path to that library.
After this change it is now possible to build whole firmware for A3720 platform without requirement to use pre-compiled/proprietary x86_64 executable binaries from Marvell.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I6f26bd4356778a2f8f730a223067a2e550e6c8e0
show more ...
|
| c0365705 | 27-Oct-2020 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "plat: marvell: armada: Fix dependences for target fip" into integration |
| 9c28689a | 24-Oct-2020 |
Varun Wadekar <vwadekar@nvidia.com> |
Merge changes I5ae9d08b,I5cbbd7eb,Idb389223 into integration
* changes: plat: marvell: armada: Building ${DOIMAGETOOL} is only for a8k plat: marvell: armada: Fix including plat/marvell/marvell.m
Merge changes I5ae9d08b,I5cbbd7eb,Idb389223 into integration
* changes: plat: marvell: armada: Building ${DOIMAGETOOL} is only for a8k plat: marvell: armada: Fix including plat/marvell/marvell.mk file plat: marvell: armada: a3k: When WTP is empty do not define variables and targets which depends on it
show more ...
|
| b5e3d540 | 21-Oct-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Building ${DOIMAGETOOL} is only for a8k
Currently a3k target is misusing ${DOIMAGETOOL} target for building flash and UART images. It is not used for building image tool.
So
plat: marvell: armada: Building ${DOIMAGETOOL} is only for a8k
Currently a3k target is misusing ${DOIMAGETOOL} target for building flash and UART images. It is not used for building image tool.
So move ${DOIMAGETOOL} target from common marvell include file into a8k include file and add correct invocation of ${MAKE} into a3k for building flash and UART images.
Part of this change is also checks that MV_DDR_PATH for a3k was specified by user as this option is required for building a3k flash and UART images.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I5ae9d08b8505460933f17836c9b6435fd6e51bb6
show more ...
|
| 0412b732 | 19-Oct-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Fix including plat/marvell/marvell.mk file
Include file plat/marvell/marvell.mk for platform A3700 was included two times. Once from file plat/marvell/armada/a3k/common/a3700_
plat: marvell: armada: Fix including plat/marvell/marvell.mk file
Include file plat/marvell/marvell.mk for platform A3700 was included two times. Once from file plat/marvell/armada/a3k/common/a3700_common.mk and second time from common file plat/marvell/armada/common/marvell_common.mk.
It caused following warning every time was make called:
plat/marvell/marvell.mk:51: warning: overriding recipe for target 'mrvl_clean' plat/marvell/marvell.mk:51: warning: ignoring old recipe for target 'mrvl_clean'
Change in this commit removes inclusion of plat/marvell/marvell.mk file in common file plat/marvell/armada/common/marvell_common.mk. As a80x0 platform needs this include file, add it also into a80x0 platform specific include file lat/marvell/armada/a8k/common/a8k_common.mk.
Also moves inclusion of plat/marvell/marvell.mk file in a3700 platform file plat/marvell/armada/a3k/common/a3700_common.mk at correct place. Global plat/marvell/marvell.mk expects that variables DOIMAGEPATH and DOIMAGETOOL are already defined, but it defines MARVELL_SECURE_BOOT variable which is needed by plat/marvell/armada/a3k/common/a3700_common.mk.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I5cbbd7eb8a3376924419f9850516b2a4924be5aa
show more ...
|
| fb28d525 | 08-Oct-2020 |
Pali Rohár <pali@kernel.org> |
plat: marvell: armada: Fix dependences for target fip
For building fip image it is not needed to build target mrvl_flash. This fip image contains only bl2, bl31 and bl33 (u-boot.bin) images and ther
plat: marvell: armada: Fix dependences for target fip
For building fip image it is not needed to build target mrvl_flash. This fip image contains only bl2, bl31 and bl33 (u-boot.bin) images and therefore it does not depend on Marvell wtmi and wtp A3700-utils.
So remove mrvl_flash dependency for fip target to allow building fip image without need to build mrvl_flash and therefore specify and provide Marvell wmi and wtp A3700-utils.
This changes fixes compilation of fip image for A3700 platform by command:
make CROSS_COMPILE=aarch64-linux-gnu- BL33=/path/u-boot/u-boot.bin \ DEBUG=0 LOG_LEVEL=0 USE_COHERENT_MEM=0 PLAT=a3700 fip
Marvell boot image can be still build by 'mrvl_flash' target.
Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: Iba9a9da5be6fd1da23407fc2d490aedcb1a292c9
show more ...
|