Skip to contentSkip to conversation

Add nvram to default boot device list

PATCH In review Avik Sil 5 participants 12 messages Oct 11, 2012 – Oct 16, 2012

lore
Share & tools
lore

Avik Sil

author
#0 lore raw

PATCH 1/1 Add nvram to default boot device list

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

Suggested by: Alexander Graf <[email protected]>

---
 vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
vl.c +1 -1
index 48049ef..8adc40b 100644
@@ -2349,7 +2349,7 @@ int main(int argc, char **argv, char **envp)
     const char *icount_option = NULL;
     const char *initrd_filename;
     const char *kernel_filename, *kernel_cmdline;
-    char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
+    char boot_devices[33] = "xcad"; /* default to NVRAM->HD->floppy->CD-ROM */
     DisplayState *ds;
     DisplayChangeListener *dcl;
     int cyls, heads, secs, translation;
Signature · 1 line
1.7.11.4
#1 lore raw
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

Did you check that no other user of the boot device list gets confused by this? Also, this new 'x' bit needs to be documented. Plus, we need a SLOF update to make use of it.

Alex

Quoted 24 lines

Suggested by: Alexander Graf <[email protected]>

---
vl.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
vl.c +1 -1
index 48049ef..8adc40b 100644
@@ -2349,7 +2349,7 @@ int main(int argc, char **argv, char **envp)
    const char *icount_option = NULL;
    const char *initrd_filename;
    const char *kernel_filename, *kernel_cmdline;
-    char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
+    char boot_devices[33] = "xcad"; /* default to NVRAM->HD->floppy->CD-ROM */
    DisplayState *ds;
    DisplayChangeListener *dcl;
    int cyls, heads, secs, translation;
Signature · 1 line
1.7.11.4
#2 lore raw
In reply to Avik Sil
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#3 lore raw
Quoted 16 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

Quoted 5 lines

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Alex

#4 lore raw
Quoted 19 lines · Alexander Graf
Quoted 16 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

Quoted 8 lines
Quoted 5 lines

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Uh, is this a call I know about?

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#5 lore raw
Quoted 26 lines · David Gibson
Quoted 25 lines · Alexander Graf
Quoted 21 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Quoted 4 lines
Quoted 2 lines

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Uh, is this a call I know about?

I would hope so. Chris / Juan, who is in charge of the phone numbers these days?

Alex

#6 lore raw
Quoted 25 lines · * Alexander Graf ([email protected]) wrote:
Quoted 24 lines · David Gibson
Quoted 23 lines · Alexander Graf
Quoted 21 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Uh, is this a call I know about?

I would hope so. Chris / Juan, who is in charge of the phone numbers these days?

Added David to the invite which contains the call details (very unfriendly time for .au I'm afraid, 14:00 UTC).

author
#11 lore raw
In reply to David Gibson
Quoted 16 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

Quoted 6 lines

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

I'm fine with the original approach. The patch is there in qemu-ppc m-l [1].

Regards,
Avik

[1] http://lists.nongnu.org/archive/html/qemu-ppc/2012-10/msg00081.html

author
#8 lore raw
In reply to Alexander Graf
Quoted 19 lines · Alexander Graf
Quoted 16 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

Quoted 8 lines
Quoted 5 lines

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Was there any discussion on this in the last QEMU call?

Regards,
Avik

#9 lore raw
Quoted 26 lines · Avik Sil
Quoted 25 lines · Alexander Graf
Quoted 21 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Quoted 3 lines
Quoted 2 lines

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Was there any discussion on this in the last QEMU call?

The call is today :)

Alex

Quoted 4 lines

Regards,
Avik

#10 lore raw

Am 16.10.2012 10:04, schrieb Alexander Graf:

Quoted 30 lines · Avik Sil
Quoted 27 lines · Alexander Graf
Quoted 25 lines · David Gibson
Quoted 22 lines · Avik Sil
Quoted 3 lines

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Was there any discussion on this in the last QEMU call?

The call is today :)

...and the topic is not officially on the agenda yet. :)

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
author
#7 lore raw
In reply to Chris Wright
Quoted 29 lines · Chris Wright
Quoted 28 lines · * Alexander Graf ([email protected]) wrote:
Quoted 27 lines · David Gibson
Quoted 25 lines · Alexander Graf
Quoted 16 lines · David Gibson
Quoted 3 lines · Avik Sil

This patch adds nvram specified boot device into qemu default boot_devices list. This helps firmware to boot from nvram specified boot device if no -boot option is specified.

I really don't think this is a good idea, it extends an already deprecated mechanism in a fuzzy way and requires careful checking to see if it could break anything. On all platforms the boot sequence should be:
if bootindex is specified:
boot according to bootindex
else if -boot is specified:
boot according to -boot sequence
else:
use platform firmware default sequence

Quoted 5 lines

The last will of course vary by platform, and could depend on platform details like the contents of NVRAM. Your original idea of making it clear to the guest when -boot has been specified (as opposed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction.

Given that this is a fundamental direction for a bunch of machines, how about we talk about it on the weekly QEMU call?

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Uh, is this a call I know about?

I would hope so. Chris / Juan, who is in charge of the phone numbers these days?

Added David to the invite which contains the call details (very unfriendly time for .au I'm afraid, 14:00 UTC).

Is it OK if I proxy David as it's unfriendly time for him? Also can this topic be included in today's call?

Regards,
Avik