blob: f10ed6ffebc2da2abe4ea506ea626865ffe5a660 (
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
|
/** @file
The internal header file that declared a data structure that is shared
between the MM IPL and the MM Core.
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _STANDALONE_MM_CORE_PRIVATE_DATA_H_
#define _STANDALONE_MM_CORE_PRIVATE_DATA_H_
#include <Guid/MmCoreData.h>
//
// Page management
//
typedef struct {
LIST_ENTRY Link;
UINTN NumberOfPages;
} FREE_PAGE_LIST;
extern LIST_ENTRY mMmMemoryMap;
//
// Pool management
//
//
// MIN_POOL_SHIFT must not be less than 5
//
#define MIN_POOL_SHIFT 6
#define MIN_POOL_SIZE (1 << MIN_POOL_SHIFT)
//
// MAX_POOL_SHIFT must not be less than EFI_PAGE_SHIFT - 1
//
#define MAX_POOL_SHIFT (EFI_PAGE_SHIFT - 1)
#define MAX_POOL_SIZE (1 << MAX_POOL_SHIFT)
//
// MAX_POOL_INDEX are calculated by maximum and minimum pool sizes
//
#define MAX_POOL_INDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1)
typedef struct {
UINTN Size;
BOOLEAN Available;
} POOL_HEADER;
typedef struct {
POOL_HEADER Header;
LIST_ENTRY Link;
} FREE_POOL_HEADER;
extern LIST_ENTRY mMmPoolLists[MAX_POOL_INDEX];
#endif
|