j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2008-07-17 14:49:25 +0200 (Thu, 17 Jul 2008) New Revision: 206
Modified: openbios-devel/arch/sparc64/openbios.c Log: Support for simple boot device selection
Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-07-17 12:48:11 UTC (rev 205) +++ openbios-devel/arch/sparc64/openbios.c 2008-07-17 12:49:25 UTC (rev 206) @@ -52,6 +52,8 @@
static uint8_t idprom[32];
+static const char *bootpath; + struct cpudef { unsigned long iu_version; const char *name; @@ -468,6 +470,18 @@ fword("encode+"); push_str("translations"); fword("property"); + + push_str("/chosen"); + fword("find-device"); + + if (nv_info.boot_devices[0] == 'c') + bootpath = "/pci/isa/ide0/disk@0,0:a"; + else + bootpath = "/pci/isa/ide1/cdrom@0,0:a"; + push_str(bootpath); + fword("encode-string"); + push_str("bootpath"); + fword("property"); }
void arch_nvram_put(char *data) @@ -583,7 +597,7 @@ enterforth((xt_t)PC); arch_init(); // XXX printk("force boot\n"); - push_str("/pci/isa/ide0/disk@0,0:a"); + push_str(bootpath); boot(); // XXX printk("falling off...\n"); return 0;