Skip to content

Reference ARC environment variables

pappadf edited this page Sep 14, 2026 · 1 revision

Reference: ARC environment variables

This page owns: every environment variable the loader and Setup read, with the values this machine needs.


The table

Variable Value used here Read by
SYSTEMPARTITION multi(0)scsi(1)disk(0)rdisk(0)partition(1) the loader; Setup, before it will start
OSLOADER …partition(1)\os\winnt40\osloader.exe the firmware, to find the loader
OSLOADPARTITION …partition(2) the loader, for the operating system
OSLOADFILENAME \WINNT the loader
OSLOADOPTIONS NODEBUG the loader
LOADIDENTIFIER Windows NT Workstation Version 4.00 the boot menu
AUTOLOAD YES the boot menu
COUNTDOWN 5 the boot menu
LASTKNOWNGOOD FALSE the loader
PROCESSORS 1
CONSOLEIN / CONSOLEOUT multi(0)serial(0)line(0) everything
FIRMWAREVERSION OpenFirmware2.26 informational
VENEERVERSION FirmWorks,ENG,3.0,… informational

Read the first five together and the design is visible: the firmware finds the loader on the system partition; the loader finds the operating system, possibly on a different partition.


How the loader sees them

Not directly. The veneer turns the environment into the loader's argv, as Name=value pairs:

Argv[0]: multi(0)scsi(1)disk(0)rdisk(0)partition(1)\os\winnt40\osloader.exe
Argv[1]: OsLoader=…
Argv[2]: SystemPartition=…
Argv[3]: OSLoadFilename=\WINNT
Argv[4]: OSLoadPartition=…
Argv[5]: OSLoadOptions=NODEBUG
Argv[6]: LoadIdentifier=…
Argv[7]: ConsoleIn=…
Argv[8]: ConsoleOut=…

The loader looks them up by name, case-insensitively, scanning backwards, requiring a literal name=. An entry emitted with an empty name is invisible to that lookup — which is a real failure mode, not a hypothetical one.


Who writes them

On a real ARC machine the firmware's setup utility, into NVRAM
Setup writes the installed system's configuration through HalSetEnvironmentVariable when it finishes
Here, at boot injected into the veneer's table from outside, because there is no NVRAM to have kept them

What Setup writes, observed:

HAL: env set 'LoadIdentifier'  = 'Windows NT Workstation Version 4.00'
HAL: env set 'OsLoader'        = 'multi(0)scsi(1)disk(0)rdisk(0)partition(1)\os\winnt40\osloader.exe'
HAL: env set 'OsLoadPartition' = 'multi(0)scsi(1)disk(0)rdisk(0)partition(2)'
HAL: env set 'OsLoadFilename'  = '\WINNT'
HAL: env set 'SystemPartition' = 'multi(0)scsi(1)disk(0)rdisk(0)partition(1)'
HAL: env set 'COUNTDOWN'       = '5'
HAL: env set 'AUTOLOAD'        = 'YES'

Correct, and lost at the next reset. → ARC §6


The storage format trap

When writing entries into the veneer's table directly, they must be stored as the name and value concatenated with no separatornot NAME=value.

The veneer's FindInLocalEnv compares strlen(name) - 1 characters and VrGetEnvironmentVariable returns entry + strlen(name), so an = between them comes back as the first character of every value:

=multi(0)scsi(1)disk(0)rdisk(0)partition(1)
^ this

The veneer §5, Booting the installed system


Next

Clone this wiki locally