mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: sbi: Make the root domain instance global variable
We make the the root domain instance global variable so that platform support and drivers can iterate over the root domain regions. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
@@ -80,6 +80,9 @@ struct sbi_domain {
|
|||||||
bool system_reset_allowed;
|
bool system_reset_allowed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** The root domain instance */
|
||||||
|
extern struct sbi_domain root;
|
||||||
|
|
||||||
/** HART id to domain table */
|
/** HART id to domain table */
|
||||||
extern struct sbi_domain *hartid_to_domain_table[];
|
extern struct sbi_domain *hartid_to_domain_table[];
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ static u32 root_memregs_count = 0;
|
|||||||
static struct sbi_domain_memregion root_fw_region;
|
static struct sbi_domain_memregion root_fw_region;
|
||||||
static struct sbi_domain_memregion root_memregs[ROOT_REGION_MAX + 1] = { 0 };
|
static struct sbi_domain_memregion root_memregs[ROOT_REGION_MAX + 1] = { 0 };
|
||||||
|
|
||||||
static struct sbi_domain root = {
|
struct sbi_domain root = {
|
||||||
.name = "root",
|
.name = "root",
|
||||||
.possible_harts = &root_hmask,
|
.possible_harts = &root_hmask,
|
||||||
.regions = root_memregs,
|
.regions = root_memregs,
|
||||||
|
Reference in New Issue
Block a user