Skip to content

UEFI Testing Package


This package adds tests.

System Functional tests

Tests that invoke system functions and query system state for verification.


This test compares the UEFI memory map and Memory Attributes Table against known requirements. The MAT has strict requirements to allow OS usage and page protections.


This test verifies the UEFI variable store handling of MorLock v1 and v2 behavior.


This test verifies the SMM paging attributes by invoking operations that should cause cpu exceptions if the memory protections are in place. The SMM cpu exception handler needs to be configured to force reset on trap to allow automated testing.
See UefiCpuPkg/Include/Protocol/SmmExceptionTestProtocol.h, gUefiCpuPkgTokenSpaceGuid.PcdSmmExceptionRebootInsteadOfHaltDefault, and gUefiCpuPkgTokenSpaceGuid.PcdSmmExceptionTestModeSupport.

System Audit tests

UEFI applications that collect data from the system and then that data can be used to compare against known good values.


Audit collection tool that gathers information about UEFI variables. This allows auditing the variables within a system, checking attributes, and confirming read/write status. This information is put into an XML file that allows for easy comparison and programmatic auditing.


UEFI shell application that gets the current variable information from the UEFI shell and creates an XML file.

Windows (UEFI)

Python script that can be run from the Windows OS. It takes the UEFI created XML file as input and then queries all listed variables and updates the XML with access and status codes. This gives additional verification for variables that may employ late locking or other protections from OS access.


Audit tool to collect the TPM Event Log from the system in standard format. It can then be programmatically compared against a known event log for the given system. Easy this that can be tested are the number of events in some PCRs, confirm that all PCRs should be capped, etc.


Audit tool creates a human readable description of the SMM page tables and memory environment.


UEFI shell application collects information from SMM and writes it to files.


SMM Library linked into SMM driver used to collect information about SMM environment. Activated by the shell app collects IDT, GDT, page tables, and loaded images.

Windows (SMM)

Python scripts that process the files generated by the UEFI app and output a report for verification and analysis.

Copyright (C) Microsoft Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent