diff mbox

[v3,REBASE,2/2] pseries: set no default boot order

Message ID 1357628791-11974-3-git-send-email-aviksil@linux.vnet.ibm.com
State New
Headers show

Commit Message

Avik Sil Jan. 8, 2013, 7:06 a.m. UTC
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.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
---
 hw/spapr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Alexander Graf Jan. 8, 2013, 7:14 a.m. UTC | #1
On 08.01.2013, at 08:06, Avik Sil wrote:

> 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.
> 
> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
> Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>

Acked-by: Alexander Graf <agraf@suse.de>


Alex

> ---
> hw/spapr.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/spapr.c b/hw/spapr.c
> index a4a65c7..abfa0d9 100644
> --- a/hw/spapr.c
> +++ b/hw/spapr.c
> @@ -284,7 +284,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)));
> @@ -960,7 +962,7 @@ static QEMUMachine spapr_machine = {
>     .block_default_type = IF_SCSI,
>     .max_cpus = MAX_CPUS,
>     .no_parallel = 1,
> -    DEFAULT_MACHINE_OPTIONS,
> +    .boot_order = NULL,
> };
> 
> static void spapr_machine_init(void)
> -- 
> 1.7.11.7
>
diff mbox

Patch

diff --git a/hw/spapr.c b/hw/spapr.c
index a4a65c7..abfa0d9 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -284,7 +284,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)));
@@ -960,7 +962,7 @@  static QEMUMachine spapr_machine = {
     .block_default_type = IF_SCSI,
     .max_cpus = MAX_CPUS,
     .no_parallel = 1,
-    DEFAULT_MACHINE_OPTIONS,
+    .boot_order = NULL,
 };
 
 static void spapr_machine_init(void)