From patchwork Thu Sep 10 08:41:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 53371 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id C674F22B26 for ; Thu, 10 Sep 2015 08:50:57 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf11431003lbb.2 for ; Thu, 10 Sep 2015 01:50:56 -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:cc:subject:date:message-id :mime-version:content-type:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=3xO9TBt3CNPh6ETYU6JyzQ48mwjkx2JlPIU2cN5PKcA=; b=R9D8Luq7Pow9ABAbgysf7YPuN3596ksM6+WY+0iSBqxLcOhbawXZDDt60jE4jovgq4 ARozHxntgW2EZzhEzVonzpLBq3Rn7NdNSFaJ30yWFBB13OxMQi5RW7eoFLLMFJX475Py 4XRSPdtskONs698Aaw5n33njt9K7WSg450IVdJInlkJO+Tu9KEjTsalAYqv5tCG4Y9u6 AW2RZWQXCN3Wh05SZiq9hyq7uo3LZ2NCgi2QtfJz/fud5Rz+SGZ+A20hBG8x9BoA0lzj ZEfipJIZ8HWFHV62+yMuk7WBfdbhJXaJstQrHmCuyZQ7Qv58IWRbZsyPllLoAzicqPMJ gPOA== X-Gm-Message-State: ALoCoQkjADNdpFf19LJ47ANiMNN3cpHxZxNee/7o+OlZoFlOOXHMUfyyc+0iv4+I9e/Kksx5gUOK X-Received: by 10.180.90.106 with SMTP id bv10mr502771wib.6.1441875056385; Thu, 10 Sep 2015 01:50:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.100 with SMTP id s4ls164458lag.83.gmail; Thu, 10 Sep 2015 01:50:56 -0700 (PDT) X-Received: by 10.112.181.162 with SMTP id dx2mr34249901lbc.75.1441875056237; Thu, 10 Sep 2015 01:50:56 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id wp2si9799408lbb.136.2015.09.10.01.50.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Sep 2015 01:50:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lanb10 with SMTP id b10so23058386lan.3 for ; Thu, 10 Sep 2015 01:50:56 -0700 (PDT) X-Received: by 10.152.161.232 with SMTP id xv8mr18052654lab.32.1441875056085; Thu, 10 Sep 2015 01:50:56 -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.112.59.35 with SMTP id w3csp818323lbq; Thu, 10 Sep 2015 01:50:54 -0700 (PDT) X-Received: by 10.68.65.3 with SMTP id t3mr81124838pbs.127.1441875054802; Thu, 10 Sep 2015 01:50:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gg4si17978489pac.75.2015.09.10.01.50.24; Thu, 10 Sep 2015 01:50:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751523AbbIJIuW (ORCPT + 7 others); Thu, 10 Sep 2015 04:50:22 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:18026 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751217AbbIJIuS (ORCPT ); Thu, 10 Sep 2015 04:50:18 -0400 Received: from 172.24.1.47 (EHLO SZXEML424-HUB.china.huawei.com) ([172.24.1.47]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CSC71314; Thu, 10 Sep 2015 16:42:50 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by SZXEML424-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.3.235.1; Thu, 10 Sep 2015 16:42:33 +0800 From: Shannon Zhao To: , CC: , , , , , , , , , , , , , , , Subject: [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters Date: Thu, 10 Sep 2015 16:41:56 +0800 Message-ID: <1441874516-11364-1-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mailfrom=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-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Shannon Zhao These EFI stub parameters are used to internal communication between EFI stub and Linux kernel and EFI stub creates these parameters. But for Xen on ARM when booting with UEFI, Xen will create a minimal DT providing these parameters for Dom0 and Dom0 is not only Linux kernel, but also other OS (such as FreeBSD) which will be used in the future. So here we plan to standardize the names by dropping the prefix "linux," and make them common to other OS. Also this will not break the compatibility since these parameters are used to internal communication between EFI stub and kernel. Signed-off-by: Shannon Zhao --- Look at [1] for the discussion about this in Xen ML. The purpose of this patch is to standardize the names to make Linux ARM kernel work on Xen with UEFI. Also it hopes other OS(e.g. FreeBSD), which will be used as Dom0 on Xen, could support this mechanism as well. [1]http://lists.xenproject.org/archives/html/xen-devel/2015-08/msg02250.html Documentation/arm/uefi.txt | 10 +++++----- drivers/firmware/efi/efi.c | 10 +++++----- drivers/firmware/efi/libstub/fdt.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt index d60030a..8c83243 100644 --- a/Documentation/arm/uefi.txt +++ b/Documentation/arm/uefi.txt @@ -45,18 +45,18 @@ following parameters: ________________________________________________________________________________ Name | Size | Description ================================================================================ -linux,uefi-system-table | 64-bit | Physical address of the UEFI System Table. +uefi-system-table | 64-bit | Physical address of the UEFI System Table. -------------------------------------------------------------------------------- -linux,uefi-mmap-start | 64-bit | Physical address of the UEFI memory map, +uefi-mmap-start | 64-bit | Physical address of the UEFI memory map, | | populated by the UEFI GetMemoryMap() call. -------------------------------------------------------------------------------- -linux,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map +uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map | | pointed to in previous entry. -------------------------------------------------------------------------------- -linux,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI +uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI | | memory map. -------------------------------------------------------------------------------- -linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. +uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. -------------------------------------------------------------------------------- linux,uefi-stub-kern-ver | string | Copy of linux_banner from build. -------------------------------------------------------------------------------- diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index d6144e3..3878715 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -481,11 +481,11 @@ static __initdata struct { int offset; int size; } dt_params[] = { - UEFI_PARAM("System Table", "linux,uefi-system-table", system_table), - UEFI_PARAM("MemMap Address", "linux,uefi-mmap-start", mmap), - UEFI_PARAM("MemMap Size", "linux,uefi-mmap-size", mmap_size), - UEFI_PARAM("MemMap Desc. Size", "linux,uefi-mmap-desc-size", desc_size), - UEFI_PARAM("MemMap Desc. Version", "linux,uefi-mmap-desc-ver", desc_ver) + UEFI_PARAM("System Table", "uefi-system-table", system_table), + UEFI_PARAM("MemMap Address", "uefi-mmap-start", mmap), + UEFI_PARAM("MemMap Size", "uefi-mmap-size", mmap_size), + UEFI_PARAM("MemMap Desc. Size", "uefi-mmap-desc-size", desc_size), + UEFI_PARAM("MemMap Desc. Version", "uefi-mmap-desc-ver", desc_ver) }; struct param_info { diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c index ef5d764..e94589a 100644 --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c @@ -118,31 +118,31 @@ efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, /* Add FDT entries for EFI runtime services in chosen node. */ node = fdt_subnode_offset(fdt, 0, "chosen"); fdt_val64 = cpu_to_fdt64((u64)(unsigned long)sys_table); - status = fdt_setprop(fdt, node, "linux,uefi-system-table", + status = fdt_setprop(fdt, node, "uefi-system-table", &fdt_val64, sizeof(fdt_val64)); if (status) goto fdt_set_fail; fdt_val64 = cpu_to_fdt64((u64)(unsigned long)memory_map); - status = fdt_setprop(fdt, node, "linux,uefi-mmap-start", + status = fdt_setprop(fdt, node, "uefi-mmap-start", &fdt_val64, sizeof(fdt_val64)); if (status) goto fdt_set_fail; fdt_val32 = cpu_to_fdt32(map_size); - status = fdt_setprop(fdt, node, "linux,uefi-mmap-size", + status = fdt_setprop(fdt, node, "uefi-mmap-size", &fdt_val32, sizeof(fdt_val32)); if (status) goto fdt_set_fail; fdt_val32 = cpu_to_fdt32(desc_size); - status = fdt_setprop(fdt, node, "linux,uefi-mmap-desc-size", + status = fdt_setprop(fdt, node, "uefi-mmap-desc-size", &fdt_val32, sizeof(fdt_val32)); if (status) goto fdt_set_fail; fdt_val32 = cpu_to_fdt32(desc_ver); - status = fdt_setprop(fdt, node, "linux,uefi-mmap-desc-ver", + status = fdt_setprop(fdt, node, "uefi-mmap-desc-ver", &fdt_val32, sizeof(fdt_val32)); if (status) goto fdt_set_fail;