All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub_dl_unload_all()
Date: Thu, 24 Jan 2008 13:26:47 +0100	[thread overview]
Message-ID: <20080124122647.GD2249@thorin> (raw)
In-Reply-To: <878x2f5t8v.fsf@xs4all.nl>

On Thu, Jan 24, 2008 at 12:59:44PM +0100, Marco Gerards wrote:
> >
> > I remember about the video mode issue, but IIRC it only affects i386-pc.  Also,
> > I don't think anyone will assume serial port to be in a particular state during
> > boot.  Do we have similar concerns on ieee1275 ?
> 
> If a video driver is used, yes.

grub_ofconsole_fini does nothing, except unregistering the driver in kernel.

> Also if memory is claimed, it has to
> be released when "chainloading".

It may be so, but unloading modules doesn't release the memory we claimed
in grub_machine_init (AFAICS).

> Besides that, there are many scenarios where something has to be
> restored.  Especially when drivers are involved.  If you switch
> scancode sets for keyboards (do you?),

I do, but then again this doesn't affect anyone in practice (there's a
chance it could affect OFW when running "exit", although that's not the
case, "exit" is not so important, and it is broken on XO for other reasons
anyway).

> changing the IDT, perhaps for
> the ATA driver this will become required?

No ATA driver here (yet).

> It's a good mechanism to
> have.

Yes, I agree it is good to have, but what is the current status?  Is there a
real risk that loading OS image overwrites our boot routine?  If not, I'd
rather just mimic what powerpc is doing untill proper relocation can be
implemented.

Actually, if the risk is minimal, I'd mimic what powerpc is doing anyway,
since it'll take a while to implement this, and the i386-ieee1275 remains
broken because of it.

> > Makes it sound like we'll have to:
> >
> >   - add a relocator in our final jump routine
> >   - put OS image in dynamic memory
> >   - put the relocator/final routine in dynamic memory
> >   - unload all modules
> >   - jump to the relocator/final routine, passing it the parameters indicating
> >     it has to copy OS image from dynamic memory to the target area, whichever
> >     it may be.
> 
> This has to be implemented, no way around this.  Hollis played with
> this approach, you might want to contact him.

I had preliminar (working!) code to implement this, but it's a hack.  We really
need to think this over first, as it might imply some redesign of the memory
manager, etc.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)



  reply	other threads:[~2008-01-24 12:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23 19:58 grub_dl_unload_all() Robert Millan
2008-01-24  8:57 ` grub_dl_unload_all() Yoshinori K. Okuji
2008-01-24 11:47   ` grub_dl_unload_all() Robert Millan
2008-01-24 11:59     ` grub_dl_unload_all() Marco Gerards
2008-01-24 12:26       ` Robert Millan [this message]
2008-01-24 12:48         ` grub_dl_unload_all() Robert Millan

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=20080124122647.GD2249@thorin \
    --to=rmh@aybabtu.com \
    --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.