Patchwork [v2,2/2] pseries: set no default boot order

login
register
mail settings
Submitter Avik Sil
Date Oct. 25, 2012, 2:38 p.m.
Message ID <1351175895-27131-3-git-send-email-aviksil@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/194191/
State New
Headers show

Comments

Avik Sil - Oct. 25, 2012, 2:38 p.m.
This patch removes the default boot order for pseries machine. This allows
the machine to handle a NULL boot order in case no -boot option is provided.
Thus it helps SLOF firmware to verify if boot order is specified in command
line or not. If no boot order is provided SLOF tries to boot from the
device set in the nvram.

Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
---
 hw/spapr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/spapr.c b/hw/spapr.c
index 57db710..6f5be50 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -283,7 +283,9 @@  static void *spapr_create_fdt_skel(const char *cpu_model,
 
         _FDT((fdt_property(fdt, "qemu,boot-kernel", &kprop, sizeof(kprop))));
     }
-    _FDT((fdt_property_string(fdt, "qemu,boot-device", boot_device)));
+    if (boot_device) {
+        _FDT((fdt_property_string(fdt, "qemu,boot-device", boot_device)));
+    }
     _FDT((fdt_property_cell(fdt, "qemu,graphic-width", graphic_width)));
     _FDT((fdt_property_cell(fdt, "qemu,graphic-height", graphic_height)));
     _FDT((fdt_property_cell(fdt, "qemu,graphic-depth", graphic_depth)));
@@ -915,7 +917,6 @@  static QEMUMachine spapr_machine = {
     .max_cpus = MAX_CPUS,
     .no_parallel = 1,
     .use_scsi = 1,
-    .default_machine_opts = DEFAULT_BOOT_ORDER,
 };
 
 static void spapr_machine_init(void)