StandaloneMmPkg: Add CPU driver suitable for ARM Platforms.
[mirror_edk2.git] / StandaloneMmPkg / Core / StandaloneMmCorePrivateData.h
CommitLineData
6b46d772
SV
1/** @file\r
2 The internal header file that declared a data structure that is shared\r
3 between the MM IPL and the MM Core.\r
4\r
5 Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
6 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>\r
7 This program and the accompanying materials are licensed and made available\r
8 under the terms and conditions of the BSD License which accompanies this\r
9 distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16\r
17#ifndef _STANDALONE_MM_CORE_PRIVATE_DATA_H_\r
18#define _STANDALONE_MM_CORE_PRIVATE_DATA_H_\r
19\r
20#include <Guid/MmCoreData.h>\r
21\r
22//\r
23// Page management\r
24//\r
25\r
26typedef struct {\r
27 LIST_ENTRY Link;\r
28 UINTN NumberOfPages;\r
29} FREE_PAGE_LIST;\r
30\r
31extern LIST_ENTRY mMmMemoryMap;\r
32\r
33//\r
34// Pool management\r
35//\r
36\r
37//\r
38// MIN_POOL_SHIFT must not be less than 5\r
39//\r
40#define MIN_POOL_SHIFT 6\r
41#define MIN_POOL_SIZE (1 << MIN_POOL_SHIFT)\r
42\r
43//\r
44// MAX_POOL_SHIFT must not be less than EFI_PAGE_SHIFT - 1\r
45//\r
46#define MAX_POOL_SHIFT (EFI_PAGE_SHIFT - 1)\r
47#define MAX_POOL_SIZE (1 << MAX_POOL_SHIFT)\r
48\r
49//\r
50// MAX_POOL_INDEX are calculated by maximum and minimum pool sizes\r
51//\r
52#define MAX_POOL_INDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1)\r
53\r
54typedef struct {\r
55 UINTN Size;\r
56 BOOLEAN Available;\r
57} POOL_HEADER;\r
58\r
59typedef struct {\r
60 POOL_HEADER Header;\r
61 LIST_ENTRY Link;\r
62} FREE_POOL_HEADER;\r
63\r
64extern LIST_ENTRY mMmPoolLists[MAX_POOL_INDEX];\r
65\r
66#endif\r