From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in23.apple.com (mail-out23.apple.com [17.171.2.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C572021E3EA67 for ; Tue, 19 Sep 2017 22:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1505884674; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5mDKkYmN3sbaWjFN6XHmzopO82DzHNud7mvGYLwMiwE=; b=AgtxLvePHua4EOuye6a1IXjyZgUuACxOEIzVayYkmpxUIsI3jqqJlC0a9c8RtrL0 H2iATOZteX1719SMhgkh5b/F63sVvEyXKiCFO9YXjtXU9JGP5SGRGpCFs2YkVKIt OWZ6bTsMfLRTi0dWP9ijAeG30GpCVQ8jvMUn/ta7VJosCaXRDJkhqB5jurkr32T9 u6HKPb53Y/mC+51egLuyC/5kskw6aG0glYNs4ZuASRLo2YPJb8qO07/wbI412sZM Qc35uhGeLqQgOvZp6OveRGTo0asUGG/uaTMJT/PojS4kCy/NrRHlmUMOP+CuJqnC TOc/JMV8WaZ3+5AiiQjsDA==; Received: from relay24.apple.com (relay24.apple.com [17.171.128.105]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in23.apple.com (Apple Secure Mail Relay) with SMTP id 16.86.06084.20AF1C95; Tue, 19 Sep 2017 22:17:54 -0700 (PDT) X-AuditID: 11ab0217-36bff700000017c4-e0-59c1fa020412 Received: from ma1-mmpp-sz10.apple.com (ma1-mmpp-sz10.apple.com [17.171.128.150]) by relay24.apple.com (Apple SCV relay) with SMTP id E4.24.07437.20AF1C95; Tue, 19 Sep 2017 22:17:54 -0700 (PDT) MIME-version: 1.0 Received: from [17.234.248.165] by ma1-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.1.3.20170825 64bit (built Aug 25 2017)) with ESMTPSA id <0OWK00C34C1RIFC0@ma1-mmpp-sz10.apple.com>; Tue, 19 Sep 2017 22:17:54 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish Message-id: <4CC33CC2-86D1-490E-A67E-12D751745121@apple.com> Date: Tue, 19 Sep 2017 22:17:51 -0700 In-reply-to: Cc: Ard Biesheuvel , "edk2-devel@lists.01.org" , Vladimir Olovyannikov , "Olivier.Martin@arm.com" To: Udit Kumar References: X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsUiuLohU5fp18FIg+3/jCz+f9jNaLHn0FFm i6PrvrBbrFhyiM3i/eLjzA6sHmvmrWH0mHX/LJvHnWt72Dy6Z/9j8dj4bgdTAGsUl01Kak5m WWqRvl0CV0bLqV7mgmVzGSveTvzE0sA4t52xi5GDQ0LAROLDmrAuRi4OIYH1TBJrF09h62Lk BIsvbPrNCpE4zCjx93EXI0iCV0BQ4sfkeywgzcwCYRJPr8RC1HxjlFgxbzVYs7CAuMS7M5uY QWw2AWWJFfM/sEP02kh0TZ/HDFFjK/FjSw8LiM0ioCqxZ+pldpCZnALJEr2zRUBmMgvcYJR4 sesz2EwRoDm3G6YwQyy7wyIxee0URohLZSVuzb4ElpAQOMMm8fnVYcYJjEKzkBw7C+FYkDCz gJbE90etUGF5iYPnZSHCmhLP7n1ih7C1JZ68u8C6gJFtFaNwbmJmjm5mnpGxXmJBQU6qXnJ+ 7iZGcCwxie9g/Pza8BCjAAejEg9vgNXBSCHWxLLiytxDjNIcLErivPw/gUIC6YklqdmpqQWp RfFFpTmpxYcYmTg4pRoYjVZ9LdgXo+zGli3GaOq54M+8HbbnWpfvtzfPezDlwT4nji8Hdv9R /JoQ/u9GFgPnK5VXLKWcHkpr7gk8c49X1GCZdXXunPSoVP5vxtI6O04EHN73SjBAa93m1sZX J3kZj8xmYP/kveZcSS/f/7aJwb9Ozrr9X2Ky0UrJE+z/N9+JkZ9aW/ltshJLcUaioRZzUXEi AHyimZqGAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsUiuLphmi7Tr4ORBtsnalr8/7Cb0WLPoaPM FkfXfWG3WLHkEJvF+8XHmR1YPdbMW8PoMev+WTaPO9f2sHl0z/7H4rHx3Q6mANYoLpuU1JzM stQifbsEroyWU73MBcvmMla8nfiJpYFxbjtjFyMnh4SAicTCpt+sXYxcHEIChxkl/j7uAkvw CghK/Jh8j6WLkYODWSBM4umVWIiab4wSK+atZgOpERYQl3h3ZhMziM0moCyxYv4HdoheG4mu 6fOYIWpsJX5s6WEBsVkEVCX2TL3MDjKTUyBZone2CMhMZoEbjBIvdn0GmykCNOd2wxRmiGV3 WCQmr50CdamsxK3Zl5gnMPLPQnLfLIT7QMLMAloS3x+1QoXlJQ6el4UIa0o8u/eJHcLWlnjy 7gLrAka2VYyCRak5iZVGJnqJBQU5qXrJ+bmbGCHBn7mD8dZNs0OMAhyMSjy8K2wORgqxJpYV V+YeYpTgYFYS4b3xFSjEm5JYWZValB9fVJqTWnyIUZqDRUmcV3gmUEogPbEkNTs1tSC1CCbL xMEp1cDYOu/Bq1nz3CT6H2Uv0Wu75rxo14yiJPYtx8OYog/fFIr6wLt45bdjEm/03oY6/ukt 5JlwR7HFo/amo9DuVJETdzperDmjnPIhudQvolnotn+XS3ZeaMAvGZ2VCo3r7G5IfXqk6L3T LSQxs+eD1GlLWaVlOrHqRvIe7yyuFC1gdplf3vyC+5USS3FGoqEWc1FxIgATMUVHegIAAA== X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: Storing Non volatile variables on SD/NAND X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 05:14:52 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Sep 19, 2017, at 10:09 PM, Udit Kumar wrote: > >>> On Sep 19, 2017, at 9:27 PM, Udit Kumar wrote: >>> >>> >>>> On 18 September 2017 at 22:28, Udit Kumar wrote: >>>>> Thanks Vladimir, >>>>> With your design, you did delayed write to eMMC due to sharing with >>>>> OS. But it works for you:) Say if eMMC controllers offers you a >>>>> status bit, if eMMC storage is being used for not. Then this could >>>>> be possible to >>>> update at run time, both OS/UEFI needs to check and wait if >>>> controller is being used. >>>> >>>> That is the problem right there. The nice thing about a firmware spec >>>> is that you don't have to care about how it was implemented if you adhere to >> the API rules. >>> >>> Yup, we are fine as long as long UEFI firmware is stored on dedicated media. >>> >>>> Imposing additional restrictions (such as requiring the OS to be >>>> careful about not using the eMMC when it may be in use by the >>>> firmware) defeats the purpose of using UEFI, since you won't be able to use a >> generic OS anyway. >>>> >>> >>> Hmm, so far, I haven't come across where UEFI specs says, we need a >>> separate Storage for firmware. (May be I missed some part of specs) >>> Irrespective of storage media, we have this problem if OS and UEFI >>> shares same storage. >>> >> >> Udit, >> >> Can you point out the spec that states you can't boot Linux and Windows at the >> same time on a PC? :) >> >> When you write a spec it is not practical do document what is not possible, you >> can only document the API the rest is implied by the implementation. So for >> example the UEFI spec does not document why the firmware and OS can't share >> a hardware device, just like you can't have 2 operating systems running on bare >> metal at the same time. It is a little like Occam's Razor the reason that the >> firmware and the OS can not share a hardware device is the mechanics of how >> to share a hardware device is not defined in the spec, thus it is not part of the >> API and not possible. > > Right, This is left on implementation how to put firmware and OS. > Ideally, keeping both storage separate is best case, no need to sync between two. > > My reply to Ard, was to highlight that in any case (NOR or eMMC /NAND) > if we are keeping OS and firmware on same storage, we will have same > issue not limited to eMMC. > > For some requirement, if we need to keep firmware and OS on same media, > Then implementation should make sure there is exclusive access (be it > NOR controller, SD controller etc). > Udit, Sorry I'm a little swamped on my email right now and might be a little behind on the thread.... Yea the only way to realistically Implement an EFI runtime service in UEFI is to have UEFI own the hardware device. There is no architecture for sharing the device, and the type of device is not really relevant. Thanks, Andrew Fish > Thanks > Udit > >> Thanks, >> >> Andrew Fish >> >>>>> For sure, some synchronization issues need to be ironed out (or >>>>> maybe I am >>>> just dreaming here). >>>>> >>>>> On part 2) where you forked VariableRuntime driver , could we think >>>>> of updating VariableRuntime driver, to support non-XIP or memory >>>>> mapped >>>> devices. >>>>> >>>> >>>> I think being able to support non-memorymapped FV volumes for the >>>> variable store would be a big improvement. This does require changes >>>> to both the FaultTolerantWrite drivers and the VariableRuntime >>>> drivers, which both appear in PEI, DXE and SMM flavors, and require >>>> thorough review due to the security impact bugs have in this layer, so this is a >> rather large chunk of work to take on. >>> >>> Thanks, your list is longer than what I was thinking :-) I think, for >>> embedded world with UEFI, later or sooner, this will be required. >>> >>> Thanks >>> Udit >>> _______________________________________________ >>> edk2-devel mailing list >>> edk2-devel@lists.01.org >>> https://lists.01.org/mailman/listinfo/edk2-devel