From owner-freebsd-arm@freebsd.org Mon Sep 14 09:35:03 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93BA5A0207D for ; Mon, 14 Sep 2015 09:35:03 +0000 (UTC) (envelope-from zhaoshenglong@huawei.com) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [58.251.152.64]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "myname.my.domain", Issuer "www.mirapoint.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 667AD1F3D for ; Mon, 14 Sep 2015 09:35:01 +0000 (UTC) (envelope-from zhaoshenglong@huawei.com) Received: from 172.24.1.47 (EHLO szxeml422-hub.china.huawei.com) ([172.24.1.47]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CUX65972; Mon, 14 Sep 2015 17:31:51 +0800 (CST) Received: from [127.0.0.1] (10.177.16.142) by szxeml422-hub.china.huawei.com (10.82.67.152) with Microsoft SMTP Server id 14.3.235.1; Mon, 14 Sep 2015 17:31:35 +0800 Message-ID: <55F693F5.8030203@huawei.com> Date: Mon, 14 Sep 2015 17:31:33 +0800 From: Shannon Zhao User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Ard Biesheuvel CC: Daniel Kiper , Stefano Stabellini , Mark Rutland , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-efi@vger.kernel.org" , "Ian.Campbell@citrix.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "leif.lindholm@linaro.org" , "xen-devel@lists.xen.org" , "julien.grall@citrix.com" , "freebsd-arm@freebsd.org" , "matt.fleming@intel.com" , "christoffer.dall@linaro.org" , "jbeulich@suse.com" , "peter.huangpeng@huawei.com" , "shannon.zhao@linaro.org" , Konrad Rzeszutek Wilk Subject: Re: [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters References: <20150910112418.GC29293@leverpostej> <20150910121514.GE29293@leverpostej> <20150910144938.GI29293@leverpostej> <20150910162302.GN29293@leverpostej> <20150911124643.GB4530@olila.local.net-space.pl> <20150911154534.GD4530@olila.local.net-space.pl> <55F6886D.1090900@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mailman-Approved-At: Mon, 14 Sep 2015 11:22:33 +0000 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2015 09:35:03 -0000 On 2015/9/14 17:09, Ard Biesheuvel wrote: > On 14 September 2015 at 10:42, Shannon Zhao wrote: > [..] > >> >> It only needs to apply following patch to fix a bug in Linux kernel when >> mapping EFI_MEMORY_RUNTIME memory. >> > > Could you explain why you think efi_virtmap_init() should fail if > there are no EFI_MEMORY_RUNTIME regions? > My understanding is that if there are no EFI_MEMORY_RUNTIME regions, it means we can't use runtime services and should not set the bit EFI_RUNTIME_SERVICES of efi.flags. But if efi_virtmap_init() return true, the bit will be set. > The absence of such regions is allowed by the spec, so > efi_virtmap_init() is correct imo to return success. > Sorry, not well know about the spec. Could you point out where the spec says this? > If you are trying to work around the issue where Xen does not expose > any Runtime Services regions, there is simply no way to do that and be > still UEFI compliant. I have suggested before that we should perhaps > tolerate this anyway, by considering the case where the EFI System > Table has a NULL runtime services pointer. But rigging > efi_virtmap_init() like this is really not the way to achieve that. > -- Shannon