Debugging Open Firmware Startup

From OLPC
Revision as of 23:02, 9 October 2012 by Wad (talk | contribs) (Created page with 'These are notes about debugging early Open Firmware startup on XO-1.75 and XO-4 laptops. ==Requirements== The following applies to XO-1.75 and XO-4 laptops. …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These are notes about debugging early Open Firmware startup on XO-1.75 and XO-4 laptops.

Requirements

The following applies to XO-1.75 and XO-4 laptops. Your mileage may vary on earlier XOs (they don't have a CForth interpreter, for example).

You will need a terminal attached to the host serial console on the laptop.

CForth

You can interrupt the boot process in CForth to reconfigure the memory timings or number of memory controllers, or as a prelude to interrupting the Open Firmware startup process.

CForth is a simple Forth interpreter which runs on a small ARM processor (the Security Processor) separate from the main processor cores in the Armada 610 and PXA2128 SoCs. It is the core which executes first during a system boot, and which boots Open Firmware (and hence Linux) on the other processor cores. A detailed explanation is avaliable in the Forth Lessons.

If you hold down the rotate key while booting the system, CForth does not proceed to automatically boot Open Firmware and instead sits at an interactive prompt. While it is possible to reconfigure the memory options at this time, on this page we are just interested in progressing to Open Firmware. Type "ofw" and hit return while again holding down the rotate key. This should place you in OFW's interactive mode.

Open Firmware

You are entering Open Firmware before it has initialized any of the laptop. CForth has already initialized the SoC pin functions, and the memory. Open Firmware has initialized the Forth interpreter, but hasn't start loading any device drivers.

At this point, there are two OFW routines called which tend to run into trouble: stand-init and startup. You can walk through them using the OFW debugging features:

debug stand-init
debug startup

Enjoy!