mirror of
https://github.com/opnsense/src.git
synced 2026-02-26 03:13:02 -05:00
We use these to compile libefivar. The particular motivation for this update is
the inclusion of the RISC-V machine definitions that allow us to build the
library on the platform. This support could easily have been submitted as a
small local diff, but the timing of the release coincided with this work, and
it has been over 3 years since these sources were initially imported.
Note that this comes with a license change from regular BSD 2-clause to the
BSD+Patent license. This has been approved by core@ for this particular
project [1].
As with the original import, we retain only the subset of headers that we
actually need to build libefivar. I adapted imp@'s process slightly for this
update:
# Generate list of the headers needed to build
cp -r ../vendor/edk2/dist/MdePkg/Include sys/contrib/edk2
cd lib/libefivar
make
pushd `make -V .OBJDIR`
cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 |
sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx
popd
# Merge the needed files
cd ../../sys/contrib/edk2
svn revert -R .
for i in `cat /tmp/xxx`; do
svn merge -c VendorRevision svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i
done
svn merge -c VendorRevision svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec MdePkg.dec
[1] https://www.freebsd.org/internal/software-license.html
79 lines
2.8 KiB
C
79 lines
2.8 KiB
C
/** @file
|
|
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.
|
|
This protocol provides service to convert device nodes and paths to text.
|
|
|
|
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
|
|
#define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
|
|
|
|
///
|
|
/// Device Path To Text protocol
|
|
///
|
|
#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
|
|
{ \
|
|
0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
|
|
}
|
|
|
|
/**
|
|
Convert a device node to its text representation.
|
|
|
|
@param DeviceNode Points to the device node to be converted.
|
|
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
|
|
of the display node is used, where applicable. If DisplayOnly
|
|
is FALSE, then the longer text representation of the display node
|
|
is used.
|
|
@param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
|
|
representation for a device node can be used, where applicable.
|
|
|
|
@retval a_pointer a pointer to the allocated text representation of the device node data
|
|
@retval NULL if DeviceNode is NULL or there was insufficient memory.
|
|
|
|
**/
|
|
typedef
|
|
CHAR16*
|
|
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)(
|
|
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
|
|
IN BOOLEAN DisplayOnly,
|
|
IN BOOLEAN AllowShortcuts
|
|
);
|
|
|
|
/**
|
|
Convert a device path to its text representation.
|
|
|
|
@param DevicePath Points to the device path to be converted.
|
|
@param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
|
|
of the display node is used, where applicable. If DisplayOnly
|
|
is FALSE, then the longer text representation of the display node
|
|
is used.
|
|
@param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
|
|
text representation for a device node cannot be used.
|
|
|
|
@retval a_pointer a pointer to the allocated text representation of the device node.
|
|
@retval NULL if DevicePath is NULL or there was insufficient memory.
|
|
|
|
**/
|
|
typedef
|
|
CHAR16*
|
|
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)(
|
|
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
|
IN BOOLEAN DisplayOnly,
|
|
IN BOOLEAN AllowShortcuts
|
|
);
|
|
|
|
///
|
|
/// This protocol converts device paths and device nodes to text.
|
|
///
|
|
typedef struct {
|
|
EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
|
|
EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
|
|
} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
|
|
|
|
extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
|
|
|
|
#endif
|
|
|
|
|