On 2024-12-26 11:57, Daniel P. Smith wrote:
If a command line is not provided through the bootloader's mechanism, e.g.
muiltboot module string field, then use one from the device tree if present.
The device tree command line is located in the bootargs property of the
`multiboot,kernel` node.

Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com>
Reviewed-by: Jason Andryuk <jason.andr...@amd.com>
---
Changes since v1:
- moved common fdt functions to libfdt
- rename prop_as_offset to more correct prop_by_offset

diff --git a/xen/include/xen/libfdt/libfdt-xen.h 
b/xen/include/xen/libfdt/libfdt-xen.h
index 27d23df03af3..0e54aeeb6cc2 100644
--- a/xen/include/xen/libfdt/libfdt-xen.h
+++ b/xen/include/xen/libfdt/libfdt-xen.h
@@ -28,6 +28,30 @@ static inline int __init fdt_cell_as_u64(const fdt32_t 
*cell, uint64_t *val)
      return 0;
  }
+static inline int __init fdt_get_prop_by_offset(

I think fdt_get_prop_offset() is a better name. The point of this function is to return the offset in the fdt of the named property. "by" or "as" confuses the purpose, at least to me.

Compare the existing fdt_get_property_by_offset() which is performing a property looking by consulting the offset.

Regards,
Jason

Reply via email to