Hi Star I think the point is shown in a comment from coreboot: "As mentioned above, only the offsets need to be aligned, not the absolute bases. Please, have a look for instance at `MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c:1111`: (FtwDevice->WorkSpaceAddress >= (FvbBaseAddress + BlockSize * (LbaIndex - 1))) Things become more obvious if we remove the unnecessary parentheses: FtwDevice->WorkSpaceAddress >= FvbBaseAddress + BlockSize * (LbaIndex - 1) It's the same as: FtwDevice->WorkSpaceAddress - FvbBaseAddress >= BlockSize * (LbaIndex - 1) And _if_ aligned, the same as: (FtwDevice->WorkSpaceAddress - FvbBaseAddress) / BlockSize >= LbaIndex - 1 Now it's easy to see: neither `FtwDevice->WorkSpaceAddress` nor `FvbBaseAddress` have to be aligned, but their relative distance has to be." So if this solution isn't acceptable, could you suggest one that would be? Many thanks On Tue, 17 May 2022 at 16:05, Zeng, Star wrote: > When length is larger than block size and block size aligned, if the > address is not block size aligned, that means the range will mix with other > range, but erase operation will be done per block, that will be risky and > may break the fault tolerant mechanism. > > I could not remember all the details. Personally, I do not think it is > right way to remove the check. > > > > > > Thanks, > > Star > > *From:* Lean Sheng Tan > *Sent:* Tuesday, May 17, 2022 7:58 PM > *To:* devel@edk2.groups.io; Wu, Hao A > *Cc:* Zeng, Star ; Gao, Liming < > gaoliming@byosoft.com.cn>; Rhodes, Sean > *Subject:* Re: [edk2-devel] [PATCH] MdeModulePkg/FaultTolerantWriteDxe: > Don't check for address alignment > > > > Hi Star & Liming, > > Any update on this? > > Much appreciated. > > > Best Regards, > > *Lean Sheng Tan* > > > 9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany > > Email: sheng.tan@9elements.com > > Phone: *+49 234 68 94 188 <+492346894188>* > > Mobile: *+49 176 76 113842 <+4917676113842>* > > > > Registered office: Bochum > > Commercial register: Amtsgericht Bochum, HRB 17519 > > Management: Sebastian German, Eray Bazaar > > > Data protection information according to Art. 13 GDPR > > > > > > > On Mon, 16 May 2022 at 11:03, Wu, Hao A wrote: > > Sorry Star and Liming, > > > > For the below patch (removing the alignment check for WorkSpace & > SpareArea): > > https://edk2.groups.io/g/devel/message/89742 > > > > Do you think it will impact the FTW service on flash device? Thanks in > advance. > > > > Best Regards, > > Hao Wu > > > > *From:* devel@edk2.groups.io *On Behalf Of *Sean > Rhodes > *Sent:* Monday, May 16, 2022 3:54 PM > *To:* Wu, Hao A > *Cc:* devel@edk2.groups.io > *Subject:* Re: [edk2-devel] [PATCH] MdeModulePkg/FaultTolerantWriteDxe: > Don't check for address alignment > > > > The bug discovered was with coreboot, and the PCD values are derived from > the block size of its SMMStore (NvStorage) region. The discussion on the > patch can be found here: https://review.coreboot.org/c/coreboot/+/62990 > > > > Hacking the PCDs could work,, but why would we want to keep an incorrect > check? > > > > Thanks! > > > > > > On Mon, 16 May 2022 at 08:36, Wu, Hao A wrote: > > Sorry for not being clear on what I mean. > > Is it possible to change the platform PCD values and keep these block size > alignment requirements. > > > > Best Regards, > > Hao Wu > > > > *From:* devel@edk2.groups.io *On Behalf Of *Sean > Rhodes > *Sent:* Monday, May 16, 2022 3:00 PM > *To:* Wu; Wu, Hao A ; devel@edk2.groups.io > *Subject:* Re: [edk2-devel] [PATCH] MdeModulePkg/FaultTolerantWriteDxe: > Don't check for address alignment > > > > Hi Hao > > Yes, it does conflict - I will update the patch to fix these comments :) > > Thank you > > > >