grub-devel
[Top][All Lists]
Advanced

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

Re: [ppc patch] grub-mkimage


From: Marco Gerards
Subject: Re: [ppc patch] grub-mkimage
Date: Fri, 03 Dec 2004 16:10:45 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hollis Blanchard <address@hidden> writes:

>>> It may be possible to place module variables into their own section
>>> containing nothing else, yet still in a LOAD segment.  Then
>>> grub-mkimage
>>> could parse the *section* table (right now it only does segments) and
>>> overwrite the contents of this section to inform the runtime of the
>>> module location. I'm not convinced it's worth the effort.
>>
>> Whatever is the most flexible seems the best to me...
>
> I was aiming for simplicity really... What's the simplest possible way
> we can inform grubof of the location of its modules? :)

The solution with the other LOAD segment sounded the cleanest to me.
The one that assumed it would follow immediately after the rest of GRUB
sounded a bit hard to me.  I mean, can you really rely on such
assumptions?

>> AS Hollis said, I'm working on the relocator for PPC at the moment.
>> It is quite easy, but PPC_REL24 is a bit more complex.  It is used for
>> relative jumps.  That means the module should be loaded close to
>> grubof, which IMHO really sucks...
>
> 24-bit offsets give you a 16 MiB range, is that really a problem?

The modules are loaded into the free memory of grubof.  And grubof is
loaded to where it is linked, IIRC.  So I think that would cause
problems. :)

>> I am now trying to get option 2 to work first (by using black magic to
>> get everything loaded at the right address ;)) and when module loading
>> works for me I will try to make 3 work.
>
> I agree this makes sense. I'm not sure that option 3 will end up being
> necessary, but option 2 is obviously needed.

Right, and it is finished now.  I am quite sure it is required, but we
can test it.

>> Does someone else think I
>> try to do something else, or can someone help a bit somehow?  As you
>> might have noticed I really suck at this stuff and doing it just
>> because no one else does. ;)
>
> I've never seen relocation code before, but if it's still not working
> when I get back I'd be happy to take a look...

Cool.

Thanks,
Marco





reply via email to

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