History log of /netbsd-current/sys/arch/newsmips/newsmips/machdep.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.123 05-Mar-2024 thorpej

Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.


# 1.122 20-Dec-2023 thorpej

Remove unnecessary <sys/malloc.h>.


Revision tags: netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020
# 1.121 19-Oct-2018 tsutsui

Reorganize APbus zs(4) console handling.

- set sccport0a address on early startup and use it for cnputc and cngetc
- explicitly initialize zs chip in the cninit function so that zs console
can be used even if it is not initialized by PROM firmware

Tested on both news50000 and news4000.


# 1.120 14-Oct-2018 tsutsui

Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

branches: 1.119.14; 1.119.16;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.118 21-Jul-2016 christos

Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c


Revision tags: pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.117 30-Jun-2015 matt

branches: 1.117.2;
Use cpu_startup_common()


Revision tags: nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.116 24-Nov-2014 christos

branches: 1.116.2;
avoid shadowing a new global.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.115 24-Mar-2014 christos

- fix unused
- use cpu_{g,s}etmodel


Revision tags: riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.114 28-Jul-2012 matt

branches: 1.114.2; 1.114.4;
Fix -fno-common fallout.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.113 09-Mar-2011 tsutsui

branches: 1.113.4;
Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).


Revision tags: bouyer-quota2-nbase
# 1.112 20-Feb-2011 matt

Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.111 08-Feb-2011 rmind

Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.110 20-Dec-2010 matt

branches: 1.110.2; 1.110.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.


Revision tags: uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 02-Mar-2010 pooka

branches: 1.109.2;
Remove fs_mfs.h from users because it is now unnecessary and don't
generate fs_mfs.h anymore.


# 1.108 08-Feb-2010 joerg

Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base
# 1.107 17-Dec-2009 matt

branches: 1.107.2;
More changes to make newsmips compile (include "assym.h, remove unused
variables, etc.)


# 1.106 14-Dec-2009 matt

Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211
# 1.105 27-Nov-2009 rmind

- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.


# 1.104 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.103 11-Aug-2009 matt

Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)


Revision tags: jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.102 13-Feb-2009 apb

Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.101 30-Nov-2008 martin

branches: 1.101.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.


# 1.100 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.98 02-Jul-2008 ad

branches: 1.98.2; 1.98.4; 1.98.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase mjf-devfs-base vmlocking-nbase matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.97 03-Dec-2007 ad

branches: 1.97.14; 1.97.18; 1.97.20; 1.97.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.96 17-Oct-2007 garbled

branches: 1.96.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.95 03-Jul-2007 tsutsui

branches: 1.95.8; 1.95.10;
Use C99 initializers.


# 1.94 03-Jul-2007 tsutsui

No need to clear BSS if running kernel is loaded by the native bootloader.


# 1.93 03-Jul-2007 tsutsui

Print NEWS model name right after copyright and version
as other mips ports.


# 1.92 17-May-2007 yamt

merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.91 08-Mar-2007 he

branches: 1.91.2; 1.91.4; 1.91.10;
Change local variables kernend and v to char*, since they are used
for pointer arithmetic.


# 1.90 05-Mar-2007 dogcow

semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.89 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


# 1.88 28-Feb-2007 thorpej

TRUE -> true, FALSE -> false


Revision tags: ad-audiomp-base post-newlock2-merge
# 1.87 09-Feb-2007 ad

branches: 1.87.2;
Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.86 24-Jan-2007 hubertf

Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.


# 1.85 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 netbsd-4-base
# 1.84 13-Sep-2006 tsutsui

branches: 1.84.2;
Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.83 09-Apr-2006 tsutsui

branches: 1.83.8;
Remove declarations for cpu_model[] since it's in <sys/systm.h>.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.82 11-Dec-2005 christos

branches: 1.82.4; 1.82.6; 1.82.8; 1.82.10; 1.82.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base ktrace-lwp-base
# 1.81 25-Apr-2005 lukem

branches: 1.81.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2
# 1.80 06-Feb-2005 tsutsui

Oops, backout previous. They are actually needed there.


# 1.79 06-Feb-2005 tsutsui

Remove function decls which are in <machine/intr.h>


# 1.78 06-Feb-2005 tsutsui

Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.77 13-Feb-2004 wiz

branches: 1.77.8; 1.77.10;
Uppercase CPU, plural is CPUs.


# 1.76 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.75 23-Nov-2003 taca

Move initialization of `ssym' and `esym' to inside of
#if NKSYMS || defined(DDB) || defined(LKM) ... #endif.

Now GENERIC and INSTALL kernel can be compiled again.


# 1.74 23-Nov-2003 tsutsui

Suppress uninitialized warnings.


# 1.73 26-Oct-2003 tsutsui

