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

Re: [PATCH v2 09/15] x86/hyperlaunch: obtain cmdline from device tree


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 15 Jan 2025 11:38:10 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aUXXusSk24drhfYsuct6vcK2Za6M9r1k0aIHaTia3Wk=; b=UdvxvULq8KFZqwCPbamVnJA81Yq5f/BNbJkoHJiu4Qebx4rh+68v6vcDDBuO8Y84Sg/3VAKEAB44u86dpVqd93XOdSGDgjsnuzqiWv7gtGXg+5OA55vJ8vS/uXUMojdW2k15cP8LKDgVy35NjXu20+srdZbQigM3Il3gpgv4tWOx7uOUeqElQbTnalXWonGc5fisF6FOjfNkw9I9noLxRHonjlFOpOXywY6uuII51PiGbZBo0EmPiIcsJsaRe+r+00Jd5wRzxK+ePwWdyqNToC2D097wjGh65XQZKJbr4+T8+KZxgsiCPqI/fhMbsiwr/RBzbpQns8mgA6J/kcg4zw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i/7NX37+dhNKPyqUQXTCRZ/4Hi0poI7w5lp+XG0J3nirTBypvcg3Kb5DDSH5KypUoYcegnP1L0GR45Yte+MkB5qMYkRnR5r75QF5ZD/9h7HkywDNG7FU+i/kom2gwckumWV2CEjAEszX9dWUD/wNMpmiunbZVqKu2A6pgTwfkV6frWugDoypx/u1yFZ3o3L9RmILeraLu13p8hY5Je3nG84fRr9Hzqx1dS8/GybSLpd8Egg11ZUqVLZt7gQHJ+2Ek1MRxi2eEOXzDTYzyDUeEe1byNz4GZZOILblQnE8If4KxF6kmaGtjvXvvZefxlA9FODbsELFPsgxNiC8W4ZOeQ==
  • Cc: <christopher.w.clark@xxxxxxxxx>, <stefano.stabellini@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Wed, 15 Jan 2025 16:38:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <dpsmith@xxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
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



 


Rackspace

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