2 Module entry point library for Standalone MM Drivers.
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>
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
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.
18 #ifndef __MODULE_ENTRY_POINT_H__
19 #define __MODULE_ENTRY_POINT_H__
22 /// Declare the PI Specification Revision that this driver requires to execute
25 extern CONST UINT32 _gMmRevision
;
28 The entry point of PE/COFF Image for a Standalone MM Driver.
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.
39 @param ImageHandle The image handle of the Standalone MM Driver.
40 @param MmSystemTable A pointer to the MM System Table.
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().
52 IN EFI_HANDLE ImageHandle
,
53 IN EFI_MM_SYSTEM_TABLE
*MmSystemTable
58 Auto generated function that calls the library constructors for all of the
59 module's dependent libraries.
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
71 @param ImageHandle The image handle of the Standalone MM Driver.
72 @param MmSystemTable A pointer to the MM System Table.
77 ProcessLibraryConstructorList (
78 IN EFI_HANDLE ImageHandle
,
79 IN EFI_MM_SYSTEM_TABLE
*MmSystemTable
84 Auto generated function that calls the library descructors for all of the
85 module's dependent libraries.
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.
97 @param ImageHandle The image handle of the Standalone MM Driver.
98 @param MmSystemTable A pointer to the MM System Table.
103 ProcessLibraryDestructorList (
104 IN EFI_HANDLE ImageHandle
,
105 IN EFI_MM_SYSTEM_TABLE
*MmSystemTable
110 Auto generated function that calls a set of module entry points.
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
118 @param ImageHandle The image handle of the Standalone MM Driver.
119 @param MmSystemTable A pointer to the MM System Table.
121 @retval EFI_SUCCESS The Standalone MM Driver executed normally.
122 @retval !EFI_SUCCESS The Standalone MM Driver failed to execute normally.
126 ProcessModuleEntryPointList (
127 IN EFI_HANDLE ImageHandle
,
128 IN EFI_MM_SYSTEM_TABLE
*MmSystemTable