- 17 Dec, 2019 9 commits
-
-
Heiko Stuebner authored
Transfering the regions of ddr memory to additionally protect is very much specific to some rockchip internal first stage bootloader and doesn't get used in either mainline uboot or even Rockchip's published vendor uboot sources. This results in a big error ERROR: over or zero region, nr=0, max=10 getting emitted on every boot for most users and such a message coming from early firmware might actually confuse developers working with the system. As this mechanism seems to be only be used by Rockchip's internal miniloader hide it behind a build conditional, so it doesn't confuse people too much. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Change-Id: I52c02decc60fd431ea78c7486cad5bac82bdbfbe
-
Heiko Stuebner authored
So far the px30-related ddr security was loading data for regions to secure from a pre-specified memory location and also setting region0 to secure the first megabyte of memory in hard-coded setting (top=0, end=0, meaning 1MB). To make things more explicit and easier to read add a function doing the settings for specified memory areas, like other socs have and also add an assert to make sure any descriptor read from memory does not overlap the TZRAM security in region0 and TEE security in region1. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Change-Id: I78441875112bf66a62fde5f1789f4e52a78ef95f
-
Heiko Stuebner authored
Similar to others like rk3399 and rk3288 move the secure init to a separate file to unclutter the soc init a bit. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Change-Id: Iebb38e24f1c7fe5353f139c896fb8ca769bf9691
-
Hadi Asyrafi authored
Add-in support for handling BL31 parameter from non-BL2 image, ie. SPL Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: I16118d791399f652b6d1093c10092935a3449c32
-
Hadi Asyrafi authored
Load BL31 to DDR instead of On-Chip RAM for scalability. Also, make use of On-Chip RAM for BL31 specific variables filling down from handoff offset to reduce fragmentation Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: Ib64f48bd14f71e5fca2d406f4ede3386f2881099
-
Hadi Asyrafi authored
This patch will provide an entrypoint for uboot's spl into BL31. BL31 will also handle secondary cpu state during uboot's cold boot Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: I661bdb782c2d793d5fc3c7f78dd7ff746e33b7a3
-
Hadi Asyrafi authored
Separate SiP related definition from mailbox header file Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: I45ba540f29d9261007f7ec23469358747cf140b4
-
Heiko Stuebner authored
The calls to secure ddr regions on rk3288 and rk3399 use parameters of base and size - as it custom for specifying memory regions, but the functions themself expect start and endpoints of the area. This only works by chance for the TZRAM, as it starts a 0x0 and therefore its end location is the same as its size. To not fall into a trap later on adapt the functions to really take base+size parameters. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Change-Id: Idb9fab38aa081f3335a4eca971e7b7f6757fbbab
-
Heiko Stuebner authored
The agreed upon division of early boot locations is 0x40000 for bl31 to leave enough room for u-boot-spl and 0x100000 for bl33 (u-boot). rk3288 and rk3399 already correctly secure the ddr up to the 1MB boundary so pull the other platforms along to also give the Rockchip TF-A enough room to comfortably live in. Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Change-Id: Ie9e0c927d3074a418b6fd23b599d2ed7c15c8c6f
-
- 14 Dec, 2019 11 commits
-
-
Samuel Holland authored
Chip ID checking and poweroff work just like they did before. Regulators are now enabled just like on A64/H5. This changes the signatures of the low-level register read/write functions to match the interface expected by the common driver. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I14d63d171a094fa1375904928270fa3e21761646
-
Samuel Holland authored
Previously, the A64/H5 and H6 platforms' PMIC setup code was entirely independent. However, some H6 boards also need early regulator setup. Most of the register interface and all of the device tree traversal code can be reused between the AXP803 and AXP805. The main difference is the hardware bus interface, so that part is left to the platforms. The remainder is moved into a driver. I factored out the bits that were obviously specific to the AXP803; additional changes for compatibility with other PMICs can be made as needed. The only functional change is that rsb_init() now checks the PMIC's chip ID register against the expected value. This was already being done in the H6 version of the code. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Icdcf9edd6565f78cccc503922405129ac27e08a2
-
Samuel Holland authored
This simplifies the code a bit. Verified to produce the same binary. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ie1ec1ce2ea39c46525840906826c90a8a7eff287
-
Samuel Holland authored
As of a561e41b ("allwinner: power: add enable switches for DCDC1/5") there are no longer regulators without an enable register provided. Since it seems reasonable that this will continue to be the case, drop the check. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Icd7ec26fc6450d053e6e6d855fc16229b1d65a39
-
Samuel Holland authored
should_enable_regulator() is already checked in the regulators subnode loop before setup_regulator() is called, so there's no need to check it again here. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Idb8b8a6e435246f4fb226bc84813449d80a0a977
-
Samuel Holland authored
These are used by the PMIC setup code, which runs during BL31 initialization, and the PSCI shutdown code, also a part of BL31. They can't be needed before BL31, or it wouldn't be possible to boot. Allwinner platforms don't generally build anything but BL31 anyway, but this change improves clarity and consistency with allwinner-common.mk. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I24f1d9ca8b4256e44badf5218d04d8690082babf
-
Samuel Holland authored
The function is only used in this file, and it doesn't make sense for it to be used anywhere else. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Iab18f082911edcdbc37ceeaff8c512be68e0cb0f
-
Samuel Holland authored
The action of last resort isn't going to change between SoCs. This moves that code back to the PSCI implementation, where it more obviously matches the code in sunxi_system_reset(). The two error messages say essentially the same thing anyway. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I62ac35fdb5ed78a016e9b18281416f1dcea38a4a
-
Samuel Holland authored
- Check the return value from sunxi_init_platform_r_twi(). - Print the PMIC banner before doing anything that might fail. - Remove double prefixes in error messages. - Consistently omit the trailing period. - No need to print the unknown SoC's ID, since we already did that earlier in bl31_platform_setup(). - On the other hand, do print the ID of the unknown PMIC. - Try to keep the messages concise, as the large string size in these files was causing the firmware to spill into the next page. - Downgrade the banner from NOTICE to INFO. It's purely informational, and people should be using debug builds on untested hardware anyway. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ib909408a5fdaebe05470fbce48d245dd0bf040eb
-
Samuel Holland authored
Ensure that the default (zero) value represents the case where we take no action. Previously, if a PLAT=sun50i_a64 build was booted on an unknown SoC ID, it would be treated as an H5 at shutdown. This removes some duplicate code and fixes error propagation on H6. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I4e51d8a43a56eccb0d8088593cb9908e52e782bc
-
Samuel Holland authored
The clock must be running for the module to be reset. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ic8fafc946f3a1a697174b91288e357ffa033ab9a
-
- 13 Dec, 2019 2 commits
-
-
Joshua Watt authored
Instead of stringizing the paths to binary files, add them as string defines on the command line (e.g. -DFOO=\"BAR\" instead of -DFOO=BAR). This prevents macros from being expanded inside the string value itself. For example, -DFOO=/path/with-linux-in-it would have been expanded to "/path/with-1-in-it" because `linux=1` is one of the standard GCC defines. Change-Id: I7b65df3c9930faed4f1aff75ad726982ae3671e6 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
-
Ziyuan Xu authored
HDCP is using a binary driver, add macro PLAT_RK_DP_HDCP to make it as an option. Change-Id: I54ef1a3635a28e8ae56654bd1e91dfe011520a7f Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
-
- 12 Dec, 2019 1 commit
-
-
Hadi Asyrafi authored
remove plat_sip_svc.c and plat_psci.c in stratix 10 platform directory as both has been refactored to common directory for sharing with agilex platform Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: I395fed66408f536e8fefd637681e742c63621818
-
- 10 Dec, 2019 6 commits
-
-
Ambroise Vincent authored
C99 standard: "What constitutes an access to an object that has volatile-qualified type is implementation-defined". GCC is not considering the cast to void of volatile structures as an access and so is not actually issuing reads. Clang does read those structures by copying them on the stack, which in this case creates an overflow because of their large size. This patch removes the cast to void and instead uses the USED attribute to tell the compiler to retain the static variables. Change-Id: I952b5056e3f6e91841e7ef9558434352710ab80d Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com> Zelalem Aweke <zelalem.aweke@arm.com>
-
Piotr Szczepanik authored
This patch fixes hangs that happen after soft resetting of rk3399. Signed-off-by: Piotr Szczepanik <piter75@gmail.com> Change-Id: If41b12ba1dfcb2ba937361b58eafd50bf5c483d4
-
Pritesh Raithatha authored
Tegra194 supports multiple SMMU blocks. This patch adds support to save register values for SMMU0 and SMMU2, before entering the System Suspend state. Change-Id: I3a376cdb606ea057ad7047714717245f9dced5cf Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
-
Pritesh Raithatha authored
This patch introduces memory controller register defines for Tegra194 platforms. Change-Id: I6596341ae817b6cec30cb74d201ad854a0c8c0a6 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
-
Steven Kao authored
This patch updates the memory address space, physical and virtual, to be 40-bits wide for all Tegra194 platforms. Change-Id: Ie1bcdec2c4e8e15975048ce1c2a31c2ae0dd494c Signed-off-by: Steven Kao <skao@nvidia.com>
-
Varun Wadekar authored
The per CPU wake times are saved in an array called 't19x_percpu_data'. But, there is one instance in the code where the name of the variable is misspelt. This patch fixes this typographical error to fix compilation errors. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: I52f5f0b150c51d8cc38372675415dec7944a7735
-
- 09 Dec, 2019 2 commits
-
-
Ambroise Vincent authored
Previously the .init section was created even when the reclaim flag was manually set to 0. Change-Id: Ia9e7c7997261f54a4eca725d7ea605192f60bcf8 Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com> Zelalem Aweke <zelalem.aweke@arm.com>
-
Louis Mayencourt authored
Currently tb_fw_cfg_dtb size is fixed to max, which is generally a page (but depend on the platform). Instead, read the actual size of the dtb with the libfdt "fdt_totalsize" function. This avoid flushing extra memory after updating the dtb with mbedtls heap information when shared heap is used. Change-Id: Ibec727661116429f486464a0c9f15e9760d7afe2 Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
-
- 04 Dec, 2019 3 commits
-
-
Samuel Holland authored
This is not conforming C and does not compile with -fno-common. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I6535954cc567d6efa06919069b91e3f50975b073
-
Samuel Holland authored
This was found by compiling with -fno-common: ./build/picopi/release/bl2/imx_snvs.o:(.bss.__packed+0x0): multiple definition of `__packed'; ./build/picopi/release/bl2/imx_caam.o:(.bss.__packed+0x0): first defined here __packed was intended to be the attribute macro from cdefs.h, not an object of the structure type. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Id02fac3f098be2d71c35c6b4a18012515532f32a
-
Samuel Holland authored
The current range check for the offset is wrong: it is counting bytes, while indexing an array of uint32_t. Since the offset is always zero, the parameter is unnecessary. Instead of adding more code to fix the check, remove the parameter to avoid the problem entirely. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Iadfc7d027155adc754e017b3462233ce9a1d64f6
-
- 28 Nov, 2019 6 commits
-
-
Jeetesh Burman authored
This patch adds macros, to define registers required to support GPU reset, for Tegra194 SoCs. Change-Id: Ifa7e0161b9e8de695a33856193f500b847a03526 Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
-
Steven Kao authored
This patch fixes the logic to check if the previous bootloader has disabled access to the TZDRAM configuration registers. The polarity for the bit was incorrect in the previous check. Change-Id: I7a0ba4f7b1714997508ece904c0261ca2c901a03 Signed-off-by: Steven Kao <skao@nvidia.com>
-
Varun Wadekar authored
This patch introduces the 'plat_enable_console' handler to allow the platform to enable the right console. Tegra194 platform supports multiple console, while all the previous platforms support only one console. For Tegra194 platforms, the previous bootloader checks the platform config and sets the uart-id boot parameter, to 0xFE. On seeing this boot parameter, the platform port uses the proper memory aperture base address to communicate with the SPE. This functionality is currently protected by a platform macro, ENABLE_CONSOLE_SPE. Change-Id: I3972aa376d66bd10d868495f561dc08fe32fcb10 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
-
Varun Wadekar authored
This patch introduces a header file for the spe-console driver. This file currently provides a device struct and a registration function call for clients. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: Ic65c056f5bd60871d8a3f44f2c1210035f878799
-
Steven Kao authored
This patch updates the header, t194_nvg.h, to v6.4. This gets it in synch with MTS pre-release 2 - cl39748439. Change-Id: I1093c9f5dea7b7f230b3267c90b54b7f3005ecd7 Signed-off-by: Steven Kao <skao@nvidia.com>
-
Dilan Lee authored
"Strict checking" is a mode where secure world can access secure-only areas unlike legacy mode where secure world could access non-secure spaces as well. Secure-only areas are defined as the TZ-DRAM carveout and any GSC with the CPU_SECURE bit set. This mode not only helps prevent issues with IO-Coherency but aids with security as well. This patch implements the programming sequence required to enable strict checking mode for Tegra194 SoCs. Change-Id: Ic2e594f79ec7c5bc1339b509e67c4c62efb9d0c0 Signed-off-by: Dilan Lee <dilee@nvidia.com>
-