Skip to content

Instantly share code, notes, and snippets.

@orangecms
Last active August 7, 2024 19:25
Show Gist options
  • Save orangecms/6c4d586778eca411192ab74856c85676 to your computer and use it in GitHub Desktop.
Save orangecms/6c4d586778eca411192ab74856c85676 to your computer and use it in GitHub Desktop.
#!/bin/sh
_REGS=`echo RomProtect{0,1,2,3} SPICntrl0 SPIRestrictedCmd{,2} AltSPICS`
for r in $_REGS; do
chipsec_util.py reg read $r
done
dmidecode -t bios -t system
@orangecms
Copy link
Author

orangecms commented Feb 10, 2022

The above script will dump and decode the content of the listed (PCI configuration memory-mapped) registers, see also:
https://www.amd.com/system/files/TechDocs/55449_Fam_17h_M_00h-0Fh_Rev_Guide.pdf

The goal is to get a sense of what the "BIOS locking" registers look like in the wild: fwupd/fwupd#4094 (comment)

You may need to call chipsec_util without the .py extension on quite some systems.
Depending on SoC/chipset recognition, pass -p RENOIR explicitly.

If Chipsec refuses to work because it autonomously and insipidly tries to modprobe and rmmod its chipsec.ko module, clone the repo instead of using a distro package and comment out the offending lines in chipsec/helper/linux/linuxhelper.py's start and stop functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment