Architecture Overview¶
Core components¶
chipsec_main.py
main application logic and automation functions
chipsec_util.py
utility functions (access to various hardware resources)
chipsec/chipset.py
chipset detection
chipsec/command.py
base class for util commands
chipsec/defines.py
common defines
chipsec/file.py
reading from/writing to files
chipsec/logger.py
logging functions
chipsec/module.py
generic functions to import and load modules
chipsec/module_common.py
base class for modules
chipsec/result_deltas.py
supports checking result deltas between test runs
chipsec/testcase.py
support for XML and JSON log file output
chipsec/helper/helpers.py
registry of supported OS helpers
chipsec/helper/oshelper.py
OS helper: wrapper around platform specific code that invokes kernel driver
Commands¶
Implement functionality of chipsec_util.
CHIPSEC utilities provide the capability for manual testing and direct hardware access.
Warning
DIRECT HARDWARE ACCESS PROVIDED BY THESE UTILITIES COULD MAKE YOUR SYSTEM UNBOOTABLE. MAKE SURE YOU KNOW WHAT YOU ARE DOING!
Note
All numeric values in the instructions are in hex.
- List of Utility components
- chipsec.utilcmd.acpi_cmd module
- chipsec.utilcmd.chipset_cmd module
- chipsec.utilcmd.cmos_cmd module
- chipsec.utilcmd.config_cmd module
- chipsec.utilcmd.cpu_cmd module
- chipsec.utilcmd.decode_cmd module
- chipsec.utilcmd.deltas_cmd module
- chipsec.utilcmd.desc_cmd module
- chipsec.utilcmd.ec_cmd module
- chipsec.utilcmd.igd_cmd module
- chipsec.utilcmd.interrupts_cmd module
- chipsec.utilcmd.io_cmd module
- chipsec.utilcmd.iommu_cmd module
- chipsec.utilcmd.lock_check_cmd module
- chipsec.utilcmd.mem_cmd module
- chipsec.utilcmd.mmcfg_base_cmd module
- chipsec.utilcmd.mmcfg_cmd module
- chipsec.utilcmd.mmio_cmd module
- chipsec.utilcmd.msgbus_cmd module
- chipsec.utilcmd.msr_cmd module
- chipsec.utilcmd.pci_cmd module
- chipsec.utilcmd.reg_cmd module
- chipsec.utilcmd.smbios_cmd module
- chipsec.utilcmd.smbus_cmd module
- chipsec.utilcmd.spd_cmd module
- chipsec.utilcmd.spi_cmd module
- chipsec.utilcmd.spidesc_cmd module
- chipsec.utilcmd.tpm_cmd module
- chipsec.utilcmd.txt_cmd module
- chipsec.utilcmd.ucode_cmd module
- chipsec.utilcmd.uefi_cmd module
- chipsec.utilcmd.vmem_cmd module
- chipsec.utilcmd.vmm_cmd module
HAL (Hardware Abstraction Layer)¶
Useful abstractions for common tasks such as accessing the SPI.
- List of HAL components
- chipsec.hal.acpi module
- chipsec.hal.acpi_tables module
- chipsec.hal.cmos module
- chipsec.hal.cpu module
- chipsec.hal.cpuid module
- chipsec.hal.ec module
- chipsec.hal.hal_base module
- chipsec.hal.igd module
- chipsec.hal.interrupts module
- chipsec.hal.io module
- chipsec.hal.iobar module
- chipsec.hal.iommu module
- chipsec.hal.locks module
- chipsec.hal.mmio module
- chipsec.hal.msgbus module
- chipsec.hal.msr module
- chipsec.hal.paging module
- chipsec.hal.pci module
- chipsec.hal.pcidb module
- chipsec.hal.physmem module
- chipsec.hal.psp module
- chipsec.hal.smbios module
- chipsec.hal.smbus module
- chipsec.hal.spd module
- chipsec.hal.spi module
- chipsec.hal.spi_descriptor module
- chipsec.hal.spi_jedec_ids module
- chipsec.hal.spi_uefi module
- chipsec.hal.tpm module
- chipsec.hal.tpm12_commands module
- chipsec.hal.tpm_eventlog module
- chipsec.hal.ucode module
- chipsec.hal.uefi module
- chipsec.hal.uefi_common module
- chipsec.hal.uefi_compression module
- chipsec.hal.uefi_fv module
- chipsec.hal.uefi_platform module
- chipsec.hal.uefi_search module
- chipsec.hal.virtmem module
- chipsec.hal.vmm module
Fuzzing¶
CHIPSEC_MAIN Program Flow¶
Select OS Helpers and Drivers
Load Driver (optional)
Load Configuration Files
Load Modules
Run Loaded Modules
Report Results
Cleanup
CHIPSEC_UTIL Program Flow¶
Select OS Helpers and Drivers
Load Driver (optional)
Load Configuration Files
Load Utility Commands
Run Selected Command
Cleanup
Auxiliary components¶
setup.py
setup script to install CHIPSEC as a package
Executable build scripts¶
<CHIPSEC_ROOT>/scripts/build_exe_*.py
make files to build Windows executables