- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| efivars.go | ||
| fv.go | ||
| go.mod | ||
| go.sum | ||
| hii.go | ||
| ifr.go | ||
| ifr_test.go | ||
| main.go | ||
| README.md | ||
asusbios
Extracts UEFI BIOS setup settings (HII/IFR) from a firmware image and prints every setup question with its varstore, byte offset, width and allowed values — the information needed to read or change BIOS settings from Linux via efivarfs, without booting into setup.
Works on AMI Aptio V images such as ASUS .CAP capsules, and also accepts raw
SPI dumps, bare firmware volumes, or already-extracted module blobs.
Usage
asusbios [-v] [-grep <text>] [-values] [-nondefault] <bios.cap>
-grep <text>— only print questions whose prompt matches (case-insensitive).-values— annotate each setting with its current value, read live from efivarfs (-efivarsoverrides the mount point). Settings that differ from their default are marked*CHANGED*.-nondefault— only print settings whose current value differs from the default (implies-values).
$ asusbios -grep virtualization -values PRIME-Z490-P-ASUS-1806.CAP
== Module Setup (899407D7-99FE-43D8-9A21-79EC328CAC21) ==
Form "CPU Configuration"
OneOf "Intel (VMX) Virtualization Technology" [CpuSetup:0x0B4 1B] default=0 current=1 (Enabled) *CHANGED*
0 = "Disabled" (default)
1 = "Enabled"
The varstore name/GUID map to EFI variables in
/sys/firmware/efi/efivars/<Name>-<guid>; the printed offset is relative to
the variable's data (add 4 for the efivarfs attribute header). Reading
current values only makes sense when the image given is the firmware the
machine is actually running.
How it works
- Firmware volumes are located by their
_FVHsignature (this skips capsule headers and flash-descriptor layout transparently) and parsed with linuxboot/fiano, which also unpacks compressed/nested sections. - Every leaf section is scanned for HII string packages
(
EFI_HII_SIBT_*blocks) and IFR formsets (EFI_IFR_FORM_SET…EFI_IFR_END). - Questions (OneOf/Checkbox/Numeric/String) are printed with prompts resolved from the nearest English string package.
Non-goals
Writing settings back through efivarfs is deliberately not implemented: a bad
write to a setup variable can brick the board until a CMOS clear. This tool
stays read-only; change settings in BIOS setup (systemctl reboot --firmware-setup gets you there without key-mashing).