[uClinux-dev] Problem "make"ing uClinux

John Williams jwilliams at itee.uq.edu.au
Tue Mar 18 16:46:59 EST 2003


Hi Andrew,

Chizhik, Andrew wrote:
> Looking at the lines mentioned here, there is no "sw_usp" there. For
> example, line 125 in process.c reads:
> printk("USP: %081x\n", rdusp());

> I assume the problem lies in the call to rdusp(). What does that function
> do? What do these errors mean?

sw_usp is a location in kernel memory where the User Stack Pointer 
(hence the name "usp") is saved upon entry to the kernel.  This is 
because the 5307 has no concept of a user/supervisor stack pointer.

To that end, rdusp() is probably a macro, defined in 
/include/asm-m68knommu somewhere.  Ah yes, there it is, an inline 
function defined in processor.h


extern inline unsigned long rdusp(void) {
#ifdef CONFIG_COLDFIRE
         extern unsigned int     sw_usp;
         return(sw_usp);
#else
         unsigned long usp;

         __asm__ __volatile__("move %/usp,%0" : "=a" (usp));
         return usp;
#endif
}

It looks like the configuration for your platform is defining 
CONFIG_COLDFIRE, when perhaps it shouldn't.  I'm no m68k expert - does 
the 68360 have hardware user/supervisor stack pointers, or is it 
emulated in /platform/XXX/entry.S ?  In /platform/5307/entry.S you can 
see how the sw_usp is used on entry /exit to the kernel.

Sorry this is not a solution, just some expanatory stuff.  The 
coldfire/m68k experts should have more for details for you!

Regards,

John




More information about the uClinux-dev mailing list