All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] cdrom access patch
Date: Sat, 15 Mar 2008 10:49:24 +0200	[thread overview]
Message-ID: <47DB8D94.3090402@nic.fi> (raw)
In-Reply-To: <ca0f59980803150034t5faf16dek227dffe156b3c9fc@mail.gmail.com>

Bean wrote:
> On Sat, Mar 15, 2008 at 4:58 AM, Vesa Jääskeläinen <chaac@nic.fi> 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	other threads:[~2008-03-15  8:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05  8:49 [PATCH] cdrom access patch Bean
2008-03-07 15:37 ` Vesa Jääskeläinen
2008-03-09 15:33   ` Bean
2008-03-10 15:53     ` Bean
2008-03-11 21:10       ` Christian Franke
2008-03-12  5:26         ` Bean
2008-03-12  6:52           ` Christian Franke
2008-03-13 22:59           ` Christian Franke
2008-03-14  5:33             ` Bean
2008-03-14 17:28               ` Pavel Roskin
2008-03-14 19:58                 ` Bean
2008-03-14 20:56                   ` Bean
2008-03-14 20:58                     ` Vesa Jääskeläinen
2008-03-15  7:34                       ` Bean
2008-03-15  8:49                         ` Vesa Jääskeläinen [this message]
2008-03-15 10:54                           ` Bean
2008-03-15 19:01                           ` Christian Franke
2008-03-17  4:31                         ` Pavel Roskin
2008-03-17  6:21                           ` Bean
2008-03-19 22:09                             ` Pavel Roskin
2008-03-20  6:06                               ` Bean
2008-03-24  4:15                                 ` Bean
2008-03-14 23:20                     ` Christian Franke
  -- strict thread matches above, loose matches on Subject: below --
2008-03-06 23:58 Kalamatee
2008-03-08 20:16 Kalamatee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47DB8D94.3090402@nic.fi \
    --to=chaac@nic.fi \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.