mirror of https://github.com/acidanthera/audk.git
OvmfPkg/VirtNorFlashDxe: ValidateFvHeader: unwritten state is EOL too
It is possible to find variable entries with State being 0xff, i.e. not updated since flash block erase. This indicates the variable driver could not complete the header write while appending a new entry, and therefore State was not set to VAR_HEADER_VALID_ONLY. This can only happen at the end of the variable list, so treat this as additional "end of variable list" condition. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20240116171105.37831-6-kraxel@redhat.com>
This commit is contained in:
parent
b25733c974
commit
735d0a5e2e
|
@ -302,6 +302,11 @@ ValidateFvHeader (
|
|||
break;
|
||||
}
|
||||
|
||||
if (VarHeader->State == 0xff) {
|
||||
DEBUG ((DEBUG_INFO, "%a: end of var list (unwritten state)\n", __func__));
|
||||
break;
|
||||
}
|
||||
|
||||
VarName = NULL;
|
||||
switch (VarHeader->State) {
|
||||
// usage: State = VAR_HEADER_VALID_ONLY
|
||||
|
|
Loading…
Reference in New Issue