| 043f38fd | 09-Aug-2023 |
Juan Pablo Conde <juanpablo.conde@arm.com> |
build(bl32): added check for AARCH32_SP
If AACRH32_SP is not specified, it causes the DEFAULT_LINKER_SCRIPT variable to be empty, and then the linker takes the variable following it as if it was the
build(bl32): added check for AARCH32_SP
If AACRH32_SP is not specified, it causes the DEFAULT_LINKER_SCRIPT variable to be empty, and then the linker takes the variable following it as if it was the linker script, which is not one. This patch addresses that issue by requiring the AARCH32_SP variable to be set before continuing.
Change-Id: I21db7d5bd86b98faaa1a1cd3f985daa592556a2d Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
show more ...
|
| 78aac78a | 16-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): add port for MDM9607
The Qualcomm X5 Modem (MDM9607) SoC is very similar to the existing MSM8916, except for:
- Single core ARM Cortex-A7 - No GPU - MMU-500 r2p4 instead of r0p
feat(msm8916): add port for MDM9607
The Qualcomm X5 Modem (MDM9607) SoC is very similar to the existing MSM8916, except for:
- Single core ARM Cortex-A7 - No GPU - MMU-500 r2p4 instead of r0p0 (need to clear CACHE_LOCK bit) - Different default BL31/BL33 address and UART number
Make the existing MSM8916 platform port usable for MDM9607 as well by adding some minimal if statements where necessary plus the platform make files for mdm9607.
Change-Id: I4dd02c8e29af6282d8d828c3027c5e333459ba36 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| d9e565ea | 16-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
refactor(msm8916): handle single core platforms
Some Qualcomm modem platforms (MDM*) are quite similar to MSM8916 except that there is just a single CPU core. This requires some special handling:
refactor(msm8916): handle single core platforms
Some Qualcomm modem platforms (MDM*) are quite similar to MSM8916 except that there is just a single CPU core. This requires some special handling:
- There is no GPU so the GPU SMMU also does not exist. - Looking closely at dumps of the MMIO register regions reveals that some of the register addresses are slightly different.
Add the necessary checks for this to allow building for those platforms.
No functional change for existing platforms.
Change-Id: I0380ac3734876243e970a55d8bec5a8247175343 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| c28e96cd | 16-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): add port for MSM8939
The Qualcomm Snapdragon 615 (MSM8939) SoC is very similar to the existing MSM8916, except for:
- Two clusters with ARM Cortex-A53 cores - CCI-400
Make the e
feat(msm8916): add port for MSM8939
The Qualcomm Snapdragon 615 (MSM8939) SoC is very similar to the existing MSM8916, except for:
- Two clusters with ARM Cortex-A53 cores - CCI-400
Make the existing MSM8916 platform port usable for MSM8939 as well by adding some minimal if statements where necessary plus the platform make files for msm8939.
Change-Id: I8cda83dc642f62222f984a42eec14de5df4c11e3 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| c822d265 | 16-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): power on L2 caches for secondary clusters
On platforms with multiple CPU clusters the L2 cache will be only on for the cluster of the boot CPU. Add the necessary sequence to power it
feat(msm8916): power on L2 caches for secondary clusters
On platforms with multiple CPU clusters the L2 cache will be only on for the cluster of the boot CPU. Add the necessary sequence to power it up for secondary clusters similar to the CPU boot sequence.
No functional change for platforms with a single cluster. The new code is discarded entirely in this case.
Change-Id: I3d3bce519a8a10ef5278d74d81acf59123e00454 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 1240dc7e | 16-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): initialize CCI-400 for multiple clusters
The MSM8939 SoC is very similar to MSM8916 but uses an ARM CCI-400 for cache coherence between the two CPU clusters. Add the necessary code to
feat(msm8916): initialize CCI-400 for multiple clusters
The MSM8939 SoC is very similar to MSM8916 but uses an ARM CCI-400 for cache coherence between the two CPU clusters. Add the necessary code to initialize it with the existing driver.
No functional change for platforms with a single cluster. The CCI related code is discarded entirely in this case.
Change-Id: I041d60222d8d2aeca53b392934c87280c66b0db0 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 1d7ed58f | 16-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
refactor(msm8916): handle multiple CPU clusters
Some Qualcomm platforms similar to MSM8916 have multiple CPU clusters. In this case, some of the hardware blocks are duplicated and must be configured
refactor(msm8916): handle multiple CPU clusters
Some Qualcomm platforms similar to MSM8916 have multiple CPU clusters. In this case, some of the hardware blocks are duplicated and must be configured separately.
Refactor the code to handle additional clusters by introducing loops and some conditionals.
No functional change for existing single cluster platforms.
Change-Id: I5b4b1ad2a1adde559d5b79b7698afe73733b2e90 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| cf0a75f0 | 02-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): add port for MSM8909
The Qualcomm Snapdragon 210 (MSM8909) SoC is very similar to the existing MSM8916, except for:
- ARM Cortex-A7 instead of Cortex-A53 (AArch32-only) - MMU-500
feat(msm8916): add port for MSM8909
The Qualcomm Snapdragon 210 (MSM8909) SoC is very similar to the existing MSM8916, except for:
- ARM Cortex-A7 instead of Cortex-A53 (AArch32-only) - MMU-500 r2p0 instead of r0p0 (need to clear CACHE_LOCK bit) - Different default BL31 address and UART number
Make the existing MSM8916 platform port usable for MSM8909 as well by adding some minimal if statements where necessary plus the platform make files for msm8909.
Change-Id: I8eca5bd8f2486cc2174562fb5de28f8dffa0d874 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| d9b04423 | 15-Mar-2023 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): clear CACHE_LOCK for MMU-500 r2p0+
Newer Qualcomm platforms similar to MSM8916 use MMU-500 r2p0+ instead of MMU-500 r0p0. On these versions it is necessary to clear the SMMU_sACR.CACH
feat(msm8916): clear CACHE_LOCK for MMU-500 r2p0+
Newer Qualcomm platforms similar to MSM8916 use MMU-500 r2p0+ instead of MMU-500 r0p0. On these versions it is necessary to clear the SMMU_sACR.CACHE_LOCK bit to allow the normal world to write to SMMU_CBn_ACTLR. Without this Linux shows a warning and is unable to workaround the errata in MMU-500:
arm-smmu 1e00000.iommu: Failed to disable prefetcher [errata #841119 and #826419], check ACR.CACHE_LOCK
Handle this dynamically at runtime by enabling all the necessary SMMU clocks and check the IDR7 register for MMU-500 r2p0+. This must be applied to both SMMUs on the platform: APPS and GPU.
While at it clean up the clock handling: Leave the SMMU clocks on because the normal world will need it again while booting. But make sure the vote register of the RPM co-processor does not keep these clocks always-on. For some reasons some platforms seem to have a non-zero reset value for GCC_RPM_SMMU_CLOCK_BRANCH_ENA_VOTE.
Change-Id: I34cf7d3f2db977b0930eb6e64a870ecaf02a7573 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| b9072a34 | 17-Jul-2023 |
Stephan Gerhold <stephan@gerhold.net> |
style(msm8916): add missing braces to while statements
According to the coding style all conditional statements (such as if, for, while, do) must use braces regardless of the number of the statement
style(msm8916): add missing braces to while statements
According to the coding style all conditional statements (such as if, for, while, do) must use braces regardless of the number of the statements in the body [1].
Fix this for the code inside plat/qti/msm8916.
[1]: https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html#conditional-statement-bodies
Change-Id: I74f2e65aa2b3a65899e37dfd3f481d90fb15531c Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 0a9270ab | 28-Jun-2023 |
Wing Li <wingers@google.com> |
fix(sc7280): update system suspend in OS-initiated mode
This patch fixes system suspend in OS-initiated mode by setting the value of `last_at_pwrlvl` in the `psci_power_state_t` object to `PLAT_MAX_
fix(sc7280): update system suspend in OS-initiated mode
This patch fixes system suspend in OS-initiated mode by setting the value of `last_at_pwrlvl` in the `psci_power_state_t` object to `PLAT_MAX_PWR_LVL`, which otherwise would result in undefined behavior.
This is conditionally compiled into the build depending on the value of the `PSCI_OS_INIT_MODE` build option.
Change-Id: Ib9ff606b7eebd8a8224891a0d239a4e13311fe2a Signed-off-by: Wing Li <wingers@google.com>
show more ...
|
| aad23f1a | 02-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): allow selecting which UART to use
At the moment the msm8916 platform port always uses UART number 2 for debug output. In some situations it is necessary to change this, either because
feat(msm8916): allow selecting which UART to use
At the moment the msm8916 platform port always uses UART number 2 for debug output. In some situations it is necessary to change this, either because only the other UART is exposed on the board or for runtime debugging, to avoid conflicting with the normal world.
Make the UART to use configurable using QTI_UART_NUM on the make command line and also add QTI_RUNTIME_UART as an option to keep using the UART after early boot. The latter is disabled by default since it requires reserving the UART and related clocks inside the normal world.
Change-Id: I14725f954bbcecebcf317e8601922a3d00f2ec28 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 45b2bd0a | 28-Aug-2022 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): add SP_MIN port for AArch32
Use the new shared msm8916 setup code to allow compiling the minimal AArch32 Secure Payload (SP_MIN) as simple PSCI implementation.
AArch64 is preferred f
feat(msm8916): add SP_MIN port for AArch32
Use the new shared msm8916 setup code to allow compiling the minimal AArch32 Secure Payload (SP_MIN) as simple PSCI implementation.
AArch64 is preferred for the Cortex-A53 cores in MSM8916 but there are some similar platforms with AArch32-only Cortex-A7 cores that can benefit from this in future changes.
The AArch32 assembly implementation for msm8916_helpers.S and uartdm_console.S is a direct port of the AArch64 implementation. Only plat_get_my_entrypoint is slightly different because there is no need to handle the "boot remapper" on cold boot for AArch32.
Change-Id: Idf160e86fb3e685fcedec3e051400e6273997b74 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 25132f78 | 17-Apr-2023 |
Stephan Gerhold <stephan@gerhold.net> |
refactor(msm8916): detect cold boot in plat_get_my_entrypoint
The msm8916 platform port needs to disable the TCM redirect to the L2 cache as early as possible during cold boot to avoid crashes. Righ
refactor(msm8916): detect cold boot in plat_get_my_entrypoint
The msm8916 platform port needs to disable the TCM redirect to the L2 cache as early as possible during cold boot to avoid crashes. Right now this is done in plat_reset_handler by checking if BL31 was started through the "boot remapper", which redirects memory accesses around the fixed CPU reset address (0x0) to the actual link address of BL31. On AArch64 this is always the case during cold boot, since a CPU reset was necessary to switch from AArch32 in the initial bootloader to AArch64.
On AArch32, SP_MIN starts running at the real link address immediately, so the initial cold boot must be detected with a different approach.
To keep the AArch32 and AArch64 implementation of this functionality consistent, move this functionality to plat_get_my_entrypoint, by checking if the msm8916_entry_point is still zero or was already updated for later warm boots by the PSCI code.
Also, avoid entering BL31 twice and instead add the BL31_BASE offset to the return address in the link register. This allows preserving the bootloader arguments in x0-x3 because they otherwise get lost.
Change-Id: I90286c6cacf23f44ed7930a3e7e33804ca63c391 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 6b8f9e16 | 25-Mar-2023 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): add Test Secure Payload (TSP) port
Use the new shared msm8916 setup code to easily allow compiling the Test Secure Payload (TSP) for the msm8916 platform.
Unlike BL31, TSP only calls
feat(msm8916): add Test Secure Payload (TSP) port
Use the new shared msm8916 setup code to easily allow compiling the Test Secure Payload (TSP) for the msm8916 platform.
Unlike BL31, TSP only calls msm8916_platform_setup() but not msm8916_configure() because this is already done in BL31.
Change-Id: I3225ef9e61387d49870e9759ffd5b899a8805961 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 4181ec8c | 24-Mar-2023 |
Stephan Gerhold <stephan@gerhold.net> |
build(msm8916): place bl32 directly after bl31
At the moment there are two entirely separate memory regions for BL31 and BL32. However, since BL31 is very small (<= 128 KiB) there is actually still
build(msm8916): place bl32 directly after bl31
At the moment there are two entirely separate memory regions for BL31 and BL32. However, since BL31 is very small (<= 128 KiB) there is actually still plenty of space after BL31.
Drop the extra memory region for BL32 and place it directly after BL31 (i.e. BL31_LIMIT). If needed it is still possible to change it on the make command line.
While at it, move the definitions to the bottom of the make file so they come immediately before the related add_define calls.
Change-Id: I5184dcc2d89a92f1384508f973d56fd963e7befb Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 840831b2 | 28-Aug-2022 |
Stephan Gerhold <stephan@gerhold.net> |
refactor(msm8916): separate common platform setup code
In preparation of adding BL32 support for the msm8916 platform (AArch32/SP_MIN and TSP), separate the common platform setup code into shared ms
refactor(msm8916): separate common platform setup code
In preparation of adding BL32 support for the msm8916 platform (AArch32/SP_MIN and TSP), separate the common platform setup code into shared msm8916_setup.c and msm8916_config.c files which can be called from both BL31 and BL32.
msm8916_setup.c contains the relevant shared code for BL31/SP_MIN/TSP, while msm8916_config.c is cold boot configuration code that is only relevant for BL31 and SP_MIN (but not TSP).
No functional change.
Change-Id: I055522d5ad8c03dfb8e09236dc47dd383a480e95 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| a43be0f6 | 04-May-2023 |
Wing Li <wingers@google.com> |
fix(sc7280): update pwr_domain_suspend
Change-Id: I0ee6598e9a9a01aea49e05307c68bde9993debba Signed-off-by: Wing Li <wingers@google.com> |
| 41914de3 | 09-May-2023 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes I5bb43cb0,I6aebe2ca,Ib59df16a,I9d037ab2,I9df5a465, ... into integration
* changes: fix(msm8916): add timeout for crash console TX flush style(msm8916): use size macros feat(msm89
Merge changes I5bb43cb0,I6aebe2ca,Ib59df16a,I9d037ab2,I9df5a465, ... into integration
* changes: fix(msm8916): add timeout for crash console TX flush style(msm8916): use size macros feat(msm8916): expose more timer frames fix(msm8916): drop unneeded initialization of CNTACR build(msm8916): disable unneeded workarounds fix(msm8916): flush dcache after writing msm8916_entry_point fix(msm8916): print \r before \n on UART console
show more ...
|
| 7e002c8a | 06-Apr-2023 |
Stephan Gerhold <stephan@gerhold.net> |
fix(msm8916): add timeout for crash console TX flush
Resetting the UART DM controller while there are still remaining characters in the FIFO often results in corruption on the UART receiver side. To
fix(msm8916): add timeout for crash console TX flush
Resetting the UART DM controller while there are still remaining characters in the FIFO often results in corruption on the UART receiver side. To avoid this the msm8916 crash console implementation tries to wait until the TX FIFO is empty.
Unfortunately this might spin forever if the transmitter was disabled before it has fully finished transmitting. In this case the TXEMT bit console_uartdm_core_flush is waiting for will never get set.
There seems to be no good way to detect if the transmitter is actually enabled via the status registers. However, the TX FIFO is fairly small and should not take too long to get flushed, so fix this by simply limiting the amount of iterations with a short timeout.
Move the code to console_uartdm_core_init to ensure that this always happens before resetting the transmitter (also during initialization).
Change-Id: I5bb43cb0b6c029bcd15e253d60d36c0b310e108b Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| a27e3f76 | 26-Mar-2023 |
Stephan Gerhold <stephan@gerhold.net> |
style(msm8916): use size macros
Use the pre-defined size macros (SZ_*) for more clarity and to avoid having to add comments to each size represented by hexadecimal numbers.
Change-Id: I6aebe2caf136
style(msm8916): use size macros
Use the pre-defined size macros (SZ_*) for more clarity and to avoid having to add comments to each size represented by hexadecimal numbers.
Change-Id: I6aebe2caf1365279670955b9b507dec7d7b04457 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 1781bf1c | 22-Mar-2023 |
Stephan Gerhold <stephan@gerhold.net> |
feat(msm8916): expose more timer frames
The memory-mapped generic timer on msm8916 has 7 timer frames, but currently only one is exposed for usage in the non-secure world.
The platform port is curr
feat(msm8916): expose more timer frames
The memory-mapped generic timer on msm8916 has 7 timer frames, but currently only one is exposed for usage in the non-secure world.
The platform port is currently only designed to be used as minimal PSCI implementation, without secure world that could make use of the other timer frames. Let's make all of them available to the normal world.
If needed this could still be changed later by reserving some timer frames conditionally to a specific SPD being enabled in the build.
Change-Id: Ib59df16aa1fd3dbc875ab6369c133737830c98c6 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| d833af3a | 22-Mar-2023 |
Stephan Gerhold <stephan@gerhold.net> |
fix(msm8916): drop unneeded initialization of CNTACR
Normal world software is responsible to initialize CNTACR as needed. There is no existing software for msm8916 that depends on having this initia
fix(msm8916): drop unneeded initialization of CNTACR
Normal world software is responsible to initialize CNTACR as needed. There is no existing software for msm8916 that depends on having this initialization in BL31 so drop it before anything starts to rely on it.
Related issue: https://github.com/ARM-software/tf-issues/issues/170
Change-Id: I9d037ab218c0c1c8a5d5523722013eba531f4728 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 4a3e2cb3 | 14-Mar-2023 |
Stephan Gerhold <stephan@gerhold.net> |
build(msm8916): disable unneeded workarounds
The Cortex-A53 cores used in the msm8916 platform are not affected by CVE-2017-5715 and CVE-2022-23960, so disable the workarounds for them to drop the u
build(msm8916): disable unneeded workarounds
The Cortex-A53 cores used in the msm8916 platform are not affected by CVE-2017-5715 and CVE-2022-23960, so disable the workarounds for them to drop the unused code from the compiled binary.
Change-Id: I9df5a4657c4fd90702b4db4e82d4ee1a2f60303c Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|
| 01ba69cd | 17-Sep-2022 |
Stephan Gerhold <stephan@gerhold.net> |
fix(msm8916): flush dcache after writing msm8916_entry_point
msm8916_entry_point is read with caches off (and even from two different physical addresses when read through the "boot remapper"), so it
fix(msm8916): flush dcache after writing msm8916_entry_point
msm8916_entry_point is read with caches off (and even from two different physical addresses when read through the "boot remapper"), so it should be flushed to RAM after writing it.
Change-Id: I5c8193954bb28043b0a46fb2038f629bd8796c74 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
show more ...
|