[gPXE-devel] [PATCH v3][lkrn] add ramdisk support
Stefan Hajnoczi
stefanha at gmail.com
Thu Jun 3 03:01:02 EDT 2010
On Thu, Jun 3, 2010 at 4:06 AM, Wu Fengguang <fengguang.wu at intel.com> 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
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.
Stefan
More information about the gPXE-devel
mailing list