blob: c3fa8b16744b54841e380587c7330b09fe070c7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
/** @file
Internal ARCH Specific file of MM memory check library.
MM memory check library implementation. This library consumes MM_ACCESS_PROTOCOL
to get MMRAM information. In order to use this library instance, the platform should produce
all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware (like MM Core
and MM driver) and/or specific dedicated hardware.
Copyright (c) 2015 - 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include "StandaloneMmMemLibInternal.h"
//
// Maximum support address used to check input buffer
//
extern EFI_PHYSICAL_ADDRESS mMmMemLibInternalMaximumSupportAddress;
/**
Calculate and save the maximum support address.
**/
VOID
MmMemLibCalculateMaximumSupportAddress (
VOID
)
{
mMmMemLibInternalMaximumSupportAddress = MAX_ALLOC_ADDRESS;
DEBUG ((DEBUG_INFO, "mMmMemLibInternalMaximumSupportAddress = 0x%lx\n", mMmMemLibInternalMaximumSupportAddress));
}
/**
Initialize cached Mmram Ranges from HOB.
@retval EFI_UNSUPPORTED The routine is unable to extract MMRAM information.
@retval EFI_SUCCESS MmRanges are populated successfully.
**/
EFI_STATUS
MmMemLibInternalPopulateMmramRanges (
VOID
)
{
// Not implemented for AARCH64.
return EFI_SUCCESS;
}
/**
Deinitialize cached Mmram Ranges.
**/
VOID
MmMemLibInternalFreeMmramRanges (
VOID
)
{
// Not implemented for AARCH64.
}
/**
Initialize valid non-Mmram Ranges from Resource HOB.
**/
VOID
MmMemLibInitializeValidNonMmramRanges (
VOID
)
{
// Not implemented for AARCH64.
}
/**
Deinitialize cached non-Mmram Ranges.
**/
VOID
MmMemLibFreeValidNonMmramRanges (
VOID
)
{
// Not implemented for AARCH64.
}
/**
This function check if the buffer is valid non-MMRAM memory range.
@param[in] Buffer The buffer start address to be checked.
@param[in] Length The buffer length to be checked.
@retval TRUE This buffer is valid non-MMRAM memory range.
@retval FALSE This buffer is not valid non-MMRAM memory range.
**/
BOOLEAN
MmMemLibIsValidNonMmramRange (
IN EFI_PHYSICAL_ADDRESS Buffer,
IN UINT64 Length
)
{
return TRUE;
}
|