From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PX5If-0000tH-Lf for mharc-grub-devel@gnu.org; Mon, 27 Dec 2010 00:07:13 -0500 Received: from [140.186.70.92] (port=59660 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PX5Ic-0000sx-RR for grub-devel@gnu.org; Mon, 27 Dec 2010 00:07:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PX5Ib-0005tI-R3 for grub-devel@gnu.org; Mon, 27 Dec 2010 00:07:10 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:43058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PX5Ib-0005tC-GM for grub-devel@gnu.org; Mon, 27 Dec 2010 00:07:09 -0500 Received: by fxm12 with SMTP id 12so2308194fxm.0 for ; Sun, 26 Dec 2010 21:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=DMTEZyJSFF61w9fLWgGb6mARcBm6P/qggrgbaORE2EM=; b=oRGSEBBMYMMMZ+jCaWvWwI/AMOLNZnLIGLKzqTDTNTPwy5T7vBtaIK+JNatTotH9+L F2eqg3PFtJT3arFcQ4yf5uUvJAa5PbQFcUkwCneuVmWKd8X/nn43unKlpGDCAyM/ukwz 2KMA3DdMCUXTkMp0VYdRmdKubbAht/+nFYm1w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=lsyXIXrGnNKiJnklCa+HyIBwPI384av6iBmWjKdx/38iHRUPXPzNt64wIh0iCGmpqi aaEYzwActTWJkRMHMDJYWZl9U89XvRk3wFj1NM3grZvVCN1kg5Btbx05AMIkwSVW71Wj 5hCswn7qe1GfGRae17MRf+bCFlcxVjpcd0TFM= Received: by 10.223.95.203 with SMTP id e11mr5188510fan.60.1293426428706; Sun, 26 Dec 2010 21:07:08 -0800 (PST) Received: from debian.bg45.phnet (gprs25.swisscom-mobile.ch [193.247.250.25]) by mx.google.com with ESMTPS id y3sm2898792fai.38.2010.12.26.21.07.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 26 Dec 2010 21:07:07 -0800 (PST) Message-ID: <4D181EF1.5040909@gmail.com> Date: Mon, 27 Dec 2010 06:06:57 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101211 Icedove/3.0.11 MIME-Version: 1.0 To: grub-devel@gnu.org References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig58EF4B5D5AD9BF73EFBFA238" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: reed solomon breaks larger pxe images X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2010 05:07:11 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig58EF4B5D5AD9BF73EFBFA238 Content-Type: multipart/mixed; boundary="------------000401040300010303040502" This is a multi-part message in MIME format. --------------000401040300010303040502 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/27/2010 05:30 AM, Seth Goldberg wrote: > Hi, > > While trying to test pxe booting, I noticed that creating a pxe > image larger than around 100k causes the system hard-hang after > control is transferred to pxegrub. I narrowed it down to an unknown > problem in grub_reed_solomon_recover (called from startup.S).=20 > Unconditionally jumping over the call allows the system to continue to > proceed to the menu. So, if you're trying to build a pxe image with a > lot of modules, and you get a hard hang, try this: > Attached patch should fix the problem. > =3D=3D=3D modified file 'grub-core/kern/i386/pc/startup.S' > --- grub-core/kern/i386/pc/startup.S 2010-12-24 06:29:28 +0000 > +++ grub-core/kern/i386/pc/startup.S 2010-12-27 04:26:25 +0000 > @@ -147,6 +147,8 @@ > incl %eax > call grub_gate_a20 > > + jmp post_reed_solomon > + > movl EXT_C(grub_compressed_size), %edx > addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - > GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART), %edx > movl reed_solomon_redundancy, %ecx > > > > --S > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------000401040300010303040502 Content-Type: text/x-diff; name="rs.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="rs.diff" =3D=3D=3D modified file 'grub-core/kern/i386/pc/startup.S' --- grub-core/kern/i386/pc/startup.S 2010-12-04 16:19:26 +0000 +++ grub-core/kern/i386/pc/startup.S 2010-12-27 04:51:59 +0000 @@ -151,8 +151,6 @@ addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - GRUB_KERNEL_I386_PC_NO_REED_SO= LOMON_PART), %edx movl reed_solomon_redundancy, %ecx leal _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART, %eax - testl %edx, %edx - jz post_reed_solomon call EXT_C (grub_reed_solomon_recover) jmp post_reed_solomon =20 =3D=3D=3D modified file 'grub-core/lib/reed_solomon.c' --- grub-core/lib/reed_solomon.c 2010-12-21 16:51:08 +0000 +++ grub-core/lib/reed_solomon.c 2010-12-27 05:06:01 +0000 @@ -372,6 +372,10 @@ grub_size_t rr =3D (rs + SECTOR_SIZE - 1 - i) / SECTOR_SIZE; gf_single_t m[ds + rr]; =20 + /* Nothing to do. */ + if (!ds || !rr) + continue; + for (j =3D 0; j < (int) ds; j++) m[j] =3D ptr[SECTOR_SIZE * j + i]; for (j =3D 0; j < (int) rr; j++) @@ -414,6 +418,10 @@ gf_single_t *ptr =3D buffer; gf_single_t *rptr =3D ptr + s; =20 + /* Nothing to do. */ + if (!rs) + return; + while (s > 0) { grub_size_t tt; @@ -441,6 +449,10 @@ gf_single_t *ptr =3D ptr_; gf_single_t *rptr =3D ptr + s; =20 + /* Nothing to do. */ + if (!rs) + return; + #if defined (STANDALONE) init_inverts (); #endif @@ -454,8 +466,8 @@ tt =3D cs + crs; if (tt > MAX_BLOCK_SIZE) { - cs =3D cs * MAX_BLOCK_SIZE / tt; - crs =3D crs * MAX_BLOCK_SIZE / tt; + cs =3D (cs * MAX_BLOCK_SIZE) / tt; + crs =3D (crs * MAX_BLOCK_SIZE) / tt; } decode_block (ptr, cs, rptr, crs); ptr +=3D cs; --------------000401040300010303040502-- --------------enig58EF4B5D5AD9BF73EFBFA238 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk0YHvcACgkQNak7dOguQgmScgD/Z6Ta3pyMD0PmDB8Tz4nOPWhv zMqBikubxuRs1wPtLHUBAKEdNyQRyirqHJJDRP1nosFzpAyxvfJa7Wq24ayeg6al =FjHM -----END PGP SIGNATURE----- --------------enig58EF4B5D5AD9BF73EFBFA238--