On Thu, Jun 03, 2010 at 03:01:02PM +0800, Stefan Hajnoczi wrote:
> On Thu, Jun 3, 2010 at 4:06 AM, Wu Fengguang <[email protected]> wrote:
> > --- gpxe.orig/src/arch/i386/prefix/libprefix.S  2010-06-03 
> > 10:38:34.000000000 +0800
> > +++ gpxe/src/arch/i386/prefix/libprefix.S       2010-06-03 
> > 10:40:58.000000000 +0800
> > @@ -704,6 +704,11 @@ install_prealloc:
> >        /* Set up %ds for access to .data16 */
> >        movw    %bx, %ds
> >
> > +       movl    %es:ramdisk_image, %ecx
> > +       movl    %ecx, lkrn_ramdisk
> > +       movl    %es:ramdisk_size, %ecx
> > +       movl    %ecx, lkrn_ramdisk_size
> > +
> >  #ifdef KEEP_IT_REAL
> >        /* Initialise libkir */
> >        movw    %ax, (init_libkir_vector+2)
> >
> 
> I would put this in lkrnprefix.S instead.  If you look at pxeprefix.S

Yes the V2 patch has the code in lkrnprefix.S, however..

> there is code to copy an undi device structure for .prefix.data to the
> .data16 section:
> 
>         /* Copy our undi_device structure to the preloaded_undi variable */
>         movw    %bx, %es
>         movw    $preloaded_undi, %di
>         movw    $undi_device, %si
>         movw    $undi_device_size, %cx
>         rep movsb
> 
> This is done after install has returned to pxeprefix.S.

..when install has returned, the gpxe relocation has done.
So we missed the chance to relocate to some place _outside of_ the
ramdisk region.

Normally it's very unlikely that the small ramdisk script get
overwritten in gPXE relocation. So I can do this as long as you are OK
with it.

Thanks,
Fengguang
_______________________________________________
gPXE-devel mailing list
[email protected]
http://etherboot.org/mailman/listinfo/gpxe-devel

Reply via email to