Index: sys/kern/kern_subr.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_subr.c,v
retrieving revision 1.215
diff -u -r1.215 kern_subr.c
--- sys/kern/kern_subr.c	22 Nov 2014 10:24:02 -0000	1.215
+++ sys/kern/kern_subr.c	22 Nov 2014 10:25:30 -0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_subr.c,v 1.215 2014/11/22 10:24:02 mlelstv Exp $	*/
+/*	$NetBSD: kern_subr.c,v 1.214 2013/12/09 16:49:43 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.215 2014/11/22 10:24:02 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.214 2013/12/09 16:49:43 pooka Exp $");
 
 #include "opt_ddb.h"
 #include "opt_md.h"
@@ -159,6 +159,7 @@
 int booted_partition;
 daddr_t booted_startblk;
 uint64_t booted_nblks;
+char *bootspec;
 
 /*
  * Use partition letters if it's a disk class but not a wedge.
@@ -209,6 +210,12 @@
 	}
 
 	/*
+	 * Let bootcode augment "rootspec".
+	 */
+	if (rootspec == NULL)
+		rootspec = bootspec;
+
+	/*
 	 * If NFS is specified as the file system, and we found
 	 * a DV_DISK boot device (or no boot device at all), then
 	 * find a reasonable network interface for "rootspec".
Index: sys/sys/device.h
===================================================================
RCS file: /cvsroot/src/sys/sys/device.h,v
retrieving revision 1.145
diff -u -r1.145 device.h
--- sys/sys/device.h	5 Sep 2014 05:47:40 -0000	1.145
+++ sys/sys/device.h	22 Nov 2014 10:25:30 -0000
@@ -415,6 +415,7 @@
 extern int booted_partition;		/* the partition on that device */
 extern daddr_t booted_startblk;		/* or the start of a wedge */
 extern uint64_t booted_nblks;		/* and the size of that wedge */
+extern char *bootspec;			/* and the device/wedge name */
 
 struct vnode *opendisk(device_t);
 int getdisksize(struct vnode *, uint64_t *, unsigned int *);
