PrmPkg: Apply uncrustify changes
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in PrmPkg. Cc: Andrew Fish <afish@apple.com> Cc: Kang Gao <kang.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Liu Yun <yun.y.liu@intel.com> Cc: Ankit Sinha <ankit.sinha@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
f3c11224b5
commit
a298a84478
@@ -16,10 +16,10 @@
|
||||
|
||||
#include "UefiBootServicesTableLibUnitTest.h"
|
||||
|
||||
EFI_HANDLE gImageHandle = NULL;
|
||||
EFI_SYSTEM_TABLE *gST = NULL;
|
||||
EFI_HANDLE gImageHandle = NULL;
|
||||
EFI_SYSTEM_TABLE *gST = NULL;
|
||||
|
||||
STATIC EFI_BOOT_SERVICES mBootServices = {
|
||||
STATIC EFI_BOOT_SERVICES mBootServices = {
|
||||
{
|
||||
EFI_BOOT_SERVICES_SIGNATURE, // Signature
|
||||
EFI_BOOT_SERVICES_REVISION, // Revision
|
||||
@@ -27,50 +27,50 @@ STATIC EFI_BOOT_SERVICES mBootServices = {
|
||||
0, // CRC32
|
||||
0 // Reserved
|
||||
},
|
||||
(EFI_RAISE_TPL) UnitTestRaiseTpl, // RaiseTPL
|
||||
(EFI_RESTORE_TPL) UnitTestRestoreTpl, // RestoreTPL
|
||||
(EFI_ALLOCATE_PAGES) UnitTestAllocatePages, // AllocatePages
|
||||
(EFI_FREE_PAGES) UnitTestFreePages, // FreePages
|
||||
(EFI_GET_MEMORY_MAP) UnitTestGetMemoryMap, // GetMemoryMap
|
||||
(EFI_ALLOCATE_POOL) UnitTestAllocatePool, // AllocatePool
|
||||
(EFI_FREE_POOL) UnitTestFreePool, // FreePool
|
||||
(EFI_CREATE_EVENT) UnitTestCreateEvent, // CreateEvent
|
||||
(EFI_SET_TIMER) UnitTestSetTimer, // SetTimer
|
||||
(EFI_WAIT_FOR_EVENT) UnitTestWaitForEvent, // WaitForEvent
|
||||
(EFI_SIGNAL_EVENT) UnitTestSignalEvent, // SignalEvent
|
||||
(EFI_CLOSE_EVENT) UnitTestCloseEvent, // CloseEvent
|
||||
(EFI_CHECK_EVENT) UnitTestCheckEvent, // CheckEvent
|
||||
(EFI_INSTALL_PROTOCOL_INTERFACE) UnitTestInstallProtocolInterface, // InstallProtocolInterface
|
||||
(EFI_REINSTALL_PROTOCOL_INTERFACE) UnitTestReinstallProtocolInterface, // ReinstallProtocolInterface
|
||||
(EFI_UNINSTALL_PROTOCOL_INTERFACE) UnitTestUninstallProtocolInterface, // UninstallProtocolInterface
|
||||
(EFI_HANDLE_PROTOCOL) UnitTestHandleProtocol, // HandleProtocol
|
||||
(VOID *) NULL, // Reserved
|
||||
(EFI_REGISTER_PROTOCOL_NOTIFY) UnitTestRegisterProtocolNotify, // RegisterProtocolNotify
|
||||
(EFI_LOCATE_HANDLE) UnitTestLocateHandle, // LocateHandle
|
||||
(EFI_LOCATE_DEVICE_PATH) UnitTestLocateDevicePath, // LocateDevicePath
|
||||
(EFI_INSTALL_CONFIGURATION_TABLE) UnitTestInstallConfigurationTable, // InstallConfigurationTable
|
||||
(EFI_IMAGE_LOAD) UnitTestLoadImage, // LoadImage
|
||||
(EFI_IMAGE_START) UnitTestStartImage, // StartImage
|
||||
(EFI_EXIT) UnitTestExit, // Exit
|
||||
(EFI_IMAGE_UNLOAD) UnitTestUnloadImage, // UnloadImage
|
||||
(EFI_EXIT_BOOT_SERVICES) UnitTestExitBootServices, // ExitBootServices
|
||||
(EFI_GET_NEXT_MONOTONIC_COUNT) UnitTestGetNextMonotonicCount, // GetNextMonotonicCount
|
||||
(EFI_STALL) UnitTestStall, // Stall
|
||||
(EFI_SET_WATCHDOG_TIMER) UnitTestSetWatchdogTimer, // SetWatchdogTimer
|
||||
(EFI_CONNECT_CONTROLLER) UnitTestConnectController, // ConnectController
|
||||
(EFI_DISCONNECT_CONTROLLER) UnitTestDisconnectController, // DisconnectController
|
||||
(EFI_OPEN_PROTOCOL) UnitTestOpenProtocol, // OpenProtocol
|
||||
(EFI_CLOSE_PROTOCOL) UnitTestCloseProtocol, // CloseProtocol
|
||||
(EFI_OPEN_PROTOCOL_INFORMATION) UnitTestOpenProtocolInformation, // OpenProtocolInformation
|
||||
(EFI_PROTOCOLS_PER_HANDLE) UnitTestProtocolsPerHandle, // ProtocolsPerHandle
|
||||
(EFI_LOCATE_HANDLE_BUFFER) UnitTestLocateHandleBuffer, // LocateHandleBuffer
|
||||
(EFI_LOCATE_PROTOCOL) UnitTestLocateProtocol, // LocateProtocol
|
||||
(EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) UnitTestInstallMultipleProtocolInterfaces, // InstallMultipleProtocolInterfaces
|
||||
(EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) UnitTestUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces
|
||||
(EFI_CALCULATE_CRC32) UnitTestCalculateCrc32, // CalculateCrc32
|
||||
(EFI_COPY_MEM) CopyMem, // CopyMem
|
||||
(EFI_SET_MEM) SetMem, // SetMem
|
||||
(EFI_CREATE_EVENT_EX) UnitTestCreateEventEx // CreateEventEx
|
||||
(EFI_RAISE_TPL)UnitTestRaiseTpl, // RaiseTPL
|
||||
(EFI_RESTORE_TPL)UnitTestRestoreTpl, // RestoreTPL
|
||||
(EFI_ALLOCATE_PAGES)UnitTestAllocatePages, // AllocatePages
|
||||
(EFI_FREE_PAGES)UnitTestFreePages, // FreePages
|
||||
(EFI_GET_MEMORY_MAP)UnitTestGetMemoryMap, // GetMemoryMap
|
||||
(EFI_ALLOCATE_POOL)UnitTestAllocatePool, // AllocatePool
|
||||
(EFI_FREE_POOL)UnitTestFreePool, // FreePool
|
||||
(EFI_CREATE_EVENT)UnitTestCreateEvent, // CreateEvent
|
||||
(EFI_SET_TIMER)UnitTestSetTimer, // SetTimer
|
||||
(EFI_WAIT_FOR_EVENT)UnitTestWaitForEvent, // WaitForEvent
|
||||
(EFI_SIGNAL_EVENT)UnitTestSignalEvent, // SignalEvent
|
||||
(EFI_CLOSE_EVENT)UnitTestCloseEvent, // CloseEvent
|
||||
(EFI_CHECK_EVENT)UnitTestCheckEvent, // CheckEvent
|
||||
(EFI_INSTALL_PROTOCOL_INTERFACE)UnitTestInstallProtocolInterface, // InstallProtocolInterface
|
||||
(EFI_REINSTALL_PROTOCOL_INTERFACE)UnitTestReinstallProtocolInterface, // ReinstallProtocolInterface
|
||||
(EFI_UNINSTALL_PROTOCOL_INTERFACE)UnitTestUninstallProtocolInterface, // UninstallProtocolInterface
|
||||
(EFI_HANDLE_PROTOCOL)UnitTestHandleProtocol, // HandleProtocol
|
||||
(VOID *)NULL, // Reserved
|
||||
(EFI_REGISTER_PROTOCOL_NOTIFY)UnitTestRegisterProtocolNotify, // RegisterProtocolNotify
|
||||
(EFI_LOCATE_HANDLE)UnitTestLocateHandle, // LocateHandle
|
||||
(EFI_LOCATE_DEVICE_PATH)UnitTestLocateDevicePath, // LocateDevicePath
|
||||
(EFI_INSTALL_CONFIGURATION_TABLE)UnitTestInstallConfigurationTable, // InstallConfigurationTable
|
||||
(EFI_IMAGE_LOAD)UnitTestLoadImage, // LoadImage
|
||||
(EFI_IMAGE_START)UnitTestStartImage, // StartImage
|
||||
(EFI_EXIT)UnitTestExit, // Exit
|
||||
(EFI_IMAGE_UNLOAD)UnitTestUnloadImage, // UnloadImage
|
||||
(EFI_EXIT_BOOT_SERVICES)UnitTestExitBootServices, // ExitBootServices
|
||||
(EFI_GET_NEXT_MONOTONIC_COUNT)UnitTestGetNextMonotonicCount, // GetNextMonotonicCount
|
||||
(EFI_STALL)UnitTestStall, // Stall
|
||||
(EFI_SET_WATCHDOG_TIMER)UnitTestSetWatchdogTimer, // SetWatchdogTimer
|
||||
(EFI_CONNECT_CONTROLLER)UnitTestConnectController, // ConnectController
|
||||
(EFI_DISCONNECT_CONTROLLER)UnitTestDisconnectController, // DisconnectController
|
||||
(EFI_OPEN_PROTOCOL)UnitTestOpenProtocol, // OpenProtocol
|
||||
(EFI_CLOSE_PROTOCOL)UnitTestCloseProtocol, // CloseProtocol
|
||||
(EFI_OPEN_PROTOCOL_INFORMATION)UnitTestOpenProtocolInformation, // OpenProtocolInformation
|
||||
(EFI_PROTOCOLS_PER_HANDLE)UnitTestProtocolsPerHandle, // ProtocolsPerHandle
|
||||
(EFI_LOCATE_HANDLE_BUFFER)UnitTestLocateHandleBuffer, // LocateHandleBuffer
|
||||
(EFI_LOCATE_PROTOCOL)UnitTestLocateProtocol, // LocateProtocol
|
||||
(EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES)UnitTestInstallMultipleProtocolInterfaces, // InstallMultipleProtocolInterfaces
|
||||
(EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)UnitTestUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces
|
||||
(EFI_CALCULATE_CRC32)UnitTestCalculateCrc32, // CalculateCrc32
|
||||
(EFI_COPY_MEM)CopyMem, // CopyMem
|
||||
(EFI_SET_MEM)SetMem, // SetMem
|
||||
(EFI_CREATE_EVENT_EX)UnitTestCreateEventEx // CreateEventEx
|
||||
};
|
||||
|
||||
EFI_BOOT_SERVICES *gBS = &mBootServices;
|
||||
|
@@ -34,11 +34,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
EFI_TPL
|
||||
EFIAPI
|
||||
UnitTestRaiseTpl (
|
||||
IN EFI_TPL NewTpl
|
||||
IN EFI_TPL NewTpl
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Lowers the task priority to the previous value. If the new
|
||||
priority unmasks events at a higher priority, they are dispatched.
|
||||
@@ -49,7 +47,7 @@ UnitTestRaiseTpl (
|
||||
VOID
|
||||
EFIAPI
|
||||
UnitTestRestoreTpl (
|
||||
IN EFI_TPL NewTpl
|
||||
IN EFI_TPL NewTpl
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -73,9 +71,9 @@ UnitTestRestoreTpl (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestAllocatePages (
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS *Memory
|
||||
);
|
||||
|
||||
@@ -93,8 +91,8 @@ UnitTestAllocatePages (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestFreePages (
|
||||
IN EFI_PHYSICAL_ADDRESS Memory,
|
||||
IN UINTN NumberOfPages
|
||||
IN EFI_PHYSICAL_ADDRESS Memory,
|
||||
IN UINTN NumberOfPages
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -137,8 +135,6 @@ UnitTestGetMemoryMap (
|
||||
OUT UINT32 *DescriptorVersion
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Allocate pool of a particular type.
|
||||
|
||||
@@ -172,7 +168,7 @@ UnitTestAllocatePool (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestFreePool (
|
||||
IN VOID *Buffer
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -188,8 +184,8 @@ UnitTestFreePool (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestInternalFreePool (
|
||||
IN VOID *Buffer,
|
||||
OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
|
||||
IN VOID *Buffer,
|
||||
OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -213,9 +209,9 @@ UnitTestInternalFreePool (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCreateEvent (
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN VOID *NotifyContext, OPTIONAL
|
||||
OUT EFI_EVENT *Event
|
||||
);
|
||||
@@ -238,9 +234,9 @@ UnitTestCreateEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestSetTimer (
|
||||
IN EFI_EVENT UserEvent,
|
||||
IN EFI_TIMER_DELAY Type,
|
||||
IN UINT64 TriggerTime
|
||||
IN EFI_EVENT UserEvent,
|
||||
IN EFI_TIMER_DELAY Type,
|
||||
IN UINT64 TriggerTime
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -260,9 +256,9 @@ UnitTestSetTimer (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestWaitForEvent (
|
||||
IN UINTN NumberOfEvents,
|
||||
IN EFI_EVENT *UserEvents,
|
||||
OUT UINTN *UserIndex
|
||||
IN UINTN NumberOfEvents,
|
||||
IN EFI_EVENT *UserEvents,
|
||||
OUT UINTN *UserIndex
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -277,7 +273,7 @@ UnitTestWaitForEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestSignalEvent (
|
||||
IN EFI_EVENT UserEvent
|
||||
IN EFI_EVENT UserEvent
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -292,7 +288,7 @@ UnitTestSignalEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCloseEvent (
|
||||
IN EFI_EVENT UserEvent
|
||||
IN EFI_EVENT UserEvent
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -308,7 +304,7 @@ UnitTestCloseEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCheckEvent (
|
||||
IN EFI_EVENT UserEvent
|
||||
IN EFI_EVENT UserEvent
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -328,10 +324,10 @@ UnitTestCheckEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestInstallProtocolInterface (
|
||||
IN OUT EFI_HANDLE *UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN EFI_INTERFACE_TYPE InterfaceType,
|
||||
IN VOID *Interface
|
||||
IN OUT EFI_HANDLE *UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN EFI_INTERFACE_TYPE InterfaceType,
|
||||
IN VOID *Interface
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -351,10 +347,10 @@ UnitTestInstallProtocolInterface (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestReinstallProtocolInterface (
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN VOID *OldInterface,
|
||||
IN VOID *NewInterface
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN VOID *OldInterface,
|
||||
IN VOID *NewInterface
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -373,9 +369,9 @@ UnitTestReinstallProtocolInterface (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestUninstallProtocolInterface (
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN VOID *Interface
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN VOID *Interface
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -392,9 +388,9 @@ UnitTestUninstallProtocolInterface (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestHandleProtocol (
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
OUT VOID **Interface
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
OUT VOID **Interface
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -413,9 +409,9 @@ UnitTestHandleProtocol (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestRegisterProtocolNotify (
|
||||
IN EFI_GUID *Protocol,
|
||||
IN EFI_EVENT Event,
|
||||
OUT VOID **Registration
|
||||
IN EFI_GUID *Protocol,
|
||||
IN EFI_EVENT Event,
|
||||
OUT VOID **Registration
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -439,11 +435,11 @@ UnitTestRegisterProtocolNotify (
|
||||
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
|
||||
IN EFI_LOCATE_SEARCH_TYPE SearchType,
|
||||
IN EFI_GUID *Protocol OPTIONAL,
|
||||
IN VOID *SearchKey OPTIONAL,
|
||||
IN OUT UINTN *BufferSize,
|
||||
OUT EFI_HANDLE *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -464,9 +460,9 @@ UnitTestLocateHandle (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestLocateDevicePath (
|
||||
IN EFI_GUID *Protocol,
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
|
||||
OUT EFI_HANDLE *Device
|
||||
IN EFI_GUID *Protocol,
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
|
||||
OUT EFI_HANDLE *Device
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -487,8 +483,8 @@ UnitTestLocateDevicePath (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestInstallConfigurationTable (
|
||||
IN EFI_GUID *Guid,
|
||||
IN VOID *Table
|
||||
IN EFI_GUID *Guid,
|
||||
IN VOID *Table
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -528,12 +524,12 @@ UnitTestInstallConfigurationTable (
|
||||
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
|
||||
IN BOOLEAN BootPolicy,
|
||||
IN EFI_HANDLE ParentImageHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
|
||||
IN VOID *SourceBuffer OPTIONAL,
|
||||
IN UINTN SourceSize,
|
||||
OUT EFI_HANDLE *ImageHandle
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -626,8 +622,8 @@ UnitTestUnloadImage (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestExitBootServices (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN UINTN MapKey
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN UINTN MapKey
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -643,7 +639,7 @@ UnitTestExitBootServices (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestGetNextMonotonicCount (
|
||||
OUT UINT64 *Count
|
||||
OUT UINT64 *Count
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -659,7 +655,7 @@ UnitTestGetNextMonotonicCount (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestStall (
|
||||
IN UINTN Microseconds
|
||||
IN UINTN Microseconds
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -687,10 +683,10 @@ UnitTestStall (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestSetWatchdogTimer (
|
||||
IN UINTN Timeout,
|
||||
IN UINT64 WatchdogCode,
|
||||
IN UINTN DataSize,
|
||||
IN CHAR16 *WatchdogData OPTIONAL
|
||||
IN UINTN Timeout,
|
||||
IN UINT64 WatchdogCode,
|
||||
IN UINTN DataSize,
|
||||
IN CHAR16 *WatchdogData OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -791,12 +787,12 @@ UnitTestDisconnectController (
|
||||
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
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
OUT VOID **Interface OPTIONAL,
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINT32 Attributes
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -827,10 +823,10 @@ UnitTestOpenProtocol (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCloseProtocol (
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN EFI_HANDLE AgentHandle,
|
||||
IN EFI_HANDLE ControllerHandle
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
IN EFI_HANDLE AgentHandle,
|
||||
IN EFI_HANDLE ControllerHandle
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -847,10 +843,10 @@ UnitTestCloseProtocol (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestOpenProtocolInformation (
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
|
||||
OUT UINTN *EntryCount
|
||||
IN EFI_HANDLE UserHandle,
|
||||
IN EFI_GUID *Protocol,
|
||||
OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
|
||||
OUT UINTN *EntryCount
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -879,9 +875,9 @@ UnitTestOpenProtocolInformation (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestProtocolsPerHandle (
|
||||
IN EFI_HANDLE UserHandle,
|
||||
OUT EFI_GUID ***ProtocolBuffer,
|
||||
OUT UINTN *ProtocolBufferCount
|
||||
IN EFI_HANDLE UserHandle,
|
||||
OUT EFI_GUID ***ProtocolBuffer,
|
||||
OUT UINTN *ProtocolBufferCount
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -909,11 +905,11 @@ UnitTestProtocolsPerHandle (
|
||||
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
|
||||
IN EFI_LOCATE_SEARCH_TYPE SearchType,
|
||||
IN EFI_GUID *Protocol OPTIONAL,
|
||||
IN VOID *SearchKey OPTIONAL,
|
||||
IN OUT UINTN *NumberHandles,
|
||||
OUT EFI_HANDLE **Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -964,7 +960,7 @@ UnitTestLocateProtocol (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestInstallMultipleProtocolInterfaces (
|
||||
IN OUT EFI_HANDLE *Handle,
|
||||
IN OUT EFI_HANDLE *Handle,
|
||||
...
|
||||
);
|
||||
|
||||
@@ -985,7 +981,7 @@ UnitTestInstallMultipleProtocolInterfaces (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestUninstallMultipleProtocolInterfaces (
|
||||
IN EFI_HANDLE Handle,
|
||||
IN EFI_HANDLE Handle,
|
||||
...
|
||||
);
|
||||
|
||||
@@ -1007,9 +1003,9 @@ UnitTestUninstallMultipleProtocolInterfaces (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCalculateCrc32 (
|
||||
IN VOID *Data,
|
||||
IN UINTN DataSize,
|
||||
OUT UINT32 *Crc32
|
||||
IN VOID *Data,
|
||||
IN UINTN DataSize,
|
||||
OUT UINT32 *Crc32
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1035,11 +1031,11 @@ UnitTestCalculateCrc32 (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCreateEventEx (
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN CONST VOID *NotifyContext, OPTIONAL
|
||||
IN CONST EFI_GUID *EventGroup, OPTIONAL
|
||||
IN CONST EFI_GUID *EventGroup, OPTIONAL
|
||||
OUT EFI_EVENT *Event
|
||||
);
|
||||
|
||||
|
@@ -29,9 +29,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCreateEvent (
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN VOID *NotifyContext, OPTIONAL
|
||||
OUT EFI_EVENT *Event
|
||||
)
|
||||
@@ -57,9 +57,9 @@ UnitTestCreateEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestSetTimer (
|
||||
IN EFI_EVENT UserEvent,
|
||||
IN EFI_TIMER_DELAY Type,
|
||||
IN UINT64 TriggerTime
|
||||
IN EFI_EVENT UserEvent,
|
||||
IN EFI_TIMER_DELAY Type,
|
||||
IN UINT64 TriggerTime
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -82,9 +82,9 @@ UnitTestSetTimer (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestWaitForEvent (
|
||||
IN UINTN NumberOfEvents,
|
||||
IN EFI_EVENT *UserEvents,
|
||||
OUT UINTN *UserIndex
|
||||
IN UINTN NumberOfEvents,
|
||||
IN EFI_EVENT *UserEvents,
|
||||
OUT UINTN *UserIndex
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -102,7 +102,7 @@ UnitTestWaitForEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestSignalEvent (
|
||||
IN EFI_EVENT UserEvent
|
||||
IN EFI_EVENT UserEvent
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -120,7 +120,7 @@ UnitTestSignalEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCloseEvent (
|
||||
IN EFI_EVENT UserEvent
|
||||
IN EFI_EVENT UserEvent
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -139,7 +139,7 @@ UnitTestCloseEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCheckEvent (
|
||||
IN EFI_EVENT UserEvent
|
||||
IN EFI_EVENT UserEvent
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -168,11 +168,11 @@ UnitTestCheckEvent (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCreateEventEx (
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN UINT32 Type,
|
||||
IN EFI_TPL NotifyTpl,
|
||||
IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
|
||||
IN CONST VOID *NotifyContext, OPTIONAL
|
||||
IN CONST EFI_GUID *EventGroup, OPTIONAL
|
||||
IN CONST EFI_GUID *EventGroup, OPTIONAL
|
||||
OUT EFI_EVENT *Event
|
||||
)
|
||||
{
|
||||
|
@@ -45,12 +45,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
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
|
||||
IN BOOLEAN BootPolicy,
|
||||
IN EFI_HANDLE ParentImageHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
|
||||
IN VOID *SourceBuffer OPTIONAL,
|
||||
IN UINTN SourceSize,
|
||||
OUT EFI_HANDLE *ImageHandle
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -155,8 +155,8 @@ UnitTestUnloadImage (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestExitBootServices (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN UINTN MapKey
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN UINTN MapKey
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
|
@@ -29,9 +29,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestAllocatePages (
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN NumberOfPages,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS *Memory
|
||||
)
|
||||
{
|
||||
@@ -52,8 +52,8 @@ UnitTestAllocatePages (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestFreePages (
|
||||
IN EFI_PHYSICAL_ADDRESS Memory,
|
||||
IN UINTN NumberOfPages
|
||||
IN EFI_PHYSICAL_ADDRESS Memory,
|
||||
IN UINTN NumberOfPages
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -138,7 +138,7 @@ UnitTestAllocatePool (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestFreePool (
|
||||
IN VOID *Buffer
|
||||
IN VOID *Buffer
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
|
@@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestGetNextMonotonicCount (
|
||||
OUT UINT64 *Count
|
||||
OUT UINT64 *Count
|
||||
)
|
||||
{
|
||||
STATIC UINT64 StaticCount = 0;
|
||||
@@ -44,7 +44,7 @@ UnitTestGetNextMonotonicCount (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestStall (
|
||||
IN UINTN Microseconds
|
||||
IN UINTN Microseconds
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -75,10 +75,10 @@ UnitTestStall (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestSetWatchdogTimer (
|
||||
IN UINTN Timeout,
|
||||
IN UINT64 WatchdogCode,
|
||||
IN UINTN DataSize,
|
||||
IN CHAR16 *WatchdogData OPTIONAL
|
||||
IN UINTN Timeout,
|
||||
IN UINT64 WatchdogCode,
|
||||
IN UINTN DataSize,
|
||||
IN CHAR16 *WatchdogData OPTIONAL
|
||||
)
|
||||
{
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@@ -183,12 +183,12 @@ UnitTestDisconnectController (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UnitTestCalculateCrc32 (
|
||||
IN VOID *Data,
|
||||
IN UINTN DataSize,
|
||||
OUT UINT32 *Crc32
|
||||
IN VOID *Data,
|
||||
IN UINTN DataSize,
|
||||
OUT UINT32 *Crc32
|
||||
)
|
||||
{
|
||||
if (Data == NULL || Crc32 == NULL || DataSize == 0) {
|
||||
if ((Data == NULL) || (Crc32 == NULL) || (DataSize == 0)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -14,25 +14,25 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
#include "UefiBootServicesTableLibUnitTest.h"
|
||||
|
||||
#define EFI_HANDLE_SIGNATURE SIGNATURE_32('h','n','d','l')
|
||||
#define EFI_HANDLE_SIGNATURE SIGNATURE_32('h','n','d','l')
|
||||
|
||||
///
|
||||
/// IHANDLE - contains a list of protocol handles
|
||||
///
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
UINTN Signature;
|
||||
/// All handles list of IHANDLE
|
||||
LIST_ENTRY AllHandles;
|
||||
LIST_ENTRY AllHandles;
|
||||
/// List of PROTOCOL_INTERFACE's for this handle
|
||||
LIST_ENTRY Protocols;
|
||||
UINTN LocateRequest;
|
||||
LIST_ENTRY Protocols;
|
||||
UINTN LocateRequest;
|
||||
/// The Handle Database Key value when this handle was last created or modified
|
||||
UINT64 Key;
|
||||
UINT64 Key;
|
||||
} IHANDLE;
|
||||
|
||||
#define ASSERT_IS_HANDLE(a) ASSERT((a)->Signature == EFI_HANDLE_SIGNATURE)
|
||||
|
||||
#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('p','r','t','e')
|
||||
#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('p','r','t','e')
|
||||
|
||||
///
|
||||
/// PROTOCOL_ENTRY - each different protocol has 1 entry in the protocol
|
||||
@@ -40,18 +40,17 @@ typedef struct {
|
||||
/// with a list of registered notifies.
|
||||
///
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
UINTN Signature;
|
||||
/// Link Entry inserted to mProtocolDatabase
|
||||
LIST_ENTRY AllEntries;
|
||||
LIST_ENTRY AllEntries;
|
||||
/// ID of the protocol
|
||||
EFI_GUID ProtocolID;
|
||||
EFI_GUID ProtocolID;
|
||||
/// All protocol interfaces
|
||||
LIST_ENTRY Protocols;
|
||||
LIST_ENTRY Protocols;
|
||||
/// Registered notification handlers
|
||||
LIST_ENTRY Notify;
|
||||
LIST_ENTRY Notify;
|
||||
} PROTOCOL_ENTRY;
|
||||
|
||||
|
||||
#define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('p','i','f','c')
|
||||
|
||||
///
|
||||
@@ -59,65 +58,63 @@ typedef struct {
|
||||
/// with a protocol interface structure
|
||||
///
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
UINTN Signature;
|
||||
/// Link on IHANDLE.Protocols
|
||||
LIST_ENTRY Link;
|
||||
LIST_ENTRY Link;
|
||||
/// Back pointer
|
||||
IHANDLE *Handle;
|
||||
IHANDLE *Handle;
|
||||
/// Link on PROTOCOL_ENTRY.Protocols
|
||||
LIST_ENTRY ByProtocol;
|
||||
LIST_ENTRY ByProtocol;
|
||||
/// The protocol ID
|
||||
PROTOCOL_ENTRY *Protocol;
|
||||
PROTOCOL_ENTRY *Protocol;
|
||||
/// The interface value
|
||||
VOID *Interface;
|
||||
VOID *Interface;
|
||||
/// OPEN_PROTOCOL_DATA list
|
||||
LIST_ENTRY OpenList;
|
||||
UINTN OpenListCount;
|
||||
|
||||
LIST_ENTRY OpenList;
|
||||
UINTN OpenListCount;
|
||||
} PROTOCOL_INTERFACE;
|
||||
|
||||
#define OPEN_PROTOCOL_DATA_SIGNATURE SIGNATURE_32('p','o','d','l')
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
///Link on PROTOCOL_INTERFACE.OpenList
|
||||
LIST_ENTRY Link;
|
||||
UINTN Signature;
|
||||
/// Link on PROTOCOL_INTERFACE.OpenList
|
||||
LIST_ENTRY Link;
|
||||
|
||||
EFI_HANDLE AgentHandle;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
UINT32 Attributes;
|
||||
UINT32 OpenCount;
|
||||
EFI_HANDLE AgentHandle;
|
||||
EFI_HANDLE ControllerHandle;
|
||||
UINT32 Attributes;
|
||||
UINT32 OpenCount;
|
||||
} OPEN_PROTOCOL_DATA;
|
||||
|
||||
|
||||
#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('p','r','t','n')
|
||||
#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('p','r','t','n')
|
||||
|
||||
///
|
||||
/// PROTOCOL_NOTIFY - used for each register notification for a protocol
|
||||
///
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
PROTOCOL_ENTRY *Protocol;
|
||||
UINTN Signature;
|
||||
PROTOCOL_ENTRY *Protocol;
|
||||
/// All notifications for this protocol
|
||||
LIST_ENTRY Link;
|
||||
LIST_ENTRY Link;
|
||||
/// Event to notify
|
||||
EFI_EVENT Event;
|
||||
EFI_EVENT Event;
|
||||
/// Last position notified
|
||||
LIST_ENTRY *Position;
|
||||
LIST_ENTRY *Position;
|
||||
} PROTOCOL_NOTIFY;
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID *Protocol;
|
||||
VOID *SearchKey;
|
||||
LIST_ENTRY *Position;
|
||||
PROTOCOL_ENTRY *ProtEntry;
|
||||
EFI_GUID *Protocol;
|
||||
VOID *SearchKey;
|
||||
LIST_ENTRY *Position;
|
||||
PROTOCOL_ENTRY *ProtEntry;
|
||||
} LOCATE_POSITION;
|
||||
|
||||
typedef
|
||||
IHANDLE *
|
||||
(* UNIT_TEST_GET_NEXT) (
|
||||
IN OUT LOCATE_POSITION *Position,
|
||||
OUT VOID **Interface
|
||||
(*UNIT_TEST_GET_NEXT) (
|
||||
IN OUT LOCATE_POSITION *Position,
|
||||
OUT VOID **Interface
|
||||
);
|
||||
|
||||
#endif
|
||||
|
@@ -20,7 +20,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
EFI_TPL
|
||||
EFIAPI
|
||||
UnitTestRaiseTpl (
|
||||
IN EFI_TPL NewTpl
|
||||
IN EFI_TPL NewTpl
|
||||
)
|
||||
{
|
||||
return TPL_APPLICATION;
|
||||
@@ -36,7 +36,7 @@ UnitTestRaiseTpl (
|
||||
VOID
|
||||
EFIAPI
|
||||
UnitTestRestoreTpl (
|
||||
IN EFI_TPL NewTpl
|
||||
IN EFI_TPL NewTpl
|
||||
)
|
||||
{
|
||||
return;
|
||||
|
Reference in New Issue
Block a user