On 18 September 2017 at 06:52, Udit Kumar <[email protected]> wrote: > Hi EDK-2 Experts, > I am looking to store NV variables on SD/NAND device. > > While browsing, I came across some old post at link, > http://feishare.com/efimail/messages/20130319-1700-Re__edk2__Regarding_storing_Boot_Device_Config_in_persistent_memory-Olivier_Martin.html > > Looks like, this is possible easily.
That's a bold statement dude :-) >>> What you need to support Non-Volatile UEFI variables is a Non-Volatile >>> Memory. And also a driver that implements the EFI Firmware Volume Block >>> protocol for this NVM device. > > But MdeModulePkg does Copymem from NV variable start memory to some allocated > buffers. With SD/NAND Copymem is not possible, Is this something changes > since 2013 or there are some other way to use SD/NAND > No, SD/MMC cannot currently be used as the backing store for the EFI variable store. The problem is that the variable protocols are architectural protocols in PI that need to be present before any driver model drivers are dispatched, and so putting the variable store on block devices is not something that the PI software architecture currently supports (unless you reimplement the whole driver stack as DXE drivers). On top of that, it is almost impossible to share a block device that sits behind a controller between the firmware and the OS at runtime (i.e., for SetVariable() calls made by efibootmgr under Linux), because only a single agent can take ownership of the controller at any given time. (You /could/ dedicate the SD/MMC to the firmware entirely, and boot from SATA or USB, but this is out of the question on most platforms that need to use SD/MMC for that variable backing store, i.e., mobile platforms) The best thing would be for you to convince the hardware architects in your company to design and implement dual-ported SD/MMC controllers that allow a single SD/MMC to have two logical views that are independent (although I'm unsure if that is even possible in the context of the SD/MMC specifications) Thanks, Ard. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

