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 you 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 it is a sporadic issue, then you check the postcode as the checkpoint of the software before the 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 postcode-LED 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 which used for debug. During Power-On Self Test(POST), Postcode provide the indication of the progress in the BIOS / firmware when they 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(LED) (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(R) or Intel System Debugger NDA version(R) (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 your 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 and connect it.
(4) Menu : View → Breakpoints and go to the Create Breakpoints dialog and select the Create... by mouse right click .
(5) In the Create Breakpoint WIndow, select the Data tab and add 0x80 in the Location and select the IO Read&Write.
System will stop when it reads or writes any data to 0x80 port.
(6) Menu : Options → Options... and select Run After Restart Off to make reset break
System will stop after reset and you can check the IO RW breakpoint and run it.
(7) Input the restart in the command line console.
System will restart.
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.
You may check other port number as well by changing the port number.
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.
Briefly, you can easily check the postcode by using the Intel System Debugger(R) in the Intel Platform which does not have the LED postcode display. By checking the postcode, you can get several debugging information - the progress of the BIOS / firmware codes, which devices or software features are enabled, the checkpoint of your BIOS / firmware by adding user-defined postcode. It may be easy thing to get as well as critical debug information in the very early stage boot-up failure.
<References>
Postcode information from Intel Desktop board web page : http://www.intel.com/support/motherboards/desktop/sb/CS-025434.htm