Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JaU2D-0002eE-4P for mharc-grub-devel@gnu.org; Sat, 15 Mar 2008 06:54:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JaU2A-0002cA-3I for grub-devel@gnu.org; Sat, 15 Mar 2008 06:54:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JaU28-0002aZ-61 for grub-devel@gnu.org; Sat, 15 Mar 2008 06:54:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JaU27-0002aQ-W1 for grub-devel@gnu.org; Sat, 15 Mar 2008 06:54:36 -0400 Received: from ti-out-0910.google.com ([209.85.142.190]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JaU27-00032e-2E for grub-devel@gnu.org; Sat, 15 Mar 2008 06:54:35 -0400 Received: by ti-out-0910.google.com with SMTP id a20so1523502tia.10 for ; Sat, 15 Mar 2008 03:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=/YQQyNWjs/1tEZkIJoR8ngQs/a/Cx7uKIWRl/jNh670=; b=JNAvcFFHTDevNZQ6re+PQxX21D21SKEx3ZaNLg61YLqFHvZfgqQv8TbjPkmHfsrKAbcQUWvl7USWLKvMizSFutcY4+N2GRQcPFAnEmKpwfbuRtbnUCtfySf1EPw408muPR0hSDRguENR7Yci1nrlfi6ftIn2tHLZa4KcZ/aXboQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cl5KLzYP0Rvmz5+F1L31EBgv8VJyJYvVw/Ns6guP4KSdn23/lsYZNmnvtrt6l3OOYWptmSDxvlhbiNA1C1sA3Dk5+5p60RDXF9dKm1x+lUhkwiAC0Jy4a6B9trwzPbpfRXzlNbXM1bsrLQS1lp7AdZhntwTF1HNbUA++ntIwoQA= Received: by 10.110.11.10 with SMTP id 10mr3718346tik.43.1205578472958; Sat, 15 Mar 2008 03:54:32 -0700 (PDT) Received: by 10.110.62.19 with HTTP; Sat, 15 Mar 2008 03:54:32 -0700 (PDT) Message-ID: Date: Sat, 15 Mar 2008 18:54:32 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <47DB8D94.3090402@nic.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <47D9B1CF.30801@t-online.de> <1205515683.2321.18.camel@dv> <47DAE712.6070805@nic.fi> <47DB8D94.3090402@nic.fi> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] cdrom access patch X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 10:54:38 -0000 On Sat, Mar 15, 2008 at 4:49 PM, Vesa J=E4=E4skel=E4inen wro= te: > Bean wrote: > > On Sat, Mar 15, 2008 at 4:58 AM, Vesa J=E4=E4skel=E4inen wrote: > >> Bean wrote: > >> > Hi, > >> > > >> > I have an idea, why not have both names, (hdN) and (cd), hopefully > >> > this will make everyone happy. > >> > > >> > >> Hi Bean, > >> > >> I think I suggested it already ;) > >> > >> Device alias is ok for me :) (and use of cd[nro] is more favorable). > > > > Ok, the new patch add (cd0) alias for cdrom device, the corresponding > > (hdN) is also present. > > I am just wondering that this implementation is limited to cd0, you > cannot have cd1. > > Consider following scenario: > User boots with biosdisk enabled from bootable CD, gets bootdrive from > there assigns (cd0) for this device. User loads ata module to get access > to more removable disk drives (cd/dvd/bdr) and then system would assign > new device aliases like cd1, cd2 depending on how many device there is > in system. > > This could be done by something like this: > > in biosdisk: > if disk.drivetype =3D=3D cd then > add_alias(ALIAS_TYPE_CD, disk) > > in ata: > if disk.drivetype =3D=3D cd then > add_alias(ALIAS_TYPE_CD, disk) > > Idea of this is that if there are multiple CD's you get new aliases > identifier always incremented by one. With this you could even do follow= ing: > > biosdisk: > disk.bios_device_nro =3D 0x0; > add_alias(ALIAS_TYPE_FLOPPY, disk) // disk becomes as alias (fd0) > > disk.bios_device_nro =3D 0x80; > add_alias(ALIAS_TYPE_HDD, disk) // disk becomes as alias (hd0) > > disk.bios_device_nro =3D 200; > add_alias(ALIAS_TYPE_CDROM, disk) // disk becomes as alias (cd0) > > ata: // second ATA controller on system > disk.bios_device_nro =3D NOTSET; // -1 (?) > add_alias(ALIAS_TYPE_HDD, disk) // disk becomes as alias (hd1) > > And then have a disk as a generic disk info block where there is > function pointers to in example biosdisk or ata modules to handle readin= g. > > In case if user installs emulation layer for in example ATA hdd in this > scanario, then this bios_device_nro would be filled. > > In here also biosdisk will be checked if it supports outputting of > physical device information using EDD, and if it does, then it can > filter out ata accesses for those device that bios already supports. > > In this system there could be following standard names based on driver > for devices: > > (pcbios0) // floppy > (pcbios128) // hdd > (pcbios200) // cd > > (ata0) > (ata2) > (atapi1) > (atapi3) > > Or even more deeper with physical chain of devices like: > (pciXXXX/ata0) > (pcbios/disk128) > > Just something to think about :) This is a great idea, in fact, we don't even need to call add_alias explicitly. We can add a new field device_type in disk, when it's TYPE_xxx, we create the alias automatically in grub_device_iterate. --=20 Bean