2 .\" Copyright (c) 2010 Marcel Moolenaar
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
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.
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
32 .Nm efi_getvar , efi_nextvarname , efi_setvar
33 .Nd "interface for accessing the EFI variable services"
40 .Fa "char *name" "uuid_t *vendor" "uint32_t *attrib"
41 .Fa "size_t *datasize" "void *data"
44 .Fn efi_nextvarname "size_t *namesize" "char *name" "uuid_t *vendor"
47 .Fa "char *name" "uuid_t *vendor" "uint32_t attrib"
48 .Fa "size_t datasize" "void *data"
53 library provides access to a select set of the runtime services of the
54 Extensible Firmware Interface (EFI).
58 function is used to enumerate the variables.
61 parameter needs to be set to the size of the buffer pointed to by
65 is set to the length of the variable name (including the terminating
67 irrespective of whether the buffer was big enough.
68 The buffer pointed to by
70 contains the full or partial variable name on return.
71 Only on successful completion of the request is the
74 The values returned should be passed to successive calls to
76 until all variables have been enumerated.
78 The variable name and vendor as returned by
82 to obtain the value and attribute of the variable.
83 The buffer that is to contain the value is specified by
85 and the size of the buffer is given by
87 The attribute pointed to by
89 consists of the bit values defined by the EFI specification.
91 Variables can be created, modified and deleted using the
94 All new variables must be non-volatile and runtime accessible in
95 order for the request to succeed.
96 Note that for runtime accessable variables the boottime accessable bit must
98 To delete a variable, set
102 The vendor UUID is used to avoid collisions between variable names of
104 Variables created for use by
107 .Dv EFI_FREEBSD_VARIABLE
108 UUID as defined in the
112 Upon successful completion, these functions return 0.
113 Otherwise, the error number is returned.
114 These functions will fail if:
117 Insufficient permissions to access the EFI services.
119 The variable name is not in UTF-8.
121 The request has invalid parameters.
123 The variable does not exist or no more variables exist.
125 Temporary storage could not be allocated.
127 The variable name is too long or the data is too big to fit in
136 library first appeared in
138 for the ia64 architecture.
142 library and this manual page were written by
143 .An Marcel Moolenaar Aq marcel@FreeBSD.org .