]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibStandaloneMm.c
MdeModulePkg: Add Universal Payload general definition header file
[mirror_edk2.git] / MdeModulePkg / Library / VarCheckPolicyLib / VarCheckPolicyLibStandaloneMm.c
CommitLineData
e2747dbb
MK
1/** @file -- VarCheckPolicyLibStandaloneMm.c\r
2This is an instance of a VarCheck lib constructor for Standalone MM.\r
3\r
4Copyright (c) Microsoft Corporation. All rights reserved.\r
5SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#include <Library/StandaloneMmMemLib.h>\r
10\r
11#include "VarCheckPolicyLib.h"\r
12\r
13/**\r
14 Standalone MM constructor function of VarCheckPolicyLib to invoke common\r
15 constructor routine.\r
16\r
17 @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
18 @param[in] SystemTable A pointer to the EFI System Table.\r
19\r
20 @retval EFI_SUCCESS The constructor executed correctly.\r
21\r
22**/\r
23EFI_STATUS\r
24EFIAPI\r
25VarCheckPolicyLibStandaloneConstructor (\r
26 IN EFI_HANDLE ImageHandle,\r
27 IN EFI_MM_SYSTEM_TABLE *SystemTable\r
28 )\r
29{\r
30 return VarCheckPolicyLibCommonConstructor ();\r
31}\r
32\r
33/**\r
34 This function is wrapper function to validate the buffer.\r
35\r
36 @param Buffer The buffer start address to be checked.\r
37 @param Length The buffer length to be checked.\r
38\r
39 @retval TRUE This buffer is valid per processor architectureand not overlap with MMRAM.\r
40 @retval FALSE This buffer is not valid per processor architecture or overlap with MMRAM.\r
41**/\r
42BOOLEAN\r
43EFIAPI\r
44VarCheckPolicyIsBufferOutsideValid (\r
45 IN EFI_PHYSICAL_ADDRESS Buffer,\r
46 IN UINT64 Length\r
47 )\r
48{\r
49 return MmIsBufferOutsideMmValid (Buffer, Length);\r
50}\r