Hello,
An issue regarding the variable has been encountered on the LoongArch platform. Modifying the variable using efivar after S4 resume will cause data corruption in the flash.
It was found that when starting from S4, the BIOS might write to the variable. After the system resumes, the data in the runtime memory will also be restored, resulting in inconsistent data between that in the VARIABLE_MODULE_GLOBAL structure and the actual data. There is already data in the flash area corresponding to NonVolatileLastVariableOffset.
It's suspected that there will also be problems on other platforms. I'd like to know whether other platforms have encountered similar problems and if there are any solutions?
Thanks