]> xenbits.xensource.com Git - xen.git/commitdiff
xen/riscv: parse and handle fdt command line
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Tue, 15 Oct 2024 12:23:41 +0000 (14:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Oct 2024 12:23:41 +0000 (14:23 +0200)
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>
xen/arch/riscv/setup.c

index 63feea14c77b2481bbe8d76fd3bd968605cb0768..e29bd75d7cf514ddc92d58af4b52e2fe1e9bfb59 100644 (file)
@@ -27,6 +27,8 @@ unsigned char __initdata cpu0_boot_stack[STACK_SIZE]
 void __init noreturn start_xen(unsigned long bootcpu_id,
                                paddr_t dtb_addr)
 {
+    const char *cmdline;
+
     remove_identity_mapping();
 
     set_processor_id(0);
@@ -53,6 +55,10 @@ void __init noreturn start_xen(unsigned long bootcpu_id,
     if ( !boot_fdt_info(device_tree_flattened, dtb_addr) )
         BUG();
 
+    cmdline = boot_fdt_cmdline(device_tree_flattened);
+    printk("Command line: %s\n", cmdline);
+    cmdline_parse(cmdline);
+
     printk("All set up\n");
 
     machine_halt();