mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
Fix the issue that VariablePei hangs on Richford when variable region is wiped out.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7927 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
261136bc32
commit
33f201a09c
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Framework PEIM to provide the Variable functionality
|
Framework PEIM to provide the Variable functionality
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008 Intel Corporation. <BR>
|
Copyright (c) 2006 - 2009 Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -426,6 +426,14 @@ FindVariable (
|
|||||||
Variable = IndexTable->StartPtr;
|
Variable = IndexTable->StartPtr;
|
||||||
} else {
|
} else {
|
||||||
VariableBase = (UINT8 *) (UINTN) PcdGet32 (PcdFlashNvStorageVariableBase);
|
VariableBase = (UINT8 *) (UINTN) PcdGet32 (PcdFlashNvStorageVariableBase);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check if FV header is valid.
|
||||||
|
//
|
||||||
|
if (((EFI_FIRMWARE_VOLUME_HEADER *) VariableBase)->Signature != EFI_FVH_SIGNATURE) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
VariableStoreHeader = (VARIABLE_STORE_HEADER *) (VariableBase + \
|
VariableStoreHeader = (VARIABLE_STORE_HEADER *) (VariableBase + \
|
||||||
((EFI_FIRMWARE_VOLUME_HEADER *) (VariableBase)) -> HeaderLength);
|
((EFI_FIRMWARE_VOLUME_HEADER *) (VariableBase)) -> HeaderLength);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user