From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.151.62.67; helo=nwk-aaemail-lapp02.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from nwk-aaemail-lapp02.apple.com (nwk-aaemail-lapp02.apple.com [17.151.62.67]) (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 7D326211B5A25 for ; Thu, 17 Jan 2019 09:55:05 -0800 (PST) Received: from pps.filterd (nwk-aaemail-lapp02.apple.com [127.0.0.1]) by nwk-aaemail-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x0HHq4qs043196; Thu, 17 Jan 2019 09:55:03 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-transfer-encoding : content-type : sender : subject : from : in-reply-to : date : cc : message-id : references : to; s=20180706; bh=XlbWrC9FcyA2SJ/GUHuTGUzJD4yxSz2ZFh1QRw78c00=; b=IGs+eNTi8r3rl8aHgg6fUhX3b6C8FYqql6ZLiJT8dSPjtKoucgahxYRQJCwJq5EgzAY6 cm4siICpSMmTfucL3evAnDyE33XkNYt3ZxuVvjI2QpJ1Q29+l6BKc36ElGYyfXIZ1Ckn AC1v6p/crNKbBuJEyw7Yn3tgqReJAzRxUquFMYK+xIrYreU0ue7xozU4qH5aRjV/pt3p 3cH2smoOYJIyVCwFIcDxnaS3R04LNh6ybmf1dyjgKnsM72nNWsOgfofyNgkO2LvhaDjx o4Cg5fV3iffCdfIEhrC0ozn2o7N+KS3SYcfkMbsv8evtJgJTEgM+QseOQY3Ll8xw3ofn 3Q== Received: from ma1-mtap-s03.corp.apple.com (ma1-mtap-s03.corp.apple.com [17.40.76.7]) by nwk-aaemail-lapp02.apple.com with ESMTP id 2pydprrpr5-12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 17 Jan 2019 09:55:03 -0800 MIME-version: 1.0 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by ma1-mtap-s03.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PLH006V9LRO0RF0@ma1-mtap-s03.corp.apple.com>; Thu, 17 Jan 2019 09:55:02 -0800 (PST) Received: from process_viserion-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PLH00F00LO01A00@nwk-mmpp-sz10.apple.com>; Thu, 17 Jan 2019 09:55:01 -0800 (PST) X-Va-A: X-Va-T-CD: 51261b8211517578446660ad09054340 X-Va-E-CD: 685ac2fd9b1a4125622b70565570ea4f X-Va-R-CD: 6ec8b4e6b1bb3bf63fba0e32ce718723 X-Va-CD: 0 X-Va-ID: b749d28d-44c4-4420-ac9e-68db9d7aea73 X-V-A: X-V-T-CD: 51261b8211517578446660ad09054340 X-V-E-CD: 685ac2fd9b1a4125622b70565570ea4f X-V-R-CD: 6ec8b4e6b1bb3bf63fba0e32ce718723 X-V-CD: 0 X-V-ID: 70126661-eb66-4f61-b4ba-12b39dc39dd7 Received: from process_milters-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PLH00C00LMAP600@nwk-mmpp-sz10.apple.com>; Thu, 17 Jan 2019 09:55:01 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-17_06:,, signatures=0 Received: from [17.226.41.14] (unknown [17.226.41.14]) by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PLH00813LRO6980@nwk-mmpp-sz10.apple.com>; Thu, 17 Jan 2019 09:55:00 -0800 (PST) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Thu, 17 Jan 2019 09:54:35 -0800 Cc: edk2-devel@lists.01.org Message-id: References: To: galla rao X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-17_06:, , signatures=0 Subject: Re: Query on Variable Services 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: Thu, 17 Jan 2019 17:55:05 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Galla, The PCD value usually get set as the result of the build. EFI_MEMORY_RUNTIME attribute is used to request a virtual mapping from the OS. When the variable services are called from the OS the run in a virtual address space provided by the OS. Thus trying to access 0xFFE00000 would page fault. You can run the memmap command from the EFI Shell and see if bit 63 is set. If your SPI controller is a memory mapped hardware device you may also need to map the SPI register via EFI_MEMORY_RUNTIME. The SPI driver also needs to deal with the SetVirtualAddress map event to convert its pointers over to the new OS provided virtual memory space. Thanks, Andrew Fish > On Jan 17, 2019, at 9:23 AM, galla rao wrote: > > Hi All, > > Have a question for Variable services > > Given PCD's are initialized > > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase | 0xFFE00000 > > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase | > 0xFFE3E000 > > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase | > 0xFFE40000 > > Do i need to make these regions as *EFI_MEMORY_RUNTIME *through > *gDS->SetMemorySpaceAttributes* > > SPI Flash writes within BIOS works good! > > *when trying to change BootOrder from efibootmgr, the failure is seen* > > It would be useful if someone has faced this issue earlier and can respond > kindly. > > Best Regards > Galla > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel