TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestUefiBootServicesTableLib.h
Go to the documentation of this file.
1
12#ifndef UEFI_BOOT_SERVICES_TABLE_LIB_UNIT_TEST_H_
13#define UEFI_BOOT_SERVICES_TABLE_LIB_UNIT_TEST_H_
14
15#include <Uefi.h>
16
17#include <Pi/PiMultiPhase.h>
18#include <Library/BaseLib.h>
20#include <Library/DebugLib.h>
22#include <Library/UnitTestLib.h>
24
35EFIAPI
37 IN EFI_TPL NewTpl
38 );
39
47VOID
48EFIAPI
50 IN EFI_TPL NewTpl
51 );
52
72EFIAPI
75 IN EFI_MEMORY_TYPE MemoryType,
76 IN UINTN NumberOfPages,
78 );
79
92EFIAPI
95 IN UINTN NumberOfPages
96 );
97
129EFIAPI
131 IN OUT UINTN *MemoryMapSize,
132 IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
133 OUT UINTN *MapKey,
134 OUT UINTN *DescriptorSize,
135 OUT UINT32 *DescriptorVersion
136 );
137
152EFIAPI
154 IN EFI_MEMORY_TYPE PoolType,
155 IN UINTN Size,
156 OUT VOID **Buffer
157 );
158
169EFIAPI
171 IN VOID *Buffer
172 );
173
185EFIAPI
187 IN VOID *Buffer,
188 OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
189 );
190
210EFIAPI
212 IN UINT32 Type,
213 IN EFI_TPL NotifyTpl,
215 IN VOID *NotifyContext, OPTIONAL
216 OUT EFI_EVENT *Event
217 );
218
235EFIAPI
237 IN EFI_EVENT UserEvent,
238 IN EFI_TIMER_DELAY Type,
239 IN UINT64 TriggerTime
240 );
241
257EFIAPI
259 IN UINTN NumberOfEvents,
260 IN EFI_EVENT *UserEvents,
261 OUT UINTN *UserIndex
262 );
263
274EFIAPI
276 IN EFI_EVENT UserEvent
277 );
278
289EFIAPI
291 IN EFI_EVENT UserEvent
292 );
293
305EFIAPI
307 IN EFI_EVENT UserEvent
308 );
309
325EFIAPI
327 IN OUT EFI_HANDLE *UserHandle,
328 IN EFI_GUID *Protocol,
329 IN EFI_INTERFACE_TYPE InterfaceType,
330 IN VOID *Interface
331 );
332
348EFIAPI
350 IN EFI_HANDLE UserHandle,
351 IN EFI_GUID *Protocol,
352 IN VOID *OldInterface,
353 IN VOID *NewInterface
354 );
355
370EFIAPI
372 IN EFI_HANDLE UserHandle,
373 IN EFI_GUID *Protocol,
374 IN VOID *Interface
375 );
376
389EFIAPI
391 IN EFI_HANDLE UserHandle,
392 IN EFI_GUID *Protocol,
393 OUT VOID **Interface
394 );
395
410EFIAPI
412 IN EFI_GUID *Protocol,
413 IN EFI_EVENT Event,
414 OUT VOID **Registration
415 );
416
436EFIAPI
438 IN EFI_LOCATE_SEARCH_TYPE SearchType,
439 IN EFI_GUID *Protocol OPTIONAL,
440 IN VOID *SearchKey OPTIONAL,
441 IN OUT UINTN *BufferSize,
442 OUT EFI_HANDLE *Buffer
443 );
444
461EFIAPI
463 IN EFI_GUID *Protocol,
464 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
465 OUT EFI_HANDLE *Device
466 );
467
484EFIAPI
486 IN EFI_GUID *Guid,
487 IN VOID *Table
488 );
489
525EFIAPI
527 IN BOOLEAN BootPolicy,
528 IN EFI_HANDLE ParentImageHandle,
530 IN VOID *SourceBuffer OPTIONAL,
531 IN UINTN SourceSize,
532 OUT EFI_HANDLE *ImageHandle
533 );
534
555EFIAPI
557 IN EFI_HANDLE ImageHandle,
558 OUT UINTN *ExitDataSize,
559 OUT CHAR16 **ExitData OPTIONAL
560 );
561
586EFIAPI
588 IN EFI_HANDLE ImageHandle,
589 IN EFI_STATUS Status,
590 IN UINTN ExitDataSize,
591 IN CHAR16 *ExitData OPTIONAL
592 );
593
607EFIAPI
609 IN EFI_HANDLE ImageHandle
610 );
611
623EFIAPI
625 IN EFI_HANDLE ImageHandle,
626 IN UINTN MapKey
627 );
628
640EFIAPI
642 OUT UINT64 *Count
643 );
644
656EFIAPI
658 IN UINTN Microseconds
659 );
660
684EFIAPI
686 IN UINTN Timeout,
687 IN UINT64 WatchdogCode,
688 IN UINTN DataSize,
689 IN CHAR16 *WatchdogData OPTIONAL
690 );
691
719EFIAPI
721 IN EFI_HANDLE ControllerHandle,
722 IN EFI_HANDLE *DriverImageHandle OPTIONAL,
723 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,
724 IN BOOLEAN Recursive
725 );
726
760EFIAPI
762 IN EFI_HANDLE ControllerHandle,
763 IN EFI_HANDLE DriverImageHandle OPTIONAL,
764 IN EFI_HANDLE ChildHandle OPTIONAL
765 );
766
788EFIAPI
790 IN EFI_HANDLE UserHandle,
791 IN EFI_GUID *Protocol,
792 OUT VOID **Interface OPTIONAL,
793 IN EFI_HANDLE ImageHandle,
794 IN EFI_HANDLE ControllerHandle,
795 IN UINT32 Attributes
796 );
797
824EFIAPI
826 IN EFI_HANDLE UserHandle,
827 IN EFI_GUID *Protocol,
828 IN EFI_HANDLE AgentHandle,
829 IN EFI_HANDLE ControllerHandle
830 );
831
844EFIAPI
846 IN EFI_HANDLE UserHandle,
847 IN EFI_GUID *Protocol,
849 OUT UINTN *EntryCount
850 );
851
876EFIAPI
878 IN EFI_HANDLE UserHandle,
879 OUT EFI_GUID ***ProtocolBuffer,
880 OUT UINTN *ProtocolBufferCount
881 );
882
906EFIAPI
908 IN EFI_LOCATE_SEARCH_TYPE SearchType,
909 IN EFI_GUID *Protocol OPTIONAL,
910 IN VOID *SearchKey OPTIONAL,
911 IN OUT UINTN *NumberHandles,
912 OUT EFI_HANDLE **Buffer
913 );
914
932EFIAPI
934 IN EFI_GUID *Protocol,
935 IN VOID *Registration OPTIONAL,
936 OUT VOID **Interface
937 );
938
961EFIAPI
963 IN OUT EFI_HANDLE *Handle,
964 ...
965 );
966
982EFIAPI
984 IN EFI_HANDLE Handle,
985 ...
986 );
987
1004EFIAPI
1006 IN VOID *Data,
1007 IN UINTN DataSize,
1008 OUT UINT32 *Crc32
1009 );
1010
1032EFIAPI
1034 IN UINT32 Type,
1035 IN EFI_TPL NotifyTpl,
1037 IN CONST VOID *NotifyContext, OPTIONAL
1038 IN CONST EFI_GUID *EventGroup, OPTIONAL
1039 OUT EFI_EVENT *Event
1040 );
1041
1042#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
VOID EFIAPI NotifyFunction(IN EFI_EVENT Event, IN VOID *Context)
Definition: ScsiBus.c:1492
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
UINTN EFI_TPL
Definition: UefiBaseType.h:41
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_MEMORY_TYPE
EFI_INTERFACE_TYPE
Definition: UefiSpec.h:1189
VOID(EFIAPI * EFI_EVENT_NOTIFY)(IN EFI_EVENT Event, IN VOID *Context)
Definition: UefiSpec.h:463
EFI_TIMER_DELAY
Definition: UefiSpec.h:527
EFI_LOCATE_SEARCH_TYPE
Definition: UefiSpec.h:1505
EFI_ALLOCATE_TYPE
Definition: UefiSpec.h:29
EFI_STATUS EFIAPI UnitTestOpenProtocol(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, OUT VOID **Interface OPTIONAL, IN EFI_HANDLE ImageHandle, IN EFI_HANDLE ControllerHandle, IN UINT32 Attributes)
EFI_STATUS EFIAPI UnitTestCloseProtocol(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, IN EFI_HANDLE AgentHandle, IN EFI_HANDLE ControllerHandle)
EFI_STATUS EFIAPI UnitTestRegisterProtocolNotify(IN EFI_GUID *Protocol, IN EFI_EVENT Event, OUT VOID **Registration)
EFI_TPL EFIAPI UnitTestRaiseTpl(IN EFI_TPL NewTpl)
EFI_STATUS EFIAPI UnitTestUnloadImage(IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI UnitTestLocateDevicePath(IN EFI_GUID *Protocol, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, OUT EFI_HANDLE *Device)
EFI_STATUS EFIAPI UnitTestCalculateCrc32(IN VOID *Data, IN UINTN DataSize, OUT UINT32 *Crc32)
EFI_STATUS EFIAPI UnitTestGetMemoryMap(IN OUT UINTN *MemoryMapSize, IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, OUT UINTN *MapKey, OUT UINTN *DescriptorSize, OUT UINT32 *DescriptorVersion)
EFI_STATUS EFIAPI UnitTestInstallProtocolInterface(IN OUT EFI_HANDLE *UserHandle, IN EFI_GUID *Protocol, IN EFI_INTERFACE_TYPE InterfaceType, IN VOID *Interface)
EFI_STATUS EFIAPI UnitTestSignalEvent(IN EFI_EVENT UserEvent)
EFI_STATUS EFIAPI UnitTestSetWatchdogTimer(IN UINTN Timeout, IN UINT64 WatchdogCode, IN UINTN DataSize, IN CHAR16 *WatchdogData OPTIONAL)
EFI_STATUS EFIAPI UnitTestWaitForEvent(IN UINTN NumberOfEvents, IN EFI_EVENT *UserEvents, OUT UINTN *UserIndex)
EFI_STATUS EFIAPI UnitTestCloseEvent(IN EFI_EVENT UserEvent)
EFI_STATUS EFIAPI UnitTestExit(IN EFI_HANDLE ImageHandle, IN EFI_STATUS Status, IN UINTN ExitDataSize, IN CHAR16 *ExitData OPTIONAL)
EFI_STATUS EFIAPI UnitTestCheckEvent(IN EFI_EVENT UserEvent)
EFI_STATUS EFIAPI UnitTestLocateHandleBuffer(IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, IN OUT UINTN *NumberHandles, OUT EFI_HANDLE **Buffer)
EFI_STATUS EFIAPI UnitTestLoadImage(IN BOOLEAN BootPolicy, IN EFI_HANDLE ParentImageHandle, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN VOID *SourceBuffer OPTIONAL, IN UINTN SourceSize, OUT EFI_HANDLE *ImageHandle)
VOID EFIAPI UnitTestRestoreTpl(IN EFI_TPL NewTpl)
EFI_STATUS EFIAPI UnitTestCreateEventEx(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL IN CONST VOID *NotifyContext, OPTIONAL IN CONST EFI_GUID *EventGroup, OPTIONAL OUT EFI_EVENT *Event)
EFI_STATUS EFIAPI UnitTestStall(IN UINTN Microseconds)
EFI_STATUS EFIAPI UnitTestDisconnectController(IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE DriverImageHandle OPTIONAL, IN EFI_HANDLE ChildHandle OPTIONAL)
EFI_STATUS EFIAPI UnitTestInternalFreePool(IN VOID *Buffer, OUT EFI_MEMORY_TYPE *PoolType OPTIONAL)
EFI_STATUS EFIAPI UnitTestStartImage(IN EFI_HANDLE ImageHandle, OUT UINTN *ExitDataSize, OUT CHAR16 **ExitData OPTIONAL)
EFI_STATUS EFIAPI UnitTestUninstallMultipleProtocolInterfaces(IN EFI_HANDLE Handle,...)
EFI_STATUS EFIAPI UnitTestReinstallProtocolInterface(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, IN VOID *OldInterface, IN VOID *NewInterface)
EFI_STATUS EFIAPI UnitTestAllocatePool(IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer)
EFI_STATUS EFIAPI UnitTestUninstallProtocolInterface(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, IN VOID *Interface)
EFI_STATUS EFIAPI UnitTestProtocolsPerHandle(IN EFI_HANDLE UserHandle, OUT EFI_GUID ***ProtocolBuffer, OUT UINTN *ProtocolBufferCount)
EFI_STATUS EFIAPI UnitTestSetTimer(IN EFI_EVENT UserEvent, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime)
EFI_STATUS EFIAPI UnitTestGetNextMonotonicCount(OUT UINT64 *Count)
EFI_STATUS EFIAPI UnitTestExitBootServices(IN EFI_HANDLE ImageHandle, IN UINTN MapKey)
EFI_STATUS EFIAPI UnitTestOpenProtocolInformation(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer, OUT UINTN *EntryCount)
EFI_STATUS EFIAPI UnitTestFreePages(IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN NumberOfPages)
EFI_STATUS EFIAPI UnitTestFreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI UnitTestHandleProtocol(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, OUT VOID **Interface)
EFI_STATUS EFIAPI UnitTestConnectController(IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE *DriverImageHandle OPTIONAL, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, IN BOOLEAN Recursive)
EFI_STATUS EFIAPI UnitTestLocateHandle(IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, IN OUT UINTN *BufferSize, OUT EFI_HANDLE *Buffer)
EFI_STATUS EFIAPI UnitTestInstallConfigurationTable(IN EFI_GUID *Guid, IN VOID *Table)
EFI_STATUS EFIAPI UnitTestInstallMultipleProtocolInterfaces(IN OUT EFI_HANDLE *Handle,...)
EFI_STATUS EFIAPI UnitTestLocateProtocol(IN EFI_GUID *Protocol, IN VOID *Registration OPTIONAL, OUT VOID **Interface)
EFI_STATUS EFIAPI UnitTestAllocatePages(IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN NumberOfPages, IN OUT EFI_PHYSICAL_ADDRESS *Memory)
EFI_STATUS EFIAPI UnitTestCreateEvent(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL IN VOID *NotifyContext, OPTIONAL OUT EFI_EVENT *Event)
Definition: Base.h:213