lib: sbi: Allow platforms to provide root domain memory regions
authorAnup Patel <anup.patel@wdc.com>
Fri, 8 Jan 2021 04:37:01 +0000 (10:07 +0530)
committerAnup Patel <anup@brainfault.org>
Tue, 12 Jan 2021 05:11:11 +0000 (10:41 +0530)
commitdb56341dfa1f89e258921d260449eb5edee922c4
tree77a3edcd897d852f25be9d8e9b1f4c9f0afc0a6b
parent0d49c3bc1823df8bf229ba3ece8ca0a753f0622b
lib: sbi: Allow platforms to provide root domain memory regions

Currently, the root domain memory regions are fixed in generic
code but some of the platforms may want to explicitly define
memory regions for the root domain.

This patch adds optional domains_root_regions() platform callback
which platforms can use to provide platform specific root domain
memory regions. Due to this changes, the root domain should also
undergo all sanity checks (just like regular domain) so we use
sbi_domain_register() to register root domain.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_platform.h
lib/sbi/sbi_domain.c