diff mbox series

[v1,2/2] xen/riscv: parse and handle fdt command line

Message ID e914d15b82d2a28fcd1690dd68af9a61c4cb272e.1727708956.git.oleksii.kurochko@gmail.com (mailing list archive)
State Superseded
Headers show
Series Parse and handle command line from dtb | expand

Commit Message

Oleksii Kurochko Sept. 30, 2024, 3:13 p.m. UTC
Receive Xen's command line passed by DTB using boot_fdt_cmdline()
and passed it to cmdline_parse() for further procesinng and setup
of Xen-specific parameters.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/setup.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Jan Beulich Oct. 1, 2024, 3:55 p.m. UTC | #1
On 30.09.2024 17:13, Oleksii Kurochko wrote:
> Receive Xen's command line passed by DTB using boot_fdt_cmdline()
> and passed it to cmdline_parse() for further procesinng and setup
> of Xen-specific parameters.
> 
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index a8d8ef793d..0d1b52f8d0 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -29,6 +29,7 @@  void __init noreturn start_xen(unsigned long bootcpu_id,
 {
     struct bootmodule *xen_bootmodule;
     size_t fdt_size;
+    const char *cmdline;
 
     remove_identity_mapping();
 
@@ -58,6 +59,10 @@  void __init noreturn start_xen(unsigned long bootcpu_id,
     fdt_size = boot_fdt_info(device_tree_flattened, dtb_addr);
     BUG_ON(!fdt_size);
 
+    cmdline = boot_fdt_cmdline(device_tree_flattened);
+    printk("Command line: %s\n", cmdline);
+    cmdline_parse(cmdline);
+
     printk("All set up\n");
 
     machine_halt();