How come reading the boot flash (with flashprog -p internal -r test.rom) succeeds on my server even though I should have /dev/mem protection enabled (kernel compiled with CONFIG_STRICT_DEVMEM=y, CONFIG_IO_STRICT_DEVMEM=y, and not booted with iomem=relaxed), but not on my laptop or any other device I tried on?
server:
> sudo flashprog -p internal -r test.rom
flashprog v1.4 on Linux 6.18.30-p1-gentoo-dist-hardened (x86_64)
flashprog is free software, get the source code at https://flashprog.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
coreboot table found at 0x7f242000.
Found chipset "Intel C236".
Enabling flash write... Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
SPI Configuration is locked down.
OK.
Found Programmer flash chip "Opaque flash chip" (16384 kB, Programmer-specific) on internal.
Reading flash... done.
laptop:
> sudo flashprog -p internal -r test.rom
flashprog p1.4-27-g4a405fd on Linux 6.18.31-noisytoot (x86_64)
flashprog is free software, get the source code at https://flashprog.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Error accessing high tables, 0x1000 bytes at 0x000000007f669000
/dev/mem mmap failed: Operation not permitted
Failed getting access to coreboot high tables.
Error accessing DMI Table, 0x1000 bytes at 0x000000007f62d000
/dev/mem mmap failed: Operation not permitted
Unable to access DMI Table
Found chipset "Intel QM87".
Enabling flash write... Error accessing ICH RCRB, 0x4000 bytes at 0x00000000fed1c000
/dev/mem mmap failed: Operation not permitted
FAILED!
FATAL ERROR!
Error: Programmer initialization failed.