[uClinux-dev] init_mem_alloc and PAGE_OFFSET

John Williams jwilliams at itee.uq.edu.au
Tue Mar 11 18:57:05 EST 2003


Hi folks,

OK I solved the problem - the kram_start symbol was placed at the wrong 
spot in my link script.  I moved it to the beginning of my text segment 
(which sits at 0xFFE00000, the start of physical ram), relinked the 
kernel, and now I'm up and running again.

In doing this I found the potential for a quite subtle bug.  kram_start 
must not be set to less than ram_start.  This seems obvious now, but in 
my first naive attempt I set kram_start to 0x00000, thinking it would 
prevent the kernel from trying to allocate memory lower than the start 
of physical memory (ram_start).  This caused the 
reserve_bootmem(kram_start, kram_len) calls to munge the memory bitmap. 
  Might be worth adding some sanity checks in the XXX_bootmem functions.

It's very exciting, I got as far as calibrate_delay() (even after the 
first call to sti()) before the board hung again.. back to the 
debugger!!  uClinux on Microblaze is not far away now!

Thanks all for your help.

John




More information about the uClinux-dev mailing list