From owner-freebsd-ia64 Wed Feb 26 1:34:41 2003 Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4AE837B401 for ; Wed, 26 Feb 2003 01:34:39 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD66D43FBD for ; Wed, 26 Feb 2003 01:34:38 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.6/8.12.6) with ESMTP id h1Q9Yc1o052614; Wed, 26 Feb 2003 01:34:38 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7) with ESMTP id h1Q9YcWs017641; Wed, 26 Feb 2003 01:34:38 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.7/8.12.7/Submit) id h1Q9YcTk017640; Wed, 26 Feb 2003 01:34:38 -0800 (PST) Date: Wed, 26 Feb 2003 01:34:38 -0800 From: Marcel Moolenaar To: Arun Sharma Cc: freebsd-ia64@FreeBSD.ORG Subject: Re: Slow loading of the kernel from efifs ? Message-ID: <20030226093438.GA17538@dhcp01.pn.xcllnt.net> References: <200302251946.h1PJktr26424@unix-os.sc.intel.com> <20030225213120.GA49775@ns1.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.3i Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, Feb 25, 2003 at 06:55:50PM -0800, Arun Sharma wrote: > > --- 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' */ Roughly, yes. I'm worried about the situation in which the handle is invalid or not known to efifs_get_unit(). Put differently: is the handle always one corresponding a file I/O protocol if not a network protocol or do we need to match transitively. I seem to recall that the handle attached to the image describes a device, not necessarily a file system. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message