mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
d49a5ddd04
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
99 lines
3.5 KiB
Groff
99 lines
3.5 KiB
Groff
.\" Copyright 2016 Netflix, Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd September 14, 2016
|
|
.Dt LIBEFIVAR 3
|
|
.Os
|
|
.Sh NAME
|
|
.Nm libefivar
|
|
.Nd EFI Non Volatile Variable Suppoert
|
|
.Sh SYNOPSIS
|
|
.In efivar.h
|
|
.Ft int
|
|
.Fn efi_append_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes"
|
|
.Ft int
|
|
.Fn efi_del_variable "efi_guid_t guid" "const char *name"
|
|
.Ft int
|
|
.Fn efi_get_variable "efi_guid_t guid" "const char *name" "void **data" "ssize_t *data_size" "uint32_t *attributes"
|
|
.Ft int
|
|
.Fn efi_get_variable_attributes "efi_guid_t guid" "const char *name" "uint32_t *attributes"
|
|
.Ft int
|
|
.Fn efi_get_variable_size "efi_guid_t guid" "const char *name" "size_t *size"
|
|
.Ft int
|
|
.Fn efi_get_next_variable_name "efi_guid_t **guid" "char **name"
|
|
.Ft int
|
|
.Fn efi_guid_to_name "efi_guid_t *guid" "char **name"
|
|
.Ft int
|
|
.Fn efi_guid_to_symbol "efi_guid_t *guid" "char **symbol"
|
|
.Ft int
|
|
.Fn efi_guid_to_str "const efi_guid_t *guid" "char **sp"
|
|
.Ft int
|
|
.Fn efi_name_to_guid "const char *name" "efi_guid_t *guid"
|
|
.Ft int
|
|
.Fn efi_set_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes"
|
|
.Ft int
|
|
.Fn efi_str_to_guid "const char *s" "efi_guid_t *guid";
|
|
.Ft int
|
|
.Fn efi_variables_supported "void";
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
library implements access to EFI Variables via the EFI Runtime
|
|
Serivces.
|
|
All char * strings are converted to 16-bit UTF strings before passing
|
|
them to EFI.
|
|
.Pp
|
|
.Fn efi_variables_supported
|
|
returns non-zero if the current machine supports setting of EFI firmware
|
|
variables and the kernel support for doing so is present.
|
|
Otherwise zero is returned.
|
|
.Pp
|
|
.Fn efi_del_variable
|
|
deletes the EFI variable selected by
|
|
.Dv guid
|
|
and
|
|
.Dv name .
|
|
.Pp
|
|
.Fn efi_get_variable
|
|
.Fn efi_get_variable_attributes
|
|
.Fn efi_get_variable_size
|
|
.Fn efi_append_variable
|
|
.Fn efi_set_variable
|
|
.Fn efi_get_next_variable_name
|
|
.Fn efi_str_to_guid
|
|
.Fn efi_guid_to_str
|
|
.Fn efi_name_to_guid
|
|
.Fn efi_guid_to_name
|
|
.Fn efi_guid_to_symbol
|
|
This function is not actually implemented.
|
|
.Sh BUGS
|
|
No facilities exist to process the strings as native UTF.
|
|
This is a limitation in the Linux libefivar library interface.
|
|
.Sh AUTHORS
|
|
.An -nosplit
|
|
This software was originally written by
|
|
.An Warner Losh .
|