From patchwork Mon Aug 12 17:30:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 171110 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3120230ily; Mon, 12 Aug 2019 10:31:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFvx0KMEUdRw1GHBnDJsgrfkkLDU1PAYcrSHl84DGOtVq+D8uCZhF1tdgcFmJw6VhiVRif X-Received: by 2002:a5e:9314:: with SMTP id k20mr2845503iom.235.1565631107101; Mon, 12 Aug 2019 10:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565631107; cv=none; d=google.com; s=arc-20160816; b=gCLxG2xU83pwoFH2+XTr1MQcS8757aSg9CFU0nJpwzt9Bc1uVR2q64aomtuKc/fqvq Xi9Slm2dh7zjDJDal4cTcWoCkFjprMtuh0W9mpmOXIrZubJ6axyk/C72GYsR0tvf7whE XScHZ7YbX6+Fegtj8/IACDUPmO0A8qeyI3crAHUBzgeZO1s2JBQguTn8zvZHKo/YnOV2 pkpigphMeWbTxZ0Uo2Kbli6H6YQeeoTi2BWluEz4+4ls/7g+4btiJk5kK87MF2ecJn3z vKaOToULT5XDemJAdIEgnElFHw2eDL2qPrq8w/o9sQLkbVyaF/FSO87DsH4pZie1a9MU PL/g== 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=pitq2vQJhD3+2BaWEic4+RL19L5gGzvW/cF6m0kH14I=; b=qeO108rr+ZOKvERlZo7BkXNnLO2zFqdYtSL3igCRv7H1RmuMY9JvwRw4aguBdlQzNv y9ag0INn5RbQc7JvG/xat2bZTOAsp5S2yysIexMYKEyZpqTqyjGihl4bnTHR5LZfwAE6 KhF67HtZ7hJFHM8rN1dSQ+dWpO501fLGXFuxP7GekUVuTqr6q/O7u2kle2bmgQ2I5q6z j7uuKcJvFC05oJLMFbqXdnimem0Dw5lorCFK3uluvbsnCvDhEgANXzpXF52YMomiYVXc 60qdpzrT8XVEw9qgIUmW0f6M7qa1QBDyBl2n9tMC1i+NwVs6JZmE9da11yS5yfiga5V4 Ly9w== 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 i16si145136076jak.37.2019.08.12.10.31.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Aug 2019 10:31:47 -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 1hxE9c-0006py-Kc; Mon, 12 Aug 2019 17:30:44 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxE9b-0006oW-8g for xen-devel@lists.xenproject.org; Mon, 12 Aug 2019 17:30:43 +0000 X-Inumbo-ID: e88a2bd5-bd26-11e9-8980-bc764e045a96 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id e88a2bd5-bd26-11e9-8980-bc764e045a96; Mon, 12 Aug 2019 17:30:41 +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 BC16C19BF; Mon, 12 Aug 2019 10:30:41 -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 1655B3F706; Mon, 12 Aug 2019 10:30:40 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 12 Aug 2019 18:30:07 +0100 Message-Id: <20190812173019.11956-17-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190812173019.11956-1-julien.grall@arm.com> References: <20190812173019.11956-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v3 16/28] 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 v3: - Add Stefano's acked-by 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 1189ed6c47..83f8774e2a 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) @@ -302,18 +302,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.