]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/PiSmmCore/PiSmmCore.h
MdePkg: Add RETURN_ADDRESS macro into Base.h.
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / PiSmmCore.h
1 /** @file
2 The internal header file includes the common header files, defines
3 internal structure and functions used by SmmCore module.
4
5 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _SMM_CORE_H_
17 #define _SMM_CORE_H_
18
19 #include <PiSmm.h>
20
21 #include <Protocol/DxeSmmReadyToLock.h>
22 #include <Protocol/SmmReadyToLock.h>
23 #include <Protocol/SmmEndOfDxe.h>
24 #include <Protocol/CpuIo2.h>
25 #include <Protocol/SmmCommunication.h>
26 #include <Protocol/SmmAccess2.h>
27 #include <Protocol/FirmwareVolume2.h>
28 #include <Protocol/LoadedImage.h>
29 #include <Protocol/DevicePath.h>
30 #include <Protocol/Security.h>
31 #include <Protocol/Security2.h>
32
33 #include <Guid/Apriori.h>
34 #include <Guid/EventGroup.h>
35 #include <Guid/EventLegacyBios.h>
36
37 #include <Library/BaseLib.h>
38 #include <Library/BaseMemoryLib.h>
39 #include <Library/PeCoffLib.h>
40 #include <Library/CacheMaintenanceLib.h>
41 #include <Library/DebugLib.h>
42 #include <Library/ReportStatusCodeLib.h>
43 #include <Library/MemoryAllocationLib.h>
44 #include <Library/DevicePathLib.h>
45 #include <Library/UefiLib.h>
46 #include <Library/UefiBootServicesTableLib.h>
47 #include <Library/PcdLib.h>
48 #include <Library/SmmCorePlatformHookLib.h>
49 #include <Library/PerformanceLib.h>
50 #include <Library/TimerLib.h>
51
52 #include "PiSmmCorePrivateData.h"
53
54 //
55 // Used to build a table of SMI Handlers that the SMM Core registers
56 //
57 typedef struct {
58 EFI_SMM_HANDLER_ENTRY_POINT2 Handler;
59 EFI_GUID *HandlerType;
60 EFI_HANDLE DispatchHandle;
61 BOOLEAN UnRegister;
62 } SMM_CORE_SMI_HANDLERS;
63
64 //
65 // Structure for recording the state of an SMM Driver
66 //
67 #define EFI_SMM_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('s', 'd','r','v')
68
69 typedef struct {
70 UINTN Signature;
71 LIST_ENTRY Link; // mDriverList
72
73 LIST_ENTRY ScheduledLink; // mScheduledQueue
74
75 EFI_HANDLE FvHandle;
76 EFI_GUID FileName;
77 EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
78 EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
79
80 VOID *Depex;
81 UINTN DepexSize;
82
83 BOOLEAN Before;
84 BOOLEAN After;
85 EFI_GUID BeforeAfterGuid;
86
87 BOOLEAN Dependent;
88 BOOLEAN Scheduled;
89 BOOLEAN Initialized;
90 BOOLEAN DepexProtocolError;
91
92 EFI_HANDLE ImageHandle;
93 EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
94 //
95 // Image EntryPoint in SMRAM
96 //
97 PHYSICAL_ADDRESS ImageEntryPoint;
98 //
99 // Image Buffer in SMRAM
100 //
101 PHYSICAL_ADDRESS ImageBuffer;
102 //
103 // Image Page Number
104 //
105 UINTN NumberOfPage;
106 } EFI_SMM_DRIVER_ENTRY;
107
108 #define EFI_HANDLE_SIGNATURE SIGNATURE_32('h','n','d','l')
109
110 ///
111 /// IHANDLE - contains a list of protocol handles
112 ///
113 typedef struct {
114 UINTN Signature;
115 /// All handles list of IHANDLE
116 LIST_ENTRY AllHandles;
117 /// List of PROTOCOL_INTERFACE's for this handle
118 LIST_ENTRY Protocols;
119 UINTN LocateRequest;
120 } IHANDLE;
121
122 #define ASSERT_IS_HANDLE(a) ASSERT((a)->Signature == EFI_HANDLE_SIGNATURE)
123
124 #define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('p','r','t','e')
125
126 ///
127 /// PROTOCOL_ENTRY - each different protocol has 1 entry in the protocol
128 /// database. Each handler that supports this protocol is listed, along
129 /// with a list of registered notifies.
130 ///
131 typedef struct {
132 UINTN Signature;
133 /// Link Entry inserted to mProtocolDatabase
134 LIST_ENTRY AllEntries;
135 /// ID of the protocol
136 EFI_GUID ProtocolID;
137 /// All protocol interfaces
138 LIST_ENTRY Protocols;
139 /// Registerd notification handlers
140 LIST_ENTRY Notify;
141 } PROTOCOL_ENTRY;
142
143 #define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('p','i','f','c')
144
145 ///
146 /// PROTOCOL_INTERFACE - each protocol installed on a handle is tracked
147 /// with a protocol interface structure
148 ///
149 typedef struct {
150 UINTN Signature;
151 /// Link on IHANDLE.Protocols
152 LIST_ENTRY Link;
153 /// Back pointer
154 IHANDLE *Handle;
155 /// Link on PROTOCOL_ENTRY.Protocols
156 LIST_ENTRY ByProtocol;
157 /// The protocol ID
158 PROTOCOL_ENTRY *Protocol;
159 /// The interface value
160 VOID *Interface;
161 } PROTOCOL_INTERFACE;
162
163 #define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('p','r','t','n')
164
165 ///
166 /// PROTOCOL_NOTIFY - used for each register notification for a protocol
167 ///
168 typedef struct {
169 UINTN Signature;
170 PROTOCOL_ENTRY *Protocol;
171 /// All notifications for this protocol
172 LIST_ENTRY Link;
173 /// Notification function
174 EFI_SMM_NOTIFY_FN Function;
175 /// Last position notified
176 LIST_ENTRY *Position;
177 } PROTOCOL_NOTIFY;
178
179 //
180 // SMM Core Global Variables
181 //
182 extern SMM_CORE_PRIVATE_DATA *gSmmCorePrivate;
183 extern EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst;
184 extern LIST_ENTRY gHandleList;
185 extern EFI_PHYSICAL_ADDRESS gLoadModuleAtFixAddressSmramBase;
186
187 /**
188 Called to initialize the memory service.
189
190 @param SmramRangeCount Number of SMRAM Regions
191 @param SmramRanges Pointer to SMRAM Descriptors
192
193 **/
194 VOID
195 SmmInitializeMemoryServices (
196 IN UINTN SmramRangeCount,
197 IN EFI_SMRAM_DESCRIPTOR *SmramRanges
198 );
199
200 /**
201 The SmmInstallConfigurationTable() function is used to maintain the list
202 of configuration tables that are stored in the System Management System
203 Table. The list is stored as an array of (GUID, Pointer) pairs. The list
204 must be allocated from pool memory with PoolType set to EfiRuntimeServicesData.
205
206 @param SystemTable A pointer to the SMM System Table (SMST).
207 @param Guid A pointer to the GUID for the entry to add, update, or remove.
208 @param Table A pointer to the buffer of the table to add.
209 @param TableSize The size of the table to install.
210
211 @retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
212 @retval EFI_INVALID_PARAMETER Guid is not valid.
213 @retval EFI_NOT_FOUND An attempt was made to delete a non-existent entry.
214 @retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
215
216 **/
217 EFI_STATUS
218 EFIAPI
219 SmmInstallConfigurationTable (
220 IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,
221 IN CONST EFI_GUID *Guid,
222 IN VOID *Table,
223 IN UINTN TableSize
224 );
225
226 /**
227 Wrapper function to SmmInstallProtocolInterfaceNotify. This is the public API which
228 Calls the private one which contains a BOOLEAN parameter for notifications
229
230 @param UserHandle The handle to install the protocol handler on,
231 or NULL if a new handle is to be allocated
232 @param Protocol The protocol to add to the handle
233 @param InterfaceType Indicates whether Interface is supplied in
234 native form.
235 @param Interface The interface for the protocol being added
236
237 @return Status code
238
239 **/
240 EFI_STATUS
241 EFIAPI
242 SmmInstallProtocolInterface (
243 IN OUT EFI_HANDLE *UserHandle,
244 IN EFI_GUID *Protocol,
245 IN EFI_INTERFACE_TYPE InterfaceType,
246 IN VOID *Interface
247 );
248
249 /**
250 Allocates pages from the memory map.
251
252 @param Type The type of allocation to perform
253 @param MemoryType The type of memory to turn the allocated pages
254 into
255 @param NumberOfPages The number of pages to allocate
256 @param Memory A pointer to receive the base allocated memory
257 address
258
259 @retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in spec.
260 @retval EFI_NOT_FOUND Could not allocate pages match the requirement.
261 @retval EFI_OUT_OF_RESOURCES No enough pages to allocate.
262 @retval EFI_SUCCESS Pages successfully allocated.
263
264 **/
265 EFI_STATUS
266 EFIAPI
267 SmmAllocatePages (
268 IN EFI_ALLOCATE_TYPE Type,
269 IN EFI_MEMORY_TYPE MemoryType,
270 IN UINTN NumberOfPages,
271 OUT EFI_PHYSICAL_ADDRESS *Memory
272 );
273
274 /**
275 Frees previous allocated pages.
276
277 @param Memory Base address of memory being freed
278 @param NumberOfPages The number of pages to free
279
280 @retval EFI_NOT_FOUND Could not find the entry that covers the range
281 @retval EFI_INVALID_PARAMETER Address not aligned
282 @return EFI_SUCCESS Pages successfully freed.
283
284 **/
285 EFI_STATUS
286 EFIAPI
287 SmmFreePages (
288 IN EFI_PHYSICAL_ADDRESS Memory,
289 IN UINTN NumberOfPages
290 );
291
292 /**
293 Allocate pool of a particular type.
294
295 @param PoolType Type of pool to allocate
296 @param Size The amount of pool to allocate
297 @param Buffer The address to return a pointer to the allocated
298 pool
299
300 @retval EFI_INVALID_PARAMETER PoolType not valid
301 @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.
302 @retval EFI_SUCCESS Pool successfully allocated.
303
304 **/
305 EFI_STATUS
306 EFIAPI
307 SmmAllocatePool (
308 IN EFI_MEMORY_TYPE PoolType,
309 IN UINTN Size,
310 OUT VOID **Buffer
311 );
312
313 /**
314 Frees pool.
315
316 @param Buffer The allocated pool entry to free
317
318 @retval EFI_INVALID_PARAMETER Buffer is not a valid value.
319 @retval EFI_SUCCESS Pool successfully freed.
320
321 **/
322 EFI_STATUS
323 EFIAPI
324 SmmFreePool (
325 IN VOID *Buffer
326 );
327
328 /**
329 Installs a protocol interface into the boot services environment.
330
331 @param UserHandle The handle to install the protocol handler on,
332 or NULL if a new handle is to be allocated
333 @param Protocol The protocol to add to the handle
334 @param InterfaceType Indicates whether Interface is supplied in
335 native form.
336 @param Interface The interface for the protocol being added
337 @param Notify indicates whether notify the notification list
338 for this protocol
339
340 @retval EFI_INVALID_PARAMETER Invalid parameter
341 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
342 @retval EFI_SUCCESS Protocol interface successfully installed
343
344 **/
345 EFI_STATUS
346 SmmInstallProtocolInterfaceNotify (
347 IN OUT EFI_HANDLE *UserHandle,
348 IN EFI_GUID *Protocol,
349 IN EFI_INTERFACE_TYPE InterfaceType,
350 IN VOID *Interface,
351 IN BOOLEAN Notify
352 );
353
354 /**
355 Uninstalls all instances of a protocol:interfacer from a handle.
356 If the last protocol interface is remove from the handle, the
357 handle is freed.
358
359 @param UserHandle The handle to remove the protocol handler from
360 @param Protocol The protocol, of protocol:interface, to remove
361 @param Interface The interface, of protocol:interface, to remove
362
363 @retval EFI_INVALID_PARAMETER Protocol is NULL.
364 @retval EFI_SUCCESS Protocol interface successfully uninstalled.
365
366 **/
367 EFI_STATUS
368 EFIAPI
369 SmmUninstallProtocolInterface (
370 IN EFI_HANDLE UserHandle,
371 IN EFI_GUID *Protocol,
372 IN VOID *Interface
373 );
374
375 /**
376 Queries a handle to determine if it supports a specified protocol.
377
378 @param UserHandle The handle being queried.
379 @param Protocol The published unique identifier of the protocol.
380 @param Interface Supplies the address where a pointer to the
381 corresponding Protocol Interface is returned.
382
383 @return The requested protocol interface for the handle
384
385 **/
386 EFI_STATUS
387 EFIAPI
388 SmmHandleProtocol (
389 IN EFI_HANDLE UserHandle,
390 IN EFI_GUID *Protocol,
391 OUT VOID **Interface
392 );
393
394 /**
395 Add a new protocol notification record for the request protocol.
396
397 @param Protocol The requested protocol to add the notify
398 registration
399 @param Function Points to the notification function
400 @param Registration Returns the registration record
401
402 @retval EFI_INVALID_PARAMETER Invalid parameter
403 @retval EFI_SUCCESS Successfully returned the registration record
404 that has been added
405
406 **/
407 EFI_STATUS
408 EFIAPI
409 SmmRegisterProtocolNotify (
410 IN CONST EFI_GUID *Protocol,
411 IN EFI_SMM_NOTIFY_FN Function,
412 OUT VOID **Registration
413 );
414
415 /**
416 Locates the requested handle(s) and returns them in Buffer.
417
418 @param SearchType The type of search to perform to locate the
419 handles
420 @param Protocol The protocol to search for
421 @param SearchKey Dependant on SearchType
422 @param BufferSize On input the size of Buffer. On output the
423 size of data returned.
424 @param Buffer The buffer to return the results in
425
426 @retval EFI_BUFFER_TOO_SMALL Buffer too small, required buffer size is
427 returned in BufferSize.
428 @retval EFI_INVALID_PARAMETER Invalid parameter
429 @retval EFI_SUCCESS Successfully found the requested handle(s) and
430 returns them in Buffer.
431
432 **/
433 EFI_STATUS
434 EFIAPI
435 SmmLocateHandle (
436 IN EFI_LOCATE_SEARCH_TYPE SearchType,
437 IN EFI_GUID *Protocol OPTIONAL,
438 IN VOID *SearchKey OPTIONAL,
439 IN OUT UINTN *BufferSize,
440 OUT EFI_HANDLE *Buffer
441 );
442
443 /**
444 Return the first Protocol Interface that matches the Protocol GUID. If
445 Registration is pasased in return a Protocol Instance that was just add
446 to the system. If Retistration is NULL return the first Protocol Interface
447 you find.
448
449 @param Protocol The protocol to search for
450 @param Registration Optional Registration Key returned from
451 RegisterProtocolNotify()
452 @param Interface Return the Protocol interface (instance).
453
454 @retval EFI_SUCCESS If a valid Interface is returned
455 @retval EFI_INVALID_PARAMETER Invalid parameter
456 @retval EFI_NOT_FOUND Protocol interface not found
457
458 **/
459 EFI_STATUS
460 EFIAPI
461 SmmLocateProtocol (
462 IN EFI_GUID *Protocol,
463 IN VOID *Registration OPTIONAL,
464 OUT VOID **Interface
465 );
466
467 /**
468 Manage SMI of a particular type.
469
470 @param HandlerType Points to the handler type or NULL for root SMI handlers.
471 @param Context Points to an optional context buffer.
472 @param CommBuffer Points to the optional communication buffer.
473 @param CommBufferSize Points to the size of the optional communication buffer.
474
475 @retval EFI_SUCCESS Interrupt source was processed successfully but not quiesced.
476 @retval EFI_INTERRUPT_PENDING One or more SMI sources could not be quiesced.
477 @retval EFI_WARN_INTERRUPT_SOURCE_PENDING Interrupt source was not handled or quiesced.
478 @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED Interrupt source was handled and quiesced.
479
480 **/
481 EFI_STATUS
482 EFIAPI
483 SmiManage (
484 IN CONST EFI_GUID *HandlerType,
485 IN CONST VOID *Context OPTIONAL,
486 IN OUT VOID *CommBuffer OPTIONAL,
487 IN OUT UINTN *CommBufferSize OPTIONAL
488 );
489
490 /**
491 Registers a handler to execute within SMM.
492
493 @param Handler Handler service funtion pointer.
494 @param HandlerType Points to the handler type or NULL for root SMI handlers.
495 @param DispatchHandle On return, contains a unique handle which can be used to later unregister the handler function.
496
497 @retval EFI_SUCCESS Handler register success.
498 @retval EFI_INVALID_PARAMETER Handler or DispatchHandle is NULL.
499
500 **/
501 EFI_STATUS
502 EFIAPI
503 SmiHandlerRegister (
504 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
505 IN CONST EFI_GUID *HandlerType OPTIONAL,
506 OUT EFI_HANDLE *DispatchHandle
507 );
508
509 /**
510 Unregister a handler in SMM.
511
512 @param DispatchHandle The handle that was specified when the handler was registered.
513
514 @retval EFI_SUCCESS Handler function was successfully unregistered.
515 @retval EFI_INVALID_PARAMETER DispatchHandle does not refer to a valid handle.
516
517 **/
518 EFI_STATUS
519 EFIAPI
520 SmiHandlerUnRegister (
521 IN EFI_HANDLE DispatchHandle
522 );
523
524 /**
525 This function is the main entry point for an SMM handler dispatch
526 or communicate-based callback.
527
528 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
529 @param Context Points to an optional handler context which was specified when the handler was registered.
530 @param CommBuffer A pointer to a collection of data in memory that will
531 be conveyed from a non-SMM environment into an SMM environment.
532 @param CommBufferSize The size of the CommBuffer.
533
534 @return Status Code
535
536 **/
537 EFI_STATUS
538 EFIAPI
539 SmmDriverDispatchHandler (
540 IN EFI_HANDLE DispatchHandle,
541 IN CONST VOID *Context, OPTIONAL
542 IN OUT VOID *CommBuffer, OPTIONAL
543 IN OUT UINTN *CommBufferSize OPTIONAL
544 );
545
546 /**
547 This function is the main entry point for an SMM handler dispatch
548 or communicate-based callback.
549
550 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
551 @param Context Points to an optional handler context which was specified when the handler was registered.
552 @param CommBuffer A pointer to a collection of data in memory that will
553 be conveyed from a non-SMM environment into an SMM environment.
554 @param CommBufferSize The size of the CommBuffer.
555
556 @return Status Code
557
558 **/
559 EFI_STATUS
560 EFIAPI
561 SmmLegacyBootHandler (
562 IN EFI_HANDLE DispatchHandle,
563 IN CONST VOID *Context, OPTIONAL
564 IN OUT VOID *CommBuffer, OPTIONAL
565 IN OUT UINTN *CommBufferSize OPTIONAL
566 );
567
568 /**
569 This function is the main entry point for an SMM handler dispatch
570 or communicate-based callback.
571
572 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
573 @param Context Points to an optional handler context which was specified when the handler was registered.
574 @param CommBuffer A pointer to a collection of data in memory that will
575 be conveyed from a non-SMM environment into an SMM environment.
576 @param CommBufferSize The size of the CommBuffer.
577
578 @return Status Code
579
580 **/
581 EFI_STATUS
582 EFIAPI
583 SmmReadyToLockHandler (
584 IN EFI_HANDLE DispatchHandle,
585 IN CONST VOID *Context, OPTIONAL
586 IN OUT VOID *CommBuffer, OPTIONAL
587 IN OUT UINTN *CommBufferSize OPTIONAL
588 );
589
590 /**
591 This function is the main entry point for an SMM handler dispatch
592 or communicate-based callback.
593
594 @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
595 @param Context Points to an optional handler context which was specified when the handler was registered.
596 @param CommBuffer A pointer to a collection of data in memory that will
597 be conveyed from a non-SMM environment into an SMM environment.
598 @param CommBufferSize The size of the CommBuffer.
599
600 @return Status Code
601
602 **/
603 EFI_STATUS
604 EFIAPI
605 SmmEndOfDxeHandler (
606 IN EFI_HANDLE DispatchHandle,
607 IN CONST VOID *Context, OPTIONAL
608 IN OUT VOID *CommBuffer, OPTIONAL
609 IN OUT UINTN *CommBufferSize OPTIONAL
610 );
611
612 /**
613 Place holder function until all the SMM System Table Service are available.
614
615 @param Arg1 Undefined
616 @param Arg2 Undefined
617 @param Arg3 Undefined
618 @param Arg4 Undefined
619 @param Arg5 Undefined
620
621 @return EFI_NOT_AVAILABLE_YET
622
623 **/
624 EFI_STATUS
625 EFIAPI
626 SmmEfiNotAvailableYetArg5 (
627 UINTN Arg1,
628 UINTN Arg2,
629 UINTN Arg3,
630 UINTN Arg4,
631 UINTN Arg5
632 );
633
634 //
635 //Functions used during debug buils
636 //
637
638 /**
639 Traverse the discovered list for any drivers that were discovered but not loaded
640 because the dependency experessions evaluated to false.
641
642 **/
643 VOID
644 SmmDisplayDiscoveredNotDispatched (
645 VOID
646 );
647
648 /**
649 Add free SMRAM region for use by memory service.
650
651 @param MemBase Base address of memory region.
652 @param MemLength Length of the memory region.
653 @param Type Memory type.
654 @param Attributes Memory region state.
655
656 **/
657 VOID
658 SmmAddMemoryRegion (
659 IN EFI_PHYSICAL_ADDRESS MemBase,
660 IN UINT64 MemLength,
661 IN EFI_MEMORY_TYPE Type,
662 IN UINT64 Attributes
663 );
664
665 /**
666 Finds the protocol entry for the requested protocol.
667
668 @param Protocol The ID of the protocol
669 @param Create Create a new entry if not found
670
671 @return Protocol entry
672
673 **/
674 PROTOCOL_ENTRY *
675 SmmFindProtocolEntry (
676 IN EFI_GUID *Protocol,
677 IN BOOLEAN Create
678 );
679
680 /**
681 Signal event for every protocol in protocol entry.
682
683 @param Prot Protocol interface
684
685 **/
686 VOID
687 SmmNotifyProtocol (
688 IN PROTOCOL_INTERFACE *Prot
689 );
690
691 /**
692 Finds the protocol instance for the requested handle and protocol.
693 Note: This function doesn't do parameters checking, it's caller's responsibility
694 to pass in valid parameters.
695
696 @param Handle The handle to search the protocol on
697 @param Protocol GUID of the protocol
698 @param Interface The interface for the protocol being searched
699
700 @return Protocol instance (NULL: Not found)
701
702 **/
703 PROTOCOL_INTERFACE *
704 SmmFindProtocolInterface (
705 IN IHANDLE *Handle,
706 IN EFI_GUID *Protocol,
707 IN VOID *Interface
708 );
709
710 /**
711 Removes Protocol from the protocol list (but not the handle list).
712
713 @param Handle The handle to remove protocol on.
714 @param Protocol GUID of the protocol to be moved
715 @param Interface The interface of the protocol
716
717 @return Protocol Entry
718
719 **/
720 PROTOCOL_INTERFACE *
721 SmmRemoveInterfaceFromProtocol (
722 IN IHANDLE *Handle,
723 IN EFI_GUID *Protocol,
724 IN VOID *Interface
725 );
726
727 /**
728 This is the POSTFIX version of the dependency evaluator. This code does
729 not need to handle Before or After, as it is not valid to call this
730 routine in this case. POSTFIX means all the math is done on top of the stack.
731
732 @param DriverEntry DriverEntry element to update.
733
734 @retval TRUE If driver is ready to run.
735 @retval FALSE If driver is not ready to run or some fatal error
736 was found.
737
738 **/
739 BOOLEAN
740 SmmIsSchedulable (
741 IN EFI_SMM_DRIVER_ENTRY *DriverEntry
742 );
743
744 #endif