From: Chen Baozi Subject: [PATCH] xen/arm64: Avoid trying to map of paddr(start) as a block entry in boot_pgtable Date: Thu, 9 Jan 2014 16:59:11 +0800 Message-ID: <1389257951-1650-1-git-send-email-baozich@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W1BSc-00059B-Tg for xen-devel@lists.xenproject.org; Thu, 09 Jan 2014 08:59:31 +0000 Received: by mail-pb0-f54.google.com with SMTP id un15so2769684pbc.27 for ; Thu, 09 Jan 2014 00:59:27 -0800 (PST) List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Chen Baozi List-Id: xen-devel@lists.xenproject.org Block entries are only supported after first-level table. Since the physical address of 'start' is usally less than 512GB, this section of codes wouldn't be executed and therefore useless. Remove this part of codes to avoid potiential bug if it tries to map paddr(start) as a level-0 block entry by accident. Thus, we need to specified that xen image should be loaded at the address less than 512GB. Signed-off-by: Chen Baozi --- xen/arch/arm/arm64/head.S | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index 31afdd0..bebddf0 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -266,18 +266,7 @@ skip_bss: orr x2, x1, x3 /* + rights for linear PT */ str x2, [x4, #0] /* Map it in slot 0 */ - /* ... map of paddr(start) in boot_pgtable */ - lsr x1, x19, #39 /* Offset of base paddr in boot_pgtable */ - cbz x1, 1f /* It's in slot 0, map in boot_first - * or boot_second later on */ - - lsl x2, x1, #39 /* Base address for 512GB mapping */ - mov x3, #PT_MEM /* x2 := Section mapping */ - orr x2, x2, x3 - lsl x1, x1, #3 /* x1 := Slot offset */ - str x2, [x4, x1] /* Mapping of paddr(start)*/ - -1: /* Setup boot_first: */ + /* Setup boot_first: */ ldr x4, =boot_first /* Next level into boot_first */ add x4, x4, x20 /* x4 := paddr(boot_first) */ -- 1.8.4.3