diff options
| author | Anup Patel <[email protected]> | 2023-04-20 14:02:37 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-06-05 15:46:22 +0530 |
| commit | 2a04f7037317c6c5b591b160a074c700de9b3378 (patch) | |
| tree | e4c6fe4d886a7a68e444bbd28874fa74ca14091a /include | |
| parent | 40d36a6673131e36075b1df78af4d7ab92e8cc01 (diff) | |
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 <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_scratch.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sbi/sbi_scratch.h b/include/sbi/sbi_scratch.h index 9894c704..48014923 100644 --- a/include/sbi/sbi_scratch.h +++ b/include/sbi/sbi_scratch.h @@ -175,6 +175,9 @@ unsigned long sbi_scratch_alloc_offset(unsigned long size); /** Free-up extra space in sbi_scratch */ void sbi_scratch_free_offset(unsigned long offset); +/** Amount (in bytes) of used space in in sbi_scratch */ +unsigned long sbi_scratch_used_space(void); + /** Get pointer from offset in sbi_scratch */ #define sbi_scratch_offset_ptr(scratch, offset) (void *)((char *)(scratch) + (offset)) |
