[okl4-developer] Roottask pagefault

Ryan Heffernan ryan.heffernan at nicta.com.au
Thu Feb 21 15:56:02 EST 2008


On Thu, 2008-02-21 at 12:35 +1100, Nelson Tam wrote:
> Hi Ryan,
> 
> On 20/02/2008, at 18:37, Ryan Heffernan wrote:
> 
> > vbase is 0xa4000000, vend is 0xcfffffff
> > addr is 0xa4000000, vbase is 0xa4000000
> > roottask read pagefault at 33cc33c8, ip=800023e0 - deny
> 
> In addition to what Geoff said, the pointer that Iguana is  
> dereferencing looks like it was taken from uninitialised bss.   
> Normally the bootloader should zero-out the bss, and passing a
pointer  
> from a properly-initialised bss would yield a NULL pointer which
will  
> be caught by get_pd(), thus avoiding the bogus pagefault you're
seeing.
> 
> Can you check whether your bss is initialised properly?  Although
this  
> is the responsibility of the bootloader to zero-out memory within
the  
> nobits sections of an elf file, sometimes lousy bootloaders don't do  
> that, and you have to do tricks within the elf file to make sure the  
> memory is zeroed.  What we do here is manipulate the elf so that  
> nobits sections are replaced by progbits sections that contain all  
> zeros.
> 
> For now probably the easiest way is to get OKL4 to manually zero-out  
> the bss during system bootup.
> 
> Nelson.

Good call! 
It looks like the nobits section is indeed filled with garbage. I'm
pretty new to OKL4 so you'll have to forgive me for asking the best way
to go about manually zeroing the bss... should I add my own function to
the ARM init.cc and call it from startup_system? 

Ryan




More information about the Developer mailing list