mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
platform: generic: Add support for specify coldboot harts in DT
Added support for the generic platform to specify the set of coldboot hart in DT. If not specified in DT, all harts are allowed to coldboot as before. The functions related to sbi_hartmask are not available before coldboot, so I used bitmap, and added a new bitmap_test() function to test whether a certain bit of the bitmap is set. Signed-off-by: Cheng Yang <yangcheng.work@foxmail.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -62,6 +62,11 @@ static inline void bitmap_zero(unsigned long *dst, int nbits)
|
||||
}
|
||||
}
|
||||
|
||||
static inline int bitmap_test(unsigned long *bmap, int bit)
|
||||
{
|
||||
return __test_bit(bit, bmap);
|
||||
}
|
||||
|
||||
static inline void bitmap_zero_except(unsigned long *dst,
|
||||
int exception, int nbits)
|
||||
{
|
||||
|
Reference in New Issue
Block a user