* **next_mode** - Privilege mode of the next booting stage for this
domain. This can be either S-mode or U-mode.
* **system_reset_allowed** - Is domain allowed to reset the system?
+* **system_suspend_allowed** - Is domain allowed to suspend the system?
The memory regions represented by **regions** in **struct sbi_domain** have
following additional constraints to align with RISC-V PMP requirements:
* **next_mode** - Next booting stage mode in coldboot HART scratch space
is the next mode for the ROOT domain
* **system_reset_allowed** - The ROOT domain is allowed to reset the system
+* **system_suspend_allowed** - The ROOT domain is allowed to suspend the system
Domain Effects
--------------
stage mode of coldboot HART** is used as default value.
* **system-reset-allowed** (Optional) - A boolean flag representing
whether the domain instance is allowed to do system reset.
+* **system-suspend-allowed** (Optional) - A boolean flag representing
+ whether the domain instance is allowed to do system suspend.
### Assigning HART To Domain Instance
next-addr = <0x0 0x80100000>;
next-mode = <0x0>;
system-reset-allowed;
+ system-suspend-allowed;
};
udomain: untrusted-domain {
unsigned long next_mode;
/** Is domain allowed to reset the system */
bool system_reset_allowed;
+ /** Is domain allowed to suspend the system */
+ bool system_suspend_allowed;
};
/** The root domain instance */
.possible_harts = &root_hmask,
.regions = root_memregs,
.system_reset_allowed = true,
+ .system_suspend_allowed = true,
};
bool sbi_domain_is_assigned_hart(const struct sbi_domain *dom, u32 hartid)
sbi_printf("Domain%d SysReset %s: %s\n",
dom->index, suffix, (dom->system_reset_allowed) ? "yes" : "no");
+
+ sbi_printf("Domain%d SysSuspend %s: %s\n",
+ dom->index, suffix, (dom->system_suspend_allowed) ? "yes" : "no");
}
void sbi_domain_dump_all(const char *suffix)
else
dom->system_reset_allowed = false;
+ /* Read "system-suspend-allowed" DT property */
+ if (fdt_get_property(fdt, domain_offset,
+ "system-suspend-allowed", NULL))
+ dom->system_suspend_allowed = true;
+ else
+ dom->system_suspend_allowed = false;
+
/* Find /cpus DT node */
cpus_offset = fdt_path_offset(fdt, "/cpus");
if (cpus_offset < 0)