Skip to content

Commit

Permalink
core: riscv: Add a reserved-memory node for static shared memory
Browse files Browse the repository at this point in the history
To prevent Linux from using static shared memory, include the
dedicated reserved-memory node in the device tree.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
  • Loading branch information
gagachang authored and jforissier committed Jun 11, 2024
1 parent 910441c commit 139faa8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/arch/riscv/kernel/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ static void update_external_dt(void)
if (!dt || !dt->blob)
return;

#ifdef CFG_CORE_RESERVED_SHM
if (mark_static_shm_as_reserved(dt))
panic("Failed to config non-secure memory");
#endif

if (mark_tddram_as_reserved(dt))
panic("Failed to config secure memory");
}
Expand Down

0 comments on commit 139faa8

Please sign in to comment.