[edk2-devel] [Bug 3187] FaultTolerantWriteDxe defect will cause NVRAM not recovered after number of WorkSpaceRefresh().

Chuang, Marlboro marlboro.chuang at dell.com
Sat Feb 6 05:54:25 UTC 2021


HI Keysound and all,

Sorry for not giving the statement well.
This is my first post so I was not aware of the message not complete on bugzilla.

Current issue is observed with below condition.

  *   Assume NVStorage = 0x5E000 and WorkSpace = 0x2000. The total working space is 0x60000.
  *   When the NVStorage reclaiming reached the WorkSpace full, the WorkSpaceRefresh will be triggered. (FTW records reclaim)

The WorkSpaceRefresh() will do the reclaim for WorkSpace but it would move whole working block(0x60000) for the process.

Once working block is moved to spare region and start to erase the working block, the system might be powered off at erase phase (due to the erasing time).

After power on again, the FTW won’t check WorkSpaceBlock valid and see it full so that it would start to do WorkSpaceRefresh again.

At this moment, the NVStorage header was erased due to previous WorkSpaceRefresh.

After WorkSpaceRefresh is done, the NVStorage header is corrupted and the system would not have the working NVStorage service.

The attachment contained the Duplicated code to simulate the user behavior and the temporary code fix for the issue.

  1.  DupCodeChange.7z – I use the CMOS to skip the infinite loop to reset system. This is just for reproducing the symptom not for any fix.
  2.  FixCodeChange.7z – This is the temporary solution to check if the WorkSpaceBlock header is valid or not. If it is not valid, going further to have the SpareBlock copying to WorkBlock.

Hope it would be more clear.

Thanks and regards,
Marlboro.


==============================================
Marlboro Chuang
Firmware Engineer
Dell | TDC BIOS Core Team
Office : +886-2-23766313
Mobile: +886-986615685
Marlboro.Chuang at dell.com<mailto:Marlboro.Chuang at dell.com>
==============================================

From: Keysound Chang <Keysound_Chang at phoenix.com>
Sent: Friday, February 5, 2021 7:11 PM
To: devel at edk2.groups.io; Keysound Chang; Chuang, Marlboro; gaoliming
Subject: RE: [edk2-devel] [Bug 3187] FaultTolerantWriteDxe defect will cause NVRAM not recovered after number of WorkSpaceRefresh().


[EXTERNAL EMAIL]
After checking Bugzilla 3187, NVRAM already corrupted in this case. Sorry that I didn’t aware.

From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Keysound Chang via groups.io
Sent: Friday, February 5, 2021 11:03 AM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; marlboro.chuang at dell.com<mailto:marlboro.chuang at dell.com>; gaoliming <gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>>
Subject: Re: [edk2-devel] [Bug 3187] FaultTolerantWriteDxe defect will cause NVRAM not recovered after number of WorkSpaceRefresh().

Hi Marlboro,

How about use non-volatile EFI variable instead of CMOS? Not sure all platforms support CMOS.

Regards,

From: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> On Behalf Of Chuang, Marlboro via groups.io
Sent: Thursday, February 4, 2021 3:08 PM
To: gaoliming <gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>>; devel at edk2.groups.io<mailto:devel at edk2.groups.io>
Subject: Re: [edk2-devel] [Bug 3187] FaultTolerantWriteDxe defect will cause NVRAM not recovered after number of WorkSpaceRefresh().

HI Gaoliming,

The DupCodeChange is for simulating user force power off the system.
So I just use the CMOS to record the temporarily flag to ensure the code will not enter the infinite loop to reset the system.

Best Regards,
Marlboro.


==============================================
Marlboro Chuang
Firmware Engineer
Dell | TDC BIOS Core Team
Office : +886-2-23766313
Mobile: +886-986615685
Marlboro.Chuang at dell.com<mailto:Marlboro.Chuang at dell.com>
==============================================

-----Original Message-----
From: gaoliming <gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>>
Sent: Thursday, February 4, 2021 2:55 PM
To: Chuang, Marlboro; devel at edk2.groups.io<mailto:devel at edk2.groups.io>
Subject: 回复: [Bug 3187] FaultTolerantWriteDxe defect will cause NVRAM not recovered after number of WorkSpaceRefresh().


[EXTERNAL EMAIL]

Chuang:
I see you directly use IO port 0x70, 0x71. What purpose to use them?

Thanks
Liming
> -----邮件原件-----
> 发件人: Chuang, Marlboro <Marlboro.Chuang at dell.com<mailto:Marlboro.Chuang at dell.com>>
> 发送时间: 2021年2月3日 12:59
> 收件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
> 抄送: gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>
> 主题: RE: [Bug 3187] FaultTolerantWriteDxe defect will cause NVRAM not
> recovered after number of WorkSpaceRefresh().
>
> Hi All,
>
> Regarding to Bug 3187, I have the duplicated code change and fix code
> change as the attachment.
> Please help to review and refine it.
>
> Thanks and Regards,
> Marlboro.
>
>
> -----Original Message-----
> From: bugzilla-daemon at bugzilla.tianocore.org<mailto:bugzilla-daemon at bugzilla.tianocore.org>
> <bugzilla-daemon at bugzilla.tianocore.org<mailto:bugzilla-daemon at bugzilla.tianocore.org>>
> Sent: Wednesday, February 3, 2021 11:04 AM
> To: Chuang, Marlboro
> Subject: [Bug 3187] FaultTolerantWriteDxe defect will cause NVRAM not
> recovered after number of WorkSpaceRefresh().
>
>
> [EXTERNAL EMAIL]
>
> https://bugzilla.tianocore.org/show_bug.cgi?id=3187
>
> gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Priority|Lowest |Normal
> Status|UNCONFIRMED |CONFIRMED
> CC|
> |gaoliming at byosoft.com.cn<mailto:|gaoliming at byosoft.com.cn>
> Assignee|unassigned at tianocore.org<mailto:Assignee|unassigned at tianocore.org>
> |Marlboro.Chuang at dell.com<mailto:|Marlboro.Chuang at dell.com>
> Ever confirmed|0 |1
>
> --- Comment #2 from gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn> ---
> @Marlboro: can you send your patch to edk2 mail list?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are the assignee for the bug.
> You reported the bug.







-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71388): https://edk2.groups.io/g/devel/message/71388
Mute This Topic: https://groups.io/mt/80376504/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210206/a4e242df/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Duplicate_and_Fix.7z
Type: application/octet-stream
Size: 18999 bytes
Desc: Duplicate_and_Fix.7z
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210206/a4e242df/attachment.obj>


More information about the edk2-devel-archive mailing list