[Top][All Lists]

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

Re: grub_dl_unload_all()

From: Robert Millan
Subject: Re: grub_dl_unload_all()
Date: Thu, 24 Jan 2008 13:26:47 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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

> 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

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 via email to

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