Subject: Why does kernel malloc not use kseg0 addresses (i.e. physical pages)?
To: None <port-mips@netbsd.org>
From: Glenn Serre <gaserre@spiresoftware.com>
List: port-mips
Date: 04/08/2002 15:42:00
Good afternoon,

From a quick look at the kernel malloc code, it appears to me that on mips
systems, malloc could return addresses in kseg0, rather than virtual
addresses.  Why does malloc use virtual addresses?  The reasons I ask are:

  - I appear to have a buggy TLB, but I would like to get things running
    enough for people to start working on drivers.
  - kseg0 addresses might improve performance by avoiding TLB
    miss exceptions.

Note: I am trying to port NetBSD to a processor whose memory management is
like mips, but I'm not actually running the mips port, so I could have my facts
wrong.  If so, could someone please point me to where the the mips kernel
malloc arranges to get kseg0 addresses instead of virtual addresses?

Thanks in advance,
--Glenn Serre
gaserre@spiresoftware.com