Skip site navigation (1)Skip section navigation (2)
Date:      25 Feb 2003 18:55:50 -0800
From:      Arun Sharma <arun.sharma@intel.com>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        freebsd-ia64@FreeBSD.ORG
Subject:   Re: Slow loading of the kernel from efifs ?
Message-ID:  <uy943lphl.fsf@unix-os.sc.intel.com>
In-Reply-To: <20030225213120.GA49775@ns1.xcllnt.net>
References:  <200302251946.h1PJktr26424@unix-os.sc.intel.com> <20030225213120.GA49775@ns1.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar <marcel@xcllnt.net> writes:

> 
> BTW: It would be nice if we could fix the loader to not have fs0
>      hardcoded, but instead use device paths to figure out which
>      mapping to use (maybe even create our own mapping). Would
>      you be willing/able to give that a shot?

You mean something like this ?

        -Arun

--- sys/boot/efi/libefi/efifs.c-	Wed Feb 26 02:16:08 2003
+++ sys/boot/efi/libefi/efifs.c	Wed Feb 26 02:50:25 2003
@@ -377,6 +377,19 @@
 	return 0;
 }
 
+int 
+efifs_get_unit(EFI_HANDLE h)
+{
+	int i;
+
+	for(i = 0;  i < fs_handle_count; i++) {
+		if (fs_handles[i] == h)
+			return i;
+	}
+
+	return -1;
+}
+
 struct devsw efifs_dev = {
 	"fs", 
 	DEVT_DISK, 
--- sys/boot/efi/loader/main.c-	Wed Feb 26 02:37:36 2003
+++ sys/boot/efi/loader/main.c	Wed Feb 26 02:39:42 2003
@@ -152,7 +152,7 @@
 		currdev.d_kind.netif.unit = 0;
 	} else {
 		currdev.d_dev = devsw[0];	/* XXX disk */
-		currdev.d_kind.efidisk.unit = 0;
+		currdev.d_kind.efidisk.unit = efifs_get_unit(img->DeviceHandle);
 		/* XXX should be able to detect this, default to autoprobe */
 		currdev.d_kind.efidisk.slice = -1;
 		/* default to 'a' */


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?uy943lphl.fsf>