[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] cdrom access patch
From: |
Bean |
Subject: |
Re: [PATCH] cdrom access patch |
Date: |
Sat, 15 Mar 2008 18:54:32 +0800 |
On Sat, Mar 15, 2008 at 4:49 PM, Vesa Jääskeläinen <address@hidden> wrote:
> Bean wrote:
> > On Sat, Mar 15, 2008 at 4:58 AM, Vesa Jääskeläinen <address@hidden> 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 == cd then
> add_alias(ALIAS_TYPE_CD, disk)
>
> in ata:
> if disk.drivetype == 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 following:
>
> biosdisk:
> disk.bios_device_nro = 0x0;
> add_alias(ALIAS_TYPE_FLOPPY, disk) // disk becomes as alias (fd0)
>
> disk.bios_device_nro = 0x80;
> add_alias(ALIAS_TYPE_HDD, disk) // disk becomes as alias (hd0)
>
> disk.bios_device_nro = 200;
> add_alias(ALIAS_TYPE_CDROM, disk) // disk becomes as alias (cd0)
>
> ata: // second ATA controller on system
> disk.bios_device_nro = 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 reading.
>
> 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.
--
Bean
- Re: [PATCH] cdrom access patch, (continued)
- Re: [PATCH] cdrom access patch, Bean, 2008/03/12
- Re: [PATCH] cdrom access patch, Christian Franke, 2008/03/12
- Re: [PATCH] cdrom access patch, Christian Franke, 2008/03/13
- Re: [PATCH] cdrom access patch, Bean, 2008/03/14
- Re: [PATCH] cdrom access patch, Pavel Roskin, 2008/03/14
- Re: [PATCH] cdrom access patch, Bean, 2008/03/14
- Re: [PATCH] cdrom access patch, Bean, 2008/03/14
- Re: [PATCH] cdrom access patch, Vesa Jääskeläinen, 2008/03/14
- Re: [PATCH] cdrom access patch, Bean, 2008/03/15
- Re: [PATCH] cdrom access patch, Vesa Jääskeläinen, 2008/03/15
- Re: [PATCH] cdrom access patch,
Bean <=
- Re: [PATCH] cdrom access patch, Christian Franke, 2008/03/15
- Re: [PATCH] cdrom access patch, Pavel Roskin, 2008/03/17
- Re: [PATCH] cdrom access patch, Bean, 2008/03/17
- Re: [PATCH] cdrom access patch, Pavel Roskin, 2008/03/19
- Re: [PATCH] cdrom access patch, Bean, 2008/03/20
- Re: [PATCH] cdrom access patch, Bean, 2008/03/24
- Re: [PATCH] cdrom access patch, Christian Franke, 2008/03/14
[PATCH] cdrom access patch, Kalamatee, 2008/03/06
Re: [PATCH] cdrom access patch, Kalamatee, 2008/03/08