diff options
Diffstat (limited to 'include/sbi')
-rw-r--r-- | include/sbi/sbi_platform.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h index 010e9ce..43d1c03 100644 --- a/include/sbi/sbi_platform.h +++ b/include/sbi/sbi_platform.h @@ -65,6 +65,9 @@ enum sbi_platform_features { /** Platform functions */ struct sbi_platform_operations { + /* Check if specified HART is allowed to do cold boot */ + bool (*cold_boot_allowed)(u32 hartid); + /* Platform nascent initialization */ int (*nascent_init)(void); @@ -357,6 +360,23 @@ static inline bool sbi_platform_hart_invalid(const struct sbi_platform *plat, } /** + * Check whether given HART is allowed to do cold boot + * + * @param plat pointer to struct sbi_platform + * @param hartid HART ID + * + * @return true if HART is allowed to do cold boot and false otherwise + */ +static inline bool sbi_platform_cold_boot_allowed( + const struct sbi_platform *plat, + u32 hartid) +{ + if (plat && sbi_platform_ops(plat)->cold_boot_allowed) + return sbi_platform_ops(plat)->cold_boot_allowed(hartid); + return true; +} + +/** * Nascent (very early) initialization for current HART * * NOTE: This function can be used to do very early initialization of |