003 File Manager
Current Path:
/usr/src/sys/dev/bhnd/nvram
usr
/
src
/
sys
/
dev
/
bhnd
/
nvram
/
📁
..
📄
bhnd_nvram.h
(5.54 KB)
📄
bhnd_nvram_data.c
(22.42 KB)
📄
bhnd_nvram_data.h
(5.41 KB)
📄
bhnd_nvram_data_bcm.c
(29.18 KB)
📄
bhnd_nvram_data_bcmraw.c
(11.73 KB)
📄
bhnd_nvram_data_bcmreg.h
(3.18 KB)
📄
bhnd_nvram_data_bcmvar.h
(2.72 KB)
📄
bhnd_nvram_data_btxt.c
(23.67 KB)
📄
bhnd_nvram_data_sprom.c
(40.14 KB)
📄
bhnd_nvram_data_sprom_subr.c
(34.98 KB)
📄
bhnd_nvram_data_spromvar.h
(6.1 KB)
📄
bhnd_nvram_data_tlv.c
(22.32 KB)
📄
bhnd_nvram_data_tlvreg.h
(1.82 KB)
📄
bhnd_nvram_datavar.h
(7.98 KB)
📄
bhnd_nvram_if.m
(3.6 KB)
📄
bhnd_nvram_io.c
(7.14 KB)
📄
bhnd_nvram_io.h
(3.22 KB)
📄
bhnd_nvram_iobuf.c
(9.02 KB)
📄
bhnd_nvram_ioptr.c
(6.17 KB)
📄
bhnd_nvram_iores.c
(8 KB)
📄
bhnd_nvram_iovar.h
(4.11 KB)
📄
bhnd_nvram_plist.c
(25.93 KB)
📄
bhnd_nvram_plist.h
(5.22 KB)
📄
bhnd_nvram_plistvar.h
(2.55 KB)
📄
bhnd_nvram_private.h
(15.11 KB)
📄
bhnd_nvram_store.c
(33.61 KB)
📄
bhnd_nvram_store.h
(3.72 KB)
📄
bhnd_nvram_store_subr.c
(30.67 KB)
📄
bhnd_nvram_storevar.h
(10.32 KB)
📄
bhnd_nvram_subr.c
(29.63 KB)
📄
bhnd_nvram_value.c
(51.31 KB)
📄
bhnd_nvram_value.h
(8.62 KB)
📄
bhnd_nvram_value_fmts.c
(28.26 KB)
📄
bhnd_nvram_value_prf.c
(20.77 KB)
📄
bhnd_nvram_value_subr.c
(15.12 KB)
📄
bhnd_nvram_valuevar.h
(3.91 KB)
📄
bhnd_sprom.c
(6.26 KB)
📄
bhnd_spromvar.h
(2.09 KB)
📄
nvram_map
(61.27 KB)
Editing: bhnd_nvram_if.m
#- # Copyright (c) 2016 Landon Fuller <landon@landonf.org> # 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 ``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$ #include <sys/types.h> #include <sys/bus.h> #include <dev/bhnd/bhnd.h> INTERFACE bhnd_nvram; # # bhnd(4) NVRAM device interface. # # Provides a shared interface to HND NVRAM, OTP, and SPROM devices that provide # access to a common set of hardware/device configuration variables. # /** * Read an NVRAM variable. * * @param dev The NVRAM device. * @param name The NVRAM variable name. * @param[out] buf On success, the requested value will be written * to this buffer. This argment may be NULL if * the value is not desired. * @param[in,out] len The maximum capacity of @p buf. On success, * will be set to the actual size of the requested * value. * @param type The data type to be written to @p buf. * * @retval 0 success * @retval ENOENT The requested variable was not found. * @retval ENOMEM If @p buf is non-NULL and a buffer of @p len is too * small to hold the requested value. * @retval ENODEV If no supported NVRAM hardware is accessible via this * device. * @retval EOPNOTSUPP If any coercion to @p type is unsupported. * @retval EFTYPE If the @p name's data type cannot be coerced to @p type. * @retval ERANGE If value coercion would overflow @p type. * @retval non-zero If reading @p name otherwise fails, a regular unix * error code will be returned. */ METHOD int getvar { device_t dev; const char *name; void *buf; size_t *len; bhnd_nvram_type type; }; /** * Set an NVRAM variable's value. * * No changes will be written to non-volatile storage until explicitly * committed. * * @param dev The NVRAM device. * @param name The NVRAM variable name. * @param value The new value. * @param len The size of @p value. * @param type The data type of @p value. * * @retval 0 success * @retval ENOENT The specified variable name is not recognized. * @retval ENODEV If no supported NVRAM hardware is accessible via this * device. * @retval EOPNOTSUPP If any coercion to @p type is unsupported. * @retval EFTYPE If the @p name's data type cannot be coerced to @p type. * @retval ERANGE If value coercion from @p type would overflow. * @retval non-zero If reading @p name otherwise fails, a regular unix * error code will be returned. */ METHOD int setvar { device_t dev; const char *name; const void *value; size_t len; bhnd_nvram_type type; };
Upload File
Create Folder