]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Include/Pei/PeiBind.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Include / Pei / PeiBind.h
1 /*++
2
3 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 PeiBind.h
15
16 Abstract:
17
18 Tiano PEI core and PEIM binding macros
19
20 --*/
21
22 #ifndef _PEI_BIND_H_
23 #define _PEI_BIND_H_
24
25 #ifdef EFI_DEBUG
26
27 #ifdef EFI_NT_EMULATOR
28
29 #if (PI_SPECIFICATION_VERSION < 0x00010000)
30
31 #define EFI_PEI_CORE_ENTRY_POINT(InitFunction) \
32 UINTN \
33 __stdcall \
34 _DllMainCRTStartup ( \
35 UINTN Inst, \
36 UINTN reason_for_call, \
37 VOID *rserved \
38 ) \
39 { \
40 return 1; \
41 } \
42 \
43 EFI_STATUS \
44 __declspec( dllexport ) \
45 __cdecl \
46 InitializeDriver ( \
47 IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartup \
48 ) \
49 { \
50 return InitFunction(PeiStartup); \
51 }
52
53 #else
54 #define EFI_PEI_CORE_ENTRY_POINT(InitFunction) \
55 UINTN \
56 __stdcall \
57 _DllMainCRTStartup ( \
58 UINTN Inst, \
59 UINTN reason_for_call, \
60 VOID *rserved \
61 ) \
62 { \
63 return 1; \
64 } \
65 \
66 EFI_STATUS \
67 __declspec( dllexport ) \
68 __cdecl \
69 InitializeDriver ( \
70 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, \
71 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList \
72 ) \
73 { \
74 return InitFunction(SecCoreData, PpiList); \
75 }
76
77 #endif
78
79 #define EFI_PEIM_ENTRY_POINT(InitFunction) \
80 UINTN \
81 __stdcall \
82 _DllMainCRTStartup ( \
83 UINTN Inst, \
84 UINTN reason_for_call, \
85 VOID *rserved \
86 ) \
87 { \
88 return 1; \
89 } \
90 \
91 EFI_STATUS \
92 __declspec( dllexport ) \
93 __cdecl \
94 InitializeDriver ( \
95 IN EFI_FFS_FILE_HEADER *FfsHeader, \
96 IN EFI_PEI_SERVICES **PeiServices \
97 ) \
98 { \
99 return InitFunction(FfsHeader, PeiServices); \
100 }
101
102 #else
103
104 #define EFI_PEI_CORE_ENTRY_POINT(InitFunction)
105 #define EFI_PEIM_ENTRY_POINT(InitFunction)
106
107 #endif
108
109 #else
110
111 #ifdef EFI_NT_EMULATOR
112
113 #if (PI_SPECIFICATION_VERSION < 0x00010000)
114
115 #define EFI_PEI_CORE_ENTRY_POINT(InitFunction) \
116 EFI_STATUS \
117 __declspec( dllexport ) \
118 __cdecl \
119 InitializeDriver ( \
120 IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartup \
121 ) \
122 { \
123 return InitFunction(PeiStartup); \
124 }
125
126 #else
127 #define EFI_PEI_CORE_ENTRY_POINT(InitFunction) \
128 EFI_STATUS \
129 __declspec( dllexport ) \
130 __cdecl \
131 InitializeDriver ( \
132 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, \
133 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList \
134 ) \
135 { \
136 return InitFunction(SecCoreData, PpiList); \
137 }
138
139 #endif
140
141
142 #define EFI_PEIM_ENTRY_POINT(InitFunction) \
143 EFI_STATUS \
144 __declspec( dllexport ) \
145 __cdecl \
146 InitializeDriver ( \
147 IN EFI_FFS_FILE_HEADER *FfsHeader, \
148 IN EFI_PEI_SERVICES **PeiServices \
149 ) \
150 { \
151 return InitFunction(FfsHeader, PeiServices); \
152 }
153 #else
154
155 #define EFI_PEI_CORE_ENTRY_POINT(InitFunction)
156 #define EFI_PEIM_ENTRY_POINT(InitFunction)
157
158 #endif
159 #endif
160 #endif