-
Notifications
You must be signed in to change notification settings - Fork 0
Reference ARC environment variables
This page owns: every environment variable the loader and Setup read, with the values this machine needs.
| 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.
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.
| 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
When writing entries into the veneer's table directly, they must be stored as the name and value
concatenated with no separator — not 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
Corrections welcome — this wiki is edited directly, so nothing here has had a review. Repository · STORY.md · GPL-2.0-only
Start here
Theory
- Why NT on a Power Mac is hard
- Open Firmware
- ARC
- The veneer
- The NT boot chain
- The HAL contract
- The NT PowerPC ABI
- Little-endian PowerPC
- How Setup chooses a HAL
- The NT video stack
Machines
Emulator
- Getting Granny Smith
- Media you must supply
- Building the HAL
- The boot floppy
- Preparing disks
- Running text-mode Setup
- Capturing the installed image
- Booting the installed system
- Iterating on the HAL
- Checkpoints and deltas
- Making an OEM CD (retired)
Real hardware
Debugging
- The emulator shell
- Reading NT binaries
- Decoding a bugcheck
- When your instrumentation lies
- Debugging recipes
Reference
- HAL exports
- ARC environment variables
- The veneer's VrDebug bitmask
- Veneer patch catalogue
- Address and interrupt map
- Error codes seen
Project