在 2015/4/24 9:35, Yao, Jiewen 写道:
> HI Andrew
> You are right that we have FVB for flash device abstraction. The current 
> variable have some assumption:
> 1) It assumes EFI_FVB2_MEMORY_MAPPED already set for FVB implementation. It 
> even does not check this bit and start use memory map way to read flash.
> 2) It assumes EFI_FVB2_STICKY_WRITE already set for FVB implementation. So 
> Erase block is always invoked.
> As you said, current variable driver is optimized for SPI NOR. But it might 
> be burden to other flash device.
>
> One more question is: this variable driver assume variable is stored in flash 
> storage "block" - which can be abstracted by FVB.
> What happen, if variable in stored in another format? Map variable file to 
> "block"? I see how it is implemented in OVMF, really complicated.
> Or should the other variable driver duplicate all complicated Authentication 
> server in their own variable driver?

I think that we could just implement a block variable driver. And we 
don't need to change more in existing variablue driver + fault write driver.

Here's a reference as my implementation.
https://github.com/96boards/edk2/tree/hikey/HisiPkg/HiKeyPkg/Drivers/BlockVariableDxe

I only make it support FVB protocol, and it works. In order to keep 
align with existing PCD values in variable driver. I keep declaring 
PcdFlashNvStorageVariableBase & PcdNvStorageVariableBlockSize in memory 
that are not useful. And I create new 
PcdNvStorageVariableBlockDevicePath, PcdFlashNvStorageVariableBlockCount 
& PcdNvStorageVariableBlockLba. And I still need to fix one thing that 
should reserve this memory space.

Regards
Haojian

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to