Set ISA Registers Carefully with isaset

isaset writes a value straight into a chip's ISA registers. This guide walks through its addressing rules and a safe way to decide whether a write should happen at all.

The examples match isaset from lm-sensors 3.6.0-9build1 on this machine. Allow about fifteen minutes for a prepared write, or longer if you first need to identify the hardware register map.

1. Confirm the installed command without touching hardware

Start with the read-only help output. This is an ordinary command and needs no elevated privileges:

$ command -v isaset
/usr/sbin/isaset
$ dpkg-query -W -f='${Package} ${Version}\n' lm-sensors
lm-sensors 1:3.6.0-9build1
$ isaset --help
Warning: Unsupported flag "--"!
Syntax for I2C-like access:
  isaset [OPTIONS] ADDRREG DATAREG ADDRESS VALUE [MASK]
Syntax for flat address space:
  isaset -f [OPTIONS] ADDRESS VALUE [MASK]
Options:
  -f    Enable flat address space mode
  -y    Assume affirmative answer to all questions
  -W    Write a word (16-bit) value
  -L    Write a long (32-bit) value

The warning is a quirk of this older command's help handling: --help is not documented as an option, so the program reports it as unsupported while still printing the useful syntax. Do not treat that output as a hardware test.

Checkpoint: you should know which binary and package version you are using. If command -v finds a different copy, stop and inspect that installation before relying on the examples.

2. Choose the addressing mode from the chip documentation

The normal form is an I2C-like access pattern through two ISA ports:

isaset [OPTIONS] ADDRREG DATAREG ADDRESS VALUE [MASK]

ADDRREG is the ISA address of the chip's address register and DATAREG is the address of its data register; each must be between 0x0000 and 0x3FFF. The ADDRESS and VALUE arguments select and set an 8-bit chip register, so each must be between 0x00 and 0xFF.

For a monitoring chip with a documented base address of 0x0290, the usual port pair is 0x0295 and 0x0296. Super-I/O chips commonly use 0x2e and 0x2f. These are conventions, not permission to try them: use the exact pair supplied by the board or chip documentation.

Flat mode uses one complete ISA address instead:

isaset -f [OPTIONS] ADDRESS VALUE [MASK]

Here ADDRESS is the sum of the chip base address and register address, between 0x0000 and 0xFFFF. Do not combine the flat address with an address-register/data-register pair.

Checkpoint: write down the selected mode, every hexadecimal argument, and the source that documents it. If any value is missing, do not continue to the write.

3. Understand the confirmation prompt

By default, isaset asks for confirmation before it accesses the ISA bus. That pause is a useful last chance to catch a mistyped address. Leave interactive mode enabled while testing a command manually:

$ sudo isaset 0x0295 0x0296 0x00 PLACEHOLDER_VALUE
WARNING! This program can cause system crashes, data loss and worse!
Do you want to continue? [Y/n]

PLACEHOLDER_VALUE is deliberately not a value to paste. Replace it only with a documented value for your target register. The prompt and its exact wording can vary with the installed build; the safety boundary is the confirmation itself.

The -y option disables the prompt and performs the operation directly. It is intended for scripts, but it removes the interactive safeguard. Use it only after the command has been reviewed and tested manually, and keep it out of exploratory one-liners.

4. Apply a masked write only when the bit operation is documented

An optional MASK preserves unmasked bits at the written location. A mask is not a second value to try until the command works: it changes which bits are allowed to change, and the chip documentation must tell you which bits are safe and which should be preserved.

Use a fully reviewed placeholder command as a template:

$ sudo isaset 0xADDRREG 0xDATAREG 0xREGISTER 0xVALUE 0xMASK

Replace every uppercase token with a hexadecimal number from the register map, and check the address and value are each within range for the selected mode. If the register is a write-only command, a wrong value may have an immediate and irreversible effect, so do not infer a mask from a nearby register.

For flat addressing, the equivalent shape is:

$ sudo isaset -f 0xISA_ADDRESS 0xVALUE 0xMASK

Recovery: without a documented mask, omit it. An unmasked write changes the complete value selected by the command. There is no general undo operation: recovery means writing the original documented value again, if the hardware supports that and you recorded it first.

5. Select the write width deliberately

The default operation writes the register value in the ordinary form described by the command. Add -W for a 16-bit write or -L for a 32-bit write only when the hardware documentation requires that width:

$ sudo isaset -W 0xADDRREG 0xDATAREG 0xREGISTER 0xVALUE
$ sudo isaset -L -f 0xISA_ADDRESS 0xVALUE

The examples show syntax, not safe values. A width mismatch can address the wrong hardware or alter adjacent registers. Do not use -W or -L as a way to force a command past an error.

6. Run the reviewed write and capture evidence

Before answering the confirmation prompt, compare the command with your written register map one argument at a time. Then run it with sudo or from a root shell: this is the point where the machine state changes and a service or sensor may be disrupted.

$ sudo isaset [OPTIONS] ADDRREG DATAREG ADDRESS VALUE [MASK]
WARNING! This program can cause system crashes, data loss and worse!
Do you want to continue? [Y/n] Y

Warning: do not rely on a quiet return as proof the device accepted the setting. The manpage describes isaset as a write helper, not a read-back verifier. If the chip documentation provides a safe read-back method, use the appropriate read-only tool and compare the result with the intended register state. If it does not, verify through the device's documented status interface and watch for service or sensor failures.

If the command behaves unexpectedly, stop issuing more writes. Record the exact command, time, console output and affected service. Restore the recorded original value only if the hardware documentation specifies that this is safe; otherwise power down or follow the vendor's recovery procedure rather than experimenting with inverse values.

7. Automate only after the manual path is proven

A script can use -y, but it should fail closed around the command. Keep register values in reviewed constants, log the selected hardware and do not accept arbitrary addresses from a network request or unchecked user input:

#!/bin/sh
set -eu

ADDRREG='0xADDRREG'
DATAREG='0xDATAREG'
REGISTER='0xREGISTER'
VALUE='0xVALUE'

sudo isaset -y "$ADDRREG" "$DATAREG" "$REGISTER" "$VALUE"

This is a template, not a runnable hardware change. Replace the placeholders only after reviewing the register map and testing the interactive command. A scheduled script can repeat a dangerous write after a reboot or hardware replacement, so tie automation to an explicit device check where the surrounding tooling can provide one.

Done means