1 /** @file -- VarCheckPolicyLibTraditional.c
2 This is an instance of a VarCheck lib constructor for traditional SMM.
4 Copyright (c) Microsoft Corporation. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include <Library/SmmMemLib.h>
11 #include "VarCheckPolicyLib.h"
14 Traditional constructor function of VarCheckPolicyLib to invoke common
17 @param[in] ImageHandle The firmware allocated handle for the EFI image.
18 @param[in] SystemTable A pointer to the EFI System Table.
20 @retval EFI_SUCCESS The constructor executed correctly.
25 VarCheckPolicyLibTraditionalConstructor (
26 IN EFI_HANDLE ImageHandle
,
27 IN EFI_SYSTEM_TABLE
*SystemTable
30 return VarCheckPolicyLibCommonConstructor ();
34 This function is wrapper function to validate the buffer.
36 @param Buffer The buffer start address to be checked.
37 @param Length The buffer length to be checked.
39 @retval TRUE This buffer is valid per processor architecture and not overlap with SMRAM.
40 @retval FALSE This buffer is not valid per processor architecture or overlap with SMRAM.
44 VarCheckPolicyIsBufferOutsideValid (
45 IN EFI_PHYSICAL_ADDRESS Buffer
,
49 return SmmIsBufferOutsideSmmValid (Buffer
, Length
);