GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
NVRAM2ENV(4) FreeBSD Kernel Interfaces Manual NVRAM2ENV(4)

nvram2env
copy nvram-like data into kernel environment

device nvram2env

nvram2env implements a simple method of reading the NVRAM-like data and information stored in flash and storing it in the kernel environment. It can then be used by various device drivers at boot-time.

The NVRAM-like data is an array of zero terminated strings. Each string contains the string name, "=" delimiter and the string value.

nvram2env copies the environment values into kernel environment using the kernel setenv call.

Configuration of nvram2env is done in device.hints(5) defining the NVRAM base address, fallback base address, maxsize and flags.

nvram2env is currently MIPS-specific.

base - physical address where data block is stored.

fallbackbase - physical address where data block is stored, but only if not found at base.

maxsize - maximum size of data block.

flags - control flags, used to select nvram type and enable/disable CRC check.
0x0001
Avoid CRC checking. Currently CRC checking is not implemented, so to be future compatible, please set it to "1".
0x0002
Use format "Generic", skip uint32_t field, then zero terminating array of strings.
0x0004
Use Broadcom CFE format, uint32_t signature "FLSH", uint32_t size, three unused fields uint32_t, then data.
0x0008
Use U-Boot format, uint32_t crc, then zero terminating array of strings.

Usage in U-Boot case:
hint.nvram.0.base=0x1f030000
hint.nvram.0.maxsize=0x2000
hint.nvram.0.flags=3 # 1 = No check, 2 = Format Generic
hint.nvram.1.base=0x1f032000
hint.nvram.1.maxsize=0x4000
hint.nvram.1.flags=3 # 1 = No check, 2 = Format Generic

CFE nvram with fallback:

hint.nvram.0.base=0x1fff8000
hint.nvram.0.fallbackbase=0x1fc00400
hint.nvram.0.flags=4 # 4 = Format Broadcom

but seems for CFE nvram preferred to read both blocks:

NVRAM partition: Static, CFE internal

hint.nvram.0.flags=0x05 # Broadcom + nocheck
hint.nvram.0.base=0x1fc00400

Dynamic, editable form CFE, override values from first

hint.nvram.1.flags=0x05 # Broadcom + nocheck
hint.nvram.1.base=0x1cff8000

kenv(1), kenv(2)

nvram2env first appeared in FreeBSD 9.0.

Aleksandr Rybalko <ray@ddteam.net>
April 3, 2011 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 4 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.