On 3/5/24 01:40, gaoliming via groups.io wrote:
> Oliver:
>   If there is no enough space, Variable driver will reclaim flash and
> reserve the enough space at boot time. 

What if the flash is genuinely fully occupied by *live* non-volatile
variables?

Laszlo

>   At the runtime, reclaim will not be trigged. The space may be out of
> resource. The warning message may be reported. Is this your case?
> 
> Thanks
> Liming
>> -----邮件原件-----
>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Oliver Steffen
>> 发送时间: 2024年3月4日 23:18
>> 收件人: devel@edk2.groups.io
>> 抄送: Oliver Steffen <ostef...@redhat.com>; Bob Feng
>> <bob.c.f...@intel.com>; Liming Gao <gaolim...@byosoft.com.cn>; Rebecca
>> Cran <rebe...@bsdio.com>; Yuwei Chen <yuwei.c...@intel.com>; Gerd
>> Hoffmann <kra...@redhat.com>; Laszlo Ersek <ler...@redhat.com>
>> 主题: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of flash space
>> when writing variables
>>
>> Emit a DEBUG_WARN message if there is not enough flash space left to
>> write/update a variable. This condition is currently not logged
>> appropriately in all cases, given that full variable store can easily
>> render the system unbootable.
>> This new message helps identifying this condition.
>>
>> Cc: Bob Feng <bob.c.f...@intel.com>
>> Cc: Gerd Hoffmann <kra...@redhat.com>
>> Cc: Laszlo Ersek <ler...@redhat.com>
>> Cc: Liming Gao <gaolim...@byosoft.com.cn>
>> Cc: Rebecca Cran <rebe...@bsdio.com>
>> Cc: Yuwei Chen <yuwei.c...@intel.com>
>>
>> Signed-off-by: Oliver Steffen <ostef...@redhat.com>
>> ---
>>  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
>> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
>> index d394d237a53f..1c7659031dc5 100644
>> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
>> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
>> @@ -2364,6 +2364,8 @@ UpdateVariable (
>>                    );
>>
>>        ASSERT_EFI_ERROR (Status);
>>
>>      }
>>
>> +  } else if (Status == EFI_OUT_OF_RESOURCES) {
>>
>> +    DEBUG ((DEBUG_WARN, "UpdateVariable failed: Out of flash
>> space\n"));
>>
>>    }
>>
>>
>>
>>    return Status;
>>
>> --
>> 2.44.0
>>
>>
>>
>>
>>
> 
> 
> 
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116354): https://edk2.groups.io/g/devel/message/116354
Mute This Topic: https://groups.io/mt/104735640/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to