OpenSolaris

  subsites   code review   repo   packages   bugs   defect   polls   planet
You are not signed in. Sign in or register.

Hardware/Target Tools

In Sun Labs we will be using the Metrowerks PowerTAP to bring up low levels parts of the kernel and feel we can do quite a bit of work with it until the Virtual Memory Manager is up. We need to discuss this further how the tools can be used once protected memory is in order. It may be that other kernel debugging tools ie: KMDB can take over. We also have GDB via serial console and Abatron BDI 2000 with GDB support.

Freescale Tools

Abatron Tools

Status : — MetroWerks / PowerTap tools are functional on the ODW target. Reset, downloading the "test" solaris unix executable and stepping through source with symbols is now working.

Bits of information from this experience; you will need to remove all low level programming commands from any example target config file. We started with the Sandpoint platform example, however since OF configs the target it will just be confused if attempts are made to rewrite the memory controller, we ended up using only the following commands;

reset 0 sleep 12500 stop

In our first case we did not enable the "reset target on launch" option and had to turn off the memory verify since we were having a conflict at an address not in the linked map file space (?). This was with our initial tools test vehicle which was a hack anyway to test the process. So we weren't so concerned, our locore.s work has been functional with memory verifies enabled.

Use the reset button on the target after you have started the debugger. The sleep command gives OF the time to init the memory controller and then the debugger gets hold of the PC and moves the process along from there. You have to set the timing of the reset so that the default OF boot mode isn't entered ie: catch OF in it's countdown.

We have the ability to work remotely with an ethernet based power strip which allows us to cycle power on the target.

Building a kernel for the Codewarrior Debugger

Note: the following only appy to the 10/02/2006 code release

Decide on your memory location for the kernel and edit the usr/src/uts/chrp/conf/Mapfile accordingly. To date we have used one of the following selections

. = + 0xe0000000;  for PowerMac and an ODW enabled HiBAT ODW 
. = + 0x800000;    for ODW with it's 1:1 virtual memory map

Note to locate the kernel at 0xe0000000 on an ODW you have to enable HiBATs and setup a set of BATs properly. This means inetboot has to do this work before it grabs the kernel. We enabled these BATs in /usr/src/psm/stand/boot/ppc/common/chrp_srt0.s and right now there is an #ifdef leaving this out. Enabling this will require rebuilding inetboot. HiBAT enables make the PowerMac unhappy, but it's OF can create the virtual space we need without BAT modifications.

Build OpenSolaris on PowerPC as usual making sure that symbols are included and optimization is off ie: -gdwarf-2. You will end up with unix in usr/src/uts/chrp/unix/debug32 and genunix in usr/src/uts/ppc/genunix/debug32.

Currently we don't have a completely functional krtld so we have to do a workaround to continue to make progress in other areas.

Next in usr/src/uts execute the script ./buildstatic this will statically link together unix and genunix and create a standalone unix* in usr/src/uts/chrp/unix/debug32 with symbols. A stripped version of the same file unix* will be in usr/src/uts.