From patchwork Fri Jan 15 06:55:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 59835 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp356767lbb; Thu, 14 Jan 2016 22:56:59 -0800 (PST) X-Received: by 10.66.140.14 with SMTP id rc14mr12627251pab.65.1452841017240; Thu, 14 Jan 2016 22:56:57 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m68si14541332pfj.133.2016.01.14.22.56.56; Thu, 14 Jan 2016 22:56:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754805AbcAOG4y (ORCPT + 29 others); Fri, 15 Jan 2016 01:56:54 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:13175 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754456AbcAOG4l (ORCPT ); Fri, 15 Jan 2016 01:56:41 -0500 Received: from 172.24.1.51 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.1.51]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DDB64114; Fri, 15 Jan 2016 14:56:33 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.235.1; Fri, 15 Jan 2016 14:56:24 +0800 From: Shannon Zhao To: , , , CC: , , , , , , , , , Subject: [PATCH v2 12/16] ARM: Xen: Document UEFI support on Xen ARM virtual platforms Date: Fri, 15 Jan 2016 14:55:25 +0800 Message-ID: <1452840929-19612-13-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1452840929-19612-1-git-send-email-zhaoshenglong@huawei.com> References: <1452840929-19612-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.56989822.009E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c6516136be70a41c0266ce6f44ba0175 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shannon Zhao Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could scan this to get the UEFI information. Signed-off-by: Shannon Zhao --- Documentation/devicetree/bindings/arm/xen.txt | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) -- 2.0.4 diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt index 0f7b9c2..fbc17ae 100644 --- a/Documentation/devicetree/bindings/arm/xen.txt +++ b/Documentation/devicetree/bindings/arm/xen.txt @@ -15,6 +15,36 @@ the following properties: - interrupts: the interrupt used by Xen to inject event notifications. A GIC node is also required. +To support UEFI on Xen ARM virtual platforms, Xen pupulates 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. +-------------------------------------------------------------------------------- + +Below is the format of the mmap descriptor. +typedef struct { + u32 type; + u32 pad; + u64 phys_addr; + u64 virt_addr; + u64 num_pages; + u64 attribute; +} efi_memory_desc_t; Example (assuming #address-cells = <2> and #size-cells = <2>): @@ -22,4 +52,16 @@ 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>; + }; }; + +These "xen,uefi-*" parameters are similar to those in Documentation/arm/uefi.txt +which are used by normal UEFI. But to Xen ARM virtual platforms, it needs to +introduce a Xen specific UEFI and it doesn't want to mix with normal UEFI. +Therefore, it defines these parameters under /hypervisor node.