Chris Hallinan <firstname.lastname@example.org
Be careful: The callouts use a prolog specific to the procnto kernel,
and while it appears the register usage conforms to the ABI, the calling
convention does not. If you examine the macro's in callout.ah, you will
see the actual label that is exported as global cannot be executed, i.e.
you cannot just call an assembler callout routine directly. They each
have storage allocated just after the exported function label, and
execution directly from this address will cause a program exception. I
know, I found that out the hard way.
They're designed for use in the kernel environment (e.g. they pretty
well all get passed a syspage pointer), so they can't really be called
directly from startup (since you're in the process of building
the system page). The extra data you saw in callout.ah is used
when the startup library copies the code from their linked location
to the system page and is not present in the version that actually gets
On that note, does anyone have a good suggestion for how I can obtain
the address for these routines after the kernel has copied them so I can
use my JTAG debugger and step through the assembly code? I haven't
found a good way to step through this code yet, (that's why I tried to
call the routines directly from my startup code, for debugging purposes
only, and found out that you can't do that!)
The routine locations are all listed in various system page sections,
(e.g. the cache control routines are in the cacheattr section). Cranking
up the -v's on the startup command line and having the print_syspage()
routine at the end of main() will get all of them printed out.
To step through a routine what we usually do is add a breakpoint opcode
to the start of a routine and when that gets hit, start single stepping.
Brian Stecher (email@example.com
) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8