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: Replacing the legacy "map" command
Date: Tue, 27 May 2008 19:04:19 +0300	[thread overview]
Message-ID: <483C3103.8080903@nic.fi> (raw)
In-Reply-To: <bda1cfca0805261836m6e44c78bjda1cfe88335b8754@mail.gmail.com>

Hi Javier,

Welcome!

Javier Martín wrote:
> This message is mainly concerned with "how should I implement it"?
> Since this functionality is AFAIK exclusive to the x86/amd64 PC-BIOS
> target, it should be confined there, but there are at least two paths
> of action that I can think of:
>  1.- Given that only the chain OS loader makes use of such a switch, I
> could add it as an option to the "chainloader" command. This is the
> simplest path, as it would only require modifying
> loader/i386/pc/chainloader* and kern/i386/pc/startup.S (where
> grub_chainloader_real_boot resides). Such an option would most
> probably be named something like "mapdrivefirst", as in "chainloader
> --mapdrivefirst (hd1)+1".

Do not got to this route.

>  2.- The other option would be to add a new command that managed the
> BIOS drive mappings (like, "biosdrivesmap", duh), with three main
> options: "show", "map" and "reset". I'm still unsure of what files
> should be modified for this change, and this might be overkill.
> No matter how the UI (the commands) actually ends up, the mappings
> would just be stored in a variable, and not applied until the "boot"
> command is issued. Thus, actual functionality should probably be
> implemented in grub_chainloader_real_boot, and the logic is pretty
> simple, with most of it available in the GRUB Legacy code.

Well what we actually want is to have support to install interrup 
service chains for real mode. There are couple of users for this 
service, one of them being drive mapping (to int 13h) and then El Torito 
support (to int 13h).

So you would have function to install interrupt chain and this would be 
installed right away, or at point when you are leaving grub. You may 
want to have those services even if you are not chainloading. In example 
you have multiboot capable kernel, but you want to still use BIOS services.

In case of drive mapping it would work in user interface in same way as 
in GRUB Legacy. But what happens under the hood:

1. You load drive mapping module (map.mod?)
2. User configures mapping with map command (or similar)
3. If even one map command is issued this installs custom software 
interrupt handler to tweak int13h requests. Map command data is 
installed to this handler.

Thanks,
Vesa Jääskeläinen



  parent reply	other threads:[~2008-05-27 16:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27  1:36 Replacing the legacy "map" command Javier Martín
2008-05-27 15:59 ` Pavel Roskin
2008-05-27 16:15   ` Urja Rannikko
2008-05-28 14:24   ` Robert Millan
2008-05-30  0:55     ` Pavel Roskin
2008-05-30  2:13       ` Javier Martín
2008-05-30  3:48         ` Pavel Roskin
2008-05-30  7:19           ` Robert Millan
     [not found]         ` <-5961521231976305315@unknownmsgid>
2008-05-31 23:15           ` Javier Martín
2008-06-01  7:18             ` Vesa Jääskeläinen
2008-05-27 16:04 ` Vesa Jääskeläinen [this message]
2008-05-27 16:18   ` Urja Rannikko
     [not found] <483c317b.0c1e640a.2bd9.7c7eSMTPIN_ADDED@mx.google.com>
2008-05-27 21:47 ` Javier Martín
2008-05-28  0:19   ` Replacing the legacy 'map' command Tomáš Ebenlendr
  -- strict thread matches above, loose matches on Subject: below --
2008-05-28 13:17 Javier Martín
2008-05-28 16:23 ` Vesa Jääskeläinen

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=483C3103.8080903@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.