From c487381d50b280a0dce09e00cd29620be9598c90 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 10 Jan 2025 17:00:01 -0700 Subject: 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 --- include/abuf.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/abuf.h b/include/abuf.h index be98ec78c86..76e314b9a47 100644 --- a/include/abuf.h +++ b/include/abuf.h @@ -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 * -- cgit v1.2.3