Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libefivar/efivar.3
Show All 18 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" 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 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd September 14, 2016 | .Dd October 25, 2018 | ||||
.Dt LIBEFIVAR 3 | .Dt LIBEFIVAR 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm libefivar | .Nm libefivar | ||||
.Nd EFI Non Volatile Variable Suppoert | .Nd EFI Non Volatile Variable Support | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In efivar.h | .In efivar.h | ||||
.Ft int | .Ft int | ||||
.Fn efi_append_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes" | .Fn efi_append_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes" | ||||
.Ft int | .Ft int | ||||
.Fn efi_del_variable "efi_guid_t guid" "const char *name" | .Fn efi_del_variable "efi_guid_t guid" "const char *name" | ||||
.Ft int | .Ft int | ||||
.Fn efi_get_variable "efi_guid_t guid" "const char *name" "void **data" "ssize_t *data_size" "uint32_t *attributes" | .Fn efi_get_variable "efi_guid_t guid" "const char *name" "void **data" "ssize_t *data_size" "uint32_t *attributes" | ||||
Show All 9 Lines | |||||
.Fn efi_guid_to_symbol "efi_guid_t *guid" "char **symbol" | .Fn efi_guid_to_symbol "efi_guid_t *guid" "char **symbol" | ||||
.Ft int | .Ft int | ||||
.Fn efi_guid_to_str "const efi_guid_t *guid" "char **sp" | .Fn efi_guid_to_str "const efi_guid_t *guid" "char **sp" | ||||
.Ft int | .Ft int | ||||
.Fn efi_name_to_guid "const char *name" "efi_guid_t *guid" | .Fn efi_name_to_guid "const char *name" "efi_guid_t *guid" | ||||
.Ft int | .Ft int | ||||
.Fn efi_set_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes" | .Fn efi_set_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes" | ||||
.Ft int | .Ft int | ||||
.Fn efi_str_to_guid "const char *s" "efi_guid_t *guid"; | .Fn efi_str_to_guid "const char *s" "efi_guid_t *guid" | ||||
.Ft int | .Ft int | ||||
.Fn efi_variables_supported "void"; | .Fn efi_variables_supported "void" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
library implements access to EFI Variables via the EFI Runtime | library implements access to EFI Variables via the EFI Runtime | ||||
Serivces. | Services. | ||||
All char * strings are converted to 16-bit UTF strings before passing | All | ||||
.Vt "char *" | |||||
strings are converted to 16-bit UTF strings before passing | |||||
them to EFI. | them to EFI. | ||||
.Pp | .Pp | ||||
.Fn efi_variables_supported | .Fn efi_variables_supported | ||||
returns non-zero if the current machine supports setting of EFI firmware | returns non-zero if the current machine supports setting of EFI firmware | ||||
variables and the kernel support for doing so is present. | variables and the kernel support for doing so is present. | ||||
Otherwise zero is returned. | Otherwise zero is returned. | ||||
.Pp | .Pp | ||||
.Fn efi_del_variable | .Fn efi_del_variable | ||||
deletes the EFI variable selected by | deletes the EFI variable selected by | ||||
.Dv guid | .Va guid | ||||
and | and | ||||
.Dv name . | .Va name . | ||||
.Pp | .Pp | ||||
The following functions have not been implemented yet: | |||||
.Bl -dash -offset indent -compact | |||||
.It | |||||
.Fn efi_append_variable | |||||
.It | |||||
.Fn efi_get_next_variable_name | |||||
.It | |||||
.Fn efi_get_variable | .Fn efi_get_variable | ||||
.It | |||||
.Fn efi_get_variable_attributes | .Fn efi_get_variable_attributes | ||||
.It | |||||
.Fn efi_get_variable_size | .Fn efi_get_variable_size | ||||
.Fn efi_append_variable | .It | ||||
.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_name | ||||
.It | |||||
.Fn efi_guid_to_str | |||||
.It | |||||
.Fn efi_guid_to_symbol | .Fn efi_guid_to_symbol | ||||
This function is not actually implemented. | .It | ||||
.Sh BUGS | .Fn efi_name_to_guid | ||||
No facilities exist to process the strings as native UTF. | .It | ||||
This is a limitation in the Linux libefivar library interface. | .Fn efi_set_variable | ||||
.It | |||||
.Fn efi_str_to_guid | |||||
.El | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr efidev 4 | .Xr efidev 4 | ||||
.Sh HISTORY | |||||
The | |||||
.Nm | |||||
library first appeared in | |||||
.Fx 12.0 . | |||||
.Sh AUTHORS | .Sh AUTHORS | ||||
.An -nosplit | .An -nosplit | ||||
This software was originally written by | This software was originally written by | ||||
.An Warner Losh . | .An Warner Losh . | ||||
.Sh BUGS | |||||
No facilities exist to process the strings as native UTF. | |||||
This is a limitation in the Linux | |||||
.Nm | |||||
library interface. |