1. Background
During developing the system with the Intel platform, you may face with the problem that system cannot boot-up even in the very early stage of boot-up. To identify the issue, you connect the JTAG and use the Intel System Debugger(R) for the source line debugging. If there,however, is no source codes or symbol files of the BIOS or firmware, then you cannot do source line debugging. In that case you may get the postcode when it's stuck and send the postcode to the BIOS / firmware team. Secondly, if the issue happens only in the run-time which means when you step it, there is no issue or if it is sporadic issue, then you check the postcode as a checkpoint of the software before issue happens. And you can guess the problematic point. Finally, if you have the information about the postcode number but no source codes of BIOS / firmware, then you may guess the where the issue is caused by checking the postcode number.
Postcode is very useful when there is any issue in the early boot-up stage in BIOS or firmware of system. But many of embedded system or closed chassis don't have the seven-segment on the board. But don't worry; you can check the postcode by JTAG and Intel System Debugger(R). In this article, I will explain how to check the postcode with the Intel System Debugger(R).
2. Postcode
Postcode is a legacy unit uses for debug. During Power-On Self Test(POST), Postcode provide the indication of the progress in the firmware when BIOS / firmware send the codes to I/O 80h.
(1) What can get from the postcode
- Postcode give which major feature are enable and passed in the BIOS / firmware.
- Postcode can be used to indicate devices or feature errors when it initialize the system.
(2) Where can find the postcode in a hardware (If available)
POST card (PCI add-in card) | The POST card decodes the port and displays the contents on an LED display. The POST card must be installed in PCI bus connector 1. | |
Onboard POST code LED display | Some Intel® Desktop Boards include an onboard LED to show POST codes |
(3) Example of each postcode description (typical usage)
Range | Category/Subsystem |
00 – 0F | Debug codes: Can be used by any PEIM/driver for debug |
10 – 1F | Host Processors |
20 – 2F | Memory/Chipset |
30 – 3F | Recovery |
40 – 4F | Reserved for future use |
50 – 5F | I/O Busses: PCI, USB, ISA, ATA, etc. |
60 – 6F | Not currently used |
70 – 7F | Output Devices: All output consoles |
80 – 8F | Reserved for future use (new output console codes) |
90 – 9F | Input devices: Keyboard/Mouse |
A0 – AF | Reserved for future use (new input console codes) |
B0 – BF | Boot Devices: Includes fixed media and removable media. |
C0 CF | Reserved for future use |
D0 – DF | Boot device selection |
E0 – FF | E0 - EE: Miscellaneous codes F0 – FF: FF processor exception |
3. Intel System Debugger(R) Usage for checking postcode
(1) Download and Install the Intel System Studio Ultimate Edition or Intel System Debugger NDA version (You may need NDA with Intel.)
https://software.intel.com/en-us/intel-system-studio
(2) Go to the installed directory and run the batch file as you Intel platform
e.g.) If your product is using the Intel Atom(R) then please select the Atom products batch file.
This batch file list can be changed by the product update.
(3) Menu : File → Connect... and select your probe and core.
(4) Menu : View → Breakpoints and go to the Create Breakpoints dialog and select the Create... by mouse right click .
(5) In the Create Breakpoint, select the Data tab and add 0x80 in the Location and select the IO Read&Write
(6) Menu : Options → Options... and select Run After Restart Off to make reset break
(7) Input the restart in the command line console
xdb> restart
(8) After restart, system will stop by resetbreak and check the breakpoint which you set and run the system again
xdb> run
(9) When system stop at the breakpoint where system write the postcode via 0x80, you can check the postcode.
xdb> show port 0x80
e.g.) We can see that current postcode is 0xAB.
My test platform has the on-board postcode luckily and can see it is also 0xAB.