[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH v2 4/8] include/plat: Helper for finding first initrd



Introduces a helper macro that returns the first initramdisk module
found as memory region.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 include/uk/plat/memory.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/uk/plat/memory.h b/include/uk/plat/memory.h
index bc979e12..1bb15685 100644
--- a/include/uk/plat/memory.h
+++ b/include/uk/plat/memory.h
@@ -133,6 +133,17 @@ static inline int ukplat_memregion_find_next(int i, int 
sflags,
                     = ukplat_memregion_find_next(__ukplat_memregion_foreach_i,\
                                                  (sflags), (mrd)))
 
+/**
+ * Searches for the first initrd module
+ * @param mrd Pointer to memory region descriptor that will be filled out
+ * @return On success, returns the region number of the first initrd module,
+ *         `mrd` is filled out with the memory region details.
+ *         A return value < 0 means that there is no initrd module,
+ *         `mrd` may be filled out with undefined values.
+ */
+#define ukplat_memregion_find_initrd0(mrd) \
+       ukplat_memregion_find_next(-1, UKPLAT_MEMRF_INITRD, (mrd))
+
 /**
  * Sets the platform memory allocator and triggers the platform memory mappings
  * for which an allocator is needed.
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.