]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/PiSmmCore/PiSmmCorePrivateData.h
MdeModulePkg/Core/PiSmmCore: Fix various typos
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / PiSmmCorePrivateData.h
CommitLineData
e42e9404 1/** @file\r
2 The internal header file that declared a data structure that is shared\r
3 between the SMM IPL and the SMM Core.\r
4\r
d1102dba 5 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
e42e9404 7\r
8**/\r
9\r
10#ifndef _PI_SMM_CORE_PRIVATE_DATA_H_\r
11#define _PI_SMM_CORE_PRIVATE_DATA_H_\r
12\r
5657b268 13///\r
14/// Define values for the communications buffer used when gEfiEventDxeDispatchGuid is\r
d1102dba 15/// event signaled. This event is signaled by the DXE Core each time the DXE Core\r
5657b268 16/// dispatcher has completed its work. When this event is signaled, the SMM Core\r
17/// if notified, so the SMM Core can dispatch SMM drivers. If COMM_BUFFER_SMM_DISPATCH_ERROR\r
18/// is returned in the communication buffer, then an error occurred dispatching SMM\r
d1102dba
LG
19/// Drivers. If COMM_BUFFER_SMM_DISPATCH_SUCCESS is returned, then the SMM Core\r
20/// dispatched all the drivers it could. If COMM_BUFFER_SMM_DISPATCH_RESTART is\r
5657b268 21/// returned, then the SMM Core just dispatched the SMM Driver that registered\r
22/// the SMM Entry Point enabling the use of SMM Mode. In this case, the SMM Core\r
23/// should be notified again to dispatch more SMM Drivers using SMM Mode.\r
24///\r
25#define COMM_BUFFER_SMM_DISPATCH_ERROR 0x00\r
26#define COMM_BUFFER_SMM_DISPATCH_SUCCESS 0x01\r
27#define COMM_BUFFER_SMM_DISPATCH_RESTART 0x02\r
28\r
e42e9404 29///\r
30/// Signature for the private structure shared between the SMM IPL and the SMM Core\r
31///\r
32#define SMM_CORE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('s', 'm', 'm', 'c')\r
33\r
34///\r
d1102dba 35/// Private structure that is used to share information between the SMM IPL and\r
e42e9404 36/// the SMM Core. This structure is allocated from memory of type EfiRuntimeServicesData.\r
d1102dba
LG
37/// Since runtime memory types are converted to available memory when a legacy boot\r
38/// is performed, the SMM Core must not access any fields of this structure if a legacy\r
39/// boot is performed. As a result, the SMM IPL must create an event notification\r
40/// for the Legacy Boot event and notify the SMM Core that a legacy boot is being\r
41/// performed. The SMM Core can then use this information to filter accesses to\r
e42e9404 42/// thos structure.\r
43///\r
44typedef struct {\r
45 UINTN Signature;\r
46\r
47 ///\r
48 /// The ImageHandle passed into the entry point of the SMM IPL. This ImageHandle\r
49 /// is used by the SMM Core to fill in the ParentImageHandle field of the Loaded\r
50 /// Image Protocol for each SMM Driver that is dispatched by the SMM Core.\r
51 ///\r
52 EFI_HANDLE SmmIplImageHandle;\r
53\r
54 ///\r
55 /// The number of SMRAM ranges passed from the SMM IPL to the SMM Core. The SMM\r
56 /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.\r
57 ///\r
58 UINTN SmramRangeCount;\r
59\r
60 ///\r
61 /// A table of SMRAM ranges passed from the SMM IPL to the SMM Core. The SMM\r
62 /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.\r
63 ///\r
64 EFI_SMRAM_DESCRIPTOR *SmramRanges;\r
65\r
66 ///\r
d1102dba 67 /// The SMM Foundation Entry Point. The SMM Core fills in this field when the\r
4be497df 68 /// SMM Core is initialized. The SMM IPL is responsible for registering this entry\r
d1102dba 69 /// point with the SMM Configuration Protocol. The SMM Configuration Protocol may\r
e42e9404 70 /// not be available at the time the SMM IPL and SMM Core are started, so the SMM IPL\r
d1102dba
LG
71 /// sets up a protocol notification on the SMM Configuration Protocol and registers\r
72 /// the SMM Foundation Entry Point as soon as the SMM Configuration Protocol is\r
e42e9404 73 /// available.\r
74 ///\r
75 EFI_SMM_ENTRY_POINT SmmEntryPoint;\r
d1102dba 76\r
e42e9404 77 ///\r
78 /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.\r
d1102dba 79 ///\r
e42e9404 80 BOOLEAN SmmEntryPointRegistered;\r
81\r
82 ///\r
83 /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.\r
d1102dba 84 ///\r
e42e9404 85 BOOLEAN InSmm;\r
86\r
87 ///\r
88 /// This field is set by the SMM Core then the SMM Core is initialized. This field is\r
89 /// used by the SMM Base 2 Protocol and SMM Communication Protocol implementations in\r
d1102dba 90 /// the SMM IPL.\r
e42e9404 91 ///\r
92 EFI_SMM_SYSTEM_TABLE2 *Smst;\r
93\r
94 ///\r
4be497df 95 /// This field is used by the SMM Communication Protocol to pass a buffer into\r
e42e9404 96 /// a software SMI handler and for the software SMI handler to pass a buffer back to\r
d1102dba 97 /// the caller of the SMM Communication Protocol.\r
e42e9404 98 ///\r
99 VOID *CommunicationBuffer;\r
100\r
101 ///\r
4be497df 102 /// This field is used by the SMM Communication Protocol to pass the size of a buffer,\r
d1102dba 103 /// in bytes, into a software SMI handler and for the software SMI handler to pass the\r
e42e9404 104 /// size, in bytes, of a buffer back to the caller of the SMM Communication Protocol.\r
105 ///\r
ab780ebf 106 UINTN BufferSize;\r
e42e9404 107\r
108 ///\r
109 /// This field is used by the SMM Communication Protocol to pass the return status from\r
110 /// a software SMI handler back to the caller of the SMM Communication Protocol.\r
111 ///\r
112 EFI_STATUS ReturnStatus;\r
84edd20b
SZ
113\r
114 EFI_PHYSICAL_ADDRESS PiSmmCoreImageBase;\r
115 UINT64 PiSmmCoreImageSize;\r
116 EFI_PHYSICAL_ADDRESS PiSmmCoreEntryPoint;\r
e42e9404 117} SMM_CORE_PRIVATE_DATA;\r
118\r
119#endif\r