From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 9AB5C2115F527 for ; Sat, 13 Oct 2018 14:28:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F81E80F7D; Sat, 13 Oct 2018 21:28:08 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-6.rdu2.redhat.com [10.10.120.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7766227A3C9; Sat, 13 Oct 2018 21:28:06 +0000 (UTC) To: Sami Mujawar , edk2-devel@lists.01.org Cc: ruiyu.ni@intel.com, nd@arm.com, Stephanie.Hughes-Fitt@arm.com, star.zeng@intel.com, Grant Likely References: <20181012144009.48732-1-sami.mujawar@arm.com> <20181012144009.48732-4-sami.mujawar@arm.com> From: Laszlo Ersek Message-ID: Date: Sat, 13 Oct 2018 23:28:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181012144009.48732-4-sami.mujawar@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 13 Oct 2018 21:28:08 +0000 (UTC) Subject: Re: [PATCH v1 3/6] MdeModulePkg: Map persistent (NV) memory X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Oct 2018 21:28:08 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit (+Grant) On 10/12/18 16:40, Sami Mujawar wrote: > Some platforms are able to preserve a memory range across > system resets. This memory can be used for the Non-Volatile > variables storage. The PcdEmuVariableNvStoreReserved is > used to specify this option. This is the wrong approach, for two reasons. (1) At a technical level, suck hacks are usually implemented by provding a platform-specific FVB (firmware volume block) protocol / driver, underneath the normal FTW and Variable drivers. The FVB implementation can (technically) fake a "persistent" flash device in RAM that is actually volatile. (2) At a design level, this is an extremely bad idea though. Such variables are only halfway non-volatile, and that fact always comes back to bite users, sooner or later. I speak from experience with OVMF, but more recently, there has been discussion on the USWG list too, about platforms that can only fake non-volatility. I can't provide more details on this open list about that, so I'll just give you a Message-Id, and a Mantis ticket. https://mantis.uefi.org/mantis/view.php?id=1961 Thanks, Laszlo