Subject: Implemented pmap_collect for arm32 (was: Re: pmap: Cannot allocate physical memory for L1 (12))
To: Stephen Borrill <netbsd@precedence.co.uk>
From: Reinoud Zandijk <zandijk@cs.utwente.nl>
List: port-arm32
Date: 09/17/1999 23:34:09
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--1501714959-1046445952-937603946=:12136
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LXG.3.96.990917233235.12136C@kano.cs.utwente.nl>

Hi All,

Since pmap_collect wasn't implemented, noone seemed to be working on it,
and I had a night off, I made a first implementation of it. It works happy
now, allthough it's not fully tested; i.e. does it really removes the L1
pages? I hope so! 

The implementation is based on snooping the other architectures. I found a
usefull simple implementation in the mac68k port. Dunno about it's
efficiency though. Maybe it's just a ``it has to work'' implementation
instead of a neatly tailored piece of code. 

I attached the diff of /usr/src/sys/arch/arm32/arm32/pmap.c to this mail
for others to test...

Since I've got no access to -current, could anybody apply this diff to
-current when confirmed OK? 

Cheers,

Reinoud

--1501714959-1046445952-937603946=:12136
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=diffs
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LXG.3.96.990917233409.12136D@kano.cs.utwente.nl>
Content-Description: 

KioqIC91c3Ivc3JjL3N5cy9hcmNoL2FybTMyL2FybTMyL3BtYXAuYy5vcmln
CUZyaSBTZXAgMTcgMjE6MDk6MjIgMTk5OQ0KLS0tIC91c3Ivc3JjL3N5cy9h
cmNoL2FybTMyL2FybTMyL3BtYXAuYwlTYXQgU2VwIDE4IDAwOjI4OjM2IDE5
OTkNCioqKioqKioqKioqKioqKg0KKioqIDI3MzYsMjc0NyAqKioqDQotLS0g
MjczNiwyNzc4IC0tLS0NCiAgICoNCiAgICogPT4gb3B0aW9uYWwgZnVuY3Rp
b24uDQogICAqID0+IGNhbGxlZCB3aGVuIGEgcHJvY2VzcyBpcyBzd2FwcGV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