summaryrefslogtreecommitdiff
path: root/include/blkmap.h
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@linaro.org>2025-03-17 14:04:01 +0530
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2025-03-26 13:28:08 +0200
commit54c39bf104017e3a0b30fdff6104141b719af9ef (patch)
tree1d3ed658b32edd8196599723a47be5e7db2d34ec /include/blkmap.h
parent45c398028283c73ea24be20a0d0e120d3cd3e850 (diff)
blkmap: add an attribute to preserve the mem mapping
Some blkmap memory mapped devices might have to be relevant even after U-Boot passes control to the next image as part of the platform boot. An example of such a mapping would be an OS installer ISO image, information for which has to be provided to the OS kernel. Use the 'preserve' attribute for such mappings. The code for adding a pmem node to the device-tree then checks if this attribute is set, and adds a node only for mappings which have this attribute. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/blkmap.h')
-rw-r--r--include/blkmap.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/blkmap.h b/include/blkmap.h
index d53095437fa..754d8671b01 100644
--- a/include/blkmap.h
+++ b/include/blkmap.h
@@ -60,10 +60,12 @@ int blkmap_map_mem(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
* @blknr: Start block number of the mapping
* @blkcnt: Number of blocks to map
* @paddr: The target physical memory address of the mapping
+ * @preserve: Mapping intended to be preserved for subsequent stages,
+ * like the OS (e.g. ISO installer)
* Returns: 0 on success, negative error code on failure
*/
int blkmap_map_pmem(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
- phys_addr_t paddr);
+ phys_addr_t paddr, bool preserve);
/**
* blkmap_from_label() - Find blkmap from label