diff options
| author | Simon Glass <[email protected]> | 2025-01-10 17:00:01 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-22 15:58:03 -0600 |
| commit | c487381d50b280a0dce09e00cd29620be9598c90 (patch) | |
| tree | e09f7f88ccdd6308d6b4a2288331de68d8acdfd9 /include/abuf.h | |
| parent | 864106f3c477052dae932d80a89522532efe76fe (diff) | |
abuf: Provide a way to get the buffer address
In many cases it is useful to get the address of a buffer, e.g. when
booting from it. Add a function to handle this.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/abuf.h')
| -rw-r--r-- | include/abuf.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/abuf.h b/include/abuf.h index be98ec78c86..76e314b9a47 100644 --- a/include/abuf.h +++ b/include/abuf.h @@ -43,6 +43,14 @@ static inline size_t abuf_size(const struct abuf *abuf) } /** + * abuf_addr() - Get the address of a buffer's data + * + * @abuf: Buffer to check + * Return: address of buffer + */ +ulong abuf_addr(const struct abuf *abuf); + +/** * abuf_set() - set the (unallocated) data in a buffer * * This simply makes the abuf point to the supplied data, which must be live |
