]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/Variable: Make only EFI_VARIABLE_NON_VOLATILE invalid
authorSunny Wang <Sunny.Wang@arm.com>
Tue, 11 Jan 2022 21:37:20 +0000 (05:37 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 21 Jan 2022 02:13:31 +0000 (02:13 +0000)
commit21320ef66989f8af5a9e9b57df73d20a70bea85f
tree15d8f6e157580ffd9aada777ee4ff3ef06693c24
parent7709988dd8f9a69eea456869f468120f1f0fc7cb
MdeModulePkg/Variable: Make only EFI_VARIABLE_NON_VOLATILE invalid

Only EFI_VARIABLE_NON_VOLATILE attribute is an invalid combination
of attribute bits, so update the variable driver to return
EFI_INVALID_PARAMETER so that we can prevent the invalid variable
being created.

This change also fixes the SCT failure below:
 - RT.QueryVariableInfo - With being an invalid combination -- FAILURE

For details, please check the threads below:
 - https://edk2.groups.io/g/devel/topic/86486174
 - https://edk2.groups.io/g/devel/message/82466

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: G Edhaya Chandran <edhaya.chandran@arm.com>
Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
Signed-off-by: Sunny Wang <sunny.wang@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c