[Top] [All Lists]

Re: Question about Context register in TLB refilling

To: Kevin Cernekee <>
Subject: Re: Question about Context register in TLB refilling
From: "Maciej W. Rozycki" <>
Date: Sun, 17 Oct 2010 22:56:31 +0100 (BST)
Cc: "wilbur.chan" <>, Linux MIPS Mailing List <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)
On Sun, 17 Oct 2010, Kevin Cernekee wrote:

> On plain old 32-bit MIPS:
> The pgd entry for "va" is at address: (unsigned long)pgd + ((va >> 22) << 2)
> i.e. each 4-byte entry in the pgd table represents 4MB of virtual address 
> space.
> PTEBase only gives you 9 bits to work with.  If you use it to store
> pgd[31:23] directly, that means every pgd needs to be 8MB-aligned -
> ouch.

 Good point!  I believe the original idea behind the Context and XContext 
registers was to put page tables somewhere within KSEG2/3 or XKSSEG which 
would make this alignment restriction not a problem, but I realise the 
overhead of placing page tables in paged memory may be higher than that of 
our current arrangement.

 I wonder however if such performance evaluation was actually ever made or 
whether it was the complexity of having page tables paged alone that 
scared people off. ;)


<Prev in Thread] Current Thread [Next in Thread>