]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libefivar/efivar.3
rtld-elf: link udivmoddi4 from compiler_rt
[FreeBSD/FreeBSD.git] / lib / libefivar / efivar.3
1 .\"
2 .\" Copyright 2016 Netflix, Inc.
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd October 25, 2018
29 .Dt LIBEFIVAR 3
30 .Os
31 .Sh NAME
32 .Nm libefivar
33 .Nd EFI Non Volatile Variable Support
34 .Sh SYNOPSIS
35 .In efivar.h
36 .Ft int
37 .Fn efi_append_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes"
38 .Ft int
39 .Fn efi_del_variable "efi_guid_t guid" "const char *name"
40 .Ft int
41 .Fn efi_get_variable "efi_guid_t guid" "const char *name" "void **data" "ssize_t *data_size" "uint32_t *attributes"
42 .Ft int
43 .Fn efi_get_variable_attributes "efi_guid_t guid" "const char *name" "uint32_t *attributes"
44 .Ft int
45 .Fn efi_get_variable_size "efi_guid_t guid" "const char *name" "size_t *size"
46 .Ft int
47 .Fn efi_get_next_variable_name "efi_guid_t **guid" "char **name"
48 .Ft int
49 .Fn efi_guid_to_name "efi_guid_t *guid" "char **name"
50 .Ft int
51 .Fn efi_guid_to_symbol "efi_guid_t *guid" "char **symbol"
52 .Ft int
53 .Fn efi_guid_to_str "const efi_guid_t *guid" "char **sp"
54 .Ft int
55 .Fn efi_name_to_guid "const char *name" "efi_guid_t *guid"
56 .Ft int
57 .Fn efi_set_variable "efi_guid_t guid" "const char *name" "void *data" "size_t data_size" "uint32_t attributes"
58 .Ft int
59 .Fn efi_str_to_guid "const char *s" "efi_guid_t *guid"
60 .Ft int
61 .Fn efi_variables_supported "void"
62 .Sh DESCRIPTION
63 The
64 .Nm
65 library implements access to EFI Variables via the EFI Runtime
66 Services.
67 All
68 .Vt "char *"
69 strings are converted to 16-bit UTF strings before passing
70 them to EFI.
71 .Pp
72 .Fn efi_variables_supported
73 returns non-zero if the current machine supports setting of EFI firmware
74 variables and the kernel support for doing so is present.
75 Otherwise zero is returned.
76 .Pp
77 .Fn efi_del_variable
78 deletes the EFI variable selected by
79 .Va guid
80 and
81 .Va name .
82 .Pp
83 The following functions have not been implemented yet:
84 .Bl -dash -offset indent -compact
85 .It
86 .Fn efi_append_variable
87 .It
88 .Fn efi_get_next_variable_name
89 .It
90 .Fn efi_get_variable
91 .It
92 .Fn efi_get_variable_attributes
93 .It
94 .Fn efi_get_variable_size
95 .It
96 .Fn efi_guid_to_name
97 .It
98 .Fn efi_guid_to_str
99 .It
100 .Fn efi_guid_to_symbol
101 .It
102 .Fn efi_name_to_guid
103 .It
104 .Fn efi_set_variable
105 .It
106 .Fn efi_str_to_guid
107 .El
108 .Sh SEE ALSO
109 .Xr efidev 4
110 .Sh HISTORY
111 The
112 .Nm
113 library first appeared in
114 .Fx 12.0 .
115 .Sh AUTHORS
116 .An -nosplit
117 This software was originally written by
118 .An Warner Losh .
119 .Sh BUGS
120 No facilities exist to process the strings as native UTF.
121 This is a limitation in the Linux
122 .Nm
123 library interface.