]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/PiSmmCore/PiSmmCorePrivateData.h
Add PI SMM IPL and PI SMM Core
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / PiSmmCorePrivateData.h
1 /** @file
2 The internal header file that declared a data structure that is shared
3 between the SMM IPL and the SMM Core.
4
5 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _PI_SMM_CORE_PRIVATE_DATA_H_
17 #define _PI_SMM_CORE_PRIVATE_DATA_H_
18
19 ///
20 /// Signature for the private structure shared between the SMM IPL and the SMM Core
21 ///
22 #define SMM_CORE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('s', 'm', 'm', 'c')
23
24 ///
25 /// Private structure that is used to share information between the SMM IPL and
26 /// the SMM Core. This structure is allocated from memory of type EfiRuntimeServicesData.
27 /// Since runtime memory types are converted to available memory when a legacy boot
28 /// is performed, the SMM Core must access any fields of this structure if a legacy
29 /// boot is performed. As a result, the SMM IPL must create an event notification
30 /// for the Legacy Boot event and notify the SMM Core that a legacy boot is being
31 /// performed. The SMM Core can then use this information to filter accesses to
32 /// thos structure.
33 ///
34 typedef struct {
35 UINTN Signature;
36
37 ///
38 /// The ImageHandle passed into the entry point of the SMM IPL. This ImageHandle
39 /// is used by the SMM Core to fill in the ParentImageHandle field of the Loaded
40 /// Image Protocol for each SMM Driver that is dispatched by the SMM Core.
41 ///
42 EFI_HANDLE SmmIplImageHandle;
43
44 ///
45 /// The number of SMRAM ranges passed from the SMM IPL to the SMM Core. The SMM
46 /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.
47 ///
48 UINTN SmramRangeCount;
49
50 ///
51 /// A table of SMRAM ranges passed from the SMM IPL to the SMM Core. The SMM
52 /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.
53 ///
54 EFI_SMRAM_DESCRIPTOR *SmramRanges;
55
56 ///
57 /// The SMM Foundation Entry Point. The SMM Core fills in this field when the
58 /// SMM Core is initialized. The SMM IPL is responsbile for registering this entry
59 /// point with the SMM Configuration Protocol. The SMM Configuration Protocol may
60 /// not be available at the time the SMM IPL and SMM Core are started, so the SMM IPL
61 /// sets up a protocol notification on the SMM Configuration Protocol and registers
62 /// the SMM Foundation Entry Point as soon as the SMM Configuration Protocol is
63 /// available.
64 ///
65 EFI_SMM_ENTRY_POINT SmmEntryPoint;
66
67 ///
68 /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.
69 ///
70 BOOLEAN SmmEntryPointRegistered;
71
72 ///
73 /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.
74 ///
75 BOOLEAN InSmm;
76
77 ///
78 /// This field is set by the SMM Core then the SMM Core is initialized. This field is
79 /// used by the SMM Base 2 Protocol and SMM Communication Protocol implementations in
80 /// the SMM IPL.
81 ///
82 EFI_SMM_SYSTEM_TABLE2 *Smst;
83
84 ///
85 /// This field is used by the SMM Communicatioon Protocol to pass a buffer into
86 /// a software SMI handler and for the software SMI handler to pass a buffer back to
87 /// the caller of the SMM Communication Protocol.
88 ///
89 VOID *CommunicationBuffer;
90
91 ///
92 /// This field is used by the SMM Communicatioon Protocol to pass the size of a buffer,
93 /// in bytes, into a software SMI handler and for the software SMI handler to pass the
94 /// size, in bytes, of a buffer back to the caller of the SMM Communication Protocol.
95 ///
96 UINTN *BufferSize;
97
98 ///
99 /// This field is used by the SMM Communication Protocol to pass the return status from
100 /// a software SMI handler back to the caller of the SMM Communication Protocol.
101 ///
102 EFI_STATUS ReturnStatus;
103 } SMM_CORE_PRIVATE_DATA;
104
105 #endif