23 END_ENTIRE_DEVICE_PATH_SUBTYPE,
25 END_DEVICE_PATH_LENGTH,
60 if ((DevicePath ==
NULL) || ((MaxSize > 0) && (MaxSize < END_DEVICE_PATH_LENGTH))) {
74 if (NodeLength > MAX_UINTN - Size) {
83 if (Size > MaxSize - END_DEVICE_PATH_LENGTH ) {
87 if (
PcdGet32 (PcdMaximumDevicePathNodeCount) > 0) {
89 if (Count >=
PcdGet32 (PcdMaximumDevicePathNodeCount)) {
99 (*(CHAR16 *)((UINT8 *)DevicePath + NodeLength - 2) != 0))
129 ASSERT (Node !=
NULL);
151 ASSERT (Node !=
NULL);
176 ASSERT (Node !=
NULL);
200 ASSERT (Node !=
NULL);
230 ASSERT (Node !=
NULL);
257 ASSERT (Node !=
NULL);
284 ASSERT (Node !=
NULL);
313 ASSERT (Node !=
NULL);
340 ASSERT (Node !=
NULL);
341 CopyMem (Node, &mUefiDevicePathLibEndDevicePath,
sizeof (mUefiDevicePathLibEndDevicePath));
365 if (DevicePath ==
NULL) {
466 if (FirstDevicePath ==
NULL) {
470 if (SecondDevicePath ==
NULL) {
484 Size = Size1 + Size2 - END_DEVICE_PATH_LENGTH;
488 if (NewDevicePath !=
NULL) {
489 NewDevicePath =
CopyMem (NewDevicePath, FirstDevicePath, Size1);
494 (Size1 - END_DEVICE_PATH_LENGTH));
495 CopyMem (DevicePath2, SecondDevicePath, Size2);
498 return NewDevicePath;
541 if (DevicePathNode ==
NULL) {
550 TempDevicePath =
AllocatePool (NodeLength + END_DEVICE_PATH_LENGTH);
551 if (TempDevicePath ==
NULL) {
555 TempDevicePath =
CopyMem (TempDevicePath, DevicePathNode, NodeLength);
568 return NewDevicePath;
606 if (DevicePath ==
NULL) {
610 if (DevicePathInstance ==
NULL) {
622 if (NewDevicePath !=
NULL) {
623 TempDevicePath =
CopyMem (NewDevicePath, DevicePath, SrcSize);
629 TempDevicePath->
SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE;
631 CopyMem (TempDevicePath, DevicePathInstance, InstanceSize);
634 return NewDevicePath;
676 ASSERT (Size !=
NULL);
678 if ((DevicePath ==
NULL) || (*DevicePath ==
NULL)) {
690 DevPath = *DevicePath;
704 DevPath->
SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;
744 IN UINT8 NodeSubType,
758 if (DevicePath !=
NULL) {
759 DevicePath->
Type = NodeType;
760 DevicePath->
SubType = NodeSubType;
790 if (DevicePath ==
NULL) {
849 FilePath->Header.
Type = MEDIA_DEVICE_PATH;
855 if (Device !=
NULL) {
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
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DevicePathFromHandle(IN EFI_HANDLE Handle)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL)
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DuplicateDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
UINT8 EFIAPI DevicePathType(IN CONST VOID *Node)
UINT16 EFIAPI SetDevicePathNodeLength(IN OUT VOID *Node, IN UINTN Length)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibAppendDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL)
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
UINTN EFIAPI UefiDevicePathLibGetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
UINT8 EFIAPI DevicePathSubType(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibAppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
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 UefiDevicePathLibAppendDevicePathInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibDuplicateDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
BOOLEAN EFIAPI UefiDevicePathLibIsDevicePathMultiInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
BOOLEAN EFIAPI IsDevicePathEndType(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibGetNextDevicePathInstance(IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, OUT UINTN *Size)
VOID EFIAPI SetDevicePathEndNode(OUT VOID *Node)
BOOLEAN EFIAPI IsDevicePathEndInstance(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibCreateDeviceNode(IN UINT8 NodeType, IN UINT8 NodeSubType, IN UINT16 NodeLength)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define PcdGet32(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)