Cast through (void *) to appease gcc3. (now it's also warned on mipseb)


# 1.72 25-Oct-2003 tsutsui

Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.


# 1.71 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


# 1.70 25-May-2003 tsutsui

branches: 1.70.2;
Add MI softintr(9) support with common mips/softintr.c.


# 1.69 26-Apr-2003 tsutsui

- Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.


# 1.68 26-Apr-2003 ragge

Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.67 19-Apr-2003 tsutsui

- remove obsolete #if 0'ed out code
- remove some leading/trailing spaces


# 1.66 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.65 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.64 25-Sep-2002 thorpej

Don't include <sys/map.h>.


Revision tags: gehenna-devsw-base
# 1.63 25-Aug-2002 thorpej

Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.


# 1.62 04-Aug-2002 gmcgarry

Merge cpu_sysctl() for all mips ports, based on powerpc and m68k precedent.

For now, only pmax implements CPU_BOOTED_KERNEL. Need to revisit.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base
# 1.61 05-Mar-2002 simonb

branches: 1.61.6;
Provide a L2 cache configuration function.


Revision tags: ifpoll-base
# 1.60 14-Nov-2001 thorpej

branches: 1.60.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf
# 1.59 10-Sep-2001 chris

branches: 1.59.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.58 02-Jun-2001 chs

branches: 1.58.2; 1.58.4;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


Revision tags: thorpej_scsipi_beforemerge
# 1.57 24-Apr-2001 thorpej

Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().


# 1.56 24-Apr-2001 thorpej

Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.


# 1.55 23-Apr-2001 thorpej

Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.54 22-Apr-2001 thorpej

Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly. On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change. This is merely for API consistency.


# 1.53 15-Mar-2001 chs

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>


# 1.52 05-Feb-2001 tsutsui

branches: 1.52.2;
Remove obsolete cpu_exec_ecoff_hook().


# 1.51 22-Jan-2001 jdolecek

Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.


# 1.50 15-Jan-2001 thorpej

Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.49 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.48 13-Oct-2000 tsutsui

Make this compile without "options news5000".


# 1.47 12-Oct-2000 onoe

Support scsi boot device for NWS-5000.
Support NWS-3700, which is very similar with NWS-3400.
Do not depend on modelid of idrom, which is useless in most cases.


# 1.46 13-Sep-2000 thorpej

Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.


# 1.45 29-Jul-2000 jdolecek

g/c RB_DFLTROOT

I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.


# 1.44 14-Jul-2000 jeffs

Use cpu_intr() definition from mips/cpu.h instead of local one.


# 1.43 29-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.42 26-Jun-2000 mrg

remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.41 26-May-2000 thorpej

branches: 1.41.4;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.


# 1.40 14-Apr-2000 tsubai

Adapt cpu_intr change.


# 1.39 25-Mar-2000 nisimura

Make sure proc0 PCB has spl0 condition in CP0 status register field.

cpu_fork() mistakenly created processes forked by proc0, including
kthreads, in splhigh condition, because [1] proc0's PCB was zero
cleared during initialization, and [2] value 0 in status register
field made processes to have splhigh condition when CPU tick was
assigned for them. This mostly doesn't matter as forked processes
dive immediately into user mode through proc_trampoline code path,
however, kthreads never do that and remain in splhigh.

Reported by Ethan Solomita <ethan@geocast.com>.


# 1.38 03-Mar-2000 nisimura

Make clearer a bit how proc0's USPACE is intialized.


Revision tags: chs-ubc2-newbase
# 1.37 19-Jan-2000 thorpej

Move callout initialization to a single location; no need to duplicate
that code all over the place.


# 1.36 19-Jan-2000 msaitoh

check whether tv_usec >= 1000000


# 1.35 26-Dec-1999 tsubai

Use software interrupt.


# 1.34 23-Dec-1999 tsubai

Remove 2 more unnecessary debugging codes.


# 1.33 22-Dec-1999 tsubai

First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 18-Dec-1999 tsubai

Introduce bootinfo.


# 1.31 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.30 17-Sep-1999 thorpej

branches: 1.30.2; 1.30.8;
Centralize the declaration and clearing of `cold'.


# 1.29 12-Sep-1999 chs

eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.


Revision tags: chs-ubc2-base
# 1.28 26-May-1999 thorpej

Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.


# 1.27 20-May-1999 lukem

* convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes


# 1.26 18-May-1999 nisimura

- Move MachSetPID(1) call to pmap_bootstrap() adajacent to kernel pmap
initialization code.
- Abandon mips_init_proc0() and do the 4 lines straightly in MD mach_init().
- Restore a block of code accidentally lost in prevous commit.
- Change the term 'tlbpid' to a MIPS3 nomenclature 'asid'.
- Hide PTE size exposures by symbolic names in locore.S


# 1.25 11-Apr-1999 chs

add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.


Revision tags: netbsd-1-4-base
# 1.24 01-Apr-1999 thorpej

branches: 1.24.2;
Don't call configure() from cpu_startup().


# 1.23 26-Mar-1999 mycroft

Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.


# 1.22 26-Mar-1999 tsubai

<mips/db_machdep.h> --> <machine/db_machdep.h>


# 1.21 26-Mar-1999 thorpej

Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages. So, mb_map wasn't actually being used. Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.


# 1.20 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.19 01-Feb-1999 nisimura

- Nuke USPACE for now-defunct 'nullproc' pcb (8KB saving).


# 1.18 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.17 26-Dec-1998 tsubai

Make configurable with no frame buffer.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.16 28-Sep-1998 erh

This should need opt_execfmt.h.


# 1.15 21-Aug-1998 tsubai

Change vm_offset_t to [pv]addr_t.


Revision tags: eeh-paddr_t-base
# 1.14 08-Jul-1998 thorpej

Define one page free list, and put all pages on it.


# 1.13 04-Jul-1998 jonathan

defopt DDB.


# 1.12 08-Jun-1998 tsubai

Introduce newsmips_intr_t for intrcnt[].


# 1.11 07-Jun-1998 tsubai

Add support for powerdown.


# 1.10 03-May-1998 tsubai

Add UVM support.


# 1.9 01-May-1998 tsubai

Fix a typo.


# 1.8 30-Apr-1998 tsubai

Add NWS-3401's systype.


# 1.7 04-Mar-1998 thorpej

Rename NetBSD/news to NetBSD/newsmips.


# 1.6 25-Feb-1998 thorpej

Use allocsys(), mips_init_msgbuf(), and mips_init_proc0(), plus small
changes for MACHINE_NEW_NONCONTIG.


# 1.5 23-Feb-1998 thorpej

Set the VM page size after clearing the BSS segment.


# 1.4 19-Feb-1998 thorpej

Use the generic NetBSD/mips crash dump code.


# 1.3 19-Feb-1998 thorpej

Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.


# 1.2 19-Feb-1998 thorpej

Include MFS option header.


# 1.1 18-Feb-1998 tsubai

Initial import of NetBSD/news.


# 1.122 20-Dec-2023 thorpej

Remove unnecessary <sys/malloc.h>.


Revision tags: thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020
# 1.121 19-Oct-2018 tsutsui

Reorganize APbus zs(4) console handling.

- set sccport0a address on early startup and use it for cnputc and cngetc
- explicitly initialize zs chip in the cninit function so that zs console
can be used even if it is not initialized by PROM firmware

Tested on both news50000 and news4000.


# 1.120 14-Oct-2018 tsutsui

Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

branches: 1.119.14; 1.119.16;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.118 21-Jul-2016 christos

Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c


Revision tags: pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.117 30-Jun-2015 matt

branches: 1.117.2;
Use cpu_startup_common()


Revision tags: nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.116 24-Nov-2014 christos

branches: 1.116.2;
avoid shadowing a new global.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.115 24-Mar-2014 christos

- fix unused
- use cpu_{g,s}etmodel


Revision tags: riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.114 28-Jul-2012 matt

branches: 1.114.2; 1.114.4;
Fix -fno-common fallout.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.113 09-Mar-2011 tsutsui

branches: 1.113.4;
Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).


Revision tags: bouyer-quota2-nbase
# 1.112 20-Feb-2011 matt

Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.111 08-Feb-2011 rmind

Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.110 20-Dec-2010 matt

branches: 1.110.2; 1.110.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.


Revision tags: uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 02-Mar-2010 pooka

branches: 1.109.2;
Remove fs_mfs.h from users because it is now unnecessary and don't
generate fs_mfs.h anymore.


# 1.108 08-Feb-2010 joerg

Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base
# 1.107 17-Dec-2009 matt

branches: 1.107.2;
More changes to make newsmips compile (include "assym.h, remove unused
variables, etc.)


# 1.106 14-Dec-2009 matt

Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211
# 1.105 27-Nov-2009 rmind

- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.


# 1.104 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.103 11-Aug-2009 matt

Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)


Revision tags: jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.102 13-Feb-2009 apb

Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.101 30-Nov-2008 martin

branches: 1.101.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.


# 1.100 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.98 02-Jul-2008 ad

branches: 1.98.2; 1.98.4; 1.98.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase mjf-devfs-base vmlocking-nbase matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.97 03-Dec-2007 ad

branches: 1.97.14; 1.97.18; 1.97.20; 1.97.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.96 17-Oct-2007 garbled

branches: 1.96.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.95 03-Jul-2007 tsutsui

branches: 1.95.8; 1.95.10;
Use C99 initializers.


# 1.94 03-Jul-2007 tsutsui

No need to clear BSS if running kernel is loaded by the native bootloader.


# 1.93 03-Jul-2007 tsutsui

Print NEWS model name right after copyright and version
as other mips ports.


# 1.92 17-May-2007 yamt

merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.91 08-Mar-2007 he

branches: 1.91.2; 1.91.4; 1.91.10;
Change local variables kernend and v to char*, since they are used
for pointer arithmetic.


# 1.90 05-Mar-2007 dogcow

semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.89 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


# 1.88 28-Feb-2007 thorpej

TRUE -> true, FALSE -> false


Revision tags: ad-audiomp-base post-newlock2-merge
# 1.87 09-Feb-2007 ad

branches: 1.87.2;
Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.86 24-Jan-2007 hubertf

Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.


# 1.85 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 netbsd-4-base
# 1.84 13-Sep-2006 tsutsui

branches: 1.84.2;
Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.83 09-Apr-2006 tsutsui

branches: 1.83.8;
Remove declarations for cpu_model[] since it's in <sys/systm.h>.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.82 11-Dec-2005 christos

branches: 1.82.4; 1.82.6; 1.82.8; 1.82.10; 1.82.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base ktrace-lwp-base
# 1.81 25-Apr-2005 lukem

branches: 1.81.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2
# 1.80 06-Feb-2005 tsutsui

Oops, backout previous. They are actually needed there.


# 1.79 06-Feb-2005 tsutsui

Remove function decls which are in <machine/intr.h>


# 1.78 06-Feb-2005 tsutsui

Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.77 13-Feb-2004 wiz

branches: 1.77.8; 1.77.10;
Uppercase CPU, plural is CPUs.


# 1.76 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.75 23-Nov-2003 taca

Move initialization of `ssym' and `esym' to inside of
#if NKSYMS || defined(DDB) || defined(LKM) ... #endif.

Now GENERIC and INSTALL kernel can be compiled again.


# 1.74 23-Nov-2003 tsutsui

Suppress uninitialized warnings.


# 1.73 26-Oct-2003 tsutsui

Cast through (void *) to appease gcc3. (now it's also warned on mipseb)


# 1.72 25-Oct-2003 tsutsui

Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.


# 1.71 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


# 1.70 25-May-2003 tsutsui

branches: 1.70.2;
Add MI softintr(9) support with common mips/softintr.c.


# 1.69 26-Apr-2003 tsutsui

- Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.


# 1.68 26-Apr-2003 ragge

Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.67 19-Apr-2003 tsutsui

- remove obsolete #if 0'ed out code
- remove some leading/trailing spaces


# 1.66 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.65 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.64 25-Sep-2002 thorpej

Don't include <sys/map.h>.


Revision tags: gehenna-devsw-base
# 1.63 25-Aug-2002 thorpej

Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.


# 1.62 04-Aug-2002 gmcgarry

Merge cpu_sysctl() for all mips ports, based on powerpc and m68k precedent.

For now, only pmax implements CPU_BOOTED_KERNEL. Need to revisit.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base
# 1.61 05-Mar-2002 simonb

branches: 1.61.6;
Provide a L2 cache configuration function.


Revision tags: ifpoll-base
# 1.60 14-Nov-2001 thorpej

branches: 1.60.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf
# 1.59 10-Sep-2001 chris

branches: 1.59.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.58 02-Jun-2001 chs

branches: 1.58.2; 1.58.4;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


Revision tags: thorpej_scsipi_beforemerge
# 1.57 24-Apr-2001 thorpej

Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().


# 1.56 24-Apr-2001 thorpej

Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.


# 1.55 23-Apr-2001 thorpej

Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.54 22-Apr-2001 thorpej

Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly. On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change. This is merely for API consistency.


# 1.53 15-Mar-2001 chs

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>


# 1.52 05-Feb-2001 tsutsui

branches: 1.52.2;
Remove obsolete cpu_exec_ecoff_hook().


# 1.51 22-Jan-2001 jdolecek

Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.


# 1.50 15-Jan-2001 thorpej

Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.49 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.48 13-Oct-2000 tsutsui

Make this compile without "options news5000".


# 1.47 12-Oct-2000 onoe

Support scsi boot device for NWS-5000.
Support NWS-3700, which is very similar with NWS-3400.
Do not depend on modelid of idrom, which is useless in most cases.


# 1.46 13-Sep-2000 thorpej

Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.


# 1.45 29-Jul-2000 jdolecek

g/c RB_DFLTROOT

I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.


# 1.44 14-Jul-2000 jeffs

Use cpu_intr() definition from mips/cpu.h instead of local one.


# 1.43 29-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.42 26-Jun-2000 mrg

remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.41 26-May-2000 thorpej

branches: 1.41.4;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.


# 1.40 14-Apr-2000 tsubai

Adapt cpu_intr change.


# 1.39 25-Mar-2000 nisimura

Make sure proc0 PCB has spl0 condition in CP0 status register field.

cpu_fork() mistakenly created processes forked by proc0, including
kthreads, in splhigh condition, because [1] proc0's PCB was zero
cleared during initialization, and [2] value 0 in status register
field made processes to have splhigh condition when CPU tick was
assigned for them. This mostly doesn't matter as forked processes
dive immediately into user mode through proc_trampoline code path,
however, kthreads never do that and remain in splhigh.

Reported by Ethan Solomita <ethan@geocast.com>.


# 1.38 03-Mar-2000 nisimura

Make clearer a bit how proc0's USPACE is intialized.


Revision tags: chs-ubc2-newbase
# 1.37 19-Jan-2000 thorpej

Move callout initialization to a single location; no need to duplicate
that code all over the place.


# 1.36 19-Jan-2000 msaitoh

check whether tv_usec >= 1000000


# 1.35 26-Dec-1999 tsubai

Use software interrupt.


# 1.34 23-Dec-1999 tsubai

Remove 2 more unnecessary debugging codes.


# 1.33 22-Dec-1999 tsubai

First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 18-Dec-1999 tsubai

Introduce bootinfo.


# 1.31 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.30 17-Sep-1999 thorpej

branches: 1.30.2; 1.30.8;
Centralize the declaration and clearing of `cold'.


# 1.29 12-Sep-1999 chs

eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.


Revision tags: chs-ubc2-base
# 1.28 26-May-1999 thorpej

Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.


# 1.27 20-May-1999 lukem

* convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes


# 1.26 18-May-1999 nisimura

- Move MachSetPID(1) call to pmap_bootstrap() adajacent to kernel pmap
initialization code.
- Abandon mips_init_proc0() and do the 4 lines straightly in MD mach_init().
- Restore a block of code accidentally lost in prevous commit.
- Change the term 'tlbpid' to a MIPS3 nomenclature 'asid'.
- Hide PTE size exposures by symbolic names in locore.S


# 1.25 11-Apr-1999 chs

add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.


Revision tags: netbsd-1-4-base
# 1.24 01-Apr-1999 thorpej

branches: 1.24.2;
Don't call configure() from cpu_startup().


# 1.23 26-Mar-1999 mycroft

Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.


# 1.22 26-Mar-1999 tsubai

<mips/db_machdep.h> --> <machine/db_machdep.h>


# 1.21 26-Mar-1999 thorpej

Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages. So, mb_map wasn't actually being used. Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.


# 1.20 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.19 01-Feb-1999 nisimura

- Nuke USPACE for now-defunct 'nullproc' pcb (8KB saving).


# 1.18 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.17 26-Dec-1998 tsubai

Make configurable with no frame buffer.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.16 28-Sep-1998 erh

This should need opt_execfmt.h.


# 1.15 21-Aug-1998 tsubai

Change vm_offset_t to [pv]addr_t.


Revision tags: eeh-paddr_t-base
# 1.14 08-Jul-1998 thorpej

Define one page free list, and put all pages on it.


# 1.13 04-Jul-1998 jonathan

defopt DDB.


# 1.12 08-Jun-1998 tsubai

Introduce newsmips_intr_t for intrcnt[].


# 1.11 07-Jun-1998 tsubai

Add support for powerdown.


# 1.10 03-May-1998 tsubai

Add UVM support.


# 1.9 01-May-1998 tsubai

Fix a typo.


# 1.8 30-Apr-1998 tsubai

Add NWS-3401's systype.


# 1.7 04-Mar-1998 thorpej

Rename NetBSD/news to NetBSD/newsmips.


# 1.6 25-Feb-1998 thorpej

Use allocsys(), mips_init_msgbuf(), and mips_init_proc0(), plus small
changes for MACHINE_NEW_NONCONTIG.


# 1.5 23-Feb-1998 thorpej

Set the VM page size after clearing the BSS segment.


# 1.4 19-Feb-1998 thorpej

Use the generic NetBSD/mips crash dump code.


# 1.3 19-Feb-1998 thorpej

Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.


# 1.2 19-Feb-1998 thorpej

Include MFS option header.


# 1.1 18-Feb-1998 tsubai

Initial import of NetBSD/news.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020
# 1.121 19-Oct-2018 tsutsui

Reorganize APbus zs(4) console handling.

- set sccport0a address on early startup and use it for cnputc and cngetc
- explicitly initialize zs chip in the cninit function so that zs console
can be used even if it is not initialized by PROM firmware

Tested on both news50000 and news4000.


# 1.120 14-Oct-2018 tsutsui

Add NWS-4000 support.

Based on nonaka@'s porting effort back in 2002.
See announcement on port-newsmips@ for more details:
http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html


Revision tags: pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

branches: 1.119.14;
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.118 21-Jul-2016 christos

Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c


Revision tags: pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.117 30-Jun-2015 matt

branches: 1.117.2;
Use cpu_startup_common()


Revision tags: nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.116 24-Nov-2014 christos

branches: 1.116.2;
avoid shadowing a new global.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.115 24-Mar-2014 christos

- fix unused
- use cpu_{g,s}etmodel


Revision tags: riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.114 28-Jul-2012 matt

branches: 1.114.2; 1.114.4;
Fix -fno-common fallout.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.113 09-Mar-2011 tsutsui

branches: 1.113.4;
Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).


Revision tags: bouyer-quota2-nbase
# 1.112 20-Feb-2011 matt

Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.111 08-Feb-2011 rmind

Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.110 20-Dec-2010 matt

branches: 1.110.2; 1.110.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.


Revision tags: uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 02-Mar-2010 pooka

branches: 1.109.2;
Remove fs_mfs.h from users because it is now unnecessary and don't
generate fs_mfs.h anymore.


# 1.108 08-Feb-2010 joerg

Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base
# 1.107 17-Dec-2009 matt

branches: 1.107.2;
More changes to make newsmips compile (include "assym.h, remove unused
variables, etc.)


# 1.106 14-Dec-2009 matt

Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211
# 1.105 27-Nov-2009 rmind

- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.


# 1.104 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.103 11-Aug-2009 matt

Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)


Revision tags: jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.102 13-Feb-2009 apb

Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.101 30-Nov-2008 martin

branches: 1.101.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.


# 1.100 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.98 02-Jul-2008 ad

branches: 1.98.2; 1.98.4; 1.98.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase mjf-devfs-base vmlocking-nbase matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.97 03-Dec-2007 ad

branches: 1.97.14; 1.97.18; 1.97.20; 1.97.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.96 17-Oct-2007 garbled

branches: 1.96.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.95 03-Jul-2007 tsutsui

branches: 1.95.8; 1.95.10;
Use C99 initializers.


# 1.94 03-Jul-2007 tsutsui

No need to clear BSS if running kernel is loaded by the native bootloader.


# 1.93 03-Jul-2007 tsutsui

Print NEWS model name right after copyright and version
as other mips ports.


# 1.92 17-May-2007 yamt

merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.91 08-Mar-2007 he

branches: 1.91.2; 1.91.4; 1.91.10;
Change local variables kernend and v to char*, since they are used
for pointer arithmetic.


# 1.90 05-Mar-2007 dogcow

semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.89 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


# 1.88 28-Feb-2007 thorpej

TRUE -> true, FALSE -> false


Revision tags: ad-audiomp-base post-newlock2-merge
# 1.87 09-Feb-2007 ad

branches: 1.87.2;
Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.86 24-Jan-2007 hubertf

Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.


# 1.85 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 netbsd-4-base
# 1.84 13-Sep-2006 tsutsui

branches: 1.84.2;
Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.83 09-Apr-2006 tsutsui

branches: 1.83.8;
Remove declarations for cpu_model[] since it's in <sys/systm.h>.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.82 11-Dec-2005 christos

branches: 1.82.4; 1.82.6; 1.82.8; 1.82.10; 1.82.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base ktrace-lwp-base
# 1.81 25-Apr-2005 lukem

branches: 1.81.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2
# 1.80 06-Feb-2005 tsutsui

Oops, backout previous. They are actually needed there.


# 1.79 06-Feb-2005 tsutsui

Remove function decls which are in <machine/intr.h>


# 1.78 06-Feb-2005 tsutsui

Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.77 13-Feb-2004 wiz

branches: 1.77.8; 1.77.10;
Uppercase CPU, plural is CPUs.


# 1.76 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.75 23-Nov-2003 taca

Move initialization of `ssym' and `esym' to inside of
#if NKSYMS || defined(DDB) || defined(LKM) ... #endif.

Now GENERIC and INSTALL kernel can be compiled again.


# 1.74 23-Nov-2003 tsutsui

Suppress uninitialized warnings.


# 1.73 26-Oct-2003 tsutsui

Cast through (void *) to appease gcc3. (now it's also warned on mipseb)


# 1.72 25-Oct-2003 tsutsui

Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.


# 1.71 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


# 1.70 25-May-2003 tsutsui

branches: 1.70.2;
Add MI softintr(9) support with common mips/softintr.c.


# 1.69 26-Apr-2003 tsutsui

- Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.


# 1.68 26-Apr-2003 ragge

Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.67 19-Apr-2003 tsutsui

- remove obsolete #if 0'ed out code
- remove some leading/trailing spaces


# 1.66 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.65 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.64 25-Sep-2002 thorpej

Don't include <sys/map.h>.


Revision tags: gehenna-devsw-base
# 1.63 25-Aug-2002 thorpej

Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.


# 1.62 04-Aug-2002 gmcgarry

Merge cpu_sysctl() for all mips ports, based on powerpc and m68k precedent.

For now, only pmax implements CPU_BOOTED_KERNEL. Need to revisit.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base
# 1.61 05-Mar-2002 simonb

branches: 1.61.6;
Provide a L2 cache configuration function.


Revision tags: ifpoll-base
# 1.60 14-Nov-2001 thorpej

branches: 1.60.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf
# 1.59 10-Sep-2001 chris

branches: 1.59.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.58 02-Jun-2001 chs

branches: 1.58.2; 1.58.4;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


Revision tags: thorpej_scsipi_beforemerge
# 1.57 24-Apr-2001 thorpej

Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().


# 1.56 24-Apr-2001 thorpej

Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.


# 1.55 23-Apr-2001 thorpej

Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.54 22-Apr-2001 thorpej

Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly. On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change. This is merely for API consistency.


# 1.53 15-Mar-2001 chs

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>


# 1.52 05-Feb-2001 tsutsui

branches: 1.52.2;
Remove obsolete cpu_exec_ecoff_hook().


# 1.51 22-Jan-2001 jdolecek

Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.


# 1.50 15-Jan-2001 thorpej

Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.49 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.48 13-Oct-2000 tsutsui

Make this compile without "options news5000".


# 1.47 12-Oct-2000 onoe

Support scsi boot device for NWS-5000.
Support NWS-3700, which is very similar with NWS-3400.
Do not depend on modelid of idrom, which is useless in most cases.


# 1.46 13-Sep-2000 thorpej

Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.


# 1.45 29-Jul-2000 jdolecek

g/c RB_DFLTROOT

I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.


# 1.44 14-Jul-2000 jeffs

Use cpu_intr() definition from mips/cpu.h instead of local one.


# 1.43 29-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.42 26-Jun-2000 mrg

remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.41 26-May-2000 thorpej

branches: 1.41.4;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.


# 1.40 14-Apr-2000 tsubai

Adapt cpu_intr change.


# 1.39 25-Mar-2000 nisimura

Make sure proc0 PCB has spl0 condition in CP0 status register field.

cpu_fork() mistakenly created processes forked by proc0, including
kthreads, in splhigh condition, because [1] proc0's PCB was zero
cleared during initialization, and [2] value 0 in status register
field made processes to have splhigh condition when CPU tick was
assigned for them. This mostly doesn't matter as forked processes
dive immediately into user mode through proc_trampoline code path,
however, kthreads never do that and remain in splhigh.

Reported by Ethan Solomita <ethan@geocast.com>.


# 1.38 03-Mar-2000 nisimura

Make clearer a bit how proc0's USPACE is intialized.


Revision tags: chs-ubc2-newbase
# 1.37 19-Jan-2000 thorpej

Move callout initialization to a single location; no need to duplicate
that code all over the place.


# 1.36 19-Jan-2000 msaitoh

check whether tv_usec >= 1000000


# 1.35 26-Dec-1999 tsubai

Use software interrupt.


# 1.34 23-Dec-1999 tsubai

Remove 2 more unnecessary debugging codes.


# 1.33 22-Dec-1999 tsubai

First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 18-Dec-1999 tsubai

Introduce bootinfo.


# 1.31 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.30 17-Sep-1999 thorpej

branches: 1.30.2; 1.30.8;
Centralize the declaration and clearing of `cold'.


# 1.29 12-Sep-1999 chs

eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.


Revision tags: chs-ubc2-base
# 1.28 26-May-1999 thorpej

Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.


# 1.27 20-May-1999 lukem

* convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes


# 1.26 18-May-1999 nisimura

- Move MachSetPID(1) call to pmap_bootstrap() adajacent to kernel pmap
initialization code.
- Abandon mips_init_proc0() and do the 4 lines straightly in MD mach_init().
- Restore a block of code accidentally lost in prevous commit.
- Change the term 'tlbpid' to a MIPS3 nomenclature 'asid'.
- Hide PTE size exposures by symbolic names in locore.S


# 1.25 11-Apr-1999 chs

add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.


Revision tags: netbsd-1-4-base
# 1.24 01-Apr-1999 thorpej

branches: 1.24.2;
Don't call configure() from cpu_startup().


# 1.23 26-Mar-1999 mycroft

Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.


# 1.22 26-Mar-1999 tsubai

<mips/db_machdep.h> --> <machine/db_machdep.h>


# 1.21 26-Mar-1999 thorpej

Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages. So, mb_map wasn't actually being used. Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.


# 1.20 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.19 01-Feb-1999 nisimura

- Nuke USPACE for now-defunct 'nullproc' pcb (8KB saving).


# 1.18 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.17 26-Dec-1998 tsubai

Make configurable with no frame buffer.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.16 28-Sep-1998 erh

This should need opt_execfmt.h.


# 1.15 21-Aug-1998 tsubai

Change vm_offset_t to [pv]addr_t.


Revision tags: eeh-paddr_t-base
# 1.14 08-Jul-1998 thorpej

Define one page free list, and put all pages on it.


# 1.13 04-Jul-1998 jonathan

defopt DDB.


# 1.12 08-Jun-1998 tsubai

Introduce newsmips_intr_t for intrcnt[].


# 1.11 07-Jun-1998 tsubai

Add support for powerdown.


# 1.10 03-May-1998 tsubai

Add UVM support.


# 1.9 01-May-1998 tsubai

Fix a typo.


# 1.8 30-Apr-1998 tsubai

Add NWS-3401's systype.


# 1.7 04-Mar-1998 thorpej

Rename NetBSD/news to NetBSD/newsmips.


# 1.6 25-Feb-1998 thorpej

Use allocsys(), mips_init_msgbuf(), and mips_init_proc0(), plus small
changes for MACHINE_NEW_NONCONTIG.


# 1.5 23-Feb-1998 thorpej

Set the VM page size after clearing the BSS segment.


# 1.4 19-Feb-1998 thorpej

Use the generic NetBSD/mips crash dump code.


# 1.3 19-Feb-1998 thorpej

Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.


# 1.2 19-Feb-1998 thorpej

Include MFS option header.


# 1.1 18-Feb-1998 tsubai

Initial import of NetBSD/news.


# 1.119 22-Dec-2016 cherry

switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.118 21-Jul-2016 christos

Don't include <mips/locore.h> in <machine/intr.h>, introduces circular
dependencies; instead include it in the 4 driver files that need it,
and reorder it in machdep.c


Revision tags: pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921
# 1.117 30-Jun-2015 matt

branches: 1.117.2;
Use cpu_startup_common()


Revision tags: nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
# 1.116 24-Nov-2014 christos

branches: 1.116.2;
avoid shadowing a new global.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.115 24-Mar-2014 christos

- fix unused
- use cpu_{g,s}etmodel


Revision tags: riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.114 28-Jul-2012 matt

branches: 1.114.2; 1.114.4;
Fix -fno-common fallout.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.113 09-Mar-2011 tsutsui

branches: 1.113.4;
Fix newsmips interrupt handling for new mips interrupt/spl framework:
- make news3400_badaddr() work even if interrupts are disabled
(in the old world bus error interrupt is enabled even during splhigh())
- make ipl_sr_map values model dependent

Now GENERIC kernel boots to single user properly on R3000 NWS-3470D,
though sh(1) still gets floating point exceptions during /etc/rc scripts.
news5000 is untested (yet).


Revision tags: bouyer-quota2-nbase
# 1.112 20-Feb-2011 matt

Merge forward matt-nb5-mips64
Adapt to new interrupt/spl framework


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.111 08-Feb-2011 rmind

Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231
# 1.110 20-Dec-2010 matt

branches: 1.110.2; 1.110.4;
Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.


Revision tags: uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 02-Mar-2010 pooka

branches: 1.109.2;
Remove fs_mfs.h from users because it is now unnecessary and don't
generate fs_mfs.h anymore.


# 1.108 08-Feb-2010 joerg

Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.


Revision tags: uebayasi-xip-base
# 1.107 17-Dec-2009 matt

branches: 1.107.2;
More changes to make newsmips compile (include "assym.h, remove unused
variables, etc.)


# 1.106 14-Dec-2009 matt

Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211
# 1.105 27-Nov-2009 rmind

- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places. Reduce sys/user.h inclusions.


# 1.104 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.103 11-Aug-2009 matt

Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)


Revision tags: jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base
# 1.102 13-Feb-2009 apb

Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base haad-dm-base mjf-devfs2-base
# 1.101 30-Nov-2008 martin

branches: 1.101.4;
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.


# 1.100 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled. So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks(). Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown(). No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown(). I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that. Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.98 02-Jul-2008 ad

branches: 1.98.2; 1.98.4; 1.98.10;
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase mjf-devfs-base vmlocking-nbase matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.97 03-Dec-2007 ad

branches: 1.97.14; 1.97.18; 1.97.20; 1.97.22;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.


Revision tags: jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base
# 1.96 17-Oct-2007 garbled

branches: 1.96.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.95 03-Jul-2007 tsutsui

branches: 1.95.8; 1.95.10;
Use C99 initializers.


# 1.94 03-Jul-2007 tsutsui

No need to clear BSS if running kernel is loaded by the native bootloader.


# 1.93 03-Jul-2007 tsutsui

Print NEWS model name right after copyright and version
as other mips ports.


# 1.92 17-May-2007 yamt

merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.91 08-Mar-2007 he

branches: 1.91.2; 1.91.4; 1.91.10;
Change local variables kernend and v to char*, since they are used
for pointer arithmetic.


# 1.90 05-Mar-2007 dogcow

semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.89 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


# 1.88 28-Feb-2007 thorpej

TRUE -> true, FALSE -> false


Revision tags: ad-audiomp-base post-newlock2-merge
# 1.87 09-Feb-2007 ad

branches: 1.87.2;
Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.86 24-Jan-2007 hubertf

Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.


# 1.85 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 netbsd-4-base
# 1.84 13-Sep-2006 tsutsui

branches: 1.84.2;
Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.83 09-Apr-2006 tsutsui

branches: 1.83.8;
Remove declarations for cpu_model[] since it's in <sys/systm.h>.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.82 11-Dec-2005 christos

branches: 1.82.4; 1.82.6; 1.82.8; 1.82.10; 1.82.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base kent-audio2-base ktrace-lwp-base
# 1.81 25-Apr-2005 lukem

branches: 1.81.2;
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2
# 1.80 06-Feb-2005 tsutsui

Oops, backout previous. They are actually needed there.


# 1.79 06-Feb-2005 tsutsui

Remove function decls which are in <machine/intr.h>


# 1.78 06-Feb-2005 tsutsui

Misc cleanup:
- ANSI function decls
- remove __P()
- u_intNN_t -> uintNN_t
- remove register decls
- bcopy -> memcpy, strcpy
- bzero -> memset
- bcmp -> memcmp
- use malloc(9) with M_ZERO
- some KNF
etc.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE yamt-km-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.77 13-Feb-2004 wiz

branches: 1.77.8; 1.77.10;
Uppercase CPU, plural is CPUs.


# 1.76 30-Dec-2003 pk

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes). It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms. Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.


# 1.75 23-Nov-2003 taca

Move initialization of `ssym' and `esym' to inside of
#if NKSYMS || defined(DDB) || defined(LKM) ... #endif.

Now GENERIC and INSTALL kernel can be compiled again.


# 1.74 23-Nov-2003 tsutsui

Suppress uninitialized warnings.


# 1.73 26-Oct-2003 tsutsui

Cast through (void *) to appease gcc3. (now it's also warned on mipseb)


# 1.72 25-Oct-2003 tsutsui

Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips.


# 1.71 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.


# 1.70 25-May-2003 tsutsui

branches: 1.70.2;
Add MI softintr(9) support with common mips/softintr.c.


# 1.69 26-Apr-2003 tsutsui

- Declare common functions in cpu.h
- Rename some machine dependent functions for consistency.
- Remove register declarations.
- Some KNF.


# 1.68 26-Apr-2003 ragge

Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.67 19-Apr-2003 tsutsui

- remove obsolete #if 0'ed out code
- remove some leading/trailing spaces


# 1.66 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.65 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.64 25-Sep-2002 thorpej

Don't include <sys/map.h>.


Revision tags: gehenna-devsw-base
# 1.63 25-Aug-2002 thorpej

Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.


# 1.62 04-Aug-2002 gmcgarry

Merge cpu_sysctl() for all mips ports, based on powerpc and m68k precedent.

For now, only pmax implements CPU_BOOTED_KERNEL. Need to revisit.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base
# 1.61 05-Mar-2002 simonb

branches: 1.61.6;
Provide a L2 cache configuration function.


Revision tags: ifpoll-base
# 1.60 14-Nov-2001 thorpej

branches: 1.60.2;
Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf
# 1.59 10-Sep-2001 chris

branches: 1.59.2;
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.58 02-Jun-2001 chs

branches: 1.58.2; 1.58.4;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


Revision tags: thorpej_scsipi_beforemerge
# 1.57 24-Apr-2001 thorpej

Do the first allocsys() pass (the pass that computes sizes) before
calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().


# 1.56 24-Apr-2001 thorpej

Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative. It may be possible to
optimize these a little more.


# 1.55 23-Apr-2001 thorpej

Call pmap_bootstrap() before calling uvm_pageboot_alloc(), so that
the kernel virtual address space bounds will be set up.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.54 22-Apr-2001 thorpej

Use uvm_pageboot_alloc() for early memory allocation, rather than
calling pmap_steal_memory() directly. On these platforms, since
uvm_pageboot_alloc() is a wrapper around pmap_steal_memory(), there
is no functional change. This is merely for API consistency.


# 1.53 15-Mar-2001 chs

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS 0
KERN_INVALID_ADDRESS EFAULT
KERN_PROTECTION_FAILURE EACCES
KERN_NO_SPACE ENOMEM
KERN_INVALID_ARGUMENT EINVAL
KERN_FAILURE various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE ENOMEM
KERN_NOT_RECEIVER <unused>
KERN_NO_ACCESS <unused>
KERN_PAGES_LOCKED <unused>


# 1.52 05-Feb-2001 tsutsui

branches: 1.52.2;
Remove obsolete cpu_exec_ecoff_hook().


# 1.51 22-Jan-2001 jdolecek

Require the machine-dependant DDB commands to be in db_machine_command_table[]
and link it directly to db_command_table[] so that it's not necessary
to do this at runtime. Make db_machine_command_table[] const on all ports.
g/c now unneded stuff, like db_machine_commands_install(), db_machine_init()

Patch written by enami.


# 1.50 15-Jan-2001 thorpej

Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().


# 1.49 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.48 13-Oct-2000 tsutsui

Make this compile without "options news5000".


# 1.47 12-Oct-2000 onoe

Support scsi boot device for NWS-5000.
Support NWS-3700, which is very similar with NWS-3400.
Do not depend on modelid of idrom, which is useless in most cases.


# 1.46 13-Sep-2000 thorpej

Add an align argument to uvm_map() and some callers of that
routine. Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.


# 1.45 29-Jul-2000 jdolecek

g/c RB_DFLTROOT

I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.


# 1.44 14-Jul-2000 jeffs

Use cpu_intr() definition from mips/cpu.h instead of local one.


# 1.43 29-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.42 26-Jun-2000 mrg

remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.41 26-May-2000 thorpej

branches: 1.41.4;
First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.


# 1.40 14-Apr-2000 tsubai

Adapt cpu_intr change.


# 1.39 25-Mar-2000 nisimura

Make sure proc0 PCB has spl0 condition in CP0 status register field.

cpu_fork() mistakenly created processes forked by proc0, including
kthreads, in splhigh condition, because [1] proc0's PCB was zero
cleared during initialization, and [2] value 0 in status register
field made processes to have splhigh condition when CPU tick was
assigned for them. This mostly doesn't matter as forked processes
dive immediately into user mode through proc_trampoline code path,
however, kthreads never do that and remain in splhigh.

Reported by Ethan Solomita <ethan@geocast.com>.


# 1.38 03-Mar-2000 nisimura

Make clearer a bit how proc0's USPACE is intialized.


Revision tags: chs-ubc2-newbase
# 1.37 19-Jan-2000 thorpej

Move callout initialization to a single location; no need to duplicate
that code all over the place.


# 1.36 19-Jan-2000 msaitoh

check whether tv_usec >= 1000000


# 1.35 26-Dec-1999 tsubai

Use software interrupt.


# 1.34 23-Dec-1999 tsubai

Remove 2 more unnecessary debugging codes.


# 1.33 22-Dec-1999 tsubai

First cut of news5000 support.
Mostly from SHIMIZU Ryo <dejiko@di.gi.charat.org>.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.32 18-Dec-1999 tsubai

Introduce bootinfo.


# 1.31 04-Dec-1999 ragge

CL* discarding.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.30 17-Sep-1999 thorpej

branches: 1.30.2; 1.30.8;
Centralize the declaration and clearing of `cold'.


# 1.29 12-Sep-1999 chs

eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.


Revision tags: chs-ubc2-base
# 1.28 26-May-1999 thorpej

Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags. PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that. INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now). This will eventually
change now these maps are locked, as well.


# 1.27 20-May-1999 lukem

* convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes


# 1.26 18-May-1999 nisimura

- Move MachSetPID(1) call to pmap_bootstrap() adajacent to kernel pmap
initialization code.
- Abandon mips_init_proc0() and do the 4 lines straightly in MD mach_init().
- Restore a block of code accidentally lost in prevous commit.
- Change the term 'tlbpid' to a MIPS3 nomenclature 'asid'.
- Hide PTE size exposures by symbolic names in locore.S


# 1.25 11-Apr-1999 chs

add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.


Revision tags: netbsd-1-4-base
# 1.24 01-Apr-1999 thorpej

branches: 1.24.2;
Don't call configure() from cpu_startup().


# 1.23 26-Mar-1999 mycroft

Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot. Also, DO NOT use
pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
access_type = 0. This should probably be revisited.


# 1.22 26-Mar-1999 tsubai

<mips/db_machdep.h> --> <machine/db_machdep.h>


# 1.21 26-Mar-1999 thorpej

Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages. So, mb_map wasn't actually being used. Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.


# 1.20 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.19 01-Feb-1999 nisimura

- Nuke USPACE for now-defunct 'nullproc' pcb (8KB saving).


# 1.18 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.17 26-Dec-1998 tsubai

Make configurable with no frame buffer.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.16 28-Sep-1998 erh

This should need opt_execfmt.h.


# 1.15 21-Aug-1998 tsubai

Change vm_offset_t to [pv]addr_t.


Revision tags: eeh-paddr_t-base
# 1.14 08-Jul-1998 thorpej

Define one page free list, and put all pages on it.


# 1.13 04-Jul-1998 jonathan

defopt DDB.


# 1.12 08-Jun-1998 tsubai

Introduce newsmips_intr_t for intrcnt[].


# 1.11 07-Jun-1998 tsubai

Add support for powerdown.


# 1.10 03-May-1998 tsubai

Add UVM support.


# 1.9 01-May-1998 tsubai

Fix a typo.


# 1.8 30-Apr-1998 tsubai

Add NWS-3401's systype.


# 1.7 04-Mar-1998 thorpej

Rename NetBSD/news to NetBSD/newsmips.


# 1.6 25-Feb-1998 thorpej

Use allocsys(), mips_init_msgbuf(), and mips_init_proc0(), plus small
changes for MACHINE_NEW_NONCONTIG.


# 1.5 23-Feb-1998 thorpej

Set the VM page size after clearing the BSS segment.


# 1.4 19-Feb-1998 thorpej

Use the generic NetBSD/mips crash dump code.


# 1.3 19-Feb-1998 thorpej

Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.


# 1.2 19-Feb-1998 thorpej

Include MFS option header.


# 1.1 18-Feb-1998 tsubai

Initial import of NetBSD/news.