Architecture Overview

CHIPSEC Architecture

CHIPSEC Architecture

Core components

chipsec_main.py

main application logic and module execution

chipsec_util.py

command-line access to CHIPSEC utility commands

chipsec/chipset.py

chipset detection and CHIPSEC initialization

chipsec/command.py

base class for utility commands

chipsec/library/defines.py

common constants and definitions

chipsec/library/file.py

file and path utilities

chipsec/library/logger.py

logging functions

chipsec/module.py

module discovery and loading

chipsec/module_common.py

base class for security modules

chipsec/library/result_deltas.py

checking result deltas between test runs

chipsec/testcase.py

result reporting and XML/JSON output

chipsec/helper/basehelper.py

interface implemented by OS helpers

chipsec/helper/oshelper.py

discovers and selects an OS helper backend

chipsec/hal/

hardware abstraction layer implementations

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.

HAL (Hardware Abstraction Layer)

Useful abstractions for common tasks such as accessing the SPI.

Fuzzing

CHIPSEC_MAIN Program Flow

  1. Select OS Helpers and Drivers

    • Load Driver (optional)

  2. Detect Platform

  3. Load Configuration Files

  4. Load Modules

  5. Run Loaded Modules

  6. Report Results

  7. Cleanup

CHIPSEC_UTIL Program Flow

  1. Select OS Helpers and Drivers

    • Load Driver (optional)

  2. Detect Platform

  3. Load Configuration Files

  4. Load Utility Commands

  5. Run Selected Command

  6. 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