Hi Jiewen & Andrew,

Repost it for the new mailing list.

I'm sorry that I just have time to enable the block variable driver as
runtime driver.
Now I find there's the issue on it. We need to enable both the block variable
driver & mmc driver as runtime.

The working flow is in below.
1. MMC controller is intiailized by UEFI.
2. MMC controller is initialized by linux.
3. Update variable in linux. It means MMC driver is invoked by UEFI.

I think the working flow is wrong. We shouldn't do this. It seems that
we have only
two choices. One is to make sure the hardware controller could be only accessed
by UEFI. The second one is to only implement MMC operation in UEFI. When linux
wants to access MMC, it has to submit the request to UEFI.

Do you think it's possible to only implement MMC operation in UEFI?

Regards
Haojian

On 24 April 2015 at 10:03, Yao, Jiewen <jiewen....@intel.com> wrote:
> Hi Haojian
> Thanks for the sharing.
>
> May I know if you have validated variable set in UEFI runtime?
> I found it is marked as DXE driver instead of RUNTIME driver. But maybe I am 
> wrong.
>
> Thank you
> Yao Jiewen
>
>
> -----Original Message-----
> From: Haojian Zhuang [mailto:haojian.zhu...@linaro.org]
> Sent: Friday, April 24, 2015 9:53 AM
> To: edk2-de...@lists.sourceforge.net
> Subject: Re: [edk2] Variable Storage Driver
>
>
> 在 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
> edk2-de...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> ------------------------------------------------------------------------------
> 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
> edk2-de...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to