dxecore.h
来自「EFI BIOS是Intel提出的下一代的BIOS标准。这里上传的Edk源代码是」· C头文件 代码 · 共 2,531 行 · 第 1/4 页
H
2,531 行
/*++
Routine Description:
Raise the task priority level to the new level.
High level is implemented by disabling processor interrupts.
Arguments:
NewTpl - New task priority level
Returns:
The previous task priority level
--*/
;
EFI_BOOTSERVICE
VOID
EFIAPI
CoreRestoreTpl (
IN EFI_TPL NewTpl
)
/*++
Routine Description:
Lowers the task priority to the previous value. If the new
priority unmasks events at a higher priority, they are dispatched.
Arguments:
NewTpl - New, lower, task priority
Returns:
None
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreStall (
IN UINTN Microseconds
)
/*++
Routine Description:
Introduces a fine-grained stall.
Arguments:
Microseconds The number of microseconds to stall execution
Returns:
EFI_SUCCESS - Execution was stalled for at least the requested amount
of microseconds.
EFI_NOT_AVAILABLE_YET - gMetronome is not available yet
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreSetWatchdogTimer (
IN UINTN Timeout,
IN UINT64 WatchdogCode,
IN UINTN DataSize,
IN CHAR16 *WatchdogData OPTIONAL
)
/*++
Routine Description:
Sets the system's watchdog timer.
Arguments:
Timeout The number of seconds. Zero disables the timer.
///////following three parameters are left for platform specific using
WatchdogCode The numberic code to log. 0x0 to 0xffff are firmware
DataSize Size of the optional data
WatchdogData Optional Null terminated unicode string followed by binary
data.
Returns:
EFI_SUCCESS Timeout has been set
EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet
EFI_UNSUPPORTED System does not have a timer (currently not used)
EFI_DEVICE_ERROR Could not complete due to hardware error
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreInstallProtocolInterface (
IN OUT EFI_HANDLE *UserHandle,
IN EFI_GUID *Protocol,
IN EFI_INTERFACE_TYPE InterfaceType,
IN VOID *Interface
)
/*++
Routine Description:
Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which
Calls the private one which contains a BOOLEAN parameter for notifications
Arguments:
UserHandle - The handle to install the protocol handler on,
or NULL if a new handle is to be allocated
Protocol - The protocol to add to the handle
InterfaceType - Indicates whether Interface is supplied in native form.
Interface - The interface for the protocol being added
Returns:
Status code
--*/
;
EFI_STATUS
CoreInstallProtocolInterfaceNotify (
IN OUT EFI_HANDLE *UserHandle,
IN EFI_GUID *Protocol,
IN EFI_INTERFACE_TYPE InterfaceType,
IN VOID *Interface,
IN BOOLEAN Notify
)
/*++
Routine Description:
Installs a protocol interface into the boot services environment.
Arguments:
UserHandle - The handle to install the protocol handler on,
or NULL if a new handle is to be allocated
Protocol - The protocol to add to the handle
InterfaceType - Indicates whether Interface is supplied in native form.
Interface - The interface for the protocol being added
Notify - Whether to notify the notification list for this protocol
Returns:
EFI_INVALID_PARAMETER - Invalid parameter
EFI_OUT_OF_RESOURCES - No enough buffer to allocate
EFI_SUCCESS - Protocol interface successfully installed
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreInstallMultipleProtocolInterfaces (
IN OUT EFI_HANDLE *Handle,
...
)
/*++
Routine Description:
Installs a list of protocol interface into the boot services environment.
This function calls InstallProtocolInterface() in a loop. If any error
occures all the protocols added by this function are removed. This is
basically a lib function to save space.
Arguments:
Handle - The handle to install the protocol handlers on,
or NULL if a new handle is to be allocated
... - EFI_GUID followed by protocol instance. A NULL terminates the
list. The pairs are the arguments to InstallProtocolInterface().
All the protocols are added to Handle.
Returns:
EFI_INVALID_PARAMETER - Handle is NULL.
EFI_SUCCESS - Protocol interfaces successfully installed.
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreUninstallMultipleProtocolInterfaces (
IN EFI_HANDLE Handle,
...
)
/*++
Routine Description:
Uninstalls a list of protocol interface in the boot services environment.
This function calls UnisatllProtocolInterface() in a loop. This is
basically a lib function to save space.
Arguments:
Handle - The handle to uninstall the protocol
... - EFI_GUID followed by protocol instance. A NULL terminates the
list. The pairs are the arguments to UninstallProtocolInterface().
All the protocols are added to Handle.
Returns:
Status code
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreReinstallProtocolInterface (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
IN VOID *OldInterface,
IN VOID *NewInterface
)
/*++
Routine Description:
Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
Arguments:
UserHandle - Handle on which the interface is to be reinstalled
Protocol - The numeric ID of the interface
OldInterface - A pointer to the old interface
NewInterface - A pointer to the new interface
Returns:
Status code.
On EFI_SUCCESS The protocol interface was installed
On EFI_NOT_FOUND The OldInterface on the handle was not found
On EFI_INVALID_PARAMETER One of the parameters has an invalid value
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreUninstallProtocolInterface (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
IN VOID *Interface
)
/*++
Routine Description:
Uninstalls all instances of a protocol:interfacer from a handle.
If the last protocol interface is remove from the handle, the
handle is freed.
Arguments:
UserHandle - The handle to remove the protocol handler from
Protocol - The protocol, of protocol:interface, to remove
Interface - The interface, of protocol:interface, to remove
Returns:
EFI_INVALID_PARAMETER - Protocol is NULL.
EFI_SUCCESS - Protocol interface successfully uninstalled.
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreHandleProtocol (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
OUT VOID **Interface
)
/*++
Routine Description:
Queries a handle to determine if it supports a specified protocol.
Arguments:
UserHandle - The handle being queried.
Protocol - The published unique identifier of the protocol.
Interface - Supplies the address where a pointer to the corresponding Protocol
Interface is returned.
Returns:
The requested protocol interface for the handle
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreOpenProtocol (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
OUT VOID **Interface OPTIONAL,
IN EFI_HANDLE ImageHandle,
IN EFI_HANDLE ControllerHandle,
IN UINT32 Attributes
)
/*++
Routine Description:
Locates the installed protocol handler for the handle, and
invokes it to obtain the protocol interface. Usage information
is registered in the protocol data base.
Arguments:
UserHandle - The handle to obtain the protocol interface on
Protocol - The ID of the protocol
Interface - The location to return the protocol interface
ImageHandle - The handle of the Image that is opening the protocol interface
specified by Protocol and Interface.
ControllerHandle - The controller handle that is requiring this interface.
Attributes - The open mode of the protocol interface specified by Handle
and Protocol.
Returns:
EFI_INVALID_PARAMETER - Protocol is NULL.
EFI_SUCCESS - Get the protocol interface.
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreOpenProtocolInformation (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
OUT UINTN *EntryCount
)
/*++
Routine Description:
Return information about Opened protocols in the system
Arguments:
UserHandle - The handle to close the protocol interface on
Protocol - The ID of the protocol
EntryBuffer - A pointer to a buffer of open protocol information in the form of
EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
EntryCount - Number of EntryBuffer entries
Returns:
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreCloseProtocol (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
IN EFI_HANDLE ImageHandle,
IN EFI_HANDLE ControllerHandle
)
/*++
Routine Description:
Close Protocol
Arguments:
UserHandle - The handle to close the protocol interface on
Protocol - The ID of the protocol
ImageHandle - The user of the protocol to close
ControllerHandle - The user of the protocol to close
Returns:
EFI_INVALID_PARAMETER - Protocol is NULL.
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreProtocolsPerHandle (
IN EFI_HANDLE UserHandle,
OUT EFI_GUID ***ProtocolBuffer,
OUT UINTN *ProtocolBufferCount
)
/*++
Routine Description:
Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
from pool.
Arguments:
UserHandle - The handle from which to retrieve the list of protocol interface
GUIDs.
ProtocolBuffer - A pointer to the list of protocol interface GUID pointers that are
installed on Handle.
ProtocolBufferCount - A pointer to the number of GUID pointers present in
ProtocolBuffer.
Returns:
EFI_SUCCESS - The list of protocol interface GUIDs installed on Handle was returned in
ProtocolBuffer. The number of protocol interface GUIDs was
returned in ProtocolBufferCount.
EFI_INVALID_PARAMETER - Handle is NULL.
EFI_INVALID_PARAMETER - Handle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ProtocolBuffer is NULL.
EFI_INVALID_PARAMETER - ProtocolBufferCount is NULL.
EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the results.
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreRegisterProtocolNotify (
IN EFI_GUID *Protocol,
IN EFI_EVENT Event,
OUT VOID **Registration
)
/*++
Routine Description:
Add a new protocol notification record for the request protocol.
Arguments:
Protocol - The requested protocol to add the notify registration
Event - The event to signal
Registration - Returns the registration record
Returns:
EFI_INVALID_PARAMETER - Invalid parameter
EFI_SUCCESS - Successfully returned the registration record that has been added
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreLocateHandle (
IN EFI_LOCATE_SEARCH_TYPE SearchType,
IN EFI_GUID *Protocol OPTIONAL,
IN VOID *SearchKey OPTIONAL,
IN OUT UINTN *BufferSize,
OUT EFI_HANDLE *Buffer
)
/*++
Routine Description:
Locates the requested handle(s) and returns them in Buffer.
Arguments:
SearchType - The type of search to perform to locate the handles
Protocol - The protocol to search for
SearchKey - Dependant on SearchType
BufferSize - On input the size of Buffer. On output the
size of data returned.
Buffer - The buffer to return the results in
Returns:
EFI_BUFFER_TOO_SMALL - Buffer too small, required buffer size is returned in BufferSize.
EFI_INVALID_PARAMETER - Invalid parameter
EFI_SUCCESS - Successfully found the requested handle(s) and returns them in Buffer.
--*/
;
EFI_BOOTSERVICE
EFI_STATUS
EFIAPI
CoreLocateDevicePath (
IN EFI_GUID *Protocol,
IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath,
OUT EFI_HANDLE *Device
)
/*++
Routine Description:
Locates the handle to a device on the device path that supports the specified protocol.
Arguments:
Protocol - The protocol to search for.
FilePath - On input, a pointer to a pointer to the device path. On output, the device
path pointer is modified to point to the remaining part of the devicepath.
Device - A pointer to the returned device handle.
Returns:
EFI_SUCCESS - The resulting handle was returned.
EFI_NOT_FOUND - No handles matched the search.
EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreLocateHandleBuffer (
IN EFI_LOCATE_SEARCH_TYPE SearchType,
IN EFI_GUID *Protocol OPTIONAL,
IN VOID *SearchKey OPTIONAL,
IN OUT UINTN *NumberHandles,
OUT EFI_HANDLE **Buffer
)
/*++
Routine Description:
Function returns an array of handles that support the requested protocol
in a buffer allocated from pool. This is a version of CoreLocateHandle()
that allocates a buffer for the caller.
Arguments:
SearchType - Specifies which handle(s) are to be returned.
Protocol - Provides the protocol to search by.
This parameter is only valid for SearchType ByProtocol.
SearchKey - Supplies the search key depending on the SearchType.
NumberHandles - The number of handles returned in Buffer.
Buffer - A pointer to the buffer to return the requested array of
handles that support Protocol.
Returns:
EFI_SUCCESS - The result array of handles was returned.
EFI_NOT_FOUND - No handles match the search.
EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.
EFI_INVALID_PARAMETER - Invalid parameter
--*/
;
EFI_BOOTSERVICE11
EFI_STATUS
EFIAPI
CoreLocateProtocol (
IN EFI_GUID *Protocol,
IN VOID *Registration OPTIONAL,
OUT VOID **Interface
)
/*++
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?