From patchwork Mon Jul 14 16:39:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 33619 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4D59820CAD for ; Mon, 14 Jul 2014 16:40:37 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id 29sf13453973yhl.6 for ; Mon, 14 Jul 2014 09:40:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=XFQcJl9b+J7tGEtzvNNGQcz8ujyb4qx4z2CepYmmpmM=; b=dH88Er9ioBy4vuTI+djPYcZIVWFH9MzCvZaktmFRPiqWsI1F+MrrPSBB8OtlBW7eGu WuC38oNvvKaWwGAuls1M83p/kSKTiWKCIBZqDiS8OOoez8pc1SnF6Adh+lpDwz2+bCyo PJeodeJhCSkKAxpwkuD2yC6CRBaBw+Zj0OXROj6FoOiK2qfuPQ7wTaCF6Lx9LZS+svb5 URsESOwwit5BpRl6sseuyOjQ3qdmTTirXmT/K+f2JIPq0LBPfEj9gULadKacIPTEQ+t7 IjjR1rWlRpAKF+irfgrTCMq4EOymAChYRR8xMwJ1DMXzTgbWCmuMd9u3tjzq1G122dYZ 1m/g== X-Gm-Message-State: ALoCoQlAOh/RK/XYv04sOHtPjt3tuLzsOu0w4BimPm/US9FOyarMO7FaUGwqOXIGU2ZstD98Mk8W X-Received: by 10.224.172.193 with SMTP id m1mr8252568qaz.8.1405356037017; Mon, 14 Jul 2014 09:40:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.100 with SMTP id y91ls1107721qgy.60.gmail; Mon, 14 Jul 2014 09:40:36 -0700 (PDT) X-Received: by 10.52.172.5 with SMTP id ay5mr1322438vdc.38.1405356036936; Mon, 14 Jul 2014 09:40:36 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id f15si5537283vdt.65.2014.07.14.09.40.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jul 2014 09:40:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so4012110vcb.1 for ; Mon, 14 Jul 2014 09:40:36 -0700 (PDT) X-Received: by 10.52.0.177 with SMTP id 17mr14374019vdf.12.1405356036855; Mon, 14 Jul 2014 09:40:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp148829vcb; Mon, 14 Jul 2014 09:40:36 -0700 (PDT) X-Received: by 10.42.49.196 with SMTP id x4mr4223244icf.85.1405356036313; Mon, 14 Jul 2014 09:40:36 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id p10si12413733igj.57.2014.07.14.09.40.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jul 2014 09:40:36 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X6jHt-0007Mx-IV; Mon, 14 Jul 2014 16:39:37 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X6jHs-0007MA-EJ for xen-devel@lists.xen.org; Mon, 14 Jul 2014 16:39:36 +0000 Received: from [85.158.139.211:35053] by server-11.bemta-5.messagelabs.com id 68/5F-31786-7C704C35; Mon, 14 Jul 2014 16:39:35 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-11.tower-206.messagelabs.com!1405355973!11316931!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12933 invoked from network); 14 Jul 2014 16:39:35 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-11.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 14 Jul 2014 16:39:35 -0000 X-IronPort-AV: E=Sophos;i="5.01,659,1400025600"; d="scan'208";a="152333834" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 14 Jul 2014 16:39:12 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Mon, 14 Jul 2014 12:39:11 -0400 Received: from drall.uk.xensource.com ([10.80.16.71]) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1X6jHS-0008Rc-Do; Mon, 14 Jul 2014 17:39:11 +0100 Received: by drall.uk.xensource.com (sSMTP sendmail emulation); Mon, 14 Jul 2014 17:39:10 +0100 From: Ian Campbell To: Date: Mon, 14 Jul 2014 17:39:06 +0100 Message-ID: <1405355950-6461-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405355930.31863.5.camel@kazak.uk.xensource.com> References: <1405355930.31863.5.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH 1/5] xen: arm: correct whitespace/comments and use #defines in head.S X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Ian Campbell Acked-by: Julien Grall --- xen/arch/arm/arm32/head.S | 11 +++++------ xen/arch/arm/arm64/head.S | 15 +++++++-------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 8a6594a..1319a13 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -266,10 +266,10 @@ cpu_init_done: strd r2, r3, [r4, #0] /* Map it in slot 0 */ /* ... map of paddr(start) in boot_pgtable */ - lsrs r1, r9, #30 /* Offset of base paddr in boot_pgtable */ + lsrs r1, r9, #FIRST_SHIFT /* Offset of base paddr in boot_pgtable */ beq 1f /* If it is in slot 0 then map in boot_second * later on */ - lsl r2, r1, #30 /* Base address for 1GB mapping */ + lsl r2, r1, #FIRST_SHIFT /* Base address for 1GB mapping */ orr r2, r2, #PT_UPPER(MEM) /* r2:r3 := section map */ orr r2, r2, #PT_LOWER(MEM) lsl r1, r1, #3 /* r1 := Slot offset */ @@ -277,7 +277,7 @@ cpu_init_done: 1: /* Setup boot_second: */ ldr r4, =boot_second - add r4, r4, r10 /* r1 := paddr (boot_second) */ + add r4, r4, r10 /* r4 := paddr (boot_second) */ lsr r2, r9, #SECOND_SHIFT /* Base address for 2MB mapping */ lsl r2, r2, #SECOND_SHIFT @@ -320,7 +320,7 @@ paging: dsb #if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */ /* Non-boot CPUs don't need to rebuild the fixmap itself, just - * the mapping from boot_second to xen_fixmap */ + * the mapping from boot_second to xen_fixmap */ teq r12, #0 bne 1f @@ -397,8 +397,7 @@ launch: beq start_xen /* and disappear into the land of C */ b start_secondary /* (to the appropriate entry point) */ -/* Fail-stop - * r0: string explaining why */ +/* Fail-stop */ fail: PRINT("- Boot failed -\r\n") 1: wfe b 1b diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index 2a13527..883640c 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -267,11 +267,11 @@ skip_bss: 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 */ + lsr x1, x19, #ZEROETH_SHIFT/* 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 */ + lsl x2, x1, #ZEROETH_SHIFT /* Base address for 512GB mapping */ mov x3, #PT_MEM /* x2 := Section mapping */ orr x2, x2, x3 lsl x1, x1, #3 /* x1 := Slot offset */ @@ -284,7 +284,7 @@ skip_bss: /* ... map boot_second in boot_first[0] */ ldr x1, =boot_second add x1, x1, x20 /* x1 := paddr(boot_second) */ - mov x3, #PT_PT /* x2 := table map of boot_first */ + mov x3, #PT_PT /* x2 := table map of boot_second */ orr x2, x1, x3 /* + rights for linear PT */ str x2, [x4, #0] /* Map it in slot 0 */ @@ -300,8 +300,8 @@ skip_bss: str x2, [x4, x1] /* Create mapping of paddr(start)*/ 1: /* Setup boot_second: */ - ldr x4, =boot_second - add x4, x4, x20 /* x4 := paddr (boot_second) */ + ldr x4, =boot_second /* Next level into boot_second */ + add x4, x4, x20 /* x4 := paddr(boot_second) */ lsr x2, x19, #SECOND_SHIFT /* Base address for 2MB mapping */ lsl x2, x2, #SECOND_SHIFT @@ -345,7 +345,7 @@ paging: dsb sy #if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */ /* Non-boot CPUs don't need to rebuild the fixmap itself, just - * the mapping from boot_second to xen_fixmap */ + * the mapping from boot_second to xen_fixmap */ cbnz x22, 1f /* Add UART to the fixmap table */ @@ -417,8 +417,7 @@ launch: cbz x22, start_xen /* and disappear into the land of C */ b start_secondary /* (to the appropriate entry point) */ -/* Fail-stop - * r0: string explaining why */ +/* Fail-stop */ fail: PRINT("- Boot failed -\r\n") 1: wfe b 1b