| 85bebe18 | 11-Oct-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
refactor(console): disable getc() by default
The ability to read a character from the console constitutes an attack vector into TF-A, as it gives attackers a means to inject arbitrary data into TF-A
refactor(console): disable getc() by default
The ability to read a character from the console constitutes an attack vector into TF-A, as it gives attackers a means to inject arbitrary data into TF-A. It is dangerous to keep that feature enabled if not strictly necessary, especially in production firmware builds.
Thus, we need a way to disable this feature. Moreover, when it is disabled, all related code should be eliminated from the firmware binaries, such that no remnant/dead getc() code remains in memory, which could otherwise be used as a gadget as part of a bigger security attack.
This patch disables getc() feature by default. For legitimate getc() use cases [1], it can be explicitly enabled by building TF-A with ENABLE_CONSOLE_GETC=1.
The following changes are introduced when getc() is disabled:
- The multi-console framework no longer provides the console_getc() function.
- If the console driver selected by the platform attempts to register a getc() callback into the multi-console framework then TF-A will now fail to build.
If registered through the assembly function finish_console_register(): - On AArch64, you'll get: Error: undefined symbol CONSOLE_T_GETC used as an immediate value. - On AArch32, you'll get: Error: internal_relocation (type: OFFSET_IMM) not fixed up
If registered through the C function console_register(), this requires populating a struct console with a getc field, which will trigger: error: 'console_t' {aka 'struct console'} has no member named 'getc'
- All console drivers which previously registered a getc() callback have been modified to do so only when ENABLE_CONSOLE_GETC=1.
[1] Example of such use cases would be: - Firmware recovery: retrieving a golden BL2 image over the console in order to repair a broken firmware on a bricked board. - Factory CLI tool: Drive some soak tests through the console.
Discussed on TF-A mailing list here: https://lists.trustedfirmware.org/archives/list/tf-a@lists.trustedfirmware.org/thread/YS7F6RCNTWBTEOBLAXIRTXWIOYINVRW7/
Change-Id: Icb412304cd23dbdd7662df7cf8992267b7975cc5 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Acked-by: Baruch Siach <baruch@tkos.co.il>
show more ...
|
| 4827613c | 06-Sep-2023 |
Marco Felsch <m.felsch@pengutronix.de> |
fix(imx8m): map BL32 memory only if SPD_opteed or SPD_trusty is enabled
Always map the BL32 memory can interfere with the BL33 mapping if the BL33 is not aware of the mapping, e.g. different memory
fix(imx8m): map BL32 memory only if SPD_opteed or SPD_trusty is enabled
Always map the BL32 memory can interfere with the BL33 mapping if the BL33 is not aware of the mapping, e.g. different memory tagging secure/non-secure. Therefore map the memory only if BL32 (opteed, trusty) is enabled and BL33 is aware of this memory mapping.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Change-Id: I9c2bf78aa6e88c93e749a9248724186fee9df864
show more ...
|
| 85625646 | 06-Sep-2023 |
Marco Felsch <m.felsch@pengutronix.de> |
feat(imx8mn): add workaround for errata ERR050362
Port the workaround from the downstream imx-atf [1]:
| commit 1990081264f40822d1564f4562f05bbbc0c2941b | Author: Ji Luo <ji.luo@nxp.com> | Date:
feat(imx8mn): add workaround for errata ERR050362
Port the workaround from the downstream imx-atf [1]:
| commit 1990081264f40822d1564f4562f05bbbc0c2941b | Author: Ji Luo <ji.luo@nxp.com> | Date: Thu May 20 16:26:55 2021 +0800 | | MA-19071 imx8mn: workaround for errata ERR050362 | | Configure the force_incr programmable bit in GPV_5 of PL301_display, | which fixes partial write issue. This workaround was done in MCU FW | before, move it to TF-A now as MCU should not touch secure world. | | Change-Id: I2e5bbc764640afeab6ac2f4b202939b59bd3b3f2 | Signed-off-by: Ji Luo <ji.luo@nxp.com>
[1] https://github.com/nxp-imx/imx-atf.git
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Change-Id: Iaff5f1faa143204d64c075b288f8dd13eb2902d8
show more ...
|
| 2a6ffa99 | 23-Mar-2020 |
Jacky Bai <ping.bai@nxp.com> |
feat(imx8m): move the gpc reg & macro to a separate header file
move the gpc reg offset, bit define & macro to a separate header file for code reuse.
This fixes suspend to mem on i.MX8M Plus too, s
feat(imx8m): move the gpc reg & macro to a separate header file
move the gpc reg offset, bit define & macro to a separate header file for code reuse.
This fixes suspend to mem on i.MX8M Plus too, since the register layout is different there.
Change-Id: Ibec60c3a68ffa8c378de5334577a7b0e463ca875 Signed-off-by: Jacky Bai <ping.bai@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> # Upgrade to latest, update commit message
show more ...
|
| 422d30c6 | 07-Jun-2023 |
Jacky Bai <ping.bai@nxp.com> |
feat(imx93): add cpuidle and basic suspend support
Add cpuidle and basic suspend support. For now only core & cluster will be put into low power mode when system suspend.
Signed-off-by: Jacky Bai <
feat(imx93): add cpuidle and basic suspend support
Add cpuidle and basic suspend support. For now only core & cluster will be put into low power mode when system suspend.
Signed-off-by: Jacky Bai <ping.bai@nxp.com> Change-Id: Ife0b6dc48738ae7a2322d6a7f6342ffe15d35342
show more ...
|
| 3d3b769a | 24-Apr-2022 |
Yangbo Lu <yangbo.lu@nxp.com> |
feat(imx93): allow SoC masters access to system TCM
SoC masters should be allowed to access to system TCM. For example, This makes it possible for M core to run ENET/ENET_QOS examples whose DMA acce
feat(imx93): allow SoC masters access to system TCM
SoC masters should be allowed to access to system TCM. For example, This makes it possible for M core to run ENET/ENET_QOS examples whose DMA accesses system TCM in single boot mode.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Change-Id: I4149e047e49a66699015f92c25a7f5334a972835
show more ...
|
| eb76a241 | 26-Jul-2022 |
Jacky Bai <ping.bai@nxp.com> |
feat(imx93): update the ocram trdc config for did10
Update the ocram trdc config for DID10 to make sure NPU can access the OCRAM. Need to fine tune the OCRAM config in the future.
Signed-off-by: Ja
feat(imx93): update the ocram trdc config for did10
Update the ocram trdc config for DID10 to make sure NPU can access the OCRAM. Need to fine tune the OCRAM config in the future.
Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Change-Id: Iaa8518e0bea2c3939292202c116bd08444e07698
show more ...
|