From patchwork Mon Jul 22 21:39:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 169438 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp8012374ilk; Mon, 22 Jul 2019 14:41:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3viYkHdb8NsE68JC9+h7rpdzN9v9mGZEerCGd3k1Vz9I9huDbStiO6n8wkWofqmYtR2Yh X-Received: by 2002:a6b:b497:: with SMTP id d145mr43914343iof.17.1563831683425; Mon, 22 Jul 2019 14:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563831683; cv=none; d=google.com; s=arc-20160816; b=YqdOMMXmfw0A/Y9TAmT1HiaXi4VJFQ/qMsAPxlbrxVnyAFvD0s1yTkVifg55Dagrsv G8nHfd8lcNZHxd9ZsMzU/PSjLkg+Uk5u+8iy43OF8IzVHFa9/3dlzo442ObwxoQMtTp8 EKS6MwxEQXI2S/3H9do4ZSZoYqC6fZLWWXlbE06RfpaOgl2+7Zj+GP6+RRV43Nx3nyMD NLe+gGPYvPyD6gGNmsRfAxSICjtO8ITwld+jJnqkQWwmVisLWlAhGtumYe5fSSLvH1NW Qejaerd9PQaw8ZM863+btBkfY29U0060Vzy1mzeM5riacggYlH2PB4LOpV/pYcWeXC1s /r+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=67QZHh0smnzbyzTnWJczGMY516WvhqgE1egeE+vZAEw=; b=QJ+qdP4tJQasycfYr57QEfHMfg1YAWAcQRJFHLvm1Ep4PA+pxzWWCtuxZS6LSQ4aLC pEAt29ptdI89qFFeF9XrcD2S1P4W3/tbidxnSZWwSE7cC18iSpD2Xss/rhsETj4VqF6S NAzNh0djI4zRI+sExfcaEiPtWY52M59fIrf+0Ra5y7cVY06iC9u6fBK5gCDVvVoKXHyo GcQEri5zH6IoVT5M4YtddAF8fR5PzgueEnLbQePEWmOADgSu6teQQcLgxYHrfNOxh4F0 hGs0cxDT3UYwEIhlznw3zCYJtDTqD0z0Q1+5iXDkZHdSMmD87wZMzjqwVGqASMDJXVDz hC5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id i5si34246471jan.51.2019.07.22.14.41.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jul 2019 14:41:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hpg2s-00038Y-Tg; Mon, 22 Jul 2019 21:40:34 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hpg2p-00031C-Qd for xen-devel@lists.xenproject.org; Mon, 22 Jul 2019 21:40:31 +0000 X-Inumbo-ID: 539a022c-acc9-11e9-91e4-e3ebf45ca47e Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 539a022c-acc9-11e9-91e4-e3ebf45ca47e; Mon, 22 Jul 2019 21:40:30 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 251911509; Mon, 22 Jul 2019 14:40:30 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 729C93F71F; Mon, 22 Jul 2019 14:40:29 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 22 Jul 2019 22:39:50 +0100 Message-Id: <20190722213958.5761-28-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190722213958.5761-1-julien.grall@arm.com> References: <20190722213958.5761-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 27/35] xen/arm32: head: Document create_pages_tables() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Document the behavior and the main registers usage within the function. Note that r6 is now only used within the function, so it does not need to be part of the common register. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Changes in v2: - Patch added --- xen/arch/arm/arm32/head.S | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 119d2a0df8..ef8979959b 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -53,7 +53,7 @@ * r3 - * r4 - * r5 - - * r6 - identity map in place + * r6 - * r7 - * r8 - DTB address (boot CPU only) * r9 - paddr(start) @@ -301,18 +301,26 @@ cpu_init_done: mov pc, r5 /* Return address is in r5 */ ENDPROC(cpu_init) +/* + * Rebuild the boot pagetable's first-level entries. The structure + * is described in mm.c. + * + * After the CPU enables paging it will add the fixmap mapping + * to these page tables, however this may clash with the 1:1 + * mapping. So each CPU must rebuild the page tables here with + * the 1:1 in place. + * + * Inputs: + * r9 : paddr(start) + * r10: phys offset + * + * Clobbers r0 - r6 + * + * Register usage within this function: + * r6 : Identity map in place + */ create_page_tables: /* - * Rebuild the boot pagetable's first-level entries. The structure - * is described in mm.c. - * - * After the CPU enables paging it will add the fixmap mapping - * to these page tables, however this may clash with the 1:1 - * mapping. So each CPU must rebuild the page tables here with - * the 1:1 in place. - */ - - /* * If Xen is loaded at exactly XEN_VIRT_START then we don't * need an additional 1:1 mapping, the virtual mapping will * suffice.