ArmPkg: only attempt buildin MmCommunicationDxe for AArch64
[mirror_edk2.git] / StandaloneMmPkg / Include / Guid / MmCoreData.h
CommitLineData
2c868eef
SV
1/** @file\r
2 MM Core data.\r
3\r
4Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
5Copyright (c) 2018, ARM Limited. All rights reserved.<BR>\r
86094561 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
2c868eef
SV
7\r
8**/\r
9\r
10#ifndef __MM_CORE_DATA_H__\r
11#define __MM_CORE_DATA_H__\r
12\r
13#define MM_CORE_DATA_HOB_GUID \\r
14 { 0xa160bf99, 0x2aa4, 0x4d7d, { 0x99, 0x93, 0x89, 0x9c, 0xb1, 0x2d, 0xf3, 0x76 }}\r
15\r
16extern EFI_GUID gMmCoreDataHobGuid;\r
17\r
18typedef struct {\r
19 //\r
20 // Address pointer to MM_CORE_PRIVATE_DATA\r
21 //\r
22 EFI_PHYSICAL_ADDRESS Address;\r
23} MM_CORE_DATA_HOB_DATA;\r
24\r
25\r
26///\r
27/// Define values for the communications buffer used when gEfiEventDxeDispatchGuid is\r
28/// event signaled. This event is signaled by the DXE Core each time the DXE Core\r
29/// dispatcher has completed its work. When this event is signaled, the MM Core\r
30/// if notified, so the MM Core can dispatch MM drivers. If COMM_BUFFER_MM_DISPATCH_ERROR\r
31/// is returned in the communication buffer, then an error occurred dispatching MM\r
32/// Drivers. If COMM_BUFFER_MM_DISPATCH_SUCCESS is returned, then the MM Core\r
33/// dispatched all the drivers it could. If COMM_BUFFER_MM_DISPATCH_RESTART is\r
34/// returned, then the MM Core just dispatched the MM Driver that registered\r
35/// the MM Entry Point enabling the use of MM Mode. In this case, the MM Core\r
36/// should be notified again to dispatch more MM Drivers using MM Mode.\r
37///\r
38#define COMM_BUFFER_MM_DISPATCH_ERROR 0x00\r
39#define COMM_BUFFER_MM_DISPATCH_SUCCESS 0x01\r
40#define COMM_BUFFER_MM_DISPATCH_RESTART 0x02\r
41\r
42///\r
43/// Signature for the private structure shared between the MM IPL and the MM Core\r
44///\r
45#define MM_CORE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('m', 'm', 'i', 'c')\r
46\r
47///\r
48/// Private structure that is used to share information between the MM IPL and\r
49/// the MM Core. This structure is allocated from memory of type EfiRuntimeServicesData.\r
50/// Since runtime memory types are converted to available memory when a legacy boot\r
51/// is performed, the MM Core must not access any fields of this structure if a legacy\r
52/// boot is performed. As a result, the MM IPL must create an event notification\r
53/// for the Legacy Boot event and notify the MM Core that a legacy boot is being\r
54/// performed. The MM Core can then use this information to filter accesses to\r
55/// thos structure.\r
56///\r
57typedef struct {\r
58 UINT64 Signature;\r
59\r
60 ///\r
61 /// The number of MMRAM ranges passed from the MM IPL to the MM Core. The MM\r
62 /// Core uses these ranges of MMRAM to initialize the MM Core memory manager.\r
63 ///\r
64 UINT64 MmramRangeCount;\r
65\r
66 ///\r
67 /// A table of MMRAM ranges passed from the MM IPL to the MM Core. The MM\r
68 /// Core uses these ranges of MMRAM to initialize the MM Core memory manager.\r
69 ///\r
70 EFI_PHYSICAL_ADDRESS MmramRanges;\r
71\r
72 ///\r
73 /// The MM Foundation Entry Point. The MM Core fills in this field when the\r
74 /// MM Core is initialized. The MM IPL is responsbile for registering this entry\r
75 /// point with the MM Configuration Protocol. The MM Configuration Protocol may\r
76 /// not be available at the time the MM IPL and MM Core are started, so the MM IPL\r
77 /// sets up a protocol notification on the MM Configuration Protocol and registers\r
78 /// the MM Foundation Entry Point as soon as the MM Configuration Protocol is\r
79 /// available.\r
80 ///\r
81 EFI_PHYSICAL_ADDRESS MmEntryPoint;\r
82\r
83 ///\r
84 /// Boolean flag set to TRUE while an MMI is being processed by the MM Core.\r
85 ///\r
86 BOOLEAN MmEntryPointRegistered;\r
87\r
88 ///\r
89 /// Boolean flag set to TRUE while an MMI is being processed by the MM Core.\r
90 ///\r
91 BOOLEAN InMm;\r
92\r
93 ///\r
94 /// This field is set by the MM Core then the MM Core is initialized. This field is\r
95 /// used by the MM Base 2 Protocol and MM Communication Protocol implementations in\r
96 /// the MM IPL.\r
97 ///\r
98 EFI_PHYSICAL_ADDRESS Mmst;\r
99\r
100 ///\r
101 /// This field is used by the MM Communicatioon Protocol to pass a buffer into\r
102 /// a software MMI handler and for the software MMI handler to pass a buffer back to\r
103 /// the caller of the MM Communication Protocol.\r
104 ///\r
105 EFI_PHYSICAL_ADDRESS CommunicationBuffer;\r
106\r
107 ///\r
108 /// This field is used by the MM Communicatioon Protocol to pass the size of a buffer,\r
109 /// in bytes, into a software MMI handler and for the software MMI handler to pass the\r
110 /// size, in bytes, of a buffer back to the caller of the MM Communication Protocol.\r
111 ///\r
112 UINT64 BufferSize;\r
113\r
114 ///\r
115 /// This field is used by the MM Communication Protocol to pass the return status from\r
116 /// a software MMI handler back to the caller of the MM Communication Protocol.\r
117 ///\r
118 UINT64 ReturnStatus;\r
119\r
120 EFI_PHYSICAL_ADDRESS MmCoreImageBase;\r
121 UINT64 MmCoreImageSize;\r
122 EFI_PHYSICAL_ADDRESS MmCoreEntryPoint;\r
123\r
124 EFI_PHYSICAL_ADDRESS StandaloneBfvAddress;\r
125} MM_CORE_PRIVATE_DATA;\r
126\r
127#endif\r