- 26 Mar, 2021 1 commit
-
-
Andre Przywara authored
When the BL31 for the Allwinner H616 runs in DRAM, we need to make sure we tell the non-secure world about the memory region it uses. Add a reserved-memory node to the DT, which covers the area that BL31 could occupy. The "no-map" property will prevent OSes from mapping the area, so there would be no speculative accesses. Change-Id: I808f3e1a8089da53bbe4fc6435a808e9159831e1 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
- 25 Mar, 2021 2 commits
-
-
Andre Przywara authored
Change-Id: I557fd05401e24204952135cf3ca26479a43ad1f1 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Andre Przywara authored
In preparation for changing the memory map, express the locations of the various code and data pieces more dynamically, allowing SoCs to override the memmap later. Also prepare for the SCP region to become optional. No functional change. Change-Id: I7ac01e309be2f23bde2ac2050d8d5b5e3d6efea2 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
- 24 Jan, 2021 1 commit
-
-
Samuel Holland authored
Disabling secondary CPUs during boot is unnecessary because the other CPUs are already in reset, and it saves an entirely insignificant amount of power. Let's remove this bit of code that was added mostly "because we can", and along with it remove an unconditional dependency on the CPU ops functions. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ia77a1b722da6ba989c3992b656a6cde3f2238fd7
-
- 14 Dec, 2020 1 commit
-
-
Samuel Holland authored
While the Allwinner platform code nominally supported a custom PRELOADED_BL33_BASE, some references to the BL33 load address used another constant: PLAT_SUNXI_NS_IMAGE_OFFSET. To allow the DTB search code to work if a U-Boot BL33 is loaded to a custom address, consistently use PRELOADED_BL33_BASE. And to avoid this confusion in the future, remove the other constant. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: Ie6b97ae1fdec95d784676aef39200bef161471b0
-
- 25 Feb, 2020 1 commit
-
-
Andre Przywara authored
Since now the generic console_t structure holds the UART base address as well, let's use that generic location and drop the UART driver specific data structure at all. Change-Id: I5c2fe3b6a667acf80c808cfec4a64059a2c9c25f Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
- 18 Feb, 2019 1 commit
-
-
Samuel Holland authored
Convert them to take an mpidr instead of a (cluster, core) pair. This simplifies all of the call sites, and actually makes the functions a bit smaller. Signed-off-by: Samuel Holland <samuel@sholland.org>
-
- 04 Jan, 2019 1 commit
-
-
Antonio Nino Diaz authored
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: e0ea0928 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3 ("drivers: add tzc380 support"). This problem was introduced in commit 4ecca339 ("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>
-
- 14 Nov, 2018 1 commit
-
-
Andre Przywara authored
The legacy Allwinner ATF port used to setup some clocks, and U-Boot is still relying on this. We don't need to setup the full set, as the SPL is doing most of it, but it misses one clock (AHB2) and programs another (AHB1) to quite conservative values. Fix this up during the platform setup to improve USB and Ethernet performance, iperf values go up by 31% in my setup with that patch. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
- 20 Oct, 2018 5 commits
-
-
Andre Przywara authored
For Allwinner boards we now use some heuritistics to find a preloaded .dtb file. Pass this address on to the PMIC setup routine, so that it can use the information contained therein to setup some initial power rails. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Andre Przywara authored
The initial PMIC setup for the Allwinner platform is quite board specific, and used to be guarded by reading the .dtb stub *name* from the SPL image in the legacy ATF port. This doesn't scale particularly well, and requires constant maintainance. Instead having the actual .dtb available would be much better, as the PMIC setup requirements could be read from there directly. The only available BL33 for Allwinner platforms so far is U-Boot, and fortunately U-Boot comes with the full featured .dtb, appended to the end of the U-Boot image. Introduce some code that scans the beginning of the BL33 image to look for the load address, which is followed by the image size. Adding those two values together gives us the end of the image and thus the .dtb address. Verify that this heuristic is valid by sanitising some values and checking the DTB magic. Print out the DTB address and the model name, if specified in the root node. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Andre Przywara authored
So far we have a sunxi_private.h header file in the common code directory. This holds the prototypes of various functions we share in *common* code. However we will need some of those in the platform specific code parts as well, and want to introduce new functions shared across the whole platform port. So move the sunxi_private.h file into the common/include directory, so that it becomes visible to all parts of the platform code. Fix up the existing #includes and add missing ones, also add the sunxi_read_soc_id() prototype here. This will be used in follow up patches. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Andre Przywara authored
In the BL31 platform setup we read the Allwinner SoC ID to identify the chip and print its name. In addition to that we will need to differentiate the power setup between the SoCs, to pass on the SoC ID to the PMIC setup routine. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Andre Przywara authored
We will soon make more use of the Allwinner SoC ID, to differentiate the platform setup. Introduce definitions to avoid dealing with magic numbers and make the code more readable. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
- 07 Sep, 2018 1 commit
-
-
Icenowy Zheng authored
As the ATF may need to do some power initialization on Allwinner platform with AXP PMICs, call the PMIC setup code in BL31. Stub of PMIC setup code is added, to prevent undefined reference. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
-
- 03 Jul, 2018 1 commit
-
-
Andre Przywara authored
The H6 is Allwinner's most recent SoC. It shares most peripherals with the other ARMv8 Allwinner SoCs (A64/H5), but has a completely different memory map. Introduce a separate platform target, which includes a different header file to cater for the address differences. Also add the new build target to the documentation. The new ATF platform name is "sun50i_h6". Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
- 28 Jun, 2018 2 commits
-
-
Andre Przywara authored
So far we already support booting on two different SoCs, and we will shortly add a third, so add some code to determine the current SoC type. This can be later used to runtime detect certain properties. Also print the SoC name to the console, to give valuable debug information. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Amit Singh Tomar authored
This patch is an attempt to run Trusted OS (OP-TEE OS being one of them) along side BL31 image. ATF supports multiple SPD's that can take dispatcher name (opteed for OP-TEE OS) as an input using the 'SPD=<dispatcher name>' option during bl31 build. Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
-
- 23 Jun, 2018 1 commit
-
-
Amit Singh Tomar authored
This patch is an attempt to run Trusted OS (OP-TEE OS being one of them) along side BL31 image. ATF supports multiple SPD's that can take dispatcher name (opteed for OP-TEE OS) as an input using the 'SPD=<dispatcher name>' option during bl31 build. Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
-
- 15 Jun, 2018 3 commits
-
-
Andre Przywara authored
Some peripherals are TrustZone aware, so they need to be configured to be accessible from non-secure world, as we don't need any of them being exclusive to the secure world. This affects some clocks, DMA channels and the Secure Peripheral Controller (SPC). The latter controls access to most devices, but is not active unless booting with the secure boot fuse burnt. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Samuel Holland authored
sun50i_cpu_on will be used by the PSCI implementation to initialize secondary cores for SMP. Unfortunately, sun50i_cpu_off is not usable by PSCI directly, because it is not possible for a CPU to use this function to power itself down. Power cannot be shut off until the outputs are clamped, and MMIO does not work once the outputs are clamped. But at least CPU0 can shutdown the other cores early in the BL31 boot process and before shutting down the system. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-
Samuel Holland authored
This platform supports Allwinner's SoCs with ARMv8 cores. So far they all sport a single cluster of Cortex-A53 cores. "sunxi" is the original code name used for this platform, and since it appears in the Linux kernel and in U-Boot as well, we use it here as a short file name prefix and for identifiers. This port includes BL31 support only. U-Boot's SPL takes the role of the primary loader, also doing the DRAM initialization. It then loads the rest of the firmware, namely ATF and U-Boot (BL33), then hands execution over to ATF. This commit includes the basic platform code shared across all SoCs. There is no platform.mk yet. [Andre: moved files into proper directories, supported RESET_TO_BL31, various clean ups and simplifications ] Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-