]>
Commit | Line | Data |
---|---|---|
41335d22 | 1 | /** @file\r |
2 | Definition of Extended SAL Boot Service Protocol\r | |
3 | \r | |
4 | The Extended SAL Boot Service Protocol provides a mechanisms for platform specific \r | |
5 | drivers to update the SAL System Table and register Extended SAL Procedures that are\r | |
6 | callable in physical or virtual mode using the SAL calling convention.\r | |
7 | \r | |
9df063a0 HT |
8 | Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r |
9 | This program and the accompanying materials \r | |
41335d22 | 10 | are licensed and made available under the terms and conditions of the BSD License \r |
11 | which accompanies this distribution. The full text of the license may be found at \r | |
12 | http://opensource.org/licenses/bsd-license.php \r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef _EXTENDED_SAL_BOOT_SERVICE_PROTOCOL_H_\r | |
20 | #define _EXTENDED_SAL_BOOT_SERVICE_PROTOCOL_H_\r | |
21 | \r | |
22 | #include <IndustryStandard/Sal.h>\r | |
23 | \r | |
24 | #define EXTENDED_SAL_BOOT_SERVICE_PROTOCOL_GUID \\r | |
25 | { 0xde0ee9a4, 0x3c7a, 0x44f2, {0xb7, 0x8b, 0xe3, 0xcc, 0xd6, 0x9c, 0x3a, 0xf7 } }\r | |
26 | \r | |
27 | typedef struct _EXTENDED_SAL_BOOT_SERVICE_PROTOCOL EXTENDED_SAL_BOOT_SERVICE_PROTOCOL;\r | |
28 | \r | |
29 | /**\r | |
30 | Adds platform specific information to the to the header of the SAL System Table.\r | |
31 | \r | |
32 | @param This A pointer to the EXTENDED_SAL_BOOT_SERVICE_PROTOCOL instance.\r | |
33 | @param SalAVersion Version of recovery SAL PEIM(s) in BCD format. Higher byte contains\r | |
34 | the major revision and the lower byte contains the minor revision.\r | |
35 | @param SalBVersion Version of DXE SAL Driver in BCD format. Higher byte contains\r | |
36 | the major revision and the lower byte contains the minor revision.\r | |
37 | @param OemId A pointer to a Null-terminated ASCII string that contains OEM unique string.\r | |
38 | The string cannot be longer than 32 bytes in total length\r | |
39 | @param ProductId A pointer to a Null-terminated ASCII string that uniquely identifies a family of \r | |
40 | compatible products. The string cannot be longer than 32 bytes in total length.\r | |
41 | \r | |
42 | @retval EFI_SUCCESS The SAL System Table header was updated successfully.\r | |
43 | @retval EFI_INVALID_PARAMETER OemId is NULL.\r | |
44 | @retval EFI_INVALID_PARAMETER ProductId is NULL.\r | |
45 | @retval EFI_INVALID_PARAMETER The length of OemId is greater than 32 characters.\r | |
46 | @retval EFI_INVALID_PARAMETER The length of ProductId is greater than 32 characters.\r | |
47 | \r | |
48 | **/\r | |
49 | typedef\r | |
50 | EFI_STATUS\r | |
a1749b80 | 51 | (EFIAPI *EXTENDED_SAL_ADD_SST_INFO)(\r |
41335d22 | 52 | IN EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *This,\r |
53 | IN UINT16 SalAVersion,\r | |
54 | IN UINT16 SalBVersion,\r | |
55 | IN CHAR8 *OemId,\r | |
56 | IN CHAR8 *ProductId\r | |
57 | );\r | |
58 | \r | |
59 | /**\r | |
60 | Adds an entry to the SAL System Table.\r | |
61 | \r | |
62 | This function adds the SAL System Table Entry specified by TableEntry and EntrySize\r | |
63 | to the SAL System Table.\r | |
64 | \r | |
65 | @param This A pointer to the EXTENDED_SAL_BOOT_SERVICE_PROTOCOL instance.\r | |
66 | @param TableEntry Pointer to a buffer containing a SAL System Table entry that is EntrySize bytes \r | |
67 | in length. The first byte of the TableEntry describes the type of entry.\r | |
68 | @param EntrySize The size, in bytes, of TableEntry.\r | |
69 | \r | |
70 | @retval EFI_SUCCESSThe SAL System Table was updated successfully.\r | |
71 | @retval EFI_INVALID_PARAMETER TableEntry is NULL.\r | |
72 | @retval EFI_INVALID_PARAMETER TableEntry specifies an invalid entry type.\r | |
73 | @retval EFI_INVALID_PARAMETER EntrySize is not valid for this type of entry.\r | |
74 | \r | |
75 | **/\r | |
76 | typedef\r | |
77 | EFI_STATUS\r | |
a1749b80 | 78 | (EFIAPI *EXTENDED_SAL_ADD_SST_ENTRY)(\r |
41335d22 | 79 | IN EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *This,\r |
80 | IN UINT8 *TableEntry,\r | |
81 | IN UINTN EntrySize\r | |
82 | );\r | |
83 | \r | |
84 | /**\r | |
85 | Internal ESAL procedures.\r | |
86 | \r | |
87 | This is prototype of internal Extended SAL procedures, which is registerd by\r | |
88 | EXTENDED_SAL_REGISTER_INTERNAL_PROC service.\r | |
89 | \r | |
90 | @param FunctionId The Function ID associated with this Extended SAL Procedure.\r | |
91 | @param Arg2 Second argument to the Extended SAL procedure.\r | |
92 | @param Arg3 Third argument to the Extended SAL procedure.\r | |
93 | @param Arg4 Fourth argument to the Extended SAL procedure.\r | |
94 | @param Arg5 Fifth argument to the Extended SAL procedure.\r | |
95 | @param Arg6 Sixth argument to the Extended SAL procedure.\r | |
96 | @param Arg7 Seventh argument to the Extended SAL procedure.\r | |
97 | @param Arg8 Eighth argument to the Extended SAL procedure.\r | |
98 | @param VirtualMode TRUE if the Extended SAL Procedure is being invoked in virtual mode.\r | |
99 | FALSE if the Extended SAL Procedure is being invoked in physical mode.\r | |
100 | @param ModuleGlobal A pointer to the global context associated with this Extended SAL Procedure. \r | |
101 | \r | |
102 | @return The result returned from the specified Extended SAL Procedure\r | |
103 | \r | |
104 | **/\r | |
105 | typedef\r | |
106 | SAL_RETURN_REGS\r | |
a1749b80 | 107 | (EFIAPI *SAL_INTERNAL_EXTENDED_SAL_PROC)(\r |
41335d22 | 108 | IN UINT64 FunctionId,\r |
109 | IN UINT64 Arg2,\r | |
110 | IN UINT64 Arg3,\r | |
111 | IN UINT64 Arg4,\r | |
112 | IN UINT64 Arg5,\r | |
113 | IN UINT64 Arg6,\r | |
114 | IN UINT64 Arg7,\r | |
115 | IN UINT64 Arg8,\r | |
116 | IN BOOLEAN VirtualMode,\r | |
117 | IN VOID *ModuleGlobal OPTIONAL\r | |
118 | ); \r | |
119 | \r | |
120 | /**\r | |
121 | Registers an Extended SAL Procedure.\r | |
122 | \r | |
123 | The Extended SAL Procedure specified by InternalSalProc and named by ClassGuidLo,\r | |
124 | ClassGuidHi, and FunctionId is added to the set of available Extended SAL Procedures.\r | |
125 | \r | |
126 | @param This A pointer to the EXTENDED_SAL_BOOT_SERVICE_PROTOCOL instance.\r | |
127 | @param ClassGuidLo The lower 64-bits of the class GUID for the Extended SAL Procedure being added. \r | |
128 | Each class GUID contains one or more functions specified by a Function ID.\r | |
129 | @param ClassGuidHi The upper 64-bits of the class GUID for the Extended SAL Procedure being added. \r | |
130 | Each class GUID contains one or more functions specified by a Function ID.\r | |
131 | @param FunctionId The Function ID for the Extended SAL Procedure that is being added. This Function \r | |
132 | ID is a member of the Extended SAL Procedure class specified by ClassGuidLo \r | |
133 | and ClassGuidHi.\r | |
134 | @param InternalSalProc A pointer to the Extended SAL Procedure being added.\r | |
135 | @param PhysicalModuleGlobal Pointer to a module global structure. This is a physical mode pointer.\r | |
136 | This pointer is passed to the Extended SAL Procedure specified by ClassGuidLo, \r | |
137 | ClassGuidHi, FunctionId, and InternalSalProc. If the system is in physical mode,\r | |
138 | then this pointer is passed unmodified to InternalSalProc. If the system is in\r | |
139 | virtual mode, then the virtual address associated with this pointer is passed to\r | |
140 | InternalSalProc.\r | |
141 | \r | |
142 | @retval EFI_SUCCESS The Extended SAL Procedure was added.\r | |
143 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to add the Extended SAL Procedure.\r | |
144 | \r | |
145 | **/\r | |
146 | typedef\r | |
147 | EFI_STATUS\r | |
a1749b80 | 148 | (EFIAPI *EXTENDED_SAL_REGISTER_INTERNAL_PROC)(\r |
41335d22 | 149 | IN EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *This,\r |
150 | IN UINT64 ClassGuidLo,\r | |
151 | IN UINT64 ClassGuidHi,\r | |
152 | IN UINT64 FunctionId,\r | |
153 | IN SAL_INTERNAL_EXTENDED_SAL_PROC InternalSalProc,\r | |
154 | IN VOID *PhysicalModuleGlobal OPTIONAL\r | |
155 | );\r | |
156 | \r | |
157 | /**\r | |
158 | Calls a previously registered Extended SAL Procedure.\r | |
159 | \r | |
160 | This function calls the Extended SAL Procedure specified by ClassGuidLo, ClassGuidHi, \r | |
161 | and FunctionId. The set of previously registered Extended SAL Procedures is searched for a \r | |
162 | matching ClassGuidLo, ClassGuidHi, and FunctionId. If a match is not found, then \r | |
163 | EFI_SAL_NOT_IMPLEMENTED is returned.\r | |
164 | \r | |
165 | @param ClassGuidLo The lower 64-bits of the class GUID for the Extended SAL Procedure\r | |
166 | that is being called.\r | |
167 | @param ClassGuidHi The upper 64-bits of the class GUID for the Extended SAL Procedure\r | |
168 | that is being called.\r | |
169 | @param FunctionId Function ID for the Extended SAL Procedure being called.\r | |
170 | @param Arg2 Second argument to the Extended SAL procedure.\r | |
171 | @param Arg3 Third argument to the Extended SAL procedure.\r | |
172 | @param Arg4 Fourth argument to the Extended SAL procedure.\r | |
173 | @param Arg5 Fifth argument to the Extended SAL procedure.\r | |
174 | @param Arg6 Sixth argument to the Extended SAL procedure.\r | |
175 | @param Arg7 Seventh argument to the Extended SAL procedure.\r | |
176 | @param Arg8 Eighth argument to the Extended SAL procedure.\r | |
177 | \r | |
178 | @retval EFI_SAL_NOT_IMPLEMENTED The Extended SAL Procedure specified by ClassGuidLo, \r | |
179 | ClassGuidHi, and FunctionId has not been registered.\r | |
180 | @retval EFI_SAL_VIRTUAL_ADDRESS_ERROR This function was called in virtual mode before virtual mappings \r | |
181 | for the specified Extended SAL Procedure are available.\r | |
182 | @retval Other The result returned from the specified Extended SAL Procedure\r | |
183 | \r | |
184 | **/\r | |
185 | typedef\r | |
186 | SAL_RETURN_REGS\r | |
a1749b80 | 187 | (EFIAPI *EXTENDED_SAL_PROC)(\r |
41335d22 | 188 | IN UINT64 ClassGuidLo,\r |
189 | IN UINT64 ClassGuidHi,\r | |
190 | IN UINT64 FunctionId,\r | |
191 | IN UINT64 Arg2,\r | |
192 | IN UINT64 Arg3,\r | |
193 | IN UINT64 Arg4,\r | |
194 | IN UINT64 Arg5,\r | |
195 | IN UINT64 Arg6,\r | |
196 | IN UINT64 Arg7,\r | |
197 | IN UINT64 Arg8\r | |
198 | );\r | |
199 | \r | |
200 | ///\r | |
201 | /// The EXTENDED_SAL_BOOT_SERVICE_PROTOCOL provides a mechanisms for platform specific \r | |
202 | /// drivers to update the SAL System Table and register Extended SAL Procedures that are\r | |
203 | /// callable in physical or virtual mode using the SAL calling convention.\r | |
204 | ///\r | |
205 | struct _EXTENDED_SAL_BOOT_SERVICE_PROTOCOL {\r | |
206 | EXTENDED_SAL_ADD_SST_INFO AddSalSystemTableInfo;\r | |
207 | EXTENDED_SAL_ADD_SST_ENTRY AddSalSystemTableEntry;\r | |
208 | EXTENDED_SAL_REGISTER_INTERNAL_PROC RegisterExtendedSalProc; \r | |
209 | EXTENDED_SAL_PROC ExtendedSalProc;\r | |
210 | };\r | |
211 | \r | |
212 | extern EFI_GUID gEfiExtendedSalBootServiceProtocolGuid;\r | |
213 | \r | |
214 | #endif\r |