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

Re: [f-cpu] little feed-back from the libre softawre meeting



I'm discouraged... your diagram about F-CPU is speaking about ICACHE and
DCACHE, am I wrong ?

They are separate !!!! I'm explaining why it is a nonsense to speak about
'r','w' for code page and 'x' for data page, especially if you need a
seperate TLB for ICACHE and DCACHE. Of course, if you used a unified TLB for
ICACHE and DCACHE, well we can can have entries with 'r', 'w', 'x'. 'r','w'
would be relevant accessing DCACHE and 'x' for accessing ICACHE.

----- Original Message -----
From: "Cedric BAIL" <cedric.bail@free.fr>
To: <f-cpu@seul.org>
Sent: Sunday, July 14, 2002 11:27 PM
Subject: Re: [f-cpu] little feed-back from the libre softawre meeting


> > Seriously,
>
> > 'x' : executable -> ICACHE, because it is the instruction fetcher
> > which needs to access bytes in code page : IT NEVER WRITES !!! so 'x' is
in
> > fact a disguised 'r' and 'w' a non-sense.
>
> If I understand what you say, we can't write "automodify" code.

Oh my god !!!!! i turn into french explanation :

Dis-moi, depuis quand l'unité qui va chercher les instructions à exécuter
dans le cache ICACHE peut modifier les instructions en mémoire !?
Je suis en train de dire que les opérations 'r', 'w' sont des opérations que
seules les instructions 'load' ou 'store' peuvent effectuer en mémoire,
c'est à dire par l'unité LSU et non le fetcher d'instruction. Ce n'est pas
clair ?

Le code auto-modifié se fait précisèment avec des instrcutions "store" donc
on passe par le LSU et donc par le DCACHE. ICACHE n'est en rien concerné par
l'écriture. De fait tu n'échape à la duplicité en ICACHE et DCACHE et qui
fait que beaucoup de CPU n'aime pas le code auto-modifié (problème de
cohérence entre ICACHE et DCACHE)

>
> > 'r','w' : readable, writable -> DCACHE, because it is the LSU which
> > needs to access bytes in data page : IT NEVER EXECUTES !!!
>
> Why not, we must not block this possibility.

Again in french, sorry :(

Je ne comprends vraiment pas comment un "load"/"store" peut exécuter du
code... ce n'est pas le LSU qui est en charge mais le fetcher
d'instructions.

Si tu regardes les TLB software de la pluparts des CPU, tu verras qu'il y a
toujours cette distinction, et que la plupart on bien des TLB distincts. Je
ne suis pas contre 'r','w,' et 'x' dans une entrée de TLB mais à condition
de savoir bien les utiliser or il faut savoir si le TLB se place avant ou
après ICACHE et DCACHE et s'il est unifié, et comment vous l'unifiez.

>
> > When you write code in page you are indeed using LSU for that purpose so
> > you handle its page like a data page not as a code page.
>
> So you have to TLB, one for data, and one for fetcher, so you divide by
two
> the capacity of the OS to do a "load balancing" of TLB entry. And in fact
if
> you wan't to be able to write automodifing code, you will have a lot of
problem

It only depends if you place your TLB before or after ICACHE and DCACHE and
if you unify or not TLB for ICACHE and DCACHE.


*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/