[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] tlb last ! (secure bit, lib ring)



On Thu, Aug 29, 2002 at 11:42:05AM +0200, Christophe Avoinne wrote:
> Hi,
> 
> I'm confused.
> 
> Sometimes I wonder if we are not mixing hardware and software TLB notions
> when speaking.
> 
> Software TLB :
> 
> It has very few valid entries. In fact it doesn't contain all the valid
> mapping of a space address. So I don't understand why we need user or extra
> bits since entries in TLB cannot be obviously persistent !!! it doesn't make
> sense for TLB to have invalid entries or of other kind, because it is not up
> to the TLB to handle the rest of entries but to a software dedicated to
> virtual memory [dixit Cédric ]. So my oppinion is that user or extra bits
> has no interest to be in TLB entries since they should be in fact handled by
> the software, not by the TLB.

Invalid entries don't make sense in a software-controlled TLB, that's
right. But there will be permanent entries (e.g. for the system call
entry point and the interrupt handlers).

> If I take the example of SH3, it has two TLBs, one for ICACHE, another for
> DCACHE. A valid entry in TLB associated with ICACHE has only X bit
> (equivalent to R bit for data) because the instruction fetcher never writes
> data. A valid entry in TLB associated with DCACHE has R and W bits, but not
> X bit because the data fetcher never executes an instruction. So if you
> intend to have a seperate TLB for ICACHE and DCACHE, it makes no sense to
> have a different bit for X and R IN THE TLB ENTRY.
> 
> You want a general R,W,X with U/S pairing. Okay, but I still don't
> understand because it is up to the software to handle them and not to TLB.

Access violations can (and will) be handled in software, but they can
not be *detected* in software, unless you want to run an exception
handler for *every* memory access.

Note that the absence of a TLB entry means something different.

And yes, we always want all three bits (rwx).

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/