From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Us8h2-0007tQ-9T for qemu-devel@nongnu.org; Thu, 27 Jun 2013 05:40:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Us8gt-0000YN-2s for qemu-devel@nongnu.org; Thu, 27 Jun 2013 05:40:44 -0400 Received: from multi.imgtec.com ([194.200.65.239]:57829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Us8gs-0000WZ-SD for qemu-devel@nongnu.org; Thu, 27 Jun 2013 05:40:34 -0400 Message-ID: <51CC0888.6030205@imgtec.com> Date: Thu, 27 Jun 2013 10:40:24 +0100 From: James Hogan MIME-Version: 1.0 References: <1372318527-8202-1-git-send-email-leon.alrae@imgtec.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/mips: align initrd to 64KB to avoid kernel error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: yongbok.kim@imgtec.com, cristian.cuna@imgtec.com, Leon Alrae , qemu-devel@nongnu.org, aurelien@aurel32.net On 27/06/13 09:12, Peter Maydell wrote: > On 27 June 2013 08:35, Leon Alrae wrote: >> From: James Hogan >> >> The Linux kernel can be configured to use 64KB pages, but it also >> requires initrd to be page aligned. Therefore, to be safe, align the >> initrd to 64KB using a new INITRD_PAGE_MASK rather than >> TARGET_PAGE_MASK. > > This is kind of similar to the ARM bug fixed in 98ed805c3. > I wonder if we ought to have a per-CPU #define for "largest > possible page alignment for this architecture" as well as > "smallest possible" (the latter being TARGET_PAGE_MASK). Yes, very similar. Although "largest possible" is probably quite Linux specific so I'm not sure where it should really go (some arches support pages up to 4MB and beyond, but obviously they're never used as basic pages by Linux). LINUX_MAXPAGE_MASK? > This patch is a reasonable enough way to fix things though, > so I'm not objecting to it. > > Aside: given the repetitive nature of the context hunks > observable in this patch, it looks like it ought to be > possible to abstract out some of the initrd/kernel load > code from all those boards... That thought did occur to me too :) Cheers James