]>
Commit | Line | Data |
---|---|---|
880086a2 SV |
1 | /** @file\r |
2 | Internal ARCH Specific file of MM memory check library.\r | |
3 | \r | |
4 | MM memory check library implementation. This library consumes MM_ACCESS_PROTOCOL\r | |
5 | to get MMRAM information. In order to use this library instance, the platform should produce\r | |
6 | all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware (like MM Core\r | |
7 | and MM driver) and/or specific dedicated hardware.\r | |
8 | \r | |
9 | Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r | |
10 | Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>\r | |
11 | \r | |
86094561 | 12 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
880086a2 SV |
13 | \r |
14 | **/\r | |
15 | #include <Library/BaseLib.h>\r | |
16 | #include <Library/BaseMemoryLib.h>\r | |
17 | #include <Library/DebugLib.h>\r | |
18 | //\r | |
19 | // Maximum support address used to check input buffer\r | |
20 | //\r | |
21 | extern EFI_PHYSICAL_ADDRESS mMmMemLibInternalMaximumSupportAddress;\r | |
22 | \r | |
23 | /**\r | |
24 | Calculate and save the maximum support address.\r | |
25 | \r | |
26 | **/\r | |
27 | VOID\r | |
28 | MmMemLibInternalCalculateMaximumSupportAddress (\r | |
29 | VOID\r | |
30 | )\r | |
31 | {\r | |
289d93b7 | 32 | mMmMemLibInternalMaximumSupportAddress = MAX_ALLOC_ADDRESS;\r |
880086a2 | 33 | \r |
880086a2 SV |
34 | DEBUG ((DEBUG_INFO, "mMmMemLibInternalMaximumSupportAddress = 0x%lx\n", mMmMemLibInternalMaximumSupportAddress));\r |
35 | }\r | |
36 | \r | |
037ccb09 KQ |
37 | /**\r |
38 | Initialize cached Mmram Ranges from HOB.\r | |
39 | \r | |
40 | @retval EFI_UNSUPPORTED The routine is unable to extract MMRAM information.\r | |
41 | @retval EFI_SUCCESS MmRanges are populated successfully.\r | |
42 | \r | |
43 | **/\r | |
44 | EFI_STATUS\r | |
45 | MmMemLibInternalPopulateMmramRanges (\r | |
46 | VOID\r | |
47 | )\r | |
48 | {\r | |
49 | // Not implemented for AARCH64.\r | |
50 | return EFI_SUCCESS;\r | |
51 | }\r | |
52 | \r | |
53 | /**\r | |
54 | Deinitialize cached Mmram Ranges.\r | |
55 | \r | |
56 | **/\r | |
57 | VOID\r | |
58 | MmMemLibInternalFreeMmramRanges (\r | |
59 | VOID\r | |
60 | )\r | |
61 | {\r | |
62 | // Not implemented for AARCH64.\r | |
63 | }\r |