summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesBase.c
diff options
context:
space:
mode:
authorMateusz Albecki <mateusz.albecki@intel.com>2022-07-01 22:11:47 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-07-23 02:11:31 +0000
commitbf1ff540d9271c64f0c5323c79b20b21990626fe (patch)
treec50a6463a21906eba8d393c04c84fa6c1c2d7e1b /MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesBase.c
parent5a3641bfcdcf99fd76817833488f2af8abb69383 (diff)
downloadedk2-bf1ff540d9271c64f0c5323c79b20b21990626fe.tar.gz
edk2-bf1ff540d9271c64f0c5323c79b20b21990626fe.tar.bz2
edk2-bf1ff540d9271c64f0c5323c79b20b21990626fe.zip
MdePkg/UefiDevicePathLib: Add support for PEIMs
DevicePathLib utilities are useful in PEI to locate the devices which need an opal unlock on S3 resume. This commit reuses the implementation done for standalone MM support and makes the StandaloneMm library Base. Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesBase.c')
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesBase.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesBase.c b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesBase.c
new file mode 100644
index 0000000000..096f835b90
--- /dev/null
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesBase.c
@@ -0,0 +1,39 @@
+/** @file
+ Device Path services. The thing to remember is device paths are built out of
+ nodes. The device path is terminated by an end node that is length
+ sizeof(EFI_DEVICE_PATH_PROTOCOL). That would be why there is sizeof(EFI_DEVICE_PATH_PROTOCOL)
+ all over this file.
+
+ The only place where multi-instance device paths are supported is in
+ environment varibles. Multi-instance device paths should never be placed
+ on a Handle.
+
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) Microsoft Corporation.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "UefiDevicePathLib.h"
+
+/**
+ Retrieves the device path protocol from a handle.
+
+ This function returns the device path protocol from the handle specified by Handle.
+ If Handle is NULL or Handle does not contain a device path protocol, then NULL
+ is returned.
+
+ @param Handle The handle from which to retrieve the device
+ path protocol.
+
+ @return The device path protocol from the handle specified by Handle.
+
+**/
+EFI_DEVICE_PATH_PROTOCOL *
+EFIAPI
+DevicePathFromHandle (
+ IN EFI_HANDLE Handle
+ )
+{
+ return NULL;
+}