Subject: Re: KVA pitfall in initarm()
To: Toru Nishimura <locore64@alkyltechnology.com>
From: Richard Earnshaw <rearnsha@netbsd.org>
List: port-arm
Date: 01/05/2005 10:22:31
On Wed, 2005-01-05 at 02:15, Toru Nishimura wrote:
> Richard Earnshaw rearnsha@netbsd.org commented;
> 
> > There certainly is an assumption that the pages of the kernel text and
> > data have a 1:1 correspondence between the image loaded at boot and the
> > pages after mapping. 
> 
> ldscript.evbarm has the following lines.  It can certainly be called as a bug.
> 
>   /* Adjust the address for the data segment to start on the next page
>      boundary.  */
>   . = ALIGN(0x8000);
>   .data    :
> 
> - comment says wrong.
> - 16KB data segment base alignment bogs down a machine when new TLB layout
>   gets active.

Hmm, that looks excessive.  Pages are 4k, so I think that should be 

	. = ALIGN (0x1000);

So I suspect the comment is right, but the code is wrong.

R.