kernel stacks [eas: Re: G5 Bridge-mode MMU]

Peter Grehan grehan at freebsd.org
Wed Apr 16 22:24:52 UTC 2008


Hi Marcel,

> Found the problem: moea_rkva_alloc().
> 
> The first 4 pages of KVA are reserved for page zeroing and other
> special purpose uses. This was not accounted for in the original
> moea_bootstrap() code when the kernel stack was allocated, so the
> kernel stack overlapped with the pages returned by moea_rkva_alloc().

  Good catch :)

> This is easily fixed...

  The rkva_alloc routine can be removed. The original check for 
SEGMENT_LENGTH in the page_zero routines must have been a relic from the 
days when only BAT0 was used. It is safe to simply bzero the physical 
address and rely on the 1:1 BAT mappings for all of phys mem.

later,

Peter.


More information about the freebsd-ppc mailing list