Intel® System Debugger User Guide

ID 648476
Date 06/13/2024
Confidential
Document Table of Contents

Breaking on POST Codes

The execution of the BIOS also involves writing a specific code to the IO port address 0x80, for instance, by means of the instruction OUT 0x80, EAX. The value written is called the POST (Power On Self Test) code. Breaking on a specific POST code can therefore by achieved by setting an IO breakpoint at the port address and specifying a condition that checks the value of the input register against the chosen code.

For the example, if the instruction for the IO write is OUT 0x80, AX and the code to be written is 0xa123, this means adding an IO breakpoint with address equal to 0x80 and condition equal to ($rax & 0xffff) == 0xa123. Since POST codes are normally 16-bit values, it is imperative to use the 0xffff mask on the RAX register in the expression. As breakpoint conditions can be arbitrary expressions, custom ranges of codes can also be captured with conditions like (($rax & 0xff00) == 0xa200) && (($rax & 0xff) > 0x20).

Note that IO port breakpoints are normally cleared by reset flows, so please see the section on breakpoint restrictions.