Author: blueswirl Date: 2008-08-09 16:20:29 +0200 (Sat, 09 Aug 2008) New Revision: 227
Modified: openbios-devel/arch/sparc64/boot.c Log: Use nvram boot-args and boot-device variables also for Sparc64 (cf. r137)
Modified: openbios-devel/arch/sparc64/boot.c =================================================================== --- openbios-devel/arch/sparc64/boot.c 2008-08-09 14:10:37 UTC (rev 226) +++ openbios-devel/arch/sparc64/boot.c 2008-08-09 14:20:29 UTC (rev 227) @@ -34,20 +34,29 @@ }
if(!path) { - switch(boot_device) { - case 'a': - path = "/obio/SUNW,fdtwo"; - break; - case 'c': - path = "disk"; - break; - default: - case 'd': - path = "cdrom"; - break; - case 'n': - path = "net"; - break; + push_str("boot-device"); + push_str("/options"); + fword("(find-dev)"); + POP(); + fword("get-package-property"); + if (!POP()) { + path = pop_fstr_copy(); + } else { + switch (boot_device) { + case 'a': + path = "/obio/SUNW,fdtwo"; + break; + case 'c': + path = "disk"; + break; + default: + case 'd': + path = "cdrom"; + break; + case 'n': + path = "net"; + break; + } } }
@@ -57,6 +66,14 @@ param++; } else if (cmdline_size) { param = (char *)qemu_cmdline; + } else { + push_str("boot-args"); + push_str("/options"); + fword("(find-dev)"); + POP(); + fword("get-package-property"); + POP(); + param = pop_fstr_copy(); } printk("[sparc64] Booting file '%s' ", path);