Date: Wed, 26 Feb 2003 01:34:38 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Arun Sharma <arun.sharma@intel.com> Cc: freebsd-ia64@FreeBSD.ORG Subject: Re: Slow loading of the kernel from efifs ? Message-ID: <20030226093438.GA17538@dhcp01.pn.xcllnt.net> In-Reply-To: <uy943lphl.fsf@unix-os.sc.intel.com> References: <200302251946.h1PJktr26424@unix-os.sc.intel.com> <20030225213120.GA49775@ns1.xcllnt.net> <uy943lphl.fsf@unix-os.sc.intel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030226093438.GA17538>