views:

313

answers:

5

Hi,

Any good place to learn about POST and how to design and code one? I am a C++ programmer and quite baffeled with the term.

Thanks

+2  A: 

You can checkout the OpenBIOS project.

They have information on numberous opensource bios/firmware implementations. Being open source you can grab the code from svn or read it online for all of them.

Brian Gianforcaro
+1  A: 

POST (Power On Self Test) is part of the Bios, and writing a POST, but not other parts of the BIOS, seems like an odd task indeed. The documentation section of the processor manufacturer's web site would be a good start for BIOS programming. I remember writing an 80186 BIOS and POST a long time ago, and I worked exclusively with the Intel specs.

And btw, you will be doing this in Assembler, not C++.

cdonner
+3  A: 

You might want to take a look at the code for coreboot, a free software (open source) BIOS project that runs on many different kinds of hardware.

Brian Campbell
+2  A: 

BIOS? That's not too common in the embedded world, the one place where people still write POSTs. Typically, they happen before the OS itself starts, or alternatively, as the OS starts.

The goal is to figure out whether the device can run, run in degraded mode, or should signal malfunction. A typical sequence is test CPU and XIP flash, then memory, fixed hardware, and then optional hardware. You define a series of tests. A test has a start function and a check function. The start functions kicks off the test; the check polls to see if a result is already available. Tests have dependencies, and the test controller starts those tests for which the dependencies have passed (CPU and RAM being the special cases, if they're broken it's not feasible to have a nice test controller).

As you can infer from the CPU and RAM tests, you don't have the luxury of C++. You can't even assume you can use all of C. During the first part of the POST, you might not even have a stack (!)

MSalters
+2  A: 

Open source EFI BIOS, with documentation and specs (good way to learn):

https://www.tianocore.org/

Background In June of 2004 Intel announced that it would release the "Foundation Code" of its next generation firmware technology - a successor to the PC BIOS - under an open source license later in the year. The Foundation Code, developed by Intel as part of a project code named Tiano, is Intel's "preferred implementation" of the Extensible Firmware Interface (EFI) Specification. The code to be released includes the core of the Foundation Code as well as a driver development kit. To follow through with its intentions to release the code as open source, Intel partnered with Collabnet, an industry leader in providing tools and services to support an open source initiative, to create a community for this effort. The result of this partnership is this Open Source Website.

Since there are more projects that are EFI-based working in parallel with the Foundation Code, it was decided to release the EFI Shell Application and the EFI Self Certification Test (SCT) project to the open source community.

William Leara