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