Frustrated question with insmod

Bruce_Leonard at Bruce_Leonard at
Tue Feb 19 11:22:16 EST 2008

> Bruce_Leonard at wrote:
> > Sorry if this is the wrong place to post this question.  I'm 
developing a 
> > NAND flash driver and I need to do some detailed dubugging using GDB 
> > a BDI2K.  According to the Denx web site, to find out the address that 
> > module is loading at you load it using the -m parameter to insmod 
> > "insmod -m mymodule").  However, every version of insmod I've tried 
> > doesn't recognize ANY options much less -m.  Can anyone please point 
me in 
> > the right direction, or give me another way of knowing what the load 
> > address of my module is?
> # cat /sys/module/<name>/sections/.text
> Do not forget to enable CONFIG_KALLSYMS.

Well, okay I guess the address I'm getting is the right one because both 
the above cat and 'cat /proc/modules' gives me the same thing, 0xe1188000. 
CONFIG_KALLSYMS_EXTRA_PASS is not set, don't know if that makes a 

So it would seem that there's something wrong with my BDI setup that isn't 
allowing address translation in the kernel's dynamically allocated memory 
area.  I've got PTBASE set to 0xf0 in the BDI config file so it should be 
finding the virtual address of the page tables just fine.  I've also got 
CONFIG_BDI_SWITCH set in .config and I know that works with the BDI, 
because I can set breakpoints at places in the kernel code that are called 
by my module (like nand_scan_ident() ) and everything works just fine. 
It's just when I try to access memory in the dynamic area where my module 
is located that the BDI can't do an address translation.  At least I 
assume it's the BDI, because I can load the module and use it with out 
GDB/BDI, so the processor and kernel must be able to handle the addresses 
okay.  Can anyone think of where I should go dig?  I've had this working 
exactly once in the past, but I don't know what I've changed to cause it 
to stop working.



More information about the Linuxppc-embedded mailing list