aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@FreeBSD.org>2025-11-13 18:51:39 +0000
committerWarner Losh <imp@FreeBSD.org>2025-11-25 18:17:25 +0000
commit6fa0057f8953a7077362901128be14171ed705b8 (patch)
tree346a0755ca531321dc548032d4a951ceaf3ff752
parent136ff605bfb1311ecb836e6f3a41f22476aee618 (diff)
libefivar: Support UefiDevicePathLib under StandaloneMm
This change added an instance of UefiDevicePathLib for StandaloneMm. It abstracts DevicePathFromHandle function into different files for Standalone MM and other instances to avoid linking gBS into MM_STANDALONE drivers. No functional change intended, as this function and its invocation are ifdefd out. Obtained from: https://github.com/tianocore/edk2/commit/14a746bb6a92d59669c67a970479558734cf2383 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1894
-rw-r--r--lib/libefivar/uefi-dputil.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c
index 3a9cf7f374b2..c557d7426fc6 100644
--- a/lib/libefivar/uefi-dputil.c
+++ b/lib/libefivar/uefi-dputil.c
@@ -857,39 +857,6 @@ UefiDevicePathLibIsDevicePathMultiInstance (
/**
- 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
- )
-{
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
- EFI_STATUS Status;
-
- Status = gBS->HandleProtocol (
- Handle,
- &gEfiDevicePathProtocolGuid,
- (VOID *) &DevicePath
- );
- if (EFI_ERROR (Status)) {
- DevicePath = NULL;
- }
- return DevicePath;
-}
-
-/**
Allocates a device path for a file and appends it to an existing device path.
If Device is a valid device handle that contains a device path protocol, then a device path for