mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: sbi: Add system_suspend_allowed domain property
Only privileged domains should be allowed to suspend the entire system. Give the root domain this property by default and allow other domains to be given the property by specifying it in the DT. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -417,6 +417,13 @@ static int __fdt_parse_domain(void *fdt, int domain_offset, void *opaque)
|
||||
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)
|
||||
|
Reference in New Issue
Block a user