]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h
MdePkg: Fix coding style issues
[mirror_edk2.git] / MdePkg / Include / Library / StandaloneMmDriverEntryPoint.h
1 /** @file
2 Module entry point library for Standalone MM Drivers.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>
6 Copyright (c) 2018, Linaro, Limited. All rights reserved.<BR>
7
8 This program and the accompanying materials are licensed and made available
9 under the terms and conditions of the BSD License which accompanies this
10 distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
12
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15
16 **/
17
18 #ifndef __MODULE_ENTRY_POINT_H__
19 #define __MODULE_ENTRY_POINT_H__
20
21 ///
22 /// Declare the PI Specification Revision that this driver requires to execute
23 /// correctly.
24 ///
25 extern CONST UINT32 _gMmRevision;
26
27 /**
28 The entry point of PE/COFF Image for a Standalone MM Driver.
29
30 This function is the entry point for a Standalone MM Driver.
31 This function must call ProcessLibraryConstructorList() and
32 ProcessModuleEntryPointList().
33 If the return status from ProcessModuleEntryPointList()
34 is an error status, then ProcessLibraryDestructorList() must be called.
35 The return value from ProcessModuleEntryPointList() is returned.
36 If _gMmRevision is not zero and MmSystemTable->Hdr.Revision is
37 less than _gMmRevision, then return EFI_INCOMPATIBLE_VERSION.
38
39 @param ImageHandle The image handle of the Standalone MM Driver.
40 @param MmSystemTable A pointer to the MM System Table.
41
42 @retval EFI_SUCCESS The Standalone MM Driver exited normally.
43 @retval EFI_INCOMPATIBLE_VERSION _gMmRevision is greater than
44 MmSystemTable->Hdr.Revision.
45 @retval Other Return value from
46 ProcessModuleEntryPointList().
47
48 **/
49 EFI_STATUS
50 EFIAPI
51 _ModuleEntryPoint (
52 IN EFI_HANDLE ImageHandle,
53 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
54 );
55
56
57 /**
58 Auto generated function that calls the library constructors for all of the
59 module's dependent libraries.
60
61 This function must be called by _ModuleEntryPoint().
62 This function calls the set of library constructors for the set of library
63 instances that a module depends on. This includes library instances that a
64 module depends on directly and library instances that a module depends on
65 indirectly through other libraries. This function is auto generated by build
66 tools and those build tools are responsible for collecting the set of library
67 instances, determine which ones have constructors, and calling the library
68 constructors in the proper order based upon each of the library instances own
69 dependencies.
70
71 @param ImageHandle The image handle of the Standalone MM Driver.
72 @param MmSystemTable A pointer to the MM System Table.
73
74 **/
75 VOID
76 EFIAPI
77 ProcessLibraryConstructorList (
78 IN EFI_HANDLE ImageHandle,
79 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
80 );
81
82
83 /**
84 Auto generated function that calls the library descructors for all of the
85 module's dependent libraries.
86
87 This function may be called by _ModuleEntryPoint().
88 This function calls the set of library destructors for the set of library
89 instances that a module depends on. This includes library instances that a
90 module depends on directly and library instances that a module depends on
91 indirectly through other libraries.
92 This function is auto generated by build tools and those build tools are
93 responsible for collecting the set of library instances, determine which ones
94 have destructors, and calling the library destructors in the proper order
95 based upon each of the library instances own dependencies.
96
97 @param ImageHandle The image handle of the Standalone MM Driver.
98 @param MmSystemTable A pointer to the MM System Table.
99
100 **/
101 VOID
102 EFIAPI
103 ProcessLibraryDestructorList (
104 IN EFI_HANDLE ImageHandle,
105 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
106 );
107
108
109 /**
110 Auto generated function that calls a set of module entry points.
111
112 This function must be called by _ModuleEntryPoint().
113 This function calls the set of module entry points.
114 This function is auto generated by build tools and those build tools are
115 responsible for collecting the module entry points and calling them in a
116 specified order.
117
118 @param ImageHandle The image handle of the Standalone MM Driver.
119 @param MmSystemTable A pointer to the MM System Table.
120
121 @retval EFI_SUCCESS The Standalone MM Driver executed normally.
122 @retval !EFI_SUCCESS The Standalone MM Driver failed to execute normally.
123 **/
124 EFI_STATUS
125 EFIAPI
126 ProcessModuleEntryPointList (
127 IN EFI_HANDLE ImageHandle,
128 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
129 );
130
131 #endif