33 END_ENTIRE_DEVICE_PATH_SUBTYPE,
35 END_DEVICE_PATH_LENGTH,
61 Status =
gBS->LocateProtocol (
62 &gEfiDevicePathUtilitiesProtocolGuid,
64 (VOID **)&mDevicePathLibDevicePathUtilities
67 ASSERT (mDevicePathLibDevicePathUtilities !=
NULL);
97 ASSERT (DevicePath !=
NULL);
116 if (NodeLength > MAX_UINTN - Size) {
125 if (Size > MaxSize - END_DEVICE_PATH_LENGTH ) {
129 if (
PcdGet32 (PcdMaximumDevicePathNodeCount) > 0) {
131 if (Count >=
PcdGet32 (PcdMaximumDevicePathNodeCount)) {
141 (*(CHAR16 *)((UINT8 *)DevicePath + NodeLength - 2) != 0))
171 ASSERT (Node !=
NULL);
193 ASSERT (Node !=
NULL);
218 ASSERT (Node !=
NULL);
242 ASSERT (Node !=
NULL);
271 ASSERT (Node !=
NULL);
297 ASSERT (Node !=
NULL);
325 ASSERT (Node !=
NULL);
354 ASSERT (Node !=
NULL);
381 ASSERT (Node !=
NULL);
382 CopyMem (Node, &mUefiDevicePathLibEndDevicePath,
sizeof (mUefiDevicePathLibEndDevicePath));
404 return mDevicePathLibDevicePathUtilities->GetDevicePathSize (DevicePath);
430 return mDevicePathLibDevicePathUtilities->DuplicateDevicePath (DevicePath);
464 return mDevicePathLibDevicePathUtilities->AppendDevicePath (FirstDevicePath, SecondDevicePath);
502 return mDevicePathLibDevicePathUtilities->AppendDeviceNode (DevicePath, DevicePathNode);
535 return mDevicePathLibDevicePathUtilities->AppendDevicePathInstance (DevicePath, DevicePathInstance);
572 ASSERT (Size !=
NULL);
573 return mDevicePathLibDevicePathUtilities->GetNextDevicePathInstance (DevicePath, Size);
599 IN UINT8 NodeSubType,
603 return mDevicePathLibDevicePathUtilities->CreateDeviceNode (NodeType, NodeSubType, NodeLength);
627 return mDevicePathLibDevicePathUtilities->IsDevicePathMultiInstance (DevicePath);
652 Status =
gBS->HandleProtocol (
654 &gEfiDevicePathProtocolGuid,
657 if (EFI_ERROR (Status)) {
704 FilePath->Header.
Type = MEDIA_DEVICE_PATH;
710 if (Device !=
NULL) {
736 Status =
gBS->LocateProtocol (
741 if (EFI_ERROR (Status)) {
767 IN BOOLEAN DisplayOnly,
768 IN BOOLEAN AllowShortcuts
771 if (mDevicePathLibDevicePathToText ==
NULL) {
775 if (mDevicePathLibDevicePathToText !=
NULL) {
776 return mDevicePathLibDevicePathToText->ConvertDeviceNodeToText (DeviceNode, DisplayOnly, AllowShortcuts);
801 IN BOOLEAN DisplayOnly,
802 IN BOOLEAN AllowShortcuts
805 if (mDevicePathLibDevicePathToText ==
NULL) {
809 if (mDevicePathLibDevicePathToText !=
NULL) {
810 return mDevicePathLibDevicePathToText->ConvertDevicePathToText (DevicePath, DisplayOnly, AllowShortcuts);
830 IN CONST CHAR16 *TextDeviceNode
833 if (mDevicePathLibDevicePathFromText ==
NULL) {
837 if (mDevicePathLibDevicePathFromText !=
NULL) {
838 return mDevicePathLibDevicePathFromText->ConvertTextToDeviceNode (TextDeviceNode);
859 IN CONST CHAR16 *TextDevicePath
862 if (mDevicePathLibDevicePathFromText ==
NULL) {
866 if (mDevicePathLibDevicePathFromText !=
NULL) {
867 return mDevicePathLibDevicePathFromText->ConvertTextToDevicePath (TextDevicePath);
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
UINT16 EFIAPI WriteUnaligned16(OUT UINT16 *Buffer, IN UINT16 Value)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define MEDIA_FILEPATH_DP
VOID EFIAPI FreePool(IN VOID *Buffer)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define ASSERT_EFI_ERROR(StatusParameter)
#define PcdGet32(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
CHAR16 *EFIAPI ConvertDeviceNodeToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI CreateDeviceNode(IN UINT8 NodeType, IN UINT8 NodeSubType, IN UINT16 NodeLength)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI GetNextDevicePathInstance(IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, OUT UINTN *Size)
CHAR16 *EFIAPI ConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DuplicateDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI ConvertTextToDevicePath(IN CONST CHAR16 *TextDevicePath)
BOOLEAN EFIAPI IsDevicePathMultiInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI ConvertTextToDeviceNode(IN CONST CHAR16 *TextDeviceNode)
UINT8 EFIAPI DevicePathType(IN CONST VOID *Node)
UINT16 EFIAPI SetDevicePathNodeLength(IN OUT VOID *Node, IN UINTN Length)
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
UINT8 EFIAPI DevicePathSubType(IN CONST VOID *Node)
EFI_STATUS EFIAPI DevicePathLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI FileDevicePath(IN EFI_HANDLE Device OPTIONAL, IN CONST CHAR16 *FileName)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
BOOLEAN EFIAPI IsDevicePathValid(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINTN MaxSize)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DevicePathFromHandle(IN EFI_HANDLE Handle)
VOID * UefiDevicePathLibLocateProtocol(EFI_GUID *ProtocolGuid)
BOOLEAN EFIAPI IsDevicePathEndType(IN CONST VOID *Node)
VOID EFIAPI SetDevicePathEndNode(OUT VOID *Node)
BOOLEAN EFIAPI IsDevicePathEndInstance(IN CONST VOID *Node)