From patchwork Fri Apr 1 15:49:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 8726351 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4B7BDC0553 for ; Fri, 1 Apr 2016 15:59:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CA1A201FA for ; Fri, 1 Apr 2016 15:59:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58EF420155 for ; Fri, 1 Apr 2016 15:59:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1am1S0-0002QO-4R; Fri, 01 Apr 2016 15:57:32 +0000 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1am1MQ-0003lF-Ib for linux-arm-kernel@lists.infradead.org; Fri, 01 Apr 2016 15:51:53 +0000 Received: by mail-pa0-x22f.google.com with SMTP id zm5so94007235pac.0 for ; Fri, 01 Apr 2016 08:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6d3kD/k5+TjSkmmKOokdQE45WzF40+QUpM7HToUpHv8=; b=Rn9vB83dctfOgZc9aeJ5MYa1h+GwAudFtYP8mg3tim6YWBWeLoOS+mx3phvv/L8/wP LE61lvt8EqjnfcEnydo5j7kVrPvme0ew7rMTwChGDELYOeyNfwCZtnT3Hu3xyoC90/E2 RgzJxGLuB+K/yZdhMyTfAZUVuJoVGF0ck60tQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6d3kD/k5+TjSkmmKOokdQE45WzF40+QUpM7HToUpHv8=; b=JRTPrN/akVClyIaTsho3/yHr4d3Sc63DwRj3zysTZV+i+Ze3ByTET03bsrEmXBgBgn oBKBYpb7ducMECKslDdXWFjXg0u77shDgdesZgbku0hmyYuE7YAQLvMwPddbM/YWOHwO 8mhv0nGMaF5yUabKbO6CX19JHmXYaKGwyeSZmiF1AGNiQiDIrRVrwmA2pDVzP9EefqAV AD9t/S7HwaaSMm26LNZj0ZPYxlh5odNsuW+bHSRAv9X7cPNcY9K5GhxOGbd38H3Zp12K LUxp05Tre470i+GiJC7KW8fmYZ9SumSY/z6lDIGirycvRsvCGRWezmKkQo4VraZ32kX5 xLzQ== X-Gm-Message-State: AD7BkJLegegukuFfdRgE5YaWpISir+kNqW0rXrG59XgkdxqaFUiCCaqYy7s1W89mK11k7fAc X-Received: by 10.66.189.166 with SMTP id gj6mr32133588pac.158.1459525887344; Fri, 01 Apr 2016 08:51:27 -0700 (PDT) Received: from localhost.localdomain ([167.160.116.218]) by smtp.gmail.com with ESMTPSA id yj1sm22536791pac.16.2016.04.01.08.51.18 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Apr 2016 08:51:26 -0700 (PDT) From: Shannon Zhao To: linux-arm-kernel@lists.infradead.org, stefano.stabellini@citrix.com Subject: [PATCH v10 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms Date: Fri, 1 Apr 2016 23:49:11 +0800 Message-Id: <1459525755-36968-14-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1459525755-36968-1-git-send-email-shannon.zhao@linaro.org> References: <1459525755-36968-1-git-send-email-shannon.zhao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160401_085147_351598_B1A279EA X-CRM114-Status: GOOD ( 11.33 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-efi@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, peter.huangpeng@huawei.com, julien.grall@arm.com, david.vrabel@citrix.com, zhaoshenglong@huawei.com, xen-devel@lists.xen.org, shannon.zhao@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could scan this to get the UEFI information. CC: Rob Herring Signed-off-by: Shannon Zhao Acked-by: Rob Herring Reviewed-by: Stefano Stabellini --- Documentation/devicetree/bindings/arm/xen.txt | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt index 0f7b9c2..c9b9321 100644 --- a/Documentation/devicetree/bindings/arm/xen.txt +++ b/Documentation/devicetree/bindings/arm/xen.txt @@ -11,10 +11,32 @@ the following properties: memory where the grant table should be mapped to, using an HYPERVISOR_memory_op hypercall. The memory region is large enough to map the whole grant table (it is larger or equal to gnttab_max_grant_frames()). + This property is unnecessary when booting Dom0 using ACPI. - interrupts: the interrupt used by Xen to inject event notifications. A GIC node is also required. + This property is unnecessary when booting Dom0 using ACPI. +To support UEFI on Xen ARM virtual platforms, Xen populates the FDT "uefi" node +under /hypervisor with following parameters: + +________________________________________________________________________________ +Name | Size | Description +================================================================================ +xen,uefi-system-table | 64-bit | Guest physical address of the UEFI System + | | Table. +-------------------------------------------------------------------------------- +xen,uefi-mmap-start | 64-bit | Guest physical address of the UEFI memory + | | map. +-------------------------------------------------------------------------------- +xen,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map + | | pointed to in previous entry. +-------------------------------------------------------------------------------- +xen,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI + | | memory map. +-------------------------------------------------------------------------------- +xen,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. +-------------------------------------------------------------------------------- Example (assuming #address-cells = <2> and #size-cells = <2>): @@ -22,4 +44,17 @@ hypervisor { compatible = "xen,xen-4.3", "xen,xen"; reg = <0 0xb0000000 0 0x20000>; interrupts = <1 15 0xf08>; + uefi { + xen,uefi-system-table = <0xXXXXXXXX>; + xen,uefi-mmap-start = <0xXXXXXXXX>; + xen,uefi-mmap-size = <0xXXXXXXXX>; + xen,uefi-mmap-desc-size = <0xXXXXXXXX>; + xen,uefi-mmap-desc-ver = <0xXXXXXXXX>; + }; }; + +The format and meaning of the "xen,uefi-*" parameters are similar to those in +Documentation/arm/uefi.txt, which are provided by the regular UEFI stub. However +they differ because they are provided by the Xen hypervisor, together with a set +of UEFI runtime services implemented via hypercalls, see +http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,platform.h.html.