lib: sbi: Add initial domain support
authorAnup Patel <anup.patel@wdc.com>
Fri, 18 Sep 2020 11:37:49 +0000 (17:07 +0530)
committerAnup Patel <anup@brainfault.org>
Tue, 20 Oct 2020 05:52:15 +0000 (11:22 +0530)
commitb1678af210dc4b4e6d586d6d96617e9641618994
tree05bd3bb3d4e823978c426acf06e428425d035535
parent8b650050ecb61da143ee18fc150dd95ac5b0eca1
lib: sbi: Add initial domain support

An OpenSBI domain is a logical entity representing a set of HARTs
and a set of memory regions for these HARTs.

The OpenSBI domains support will allow OpenSBI platforms and previous
booting stage (i.e. U-Boot SPL, Coreboot, etc) to partition a system
into multiple domains where each domain will run it's own software.

For inter-domain isolation, OpenSBI will eventually use various HW
features such as PMP, ePMP, IOPMP, SiFive shield, etc but initial
implementation only use HW PMP support.

This patch provides initial implementation of OpenSBI domains where
we have a root/default domain and OpenSBI platforms can provide
non-root/custom domains using domain_get() callback.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_domain.h [new file with mode: 0644]
include/sbi/sbi_platform.h
lib/sbi/objects.mk
lib/sbi/sbi_domain.c [new file with mode: 0644]
lib/sbi/sbi_init.c