mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-10-24 04:32:05 +01:00
lib: sbi: Print scratch size and usage at boot time
The scratch space being a scarce resource so let us print it's size and usage at boot time. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
This commit is contained in:
1 parent
40d36a6673
commit
2a04f70373
3 files changed
+19
No files matched your search
@@ -97,3 +97,14 @@ void sbi_scratch_free_offset(unsigned long offset)
|
||||
* brain-dead allocator.
|
||||
*/
|
||||
}
|
||||
|
||||
unsigned long sbi_scratch_used_space(void)
|
||||
{
|
||||
unsigned long ret = 0;
|
||||
|
||||
spin_lock(&extra_lock);
|
||||
ret = extra_offset;
|
||||
spin_unlock(&extra_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
Reference in new issue
Block a user