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