Port-m68k archive

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

Re: PR 9725 and the m68k pmap



Hauke Fath wrote:

> An interesting exchange (and the reason why I cc'ed Steve Woodford) is at
> <http://mail-index.NetBSD.org/port-m68k/2001/07/oindex.html>, and
> especially <http://mail-index.NetBSD.org/port-m68k/2001/07/21/0000.html>.
> From what I see, m68k/m68k/pmap_motorola.c and sun3/sun3x/pmap.c differ
> considerably. Has the latter had any influence on the merged pmap
> implementation? Has there been any work to enhance the sun3x pmap with
> 680[46]0 support?

AFAIK, there is no actual work for it.

Actually sun3x pmap uses 7-7-6 three level lookups
as well as 040/060 so we could use its _design_ for 040/060,
but I'm afraid there are still much more necessary work to
use it on other ports with 040/060:

- split sun3x dependent stuff from sun3x/pmap.c
  (like pmap_motorola.c and pmap_bootstrap.c)
- add 040/060 specific stuff, like ATC flush and L2 cache etc
- rewrite port dependent MMU initialization code completely

On sun3x, MMU is already turned on by PROM and sun3x kernel
depends on it. On the other hand, most other m68k ports
initialize whole MMU stuff manually (in pmap_bootstrap.c) and
some static mappings for internal devices heavily depend on
current MMU settings (especially on several old ports).

There are some other concerns:

- Probably we should have some benchmark of hp300 pmap vs sun3x pmap,
  even on 68030. sun3x pmap seems to have much more code around
  pmap_enter(9) and pmap_remove(9) to walk through three level tables
  (though I have not checked details).
- There were/are much fewer users (and developers) of sun3x machines
  than all other hp300 derived ports. Actually, sun3x pmap had had
  longstanding bugs. I had fixed two major ones, but I'm not sure
  if that's all.
- Some old hp300 machines have HP-specific MMU and it doesn't
  support three level lookups, so they can't use sun3x pmap
  (though I don't think we have users of such machines any longer).
- Some ports (at least hp300) have VA != PA mappings and we need
  some tweaks to turn on MMU as well as current one does.
- The biggest problem is that we have too many m68k ports to be fixed :-)

I guess Michael's hack for current pmap requires less efforts
to fix (or workaround) the PR.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index