From patchwork Fri Apr 22 03:26:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 1153 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:49:42 -0000 Delivered-To: patches@linaro.org Received: by 10.220.162.205 with SMTP id w13cs132810vcx; Thu, 21 Apr 2011 20:26:52 -0700 (PDT) Received: by 10.52.99.98 with SMTP id ep2mr976818vdb.159.1303442812027; Thu, 21 Apr 2011 20:26:52 -0700 (PDT) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx.google.com with ESMTP id p8si2289518vdu.176.2011.04.21.20.26.51; Thu, 21 Apr 2011 20:26:52 -0700 (PDT) Received-SPF: neutral (google.com: 24.201.245.36 is neither permitted nor denied by best guess record for domain of nicolas.pitre@linaro.org) client-ip=24.201.245.36; Authentication-Results: mx.google.com; spf=neutral (google.com: 24.201.245.36 is neither permitted nor denied by best guess record for domain of nicolas.pitre@linaro.org) smtp.mail=nicolas.pitre@linaro.org Content-transfer-encoding: 7BIT Received: from xanadu.home ([66.130.28.92]) by VL-MR-MRZ20.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTP id <0LK1006XAAW8S940@VL-MR-MRZ20.ip.videotron.ca> for patches@linaro.org; Thu, 21 Apr 2011 23:26:33 -0400 (EDT) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Tony Lindgren , Shawn Guo Subject: [PATCH 3/3] ARM: zImage: the page table memory must be considered before relocation Date: Thu, 21 Apr 2011 23:26:48 -0400 Message-id: <1303442808-14275-3-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 1.7.4 In-reply-to: <1303442808-14275-2-git-send-email-nicolas.pitre@linaro.org> References: <1303442808-14275-2-git-send-email-nicolas.pitre@linaro.org> For correctness, the initial page table located right before the decompressed kernel should be considered when determining if relocation is required. Signed-off-by: Nicolas Pitre --- arch/arm/boot/compressed/head.S | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 9169e79..83348f6 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -232,9 +232,10 @@ restart: adr r0, LC0 * r9 = size of decompressed image * r10 = end of this image, including bss/stack/malloc space if non XIP * We basically want: - * r4 >= r10 -> OK + * r4 - 16k page directory >= r10 -> OK * r4 + image length <= r5 -> OK */ + add r10, r10, #16384 cmp r4, r10 bhs wont_overwrite add r10, r4, r9