mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00

OpenSBI supports multiple supervisor domains run on same platform. When these supervisor domains want to communicate with OpenSBI through MPXY channels, they will allocate MPXY shared memory from their own memory regions. Therefore, the MPXY state data structure must be per-domain and per-hart data structure. This commit registers per-domain MPXY state data in sbi_mpxy_init(). The original MPXY state allocated in scratch region is also removed. We also replace sbi_scratch_thishart_offset_ptr() macro as new sbi_domain_mpxy_state_thishart_ptr() macro which gets MPXY state from per-domain data. Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Link: https://lore.kernel.org/r/20250325071314.3113941-1-alvinga@andestech.com Signed-off-by: Anup Patel <anup@brainfault.org>