+ UnchangedAttributes = EFI_FVB2_READ_DISABLED_CAP | \\r
+ EFI_FVB2_READ_ENABLED_CAP | \\r
+ EFI_FVB2_WRITE_DISABLED_CAP | \\r
+ EFI_FVB2_WRITE_ENABLED_CAP | \\r
+ EFI_FVB2_LOCK_CAP | \\r
+ EFI_FVB2_STICKY_WRITE | \\r
+ EFI_FVB2_MEMORY_MAPPED | \\r
+ EFI_FVB2_ERASE_POLARITY | \\r
+ EFI_FVB2_READ_LOCK_CAP | \\r
+ EFI_FVB2_WRITE_LOCK_CAP | \\r
+ EFI_FVB2_ALIGNMENT;\r
+\r
+ //\r
+ // Some attributes of FV is read only can *not* be set\r
+ //\r
+ if ((OldAttributes & UnchangedAttributes) ^ (*Attributes & UnchangedAttributes)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r