| 1248db70 | 12-Sep-2025 |
Heiko Stuebner <heiko@sntech.de> |
feat(rk3568): protect TF-As memory area with the DDR firewall
Similar to most (all?) other Rockchip SoCs, the RK3568 also has a DDR firewall to restrict memory regions to secure usage.
The original
feat(rk3568): protect TF-As memory area with the DDR firewall
Similar to most (all?) other Rockchip SoCs, the RK3568 also has a DDR firewall to restrict memory regions to secure usage.
The original submission didn't protect the TF-A's memory region, so implement this now with knowledge gained from comments in the OPTEE pull-request for the rk356x [0].
Contrary to other SoCs like RK3576 and RK3588, the RK3568 memory regions are managed in blocks of 128KB, not blocks of 1MB size. With the registers having 16bit for upper and lower block id, this then can completely fill the 8GB max ram size the RK356x supports.
The whole behaviour was tested with a number of reads from main u-boot. With the current config of protecting everything in the first MB of memory, doing any reads before the 1MB border will trigger the expected "Synchronous Abort" and restart.
So doing => md 0x100000 4 will succeed, but reading anything before this will trigger the Abort.
[0] https://github.com/OP-TEE/optee_os/pull/6954#issuecomment-3041255974
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Diederik de Haas <diederik@cknow-tech.com> Change-Id: I6c75ab2813566e727e46cea86dd229625a64dd3f
show more ...
|
| 5e4a490d | 10-Sep-2025 |
Heiko Stuebner <heiko@sntech.de> |
feat(rk3568): bring DDR firewall naming in line
The TRM declares that region as FIREWALL_DDR, so name the memory region accordingly in TF-A and also remove the double FW_DDR + _REG addon from the on
feat(rk3568): bring DDR firewall naming in line
The TRM declares that region as FIREWALL_DDR, so name the memory region accordingly in TF-A and also remove the double FW_DDR + _REG addon from the one known register.
Signed-off-by: Heiko Stuebner <heiko@sntech.de> Change-Id: Ic098baa13b5c0b4cf339905030ee7d777bcbda34
show more ...
|
| ddd70f19 | 04-Nov-2024 |
Quentin Schulz <quentin.schulz@cherry.de> |
fix(rk3399): fix unquoted .incbin for clang
While GCC doesn't complain about anything for .incbin, clang does: """ <instantiation>:6:10: error: expected string in '.incbin' directive .incbin /build
fix(rk3399): fix unquoted .incbin for clang
While GCC doesn't complain about anything for .incbin, clang does: """ <instantiation>:6:10: error: expected string in '.incbin' directive .incbin /build/rk3399/release/m0/rk3399m0.bin ^ plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:20:1: note: while in macro instantiation INCBIN """/build/rk3399/release/m0/rk3399m0.bin""", "rk3399m0_bin", ".sram.incbin" ^ <instantiation>:6:10: error: expected string in '.incbin' directive .incbin /build/rk3399/release/m0/rk3399m0pmu.bin ^ plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:21:1: note: while in macro instantiation INCBIN """/build/rk3399/release/m0/rk3399m0pmu.bin""", "rk3399m0pmu_bin", ".pmusram.incbin" ^ """
Adding quotes around \file in .incbin fixes the clang issue but GCC now complains: """ plat/rockchip/rk3399/drivers/pmu/pmu_fw.S: Assembler messages: plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: junk at end of line, first unrecognized character is `/' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:20: Info: macro invoked from here plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: unable to include `./' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:20: Info: macro invoked from here plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: junk at end of line, first unrecognized character is `/' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:21: Info: macro invoked from here plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:14: Error: unable to include `./' plat/rockchip/rk3399/drivers/pmu/pmu_fw.S:21: Info: macro invoked from here """
Considering that the symbol is defined with escaped quotes, it is probably safe to remove the double quotes around the INBCIN macro parameter, so let's do that to make both compilers happy.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Change-Id: Id18b0341353ffc00e44e2d3c643ccdd05cc20c4f
show more ...
|
| 279cad8e | 04-Nov-2024 |
Chris Kay <chris.kay@arm.com> |
fix(rk3399): mark INCBIN-generated sections as SHF_ALLOC
When assembling with Clang, sections generated via the `INCBIN` macro are not assigned the `SHF_ALLOC` attribute, and the linker therefore do
fix(rk3399): mark INCBIN-generated sections as SHF_ALLOC
When assembling with Clang, sections generated via the `INCBIN` macro are not assigned the `SHF_ALLOC` attribute, and the linker therefore does not know to include them in the binary.
This change is simple: explicitly tell the assembler that the section should have the `SHF_ALLOC` attribute.
For reference: https://man7.org/linux/man-pages/man5/elf.5.html
> SHF_ALLOC > This section occupies memory during process execution. Some > control sections do not reside in the memory image of an object > file. This attribute is off for those sections.
Change-Id: I626162eae9030b5ffbd03af2be76f89a248af9ca Signed-off-by: Chris Kay <chris.kay@arm.com> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
show more ...
|
| e53fc040 | 31-Oct-2024 |
Quentin Schulz <quentin.schulz@cherry.de> |
build(rk3399): m0: Makefile: respect verbosity for linkerfile
All commands in the Makefile respect the verbosity except this one, so let's be consistent and respect it for that one as well.
Signed-
build(rk3399): m0: Makefile: respect verbosity for linkerfile
All commands in the Makefile respect the verbosity except this one, so let's be consistent and respect it for that one as well.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Change-Id: I5d1af4ee321e29449b927509cfa5ece01765a99e
show more ...
|
| c0c908e1 | 31-Oct-2024 |
Quentin Schulz <quentin.schulz@cherry.de> |
build(rk3399): m0: fail linker and assembler on warnings
Match the top Makefile flags and fail on warnings for the linker (ld) and assembler (as).
Signed-off-by: Quentin Schulz <quentin.schulz@cher
build(rk3399): m0: fail linker and assembler on warnings
Match the top Makefile flags and fail on warnings for the linker (ld) and assembler (as).
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Change-Id: I53fbcbdbda109b1dfe39b390a41c1ef3fd7d3e04
show more ...
|