/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _LIBUEFI_RT_H_
#define _LIBUEFI_RT_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef void *uefirt_hdl_t;
/*
* Attributes for uefirt_var_get_attr and
* uefirt_var_set_attr. See UEFI spec section 3.1.3.
*/
/*
* Enable access to UEFI boot option functions.
*/
/*
* Disable access to UEFI boot option variables.
* Deallocate resources associated with handle,
* and flush any pending writes to NVRAM.
*
* Memory allocated and returned as a result of
* calling the access functions, include all
* the uefirt_var_boot_get_* functions, is released
* and should not be referenced after calling this
* function.
*/
/*
* Return an array of existing Boot#### variables. Each element
* of the array represents an individual Boot#### option. The
* array is terminated with -1.
*/
int **bootopt);
/*
* Search the list of existing boot option Boot#### properties
* for one which matches logical_partition and return the Boot####
* in bootopt. bootopt is a pointer to a NULL-terminated
* array of bootopt's. There may be multiple boot options
* associated with a given drive.
*
* logdev is of the form "c0t0d0s0" or "c0t0d0p0".
*/
/*
* Search the list of logical path devices that match the given
* bootopt. There may be more than one device (eg multi-pathing).
* Returns a NULL-terminated list of matching logical drives in
* logdev.
*/
/*
* Remove Boot#### property and reference in BootOrder.
*/
int bootopt);
/*
* Default EFI path for Solaris bootloader
*/
/*
* Create a new load option from logical_drive and initialize.
*
* input: logical_drive, description
* input: flags - UEFIRT_BOOTOPT_FULL to use a full UEFI pathname
* output: bootopt
*/
/*
* Boot option access functions for reading or writing boot
* option data.
*/
/*
* Returns the UEFI path in UEFI display notation, of the given
* bootopt. It displays only the path information contained in
* the variable, so if it's a short form, only a relative path
* is returned.
*/
/*
* Insert or move bootopt in BootOrder.
*/
int bootopt);
/*
* Return position in BootOrder array of bootopt.
*/
/*
* Return the bootopt at position in the BootOrder array.
*/
/*
* Returns BootCurrent in bootopt.
*/
int *bootopt);
/*
* Set bootopt as the bootoption to boot from at next reboot.
* Sets BootNext.
*/
int bootopt);
#ifdef __cplusplus
}
#endif
#endif /* _LIBUEFI_RT_H_ */