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 <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-01-10 17:00:01 -07:00
committed by Tom Rini
parent 864106f3c4
commit c487381d50
3 changed files with 17 additions and 1 deletions

View File

@@ -42,6 +42,14 @@ static inline size_t abuf_size(const struct abuf *abuf)
return abuf->size;
}
/**
* 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
*