Commit graph

11 commits

Author SHA1 Message Date
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 942815c548 libefivar: Add note about extra compiler flags
Add a note about why we need these extra compiler flags to suppress
warnings. EDK2 upstream code is being used verbatim and as of the last
update these issuse persist, but are benign.

Sponsored by:		Netflix
Reviewed by:		asomers
Differential Revision:	https://reviews.freebsd.org/D38613
2023-02-15 16:03:54 -07:00
Li-Wen Hsu 71779dddff
libefivar(3): efi_set_variables_supported.3 should be efi_variables_supported.3
MFC after:	3 days
2021-12-21 20:42:39 +08:00
Emmanuel Vadot d8d41d3b84 pkgbase: Remove libefivar package and add a efi-tools one
Put all the efi related tools into FreeBSD-efi-tools.

Differential Revision:	https://reviews.freebsd.org/D31803
2021-09-07 10:24:21 +02:00
Dimitry Andric f643997a17 Cleanup compiler warning flags in lib/libefivar/Makefile
There is no need to set -Wno-unused-parameter twice, and instead of
appending to CFLAGS, append to CWARNFLAGS instead. While here, add
-Wno-unused-but-set-variable for the sake of clang 13.0.0.

MFC after:	3 days
2021-08-26 20:53:26 +02:00
Warner Losh 09ee5d8ab6 Create a function to translate UEFI paths to unix paths
efivar_device_path_to_unix_path translates from UEFI to Unix
efivar_unix_path_to_device_path translates from Unix to UEFI

At present, only HD() device types are supported (both GPT and
MBR). CdRom and floppy devices aren't supported. ZFS isn't supported
because there's no way in the UEFI standard to specify a ZFS datastore.
Network devices aren't supported either.

Three forms of Unix path are accepted: /path/to/file (for a mounted
filesystem), //path/to/file (uses the EFI partition on the same disk
as /), and dev:/path/to/file (for unmounted filesystem). Two forms are
produced (the first and last).

Sponsored by: Netflix
2017-12-02 07:29:19 +00:00
Warner Losh ca987d4641 Move sys/boot to stand. Fix all references to new location
Sponsored by:	Netflix
2017-11-14 23:02:19 +00:00
Ryan Libby 92ac7e80da libefivar: -fno-strict-aliasing
Avoid dealing with some code that uses type-punned pointers.

See D12210 and D12211 for more background.

Reviewed by:	imp
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12219
2017-09-04 18:59:44 +00:00
Warner Losh 7270962aa5 Bring in EDK2 routines for printing and parsing device paths.
This commit implements the (mostly?) Linux compatible
efidp_format_device_path and efidp_parse_device_path APIs. These are
the only APIs exposed through this library. However, they are built on
code from Tianocore's EDK2 MdePkg. They are brought in as new files
here for reasons described in FreeBSD-update.

Symbol versioning will be introduced to control what's exported from
the EDK2 code.

Some structural changes may be necessary when we move to sharing with
sys/boot/efi.

Sponsored by: Netflix
2017-03-09 00:31:31 +00:00
Warner Losh bea9d78b2d Share UCS2/UTF8 routines between boot loader and userland.
Move the UCS2 to UTF8 routines over into sys/boot/efi and have
libefivar grab them from there.

Sponsored by: Netflix
2017-03-09 00:24:01 +00:00
Warner Losh d49a5ddd04 Create libefivar library. This library aims to provide
the same API as the GPL'd version of this library. It implements the common
Linux API for programatically manipulating UEFI environment varibales using
the UEFI Runtime Services the kernel provides. It replaces the old efi
library since it is programmed to a different interface, but retails the
CHAR16 to UTF-8 and vice versa conversion routines. The new name is to match
Linux program's expectations.

Differential Revision: https://reviews.freebsd.org/D8128
Reviewed by: kib@, wblock@, Ganael Laplanche
2016-10-11 22:30:41 +00:00