X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FVariableAuthenticated%2FRuntimeDxe%2FVariableDxe.c;h=f1ba9c18f0d18cdeee6c9bf5f745bec0ef7f1004;hp=ef53a96144de0a37f0158332438538cc0bd03545;hb=41982ebbc5dccfe7db8f099601a0e77e2a9db3e1;hpb=2c4b18e09590e50c95b95fd485144d00b3b7f39f diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c index ef53a96144..f1ba9c18f0 100644 --- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c +++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c @@ -3,7 +3,7 @@ and volatile storage space and install variable architecture protocol. Copyright (C) 2013, Red Hat, Inc. -Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials 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 @@ -337,6 +337,7 @@ FtwNotificationEvent ( UINT64 Length; EFI_PHYSICAL_ADDRESS VariableStoreBase; UINT64 VariableStoreLength; + UINTN FtwMaxBlockSize; // // Ensure FTW protocol is installed. @@ -346,6 +347,11 @@ FtwNotificationEvent ( return ; } + Status = FtwProtocol->GetMaxBlockSize (FtwProtocol, &FtwMaxBlockSize); + if (!EFI_ERROR (Status)) { + ASSERT (PcdGet32 (PcdFlashNvStorageVariableSize) <= FtwMaxBlockSize); + } + // // Find the proper FVB protocol for variable. //