On Sat, 07 Apr 2012 01:36:44 -0400, Daniel Kahn Gillmor 
<d...@fifthhorseman.net> wrote:
> In particular, i suspect that *after* the bootloader has turned over
> control to the kernel (memtest in this case), the PXE-driven NIC is
> continuing to DMA received packets into active RAM.

phcoder sent me the patch below to address the PXE DMA issue.

I tested it against the current bzr head.

My testing grub.cfg is just:

----------------------
serial --speed=115200
terminal_input console serial
terminal_output console serial

linux16 (pxe)/memtest86+.bin console=ttyS0,115200n8
boot
----------------------

Using grub bzr head without this patch, i get these RAM "failures" on
the net-booted ThinkCentre M70 within ~15 seconds on roughly every other
boot (i haven't found the right packets to inject to force the DMA to
happen consistently, alas).

Using grub bzr head with the patch, i have been unable to reproduce
a single RAM failures in more than 20 trials.

I think this patch resolves the issue, and should go into the mainline.

Thanks, phcoder!

        --dkg

=== modified file 'grub-core/net/drivers/i386/pc/pxe.c'
--- grub-core/net/drivers/i386/pc/pxe.c	2012-02-08 18:26:01 +0000
+++ grub-core/net/drivers/i386/pc/pxe.c	2012-04-11 12:53:17 +0000
@@ -278,9 +278,14 @@
 grub_pxe_close (const struct grub_net_card *dev __attribute__ ((unused)))
 {
   if (pxe_rm_entry)
-    grub_pxe_call (GRUB_PXENV_UNDI_CLOSE,
-		   (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR,
-		   pxe_rm_entry);
+    {
+      grub_pxe_call (GRUB_PXENV_UNDI_CLOSE,
+		     (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR,
+		     pxe_rm_entry);
+      grub_pxe_call (GRUB_PXENV_UNDI_SHUTDOWN,
+		     (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR,
+		     pxe_rm_entry);
+    }
 }
 
 static grub_err_t

Attachment: pgplVUhF2vmVX.pgp
Description: PGP signature

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

Reply via email to