On Saturday 28 October 2006 20:35, Hollis Blanchard wrote:
> On Sat, 2006-10-28 at 16:16 +0200, Yoshinori K. Okuji wrote:
> > On Friday 27 October 2006 21:19, Hollis Blanchard wrote:
> > > Comments please. Also see next mail to see how the PPC Linux loader
> > > uses it.
> >
> > So this still loads an image to paddr directly, right?
> >
> > I think we need these features:
> >
> > - an ability to pass an address to load an image
> >
> > - an ability to pass the size of a loading area
> >
> > - an ability to get the size of a loaded image
>
> The PowerPC loader patch I sent already does 1 and 3, and you can easily
> see how 2 can be done in the exact same way. Please look at that code,
> in particular 'calcsize' and 'offset_paddr'.

As for calcsize, I do not think it is a good idea to put this to 
architecture-specific code. We always need this feature, so it should be a 
part of the API.

As for offset_paddr, I do not like modifying a member of a header. This 
changes a read value, so the state of a header changes after calling 
grub_elf*_load. This kind of side effect often makes debugging harder. I 
prefer to specify an address more explicitly.

Okuji


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to