]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
9f6f9534 | 2 | Include file for definitions in the Intel Platform Innovation Framework for EFI\r |
3 | System Management Mode Core Interface Specification (SMM CIS) version 0.90.\r | |
79964ac8 | 4 | \r |
9f6f9534 | 5 | Copyright (c) 2007 - 2009, Intel Corporation\r |
79964ac8 | 6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
79964ac8 | 14 | **/\r |
15 | \r | |
108854b2 LG |
16 | #ifndef _SMM_CIS_H_\r |
17 | #define _SMM_CIS_H_\r | |
79964ac8 | 18 | \r |
a2bb197e | 19 | //\r |
20 | // Share some common definitions with PI SMM\r | |
21 | //\r | |
22 | #include <Pi/PiSmmCis.h>\r | |
23 | #include <Protocol/SmmCpuIo.h>\r | |
24 | \r | |
79964ac8 | 25 | #define EFI_SMM_CPU_IO_GUID \\r |
26 | { \\r | |
27 | 0x5f439a0b, 0x45d8, 0x4682, {0xa4, 0xf4, 0xf0, 0x57, 0x6b, 0x51, 0x34, 0x41 } \\r | |
28 | }\r | |
29 | \r | |
30 | typedef struct _EFI_SMM_SYSTEM_TABLE EFI_SMM_SYSTEM_TABLE;\r | |
31 | typedef struct _EFI_SMM_CPU_IO_INTERFACE EFI_SMM_CPU_IO_INTERFACE;\r | |
32 | \r | |
33 | \r | |
34 | //\r | |
35 | // SMM Base specification constant and types\r | |
36 | //\r | |
79964ac8 | 37 | #define EFI_SMM_SYSTEM_TABLE_REVISION (0 << 16) | (0x09)\r |
38 | \r | |
79964ac8 | 39 | /**\r |
40 | Provides the basic memory and I/O interfaces that are used to\r | |
41 | abstract accesses to devices.\r | |
42 | \r | |
43 | @param This The EFI_SMM_CPU_IO_INTERFACE instance.\r | |
44 | @param Width Signifies the width of the I/O operations.\r | |
45 | @param Address The base address of the I/O operations.\r | |
46 | @param Count The number of I/O operations to perform.\r | |
5259c97d | 47 | @param Buffer For read operations, the destination buffer to store the results (out parameter).\r |
48 | For write operations, the source buffer from which to write data (in parameter).\r | |
79964ac8 | 49 | \r |
50 | @retval EFI_SUCCESS The data was read from or written to the device.\r | |
51 | @retval EFI_UNSUPPORTED The Address is not valid for this system.\r | |
52 | @retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.\r | |
53 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
54 | \r | |
55 | **/\r | |
56 | typedef\r | |
57 | EFI_STATUS\r | |
69686d56 | 58 | (EFIAPI *EFI_SMM_CPU_IO)(\r |
79964ac8 | 59 | IN EFI_SMM_CPU_IO_INTERFACE *This,\r |
60 | IN EFI_SMM_IO_WIDTH Width,\r | |
61 | IN UINT64 Address,\r | |
62 | IN UINTN Count,\r | |
63 | IN OUT VOID *Buffer\r | |
64 | );\r | |
65 | \r | |
66 | typedef struct {\r | |
2bbaeb0d | 67 | EFI_SMM_CPU_IO Read; ///< This service provides the various modalities of memory and I/O read.\r |
68 | EFI_SMM_CPU_IO Write; ///< This service provides the various modalities of memory and I/O write.\r | |
79964ac8 | 69 | } EFI_SMM_IO_ACCESS;\r |
70 | \r | |
470d0b27 | 71 | ///\r |
72 | /// The EFI_SMM_CPU_IO_INTERFACE service provides the basic memory, I/O, and PCI\r | |
73 | /// interfaces that are used to abstract accesses to devices.\r | |
74 | ///\r | |
79964ac8 | 75 | struct _EFI_SMM_CPU_IO_INTERFACE {\r |
470d0b27 | 76 | ///\r |
77 | /// Allows reads and writes to memory-mapped I/O space. \r | |
78 | ///\r | |
79964ac8 | 79 | EFI_SMM_IO_ACCESS Mem;\r |
470d0b27 | 80 | ///\r |
81 | /// Allows reads and writes to I/O space. \r | |
82 | ///\r | |
79964ac8 | 83 | EFI_SMM_IO_ACCESS Io;\r |
84 | };\r | |
85 | \r | |
86 | /**\r | |
87 | Allocates pool memory from SMRAM for IA-32 or runtime memory for\r | |
88 | the Itanium processor family.\r | |
89 | \r | |
5259c97d | 90 | @param PoolType The type of pool to allocate. The only supported type is EfiRuntimeServicesData\r |
79964ac8 | 91 | @param Size The number of bytes to allocate from the pool.\r |
92 | @param Buffer A pointer to a pointer to the allocated buffer if the call\r | |
93 | succeeds; undefined otherwise.\r | |
94 | \r | |
95 | @retval EFI_SUCCESS The requested number of bytes was allocated.\r | |
96 | @retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.\r | |
97 | @retval EFI_UNSUPPORTED In runtime.\r | |
6d1824fc | 98 | @note: Inconsistent with specification here:\r |
27d9ad06 | 99 | In Framework Spec, this definition is named EFI_SMM_ALLOCATE_POOL. \r |
100 | To avoid a naming conflict, the definition is renamed.\r | |
79964ac8 | 101 | **/\r |
102 | typedef\r | |
103 | EFI_STATUS\r | |
69686d56 | 104 | (EFIAPI *EFI_SMMCORE_ALLOCATE_POOL)(\r |
79964ac8 | 105 | IN EFI_MEMORY_TYPE PoolType,\r |
106 | IN UINTN Size,\r | |
107 | OUT VOID **Buffer\r | |
108 | );\r | |
109 | \r | |
110 | /**\r | |
111 | Returns pool memory to the system.\r | |
112 | \r | |
113 | @param Buffer Pointer to the buffer to free.\r | |
114 | \r | |
115 | @retval EFI_SUCCESS The memory was returned to the system.\r | |
116 | @retval EFI_INVALID_PARAMETER Buffer was invalid.\r | |
117 | @retval EFI_UNSUPPORTED In runtime.\r | |
6d1824fc | 118 | @note: Inconsistent with specification here:\r |
27d9ad06 | 119 | In Framework Spec, this definition is named EFI_SMM_FREE_POOL. \r |
120 | To avoid a naming conflict, the definition is renamed. \r | |
79964ac8 | 121 | **/\r |
122 | typedef\r | |
123 | EFI_STATUS\r | |
69686d56 | 124 | (EFIAPI *EFI_SMMCORE_FREE_POOL)(\r |
79964ac8 | 125 | IN VOID *Buffer\r |
126 | );\r | |
127 | \r | |
128 | /**\r | |
129 | Allocates memory pages from the system.\r | |
130 | \r | |
131 | @param Type The type of allocation to perform.\r | |
132 | @param MemoryType The only supported type is EfiRuntimeServicesData\r | |
133 | @param NumberofPages The number of contiguous 4 KB pages to allocate\r | |
134 | @param Memory Pointer to a physical address. On input, the way in which\r | |
135 | the address is used depends on the value of Type. On output, the address\r | |
136 | is set to the base of the page range that was allocated.\r | |
137 | \r | |
138 | @retval EFI_SUCCESS The requested pages were allocated.\r | |
139 | @retval EFI_OUT_OF_RESOURCES The pages requested could not be allocated.\r | |
140 | @retval EFI_NOT_FOUND The requested pages could not be found.\r | |
141 | @retval EFI_INVALID_PARAMETER Type is not AllocateAnyPages or AllocateMaxAddress\r | |
142 | or AllocateAddress. Or MemoryType is in the range EfiMaxMemoryType..0x7FFFFFFF.\r | |
6d1824fc | 143 | @note: Inconsistent with specification here:\r |
5259c97d | 144 | In the Framework Spec, this definition is named EFI_SMM_ALLOCATE_PAGES. \r |
145 | To avoid a naming conflict, the definition here is renamed.\r | |
79964ac8 | 146 | **/\r |
147 | typedef\r | |
148 | EFI_STATUS\r | |
69686d56 | 149 | (EFIAPI *EFI_SMMCORE_ALLOCATE_PAGES)(\r |
79964ac8 | 150 | IN EFI_ALLOCATE_TYPE Type,\r |
151 | IN EFI_MEMORY_TYPE MemoryType,\r | |
152 | IN UINTN NumberOfPages,\r | |
153 | OUT EFI_PHYSICAL_ADDRESS *Memory\r | |
154 | );\r | |
155 | \r | |
156 | /**\r | |
157 | Frees memory pages for the system.\r | |
158 | \r | |
159 | @param Memory The base physical address of the pages to be freed\r | |
160 | @param NumberOfPages The number of contiguous 4 KB pages to free.\r | |
161 | \r | |
162 | @retval EFI_SUCCESS The requested memory pages were freed.\r | |
163 | @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or NumberOfPages is invalid.\r | |
164 | @retval EFI_NOT_FOUND The requested memory pages were not allocated with SmmAllocatePages().\r | |
18d7ae2e | 165 | \r |
6d1824fc | 166 | @note: Inconsistent with specification here:\r |
5259c97d | 167 | In the Framework Spec, this definition is named EFI_SMM_FREE_PAGES. \r |
168 | To avoid a naming conflict, the definition here is renamed.\r | |
79964ac8 | 169 | **/\r |
170 | typedef\r | |
171 | EFI_STATUS\r | |
69686d56 | 172 | (EFIAPI *EFI_SMMCORE_FREE_PAGES)(\r |
79964ac8 | 173 | IN EFI_PHYSICAL_ADDRESS Memory,\r |
174 | IN UINTN NumberOfPages\r | |
175 | );\r | |
b6d47a83 | 176 | \r |
470d0b27 | 177 | ///\r |
178 | /// The processor save-state information for IA-32 processors. This information is important in that the\r | |
179 | /// SMM drivers may need to ascertain the state of the processor before invoking the SMI.\r | |
180 | ///\r | |
79964ac8 | 181 | typedef struct {\r |
470d0b27 | 182 | ///\r |
183 | /// Reserved for future processors. As such, software should not attempt to interpret or\r | |
184 | /// write to this region.\r | |
185 | ///\r | |
79964ac8 | 186 | UINT8 Reserved1[248];\r |
470d0b27 | 187 | ///\r |
188 | /// The location of the processor SMBASE, which is the location where the processor\r | |
189 | /// will pass control upon receipt of an SMI.\r | |
190 | ///\r | |
79964ac8 | 191 | UINT32 SMBASE;\r |
470d0b27 | 192 | ///\r |
193 | /// The revision of the SMM save state. This value is set by the processor.\r | |
194 | ///\r | |
79964ac8 | 195 | UINT32 SMMRevId;\r |
470d0b27 | 196 | ///\r |
197 | /// The value of the I/O restart field. Allows for restarting an in-process I/O instruction.\r | |
198 | ///\r | |
79964ac8 | 199 | UINT16 IORestart;\r |
470d0b27 | 200 | ///\r |
201 | /// Describes behavior that should be commenced in response to a halt instruction.\r | |
202 | ///\r | |
79964ac8 | 203 | UINT16 AutoHALTRestart;\r |
470d0b27 | 204 | ///\r |
205 | /// Reserved for future processors. As such, software should not attempt to interpret or\r | |
206 | /// write to this region.\r | |
207 | ///\r | |
79964ac8 | 208 | UINT8 Reserved2[164];\r |
470d0b27 | 209 | \r |
210 | //\r | |
211 | // Registers in IA-32 processors. \r | |
212 | //\r | |
79964ac8 | 213 | UINT32 ES;\r |
214 | UINT32 CS;\r | |
215 | UINT32 SS;\r | |
216 | UINT32 DS;\r | |
217 | UINT32 FS;\r | |
218 | UINT32 GS;\r | |
219 | UINT32 LDTBase;\r | |
220 | UINT32 TR;\r | |
221 | UINT32 DR7;\r | |
222 | UINT32 DR6;\r | |
223 | UINT32 EAX;\r | |
224 | UINT32 ECX;\r | |
225 | UINT32 EDX;\r | |
226 | UINT32 EBX;\r | |
227 | UINT32 ESP;\r | |
228 | UINT32 EBP;\r | |
229 | UINT32 ESI;\r | |
230 | UINT32 EDI;\r | |
231 | UINT32 EIP;\r | |
232 | UINT32 EFLAGS;\r | |
233 | UINT32 CR3;\r | |
234 | UINT32 CR0;\r | |
235 | } EFI_SMI_CPU_SAVE_STATE;\r | |
236 | \r | |
470d0b27 | 237 | ///\r |
238 | /// The processor save-state information for the Itanium processor family. This information is\r | |
239 | /// important in that the SMM drivers may need to ascertain the state of the processor before invoking\r | |
240 | /// the PMI. This structure is mandatory and must be 512 byte aligned.\r | |
241 | /// \r | |
79964ac8 | 242 | typedef struct {\r |
243 | UINT64 reserved;\r | |
244 | UINT64 r1;\r | |
245 | UINT64 r2;\r | |
246 | UINT64 r3;\r | |
247 | UINT64 r4;\r | |
248 | UINT64 r5;\r | |
249 | UINT64 r6;\r | |
250 | UINT64 r7;\r | |
251 | UINT64 r8;\r | |
252 | UINT64 r9;\r | |
253 | UINT64 r10;\r | |
254 | UINT64 r11;\r | |
255 | UINT64 r12;\r | |
256 | UINT64 r13;\r | |
257 | UINT64 r14;\r | |
258 | UINT64 r15;\r | |
259 | UINT64 r16;\r | |
260 | UINT64 r17;\r | |
261 | UINT64 r18;\r | |
262 | UINT64 r19;\r | |
263 | UINT64 r20;\r | |
264 | UINT64 r21;\r | |
265 | UINT64 r22;\r | |
266 | UINT64 r23;\r | |
267 | UINT64 r24;\r | |
268 | UINT64 r25;\r | |
269 | UINT64 r26;\r | |
270 | UINT64 r27;\r | |
271 | UINT64 r28;\r | |
272 | UINT64 r29;\r | |
273 | UINT64 r30;\r | |
274 | UINT64 r31;\r | |
275 | \r | |
276 | UINT64 pr;\r | |
277 | \r | |
278 | UINT64 b0;\r | |
279 | UINT64 b1;\r | |
280 | UINT64 b2;\r | |
281 | UINT64 b3;\r | |
282 | UINT64 b4;\r | |
283 | UINT64 b5;\r | |
284 | UINT64 b6;\r | |
285 | UINT64 b7;\r | |
286 | \r | |
287 | // application registers\r | |
288 | UINT64 ar_rsc;\r | |
289 | UINT64 ar_bsp;\r | |
290 | UINT64 ar_bspstore;\r | |
291 | UINT64 ar_rnat;\r | |
292 | \r | |
293 | UINT64 ar_fcr;\r | |
294 | \r | |
295 | UINT64 ar_eflag;\r | |
296 | UINT64 ar_csd;\r | |
297 | UINT64 ar_ssd;\r | |
298 | UINT64 ar_cflg;\r | |
299 | UINT64 ar_fsr;\r | |
300 | UINT64 ar_fir;\r | |
301 | UINT64 ar_fdr;\r | |
302 | \r | |
303 | UINT64 ar_ccv;\r | |
304 | \r | |
305 | UINT64 ar_unat;\r | |
306 | \r | |
307 | UINT64 ar_fpsr;\r | |
308 | \r | |
309 | UINT64 ar_pfs;\r | |
310 | UINT64 ar_lc;\r | |
311 | UINT64 ar_ec;\r | |
312 | \r | |
313 | // control registers\r | |
314 | UINT64 cr_dcr;\r | |
315 | UINT64 cr_itm;\r | |
316 | UINT64 cr_iva;\r | |
317 | UINT64 cr_pta;\r | |
318 | UINT64 cr_ipsr;\r | |
319 | UINT64 cr_isr;\r | |
320 | UINT64 cr_iip;\r | |
321 | UINT64 cr_ifa;\r | |
322 | UINT64 cr_itir;\r | |
323 | UINT64 cr_iipa;\r | |
324 | UINT64 cr_ifs;\r | |
325 | UINT64 cr_iim;\r | |
326 | UINT64 cr_iha;\r | |
327 | \r | |
328 | // debug registers\r | |
329 | UINT64 dbr0;\r | |
330 | UINT64 dbr1;\r | |
331 | UINT64 dbr2;\r | |
332 | UINT64 dbr3;\r | |
333 | UINT64 dbr4;\r | |
334 | UINT64 dbr5;\r | |
335 | UINT64 dbr6;\r | |
336 | UINT64 dbr7;\r | |
337 | \r | |
338 | UINT64 ibr0;\r | |
339 | UINT64 ibr1;\r | |
340 | UINT64 ibr2;\r | |
341 | UINT64 ibr3;\r | |
342 | UINT64 ibr4;\r | |
343 | UINT64 ibr5;\r | |
344 | UINT64 ibr6;\r | |
345 | UINT64 ibr7;\r | |
346 | \r | |
347 | // virtual registers\r | |
348 | UINT64 int_nat; // nat bits for R1-R31\r | |
349 | \r | |
350 | } EFI_PMI_SYSTEM_CONTEXT;\r | |
351 | \r | |
470d0b27 | 352 | ///\r |
353 | /// The processor save-state information for IA-32 and Itanium processors. This information is\r | |
354 | /// important in that the SMM drivers may need to ascertain the state of the processor before invoking\r | |
355 | /// the SMI or PMI.\r | |
356 | ///\r | |
79964ac8 | 357 | typedef union {\r |
470d0b27 | 358 | ///\r |
359 | /// The processor save-state information for IA-32 processors. \r | |
360 | ///\r | |
79964ac8 | 361 | EFI_SMI_CPU_SAVE_STATE Ia32SaveState;\r |
470d0b27 | 362 | ///\r |
363 | /// The processor save-state information for Itanium processors.\r | |
364 | ///\r | |
79964ac8 | 365 | EFI_PMI_SYSTEM_CONTEXT ItaniumSaveState;\r |
366 | } EFI_SMM_CPU_SAVE_STATE;\r | |
367 | \r | |
470d0b27 | 368 | ///\r |
369 | /// The optional floating point save-state information for IA-32 processors. If the optional floating\r | |
370 | /// point save is indicated for any handler, the following data structure must be preserved.\r | |
371 | ///\r | |
79964ac8 | 372 | typedef struct {\r |
373 | UINT16 Fcw;\r | |
374 | UINT16 Fsw;\r | |
375 | UINT16 Ftw;\r | |
376 | UINT16 Opcode;\r | |
377 | UINT32 Eip;\r | |
378 | UINT16 Cs;\r | |
379 | UINT16 Rsvd1;\r | |
380 | UINT32 DataOffset;\r | |
381 | UINT16 Ds;\r | |
382 | UINT8 Rsvd2[10];\r | |
383 | UINT8 St0Mm0[10], Rsvd3[6];\r | |
384 | UINT8 St0Mm1[10], Rsvd4[6];\r | |
385 | UINT8 St0Mm2[10], Rsvd5[6];\r | |
386 | UINT8 St0Mm3[10], Rsvd6[6];\r | |
387 | UINT8 St0Mm4[10], Rsvd7[6];\r | |
388 | UINT8 St0Mm5[10], Rsvd8[6];\r | |
389 | UINT8 St0Mm6[10], Rsvd9[6];\r | |
390 | UINT8 St0Mm7[10], Rsvd10[6];\r | |
391 | UINT8 Rsvd11[22*16];\r | |
392 | } EFI_SMI_OPTIONAL_FPSAVE_STATE;\r | |
393 | \r | |
470d0b27 | 394 | ///\r |
395 | /// The optional floating point save-state information for the Itanium processor family. If the optional\r | |
396 | /// floating point save is indicated for any handler, then this data structure must be preserved. \r | |
397 | /// \r | |
79964ac8 | 398 | typedef struct {\r |
399 | UINT64 f2[2];\r | |
400 | UINT64 f3[2];\r | |
401 | UINT64 f4[2];\r | |
402 | UINT64 f5[2];\r | |
403 | UINT64 f6[2];\r | |
404 | UINT64 f7[2];\r | |
405 | UINT64 f8[2];\r | |
406 | UINT64 f9[2];\r | |
407 | UINT64 f10[2];\r | |
408 | UINT64 f11[2];\r | |
409 | UINT64 f12[2];\r | |
410 | UINT64 f13[2];\r | |
411 | UINT64 f14[2];\r | |
412 | UINT64 f15[2];\r | |
413 | UINT64 f16[2];\r | |
414 | UINT64 f17[2];\r | |
415 | UINT64 f18[2];\r | |
416 | UINT64 f19[2];\r | |
417 | UINT64 f20[2];\r | |
418 | UINT64 f21[2];\r | |
419 | UINT64 f22[2];\r | |
420 | UINT64 f23[2];\r | |
421 | UINT64 f24[2];\r | |
422 | UINT64 f25[2];\r | |
423 | UINT64 f26[2];\r | |
424 | UINT64 f27[2];\r | |
425 | UINT64 f28[2];\r | |
426 | UINT64 f29[2];\r | |
427 | UINT64 f30[2];\r | |
428 | UINT64 f31[2];\r | |
429 | } EFI_PMI_OPTIONAL_FLOATING_POINT_CONTEXT;\r | |
430 | \r | |
470d0b27 | 431 | ///\r |
432 | /// The processor save-state information for IA-32 and Itanium processors. If the optional floating\r | |
433 | /// point save is indicated for any handler, then this data structure must be preserved.\r | |
434 | ///\r | |
79964ac8 | 435 | typedef union {\r |
470d0b27 | 436 | /// \r |
437 | /// The optional floating point save-state information for IA-32 processors. \r | |
438 | ///\r | |
79964ac8 | 439 | EFI_SMI_OPTIONAL_FPSAVE_STATE Ia32FpSave;\r |
470d0b27 | 440 | ///\r |
441 | /// The optional floating point save-state information for Itanium processors. \r | |
442 | ///\r | |
79964ac8 | 443 | EFI_PMI_OPTIONAL_FLOATING_POINT_CONTEXT ItaniumFpSave;\r |
444 | } EFI_SMM_FLOATING_POINT_SAVE_STATE;\r | |
445 | \r | |
446 | /**\r | |
447 | This function is the main entry point for an SMM handler dispatch\r | |
448 | or communicate-based callback.\r | |
449 | \r | |
450 | @param SmmImageHandle A unique value returned by the SMM infrastructure\r | |
451 | in response to registration for a communicate-based callback or dispatch.\r | |
452 | @param CommunicationBuffer\r | |
453 | An optional buffer that will be populated\r | |
454 | by the SMM infrastructure in response to a non-SMM agent (preboot or runtime)\r | |
455 | invoking the EFI_SMM_BASE_PROTOCOL.Communicate() service.\r | |
456 | @param SourceSize If CommunicationBuffer is non-NULL, this field\r | |
457 | indicates the size of the data payload in this buffer.\r | |
458 | \r | |
459 | @return Status Code\r | |
460 | \r | |
461 | **/\r | |
462 | typedef\r | |
463 | EFI_STATUS\r | |
69686d56 | 464 | (EFIAPI *EFI_SMM_HANDLER_ENTRY_POINT)(\r |
79964ac8 | 465 | IN EFI_HANDLE SmmImageHandle,\r |
466 | IN OUT VOID *CommunicationBuffer OPTIONAL,\r | |
467 | IN OUT UINTN *SourceSize OPTIONAL\r | |
468 | );\r | |
469 | \r | |
470 | /**\r | |
471 | The SmmInstallConfigurationTable() function is used to maintain the list\r | |
472 | of configuration tables that are stored in the System Management System\r | |
473 | Table. The list is stored as an array of (GUID, Pointer) pairs. The list\r | |
474 | must be allocated from pool memory with PoolType set to EfiRuntimeServicesData.\r | |
475 | \r | |
476 | @param SystemTable A pointer to the SMM System Table.\r | |
477 | @param Guid A pointer to the GUID for the entry to add, update, or remove.\r | |
478 | @param Table A pointer to the buffer of the table to add.\r | |
479 | @param TableSize The size of the table to install.\r | |
480 | \r | |
481 | @retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.\r | |
482 | @retval EFI_INVALID_PARAMETER Guid is not valid.\r | |
483 | @retval EFI_NOT_FOUND An attempt was made to delete a non-existent entry.\r | |
484 | @retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.\r | |
485 | \r | |
486 | **/\r | |
487 | typedef\r | |
488 | EFI_STATUS\r | |
69686d56 | 489 | (EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE)(\r |
79964ac8 | 490 | IN EFI_SMM_SYSTEM_TABLE *SystemTable,\r |
491 | IN EFI_GUID *Guid,\r | |
492 | IN VOID *Table,\r | |
493 | IN UINTN TableSize\r | |
494 | );\r | |
495 | \r | |
496 | //\r | |
497 | // System Management System Table (SMST)\r | |
498 | //\r | |
499 | struct _EFI_SMM_SYSTEM_TABLE {\r | |
470d0b27 | 500 | ///\r |
501 | /// The table header for the System Management System Table (SMST). \r | |
502 | ///\r | |
79964ac8 | 503 | EFI_TABLE_HEADER Hdr;\r |
504 | \r | |
470d0b27 | 505 | ///\r |
506 | /// A pointer to a NULL-terminated Unicode string containing the vendor name. It is\r | |
507 | /// permissible for this pointer to be NULL.\r | |
508 | ///\r | |
79964ac8 | 509 | CHAR16 *SmmFirmwareVendor;\r |
470d0b27 | 510 | ///\r |
511 | /// The particular revision of the firmware.\r | |
512 | ///\r | |
79964ac8 | 513 | UINT32 SmmFirmwareRevision;\r |
514 | \r | |
470d0b27 | 515 | ///\r |
516 | /// Adds, updates, or removes a configuration table entry from the SMST. \r | |
517 | ///\r | |
79964ac8 | 518 | EFI_SMM_INSTALL_CONFIGURATION_TABLE SmmInstallConfigurationTable;\r |
519 | \r | |
520 | //\r | |
521 | // I/O Services\r | |
522 | //\r | |
470d0b27 | 523 | ///\r |
524 | /// A GUID that designates the particular CPU I/O services. \r | |
525 | ///\r | |
79964ac8 | 526 | EFI_GUID EfiSmmCpuIoGuid;\r |
470d0b27 | 527 | ///\r |
528 | /// Provides the basic memory and I/O interfaces that are used to abstract accesses to\r | |
529 | /// devices.\r | |
530 | ///\r | |
79964ac8 | 531 | EFI_SMM_CPU_IO_INTERFACE SmmIo;\r |
532 | \r | |
533 | //\r | |
534 | // Runtime memory service\r | |
535 | //\r | |
470d0b27 | 536 | ///\r |
18d7ae2e | 537 | ///\r |
470d0b27 | 538 | /// Allocates pool memory from SMRAM for IA-32 or runtime memory for the\r |
539 | /// Itanium processor family.\r | |
540 | ///\r | |
79964ac8 | 541 | EFI_SMMCORE_ALLOCATE_POOL SmmAllocatePool;\r |
470d0b27 | 542 | ///\r |
543 | /// Returns pool memory to the system. \r | |
544 | ///\r | |
79964ac8 | 545 | EFI_SMMCORE_FREE_POOL SmmFreePool;\r |
470d0b27 | 546 | ///\r |
547 | /// Allocates memory pages from the system. \r | |
548 | ///\r | |
79964ac8 | 549 | EFI_SMMCORE_ALLOCATE_PAGES SmmAllocatePages;\r |
470d0b27 | 550 | ///\r |
551 | /// Frees memory pages for the system.\r | |
552 | ///\r | |
79964ac8 | 553 | EFI_SMMCORE_FREE_PAGES SmmFreePages;\r |
554 | \r | |
555 | //\r | |
556 | // MP service\r | |
557 | //\r | |
18d7ae2e | 558 | \r |
559 | ///Inconsistent with specification here:\r | |
69c8f27c | 560 | /// In Framework Spec, this definition does not exist. This method is introduced in PI1.1 spec for \r |
18d7ae2e | 561 | /// implementation needed.\r |
79964ac8 | 562 | EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp;\r |
563 | \r | |
564 | //\r | |
565 | // CPU information records\r | |
566 | //\r | |
470d0b27 | 567 | ///\r |
568 | /// A 1-relative number between 1 and the NumberOfCpus field. This field designates\r | |
569 | /// which processor is executing the SMM infrastructure. This number also serves as an\r | |
570 | /// index into the CpuSaveState and CpuOptionalFloatingPointState\r | |
571 | /// fields.\r | |
572 | ///\r | |
79964ac8 | 573 | UINTN CurrentlyExecutingCpu;\r |
470d0b27 | 574 | ///\r |
575 | /// The number of EFI Configuration Tables in the buffer\r | |
576 | /// SmmConfigurationTable.\r | |
577 | ///\r | |
79964ac8 | 578 | UINTN NumberOfCpus;\r |
470d0b27 | 579 | ///\r |
580 | /// A pointer to the EFI Configuration Tables. The number of entries in the table is\r | |
581 | /// NumberOfTableEntries.\r | |
582 | ///\r | |
79964ac8 | 583 | EFI_SMM_CPU_SAVE_STATE *CpuSaveState;\r |
470d0b27 | 584 | ///\r |
585 | /// A pointer to a catenation of the EFI_SMM_FLOATING_POINT_SAVE_STATE.\r | |
586 | /// The size of this entire table is NumberOfCpus* size of the\r | |
587 | /// EFI_SMM_FLOATING_POINT_SAVE_STATE. These fields are populated only if\r | |
588 | /// there is at least one SMM driver that has registered for a callback with the\r | |
589 | /// FloatingPointSave field in EFI_SMM_BASE_PROTOCOL.RegisterCallback() set to TRUE.\r | |
590 | ///\r | |
79964ac8 | 591 | EFI_SMM_FLOATING_POINT_SAVE_STATE *CpuOptionalFloatingPointState;\r |
592 | \r | |
593 | //\r | |
594 | // Extensibility table\r | |
595 | //\r | |
470d0b27 | 596 | ///\r |
597 | /// The number of EFI Configuration Tables in the buffer\r | |
598 | /// SmmConfigurationTable.\r | |
599 | ///\r | |
79964ac8 | 600 | UINTN NumberOfTableEntries;\r |
470d0b27 | 601 | ///\r |
602 | /// A pointer to the EFI Configuration Tables. The number of entries in the table is\r | |
603 | /// NumberOfTableEntries.\r | |
604 | ///\r | |
79964ac8 | 605 | EFI_CONFIGURATION_TABLE *SmmConfigurationTable;\r |
606 | };\r | |
607 | \r | |
608 | #endif\r |