grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cdrom access patch


From: Vesa Jääskeläinen
Subject: Re: [PATCH] cdrom access patch
Date: Sat, 15 Mar 2008 10:49:24 +0200
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

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 :)

Thanks,
Vesa Jääskeläinen






reply via email to

[Prev in Thread] Current Thread [Next in Thread]