}\r
\r
\r
-/**\r
- Retrieves the device path protocol from a handle.\r
-\r
- This function returns the device path protocol from the handle specified by Handle.\r
- If Handle is NULL or Handle does not contain a device path protocol, then NULL\r
- is returned.\r
-\r
- @param Handle The handle from which to retrieve the device\r
- path protocol.\r
-\r
- @return The device path protocol from the handle specified by Handle.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-EFIAPI\r
-DevicePathFromHandle (\r
- IN EFI_HANDLE Handle\r
- )\r
-{\r
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
- EFI_STATUS Status;\r
-\r
- Status = gBS->HandleProtocol (\r
- Handle,\r
- &gEfiDevicePathProtocolGuid,\r
- (VOID *) &DevicePath\r
- );\r
- if (EFI_ERROR (Status)) {\r
- DevicePath = NULL;\r
- }\r
- return DevicePath;\r
-}\r
-\r
/**\r
Allocates a device path for a file and appends it to an existing device path.\r
\r
--- /dev/null
+/** @file\r
+ Device Path services. The thing to remember is device paths are built out of\r
+ nodes. The device path is terminated by an end node that is length\r
+ sizeof(EFI_DEVICE_PATH_PROTOCOL). That would be why there is sizeof(EFI_DEVICE_PATH_PROTOCOL)\r
+ all over this file.\r
+\r
+ The only place where multi-instance device paths are supported is in\r
+ environment varibles. Multi-instance device paths should never be placed\r
+ on a Handle.\r
+\r
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) Microsoft Corporation.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include "UefiDevicePathLib.h"\r
+\r
+\r
+/**\r
+ Retrieves the device path protocol from a handle.\r
+\r
+ This function returns the device path protocol from the handle specified by Handle.\r
+ If Handle is NULL or Handle does not contain a device path protocol, then NULL\r
+ is returned.\r
+\r
+ @param Handle The handle from which to retrieve the device\r
+ path protocol.\r
+\r
+ @return The device path protocol from the handle specified by Handle.\r
+\r
+**/\r
+EFI_DEVICE_PATH_PROTOCOL *\r
+EFIAPI\r
+DevicePathFromHandle (\r
+ IN EFI_HANDLE Handle\r
+ )\r
+{\r
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
+ EFI_STATUS Status;\r
+\r
+ Status = gBS->HandleProtocol (\r
+ Handle,\r
+ &gEfiDevicePathProtocolGuid,\r
+ (VOID *) &DevicePath\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ DevicePath = NULL;\r
+ }\r
+ return DevicePath;\r
+}\r
--- /dev/null
+/** @file\r
+ Device Path services. The thing to remember is device paths are built out of\r
+ nodes. The device path is terminated by an end node that is length\r
+ sizeof(EFI_DEVICE_PATH_PROTOCOL). That would be why there is sizeof(EFI_DEVICE_PATH_PROTOCOL)\r
+ all over this file.\r
+\r
+ The only place where multi-instance device paths are supported is in\r
+ environment varibles. Multi-instance device paths should never be placed\r
+ on a Handle.\r
+\r
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) Microsoft Corporation.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include "UefiDevicePathLib.h"\r
+\r
+\r
+/**\r
+ Retrieves the device path protocol from a handle.\r
+\r
+ This function returns the device path protocol from the handle specified by Handle.\r
+ If Handle is NULL or Handle does not contain a device path protocol, then NULL\r
+ is returned.\r
+\r
+ @param Handle The handle from which to retrieve the device\r
+ path protocol.\r
+\r
+ @return The device path protocol from the handle specified by Handle.\r
+\r
+**/\r
+EFI_DEVICE_PATH_PROTOCOL *\r
+EFIAPI\r
+DevicePathFromHandle (\r
+ IN EFI_HANDLE Handle\r
+ )\r
+{\r
+ return NULL;\r
+}\r
\r
[Sources]\r
DevicePathUtilities.c\r
+ DevicePathUtilitiesDxeSmm.c\r
DevicePathToText.c\r
DevicePathFromText.c\r
UefiDevicePathLib.c\r
\r
[Sources]\r
DevicePathUtilities.c\r
+ DevicePathUtilitiesDxeSmm.c\r
DevicePathToText.c\r
DevicePathFromText.c\r
UefiDevicePathLibOptionalDevicePathProtocol.c\r
--- /dev/null
+## @file\r
+# Instance of Device Path Library based on Memory Allocation Library.\r
+#\r
+# Device Path Library that layers on top of the Memory Allocation Library.\r
+#\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) Microsoft Corporation.\r
+#\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+#\r
+##\r
+\r
+[Defines]\r
+ INF_VERSION = 0x00010005\r
+ BASE_NAME = UefiDevicePathLib\r
+ MODULE_UNI_FILE = UefiDevicePathLib.uni\r
+ FILE_GUID = D8E58437-44D3-4154-B7A7-EB794923EF12\r
+ MODULE_TYPE = MM_STANDALONE\r
+ PI_SPECIFICATION_VERSION = 0x00010032\r
+ VERSION_STRING = 1.0\r
+ LIBRARY_CLASS = DevicePathLib | MM_STANDALONE MM_CORE_STANDALONE\r
+\r
+\r
+#\r
+# VALID_ARCHITECTURES = IA32 X64 EBC\r
+#\r
+\r
+[Sources]\r
+ DevicePathUtilities.c\r
+ DevicePathUtilitiesStandaloneMm.c\r
+ DevicePathToText.c\r
+ DevicePathFromText.c\r
+ UefiDevicePathLib.c\r
+ UefiDevicePathLib.h\r
+\r
+[Packages]\r
+ MdePkg/MdePkg.dec\r
+\r
+[LibraryClasses]\r
+ BaseLib\r
+ MemoryAllocationLib\r
+ DebugLib\r
+ BaseMemoryLib\r
+ PcdLib\r
+ PrintLib\r
+\r
+[Guids]\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiVTUTF8Guid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiVT100Guid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiVT100PlusGuid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiPcAnsiGuid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiUartDevicePathGuid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiSasDevicePathGuid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiVirtualDiskGuid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiVirtualCdGuid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiPersistentVirtualDiskGuid\r
+ ## SOMETIMES_CONSUMES ## GUID\r
+ gEfiPersistentVirtualCdGuid\r
+\r
+[Protocols]\r
+ gEfiDevicePathProtocolGuid ## SOMETIMES_CONSUMES\r
+ gEfiDebugPortProtocolGuid ## UNDEFINED\r
+\r
+[Pcd]\r
+ gEfiMdePkgTokenSpaceGuid.PcdMaximumDevicePathNodeCount ## SOMETIMES_CONSUMES\r
MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortProtocol.inf\r
MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf\r
MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
+ MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibStandaloneMm.inf\r
MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf\r
MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf\r
MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r