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>
diff --git a/include/abuf.h b/include/abuf.h
index be98ec7..76e314b 100644
--- a/include/abuf.h
+++ b/include/abuf.h
@@ -43,6 +43,14 @@
}
/**
+ * 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