History log of /netbsd-current/sys/arch/vax/vax/machdep.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.200 17-May-2024 thorpej

Implement _UC_SETSTACK / _UC_CLRSTACK.


# 1.199 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.198 11-Jan-2024 mrg

vax: set default RLIMIT_AS to the same as MAXDSIZ

this allows modern GCC to run without returning to the issues that
reported in PR#28379, and avoids a strange sort-of-invariant violation
where the rlimit for data equaled the rlimit for all address space, so
there is no room for text or stack etc.

ok ragge@

XXX: pullup-10


# 1.197 05-Jan-2024 hans

Include leds.h to make /dev/leds work.


Revision tags: netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.196 11-Jun-2020 ad

branches: 1.196.20;
uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.195 31-Dec-2019 ad

Rename uvm_free() -> uvm_availmem().


# 1.194 21-Dec-2019 ad

uvmexp.free -> uvm_free()


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

branches: 1.192.2;
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.


# 1.199 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.198 11-Jan-2024 mrg

vax: set default RLIMIT_AS to the same as MAXDSIZ

this allows modern GCC to run without returning to the issues that
reported in PR#28379, and avoids a strange sort-of-invariant violation
where the rlimit for data equaled the rlimit for all address space, so
there is no room for text or stack etc.

ok ragge@

XXX: pullup-10


# 1.197 05-Jan-2024 hans

Include leds.h to make /dev/leds work.


Revision tags: netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.196 11-Jun-2020 ad

branches: 1.196.20;
uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.195 31-Dec-2019 ad

Rename uvm_free() -> uvm_availmem().


# 1.194 21-Dec-2019 ad

uvmexp.free -> uvm_free()


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

branches: 1.192.2;
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.


# 1.198 11-Jan-2024 mrg

vax: set default RLIMIT_AS to the same as MAXDSIZ

this allows modern GCC to run without returning to the issues that
reported in PR#28379, and avoids a strange sort-of-invariant violation
where the rlimit for data equaled the rlimit for all address space, so
there is no room for text or stack etc.

ok ragge@

XXX: pullup-10


# 1.197 05-Jan-2024 hans

Include leds.h to make /dev/leds work.


Revision tags: netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.196 11-Jun-2020 ad

uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.195 31-Dec-2019 ad

Rename uvm_free() -> uvm_availmem().


# 1.194 21-Dec-2019 ad

uvmexp.free -> uvm_free()


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

branches: 1.192.2;
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.


# 1.197 05-Jan-2024 hans

Include leds.h to make /dev/leds work.


Revision tags: netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.196 11-Jun-2020 ad

uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.195 31-Dec-2019 ad

Rename uvm_free() -> uvm_availmem().


# 1.194 21-Dec-2019 ad

uvmexp.free -> uvm_free()


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

branches: 1.192.2;
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.


# 1.196 11-Jun-2020 ad

uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
# 1.195 31-Dec-2019 ad

Rename uvm_free() -> uvm_availmem().


# 1.194 21-Dec-2019 ad

uvmexp.free -> uvm_free()


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

branches: 1.192.2;
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.


# 1.195 31-Dec-2019 ad

Rename uvm_free() -> uvm_availmem().


# 1.194 21-Dec-2019 ad

uvmexp.free -> uvm_free()


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

branches: 1.192.2;
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.


# 1.194 21-Dec-2019 ad

uvmexp.free -> uvm_free()


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

branches: 1.192.2;
Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.193 29-Dec-2018 maxv

Retire compat_ibcs2, as discussed on tech-kern@. FreeBSD did the same
recently.


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.192 31-Mar-2018 ragge

Set max/dfl size for vm a process may have to the same as for data.
This avoids a problem where mmap may lock processes in the system,
and solves PR port-vax/28379.


Revision tags: netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 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 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 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 nick-nhusb-base-20150606 nick-nhusb-base-20150406
# 1.191 16-Dec-2014 jklos

branches: 1.191.2; 1.191.8; 1.191.16;
Fix leds.h include.


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 nick-nhusb-base 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.190 24-Mar-2014 christos

branches: 1.190.6;
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.189 27-Aug-2012 martin

branches: 1.189.2; 1.189.4;
Kernel crash dumps are not properly implemented - so do not pretend they
would exist and set dumplo to 0 if dumpsize is 0. This makes savecore
happy.
XXX - implement real dumps, most of the needed code seems to be in place
already.


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.188 21-May-2012 martin

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base4
# 1.187 27-Feb-2012 matt

physmem is declared by uvm


Revision tags: jmcneill-usbmp-base5 jmcneill-usbmp-base3
# 1.186 19-Feb-2012 rmind

Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.


Revision tags: jmcneill-usbmp-base2 netbsd-6-base
# 1.185 27-Jan-2012 para

branches: 1.185.2;
converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged


# 1.184 07-Jan-2012 chs

define _UC_TLSBASE and use it to pass the TLS pointer to setcontext().
since there is no available space in ucontext_t on vax, pass the
TLS pointer on the stack referenced by the ucontext_t instead.
suggested by joerg.


# 1.183 12-Dec-2011 mrg

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places. avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.182 03-Jul-2011 matt

branches: 1.182.2; 1.182.6;
Cleanup trapframe handling. Instead of keeping a trapframe pointer in the
pcb, put in the mdlwp instead. We had a dummy field so it didn't grow in
size. This also follows the practice that mips and powerpc follow that a
pointer to the user trapframe is in l->l_md.md_utf. Make trapframe members
start with tf_


# 1.181 12-Jun-2011 rmind

Welcome to 5.99.53! Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
kernel-lock on some ports). Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.180 14-Dec-2010 matt

branches: 1.180.6;
Cleanups includes. Change <machine/XXX.h> to <sys/XXX.h>
Remove unneeded includes.


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.179 08-Feb-2010 joerg

branches: 1.179.2;
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 matt-premerge-20091211
# 1.178 21-Nov-2009 rmind

branches: 1.178.2;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .


# 1.177 26-Oct-2009 cegger

kill extra whitespaces
reviewed by tsutsui@


# 1.176 21-Oct-2009 rmind

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 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-base
# 1.175 18-Mar-2009 cegger

bcopy -> memcpy


Revision tags: nick-hppapmap-base2
# 1.174 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.


# 1.173 21-Jan-2009 he

branches: 1.173.2;
Re-adapt to the changed return types for major() and minor().


Revision tags: mjf-devfs2-base
# 1.172 11-Jan-2009 christos

fix dev_t printf formats.


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

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.170 19-Nov-2008 hans

fix build for kernel configs lacking KA46, KA48, KA49 and KA53 support.
OK by mhitch.


# 1.169 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.168 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-base matt-mips64-base2 haad-dm-base1
# 1.167 17-Oct-2008 cegger

branches: 1.167.2; 1.167.4;
build fix: get prototype for cpu_upcall()


# 1.166 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 simonb-wapbl-nbase simonb-wapbl-base
# 1.165 02-Jul-2008 ad

branches: 1.165.2;
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 keiichi-mipv6-base matt-armv6-nbase
# 1.164 11-Mar-2008 matt

branches: 1.164.4; 1.164.6; 1.164.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.


Revision tags: hpcarm-cleanup-base
# 1.163 23-Feb-2008 matt

A number of performance changes:
Change internal register SSP to contain curlwp insread curcpu(). This
shrinks the GENERIC by 2KB.
Add rwlock stubs (rw_enter, rw_exit, rw_tryenter).
Simplify simple lock code for uniprocessors.
Do SPL raise/lower in cpu_handle_ipi instead of simple_locks.


Revision tags: nick-net80211-sync-base
# 1.162 21-Feb-2008 matt

branches: 1.162.2; 1.162.6;
More softint fixes. We need to restore the softint lwp's pcb to it's initial
state since it may have been blocked or interrupted by another softint.


# 1.161 20-Feb-2008 matt

Make NetBSD/vax work again. Add support for __HAVE_FAST_SOFTINTS.
Add a few small optimizations.


Revision tags: mjf-devfs-base
# 1.160 03-Feb-2008 matt

Make process_sstep use ANSI declaration.


Revision tags: 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 vmlocking-nbase matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.159 03-Dec-2007 ad

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: nick-csl-alignment-base5 matt-armv6-prevmlocking jmcneill-base bouyer-xenamd64-base2 yamt-x86pmap-base4 bouyer-xenamd64-base yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 ppcoea-renovation-base thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.158 04-Mar-2007 christos

branches: 1.158.2; 1.158.18; 1.158.20; 1.158.26;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.157 22-Feb-2007 thorpej

TRUE -> true, FALSE -> false


# 1.156 17-Feb-2007 pavel

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.


# 1.155 16-Feb-2007 matt

branches: 1.155.2;
Partially adapt the VAX port to the newlock2 changes. These are untested
but they do at least compile.


Revision tags: post-newlock2-merge
# 1.154 09-Feb-2007 ad

Merge newlock2 to head.


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 newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.153 25-Oct-2006 he

Propagate const, prompted by new gcc.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base simonb-timcounters-final yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5 simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.152 24-Dec-2005 perry

branches: 1.152.20; 1.152.22;
bare asm -> __asm


# 1.151 11-Dec-2005 christos

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 ktrace-lwp-base
# 1.150 01-Jun-2005 scw

branches: 1.150.2;
Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext()
with the recent change to Makefile.kern.inc (revision 1.62).


Revision tags: kent-audio2-base
# 1.149 25-Apr-2005 lukem

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.


# 1.148 09-Apr-2005 matt

Rework cpu_upcall. Actually build a stack frame and argument list and
don't use a trampoline.


# 1.147 01-Apr-2005 yamt

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
save some resources like pv_entry. also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.


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 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.146 24-Apr-2004 atatat

branches: 1.146.4; 1.146.6;
The second "console_device" node should really be called "booted_device".


Revision tags: netbsd-2-0-base
# 1.145 24-Mar-2004 atatat

branches: 1.145.2;
Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.


# 1.144 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.143 08-Dec-2003 matt

Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.


# 1.142 04-Dec-2003 atatat

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al. Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded. Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment. I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.


# 1.141 29-Sep-2003 matt

Fix GCC3'ism's


# 1.140 29-Sep-2003 matt

Add SA_SIGINFO support for VAX.


# 1.139 26-Sep-2003 simonb

Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.


# 1.138 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.137 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.136 23-Jun-2003 martin

branches: 1.136.2;
Make sure to include opt_foo.h if a defflag option FOO is used.


# 1.135 26-Apr-2003 ragge

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


# 1.134 01-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.133 01-Mar-2003 matt

Add machdep sysctl support. Support booted_device, consdev, and
printfataltraps.


# 1.132 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
# 1.131 01-Dec-2002 matt

Fix inconsistencies in various definitions of avail_*, virtual_*, and
proc0paddr.


# 1.130 14-Nov-2002 ragge

Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.


Revision tags: kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.129 28-Sep-2002 ragge

Add common routines to talk with the CPMBX, from Hugh Graham (hugh@openbsd.org)
This makes halt/reboot work correctly on a bunch of machines.


# 1.128 25-Sep-2002 thorpej

Don't use rmaps; use extent maps instead.


# 1.127 12-Sep-2002 ragge

Fix a signal handler bug originally reported by Hugh Graham some year ago:
If two signals are sent after each other without the process being run in
userspace between them then the second one will overwrite part of the signal
info stored on the userstack.
Fixed by rewriting and simplifying both the signal delivery code and the
trampoline code. Also bump signal version number to 2.


# 1.126 06-Sep-2002 gehenna

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.


Revision tags: gehenna-devsw-base
# 1.125 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.124 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


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
# 1.123 31-Mar-2002 matt

branches: 1.123.2;
Make ddb symbol loading work for ELF as well a.out.


Revision tags: eeh-devprop-base newlock-base
# 1.122 06-Mar-2002 tsutsui

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.


Revision tags: ifpoll-base
# 1.121 24-Feb-2002 matt

Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.


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

branches: 1.120.4;
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.119 24-Aug-2001 chs

branches: 1.119.2;
use pmap_k* for buffer cache pages.


# 1.118 30-Jun-2001 ragge

branches: 1.118.2;
Do more intelligent calculation of KVM size. This reduces the amount of
pre-allocated physical memory significantly.
A 11/750, for example, get 2MB more free (of 14MB), about 12%.


# 1.117 02-Jun-2001 chs

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.


# 1.116 29-May-2001 ragge

Must lock kernel when softclock is called from outside hardclock.


# 1.115 02-May-2001 matt

Use the symtab info given by loadfile in the booter instead of assuming
we know where it is. This is a requirement for ELF.


# 1.114 30-Apr-2001 matt

Move RB_KDB check to after VM is init so that there's an
interrupt stack for DDB to run on. This makes boot -d work.


Revision tags: thorpej_scsipi_beforemerge
# 1.113 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.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.112 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.111 15-Jan-2001 thorpej

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


# 1.110 22-Dec-2000 jdolecek

split off thread specific stuff from struct sigacts to struct sigctx, leaving
only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.


# 1.109 18-Oct-2000 matt

add a clarifying comment.


# 1.108 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.107 08-Sep-2000 ragge

By some reason setstatclockrate() suddenly get called occationally
(it hasn't been called since -94 :-) Remove the panic that happens when
it is called.


# 1.106 26-Jul-2000 ragge

Add bi interrupt allocator. Should be somewhere else.


# 1.105 02-Jul-2000 cgd

Kwality control:
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.


# 1.104 29-Jun-2000 mrg

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


# 1.103 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-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.102 05-Jun-2000 jhawk

Do not clear msgbufenabled in dumpsys(). Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)


# 1.101 02-Jun-2000 matt

Add IPL_* codes.
Add other codes for struct references.
Add softintr framework for IPL_SOFTNET and IPL_SOFTSERIAL.
General cleanup of .s files replacing hardcoded structure offsets with
symbolic ones.


# 1.100 29-May-2000 ragge

Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.


Revision tags: minoura-xpg4dl-base
# 1.99 26-May-2000 thorpej

branches: 1.99.2;
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.98 16-Apr-2000 ragge

Call doshutdownhooks().


# 1.97 28-Mar-2000 simonb

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.


# 1.96 19-Mar-2000 ragge

First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.


# 1.95 07-Mar-2000 matt

add real vmapbuf/vunmapbuf routines. needed for VS4000 SCSI support.


# 1.94 04-Mar-2000 matt

expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c


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

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


# 1.92 16-Jan-2000 ragge

Bogus context pointer sent to sigreturn() may crash the machine.
Bug found by der Mouse.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.91 11-Dec-1999 ragge

CL* discarding.
Move physmem setting to pmap_bootstrap().
Fix security problem in process_write_regs(), found by Klaus Klein.


Revision tags: fvdl-softdep-base
# 1.90 13-Nov-1999 thorpej

Update for pmap_enter() API change. No functional difference.


Revision tags: comdex-fall-1999-base
# 1.89 27-Oct-1999 ragge

Let smg be probed as all other possible consoles.


# 1.88 22-Oct-1999 ragge

Remove the vmapbuf()/vunmapbuf() routines. They are quite unneccessary
on a machine that has MMU for its I/O devices.


# 1.87 17-Sep-1999 thorpej

branches: 1.87.2; 1.87.4; 1.87.6;
Centralize the declaration and clearing of `cold'.


# 1.86 12-Aug-1999 ragge

PGOFSET should be VAX_PGOFSET.
Remove two unused prototypes.


# 1.85 07-Aug-1999 ragge

Clean up all bus handling stuff, it has become a mess the latest years.
Add a new bus; "ibus" that is the internal MicroVAX bus.


Revision tags: chs-ubc2-base
# 1.84 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.83 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.82 02-May-1999 ragge

EEEK! The signal changes a while ago caused the user struct to be
on top of the "red zone" in the kernel stack. This phenomenon has
caused many unexplainable things to happen the last year.


# 1.81 01-May-1999 ragge

Real-time clock is started on the same way on all CPUs, there is no
need for a special CPU-dependent hook for this.


# 1.80 25-Apr-1999 simonb

g/c REAL_CLISTS.


# 1.79 17-Apr-1999 ragge

Use "access_type" in pmap_enter() more intelligent.
Allocate device register space bigger than the logical page size
from the kernel map, thus decreasing the pre-allocated page table memory.


# 1.78 14-Apr-1999 ragge

Use the pool allocator for mbufs instead of a separate submap.


# 1.77 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.76 01-Apr-1999 thorpej

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


# 1.75 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.74 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.73 13-Mar-1999 ragge

Change vsbus to take a locator for all devices.
Figure out interrupt vector/mask on vsbus by forcing all devices to
generate interrupts in the match routine, like on unibus.


# 1.72 27-Feb-1999 scottr

defopt BUFCACHE and BUFPAGES.


# 1.71 02-Feb-1999 ragge

Another giant change: Allocate register space dynamic instead of compiled-in.
This is done on a physical page size basis, instead of virtual (as the
(on vax yet non-existing) bus_* routines does). This is similar to the
way uba allocation is done.


# 1.70 19-Jan-1999 ragge

Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.


# 1.69 09-Jan-1999 thorpej

Garbage-collect `mbutl'.


# 1.68 19-Dec-1998 ragge

Fix bufpages miscalculation. At the same time, make bufpages configurable
att compile time.


Revision tags: kenh-if-detach-base
# 1.67 29-Nov-1998 ragge

uvm_km_alloc -> uvm_km_zalloc.


Revision tags: chs-ubc-base
# 1.66 05-Nov-1998 ragge

EGCS fixes.


# 1.65 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.64 06-Oct-1998 thorpej

Provide configure(), rather than open-coding it in cpu_startup().


# 1.63 06-Oct-1998 matt

Change backplace0 to mainbus0 (for consistency with other ports).
Remove unused function protocols from ka410.h and ka43.h
Fix some ka46 missing references


# 1.62 02-Oct-1998 drochner

use old sigmask in sigcontext and old sigreturn syscall in Ultrix
emulation mode


# 1.61 30-Sep-1998 ragge

Make kernel compile after recent signal changes.


Revision tags: eeh-paddr_t-base
# 1.60 05-Jul-1998 jonathan

defopt NS, NSIP.


# 1.59 05-Jul-1998 jonathan

defopt INET, NETATALK.


# 1.58 04-Jul-1998 jonathan

defopt DDB.


# 1.57 20-Jun-1998 ragge

Fix after current DDB changes.


# 1.56 08-Jun-1998 ragge

Wall fixes.


# 1.55 04-Jun-1998 ragge

Rudimentary support for the VS3100 builtin graphics console.


# 1.54 08-May-1998 kleink

Fix some arithmetics lossage on typeless pointers.


# 1.53 02-Mar-1998 ragge

Support for UVM on VAXen.


# 1.52 19-Feb-1998 thorpej

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


# 1.51 24-Jan-1998 mycroft

When dumping, print out the device number as major,minor.


# 1.50 04-Nov-1997 ragge

Move some interrupt routines out to assembler.
Optimize (slightly) pmap_clear_modify.


# 1.49 04-Nov-1997 ragge

Optimized copy/fetch/store routines; rewritten in assembler.


# 1.48 02-Nov-1997 ragge

Fix clearing of redundant restart flag; CPU specific.
Also clean up a bit.


Revision tags: netbsd-1-3-base
# 1.47 19-Oct-1997 ragge

branches: 1.47.2;
#include <vm/vm.h>. Fix some erroneous declarations.


Revision tags: marc-pcmcia-base
# 1.46 19-Sep-1997 leo

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.


Revision tags: thorpej-signal-base marc-pcmcia-bp
# 1.45 26-Jul-1997 ragge

branches: 1.45.2; 1.45.4;
Actually do 'halt' or 'reboot' on MicroVAX.


# 1.44 12-Jun-1997 mrg

bring mrg-vm-swap2 onto mainilne.


# 1.43 09-Jun-1997 veego

Initialize machine from MACHINE and machine_arch from MACHINE_ARCH.


# 1.42 06-Jun-1997 veego

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.


Revision tags: mrg-vm-swap2-base
# 1.41 19-Apr-1997 ragge

branches: 1.41.2;
Fix so that these files compile again after recent ARP changes.


# 1.40 03-Apr-1997 christos

Add netatalk netisr


# 1.39 27-Mar-1997 thorpej

Don't allocate mclrefcnt[]; it's dead and gone.


# 1.38 26-Mar-1997 gwr

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/


# 1.37 15-Mar-1997 ragge

Clean up console autoconfiguration so that the VAXstation DZ11-like
console work.


Revision tags: is-newarp-before-merge
# 1.36 19-Feb-1997 ragge

Basic change to cpu-config code. This will make support of new
cpu types much easier.


Revision tags: is-newarp-base
# 1.35 11-Jan-1997 ragge

branches: 1.35.4; 1.35.6;
Prototype updates.


# 1.34 13-Oct-1996 christos

backout previous kprintf change


# 1.33 11-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


# 1.32 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.31 20-Jul-1996 ragge

Reflect the changes of CPU determination. Add support for VAXstations.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.30 19-May-1996 ragge

Fixed all (proto)type errors. Fixes PR 2377.


# 1.29 08-Apr-1996 ragge

Added prototypes to everything. Made all files compile with -Wall.


# 1.28 07-Mar-1996 ragge

Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.


# 1.27 03-Mar-1996 ragge

Fix fuswintr/suswintr arguments to match prototype.


# 1.26 02-Mar-1996 ragge

Support for VAX 11/780 - 11/785 system types added.
There are no support (yet) for the RX01 console floppy,
even if it is actually needed to create boot floppies.
(The arff utility is also missing, so...)


# 1.25 11-Feb-1996 ragge

Fix cpu_sysctl() arguments to be like prototype.


# 1.24 02-Feb-1996 mycroft

Fix #includes.


# 1.23 28-Jan-1996 ragge

Save USP when trapping from userspace.
Change register save structs according to this.
Be compatible with the way old init passes flags (in registers).


# 1.22 04-Jan-1996 jtc

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.


# 1.21 13-Dec-1995 ragge

MicroVAX III support added; now runs on VAX 3600/3800/3900 platforms.


# 1.20 10-Nov-1995 ragge

Allow for dynamic allocation of interrupt vectors.
COMPAT_RENO removed.
Handle memory errors.
uap->sigcntxp -> SCARG(uap, sigcntxp)


Revision tags: netbsd-1-1-base
# 1.19 07-Oct-1995 mycroft

branches: 1.19.2;
Prefix names of system call implementation functions with `sys_'.


# 1.18 02-Oct-1995 ragge

#include "sys/mount.h" added.


# 1.17 19-Sep-1995 thorpej

Make system calls conform to a standard prototype and bring those
prototypes into scope.


# 1.16 01-Sep-1995 mycroft

SA_ONSTACK --> SS_ONSTACK


# 1.15 05-Jul-1995 ragge

Calling of pppintr() included.


# 1.14 16-Jun-1995 ragge

rudimentary DDB support.


# 1.13 05-Jun-1995 ragge

Enabled auto reboot. Fixed bug in conf.c. Started use of rpb.
Detecting kernel stack overflow. Removed local mapping of
sigtramp code. Frob kernel stack pages in cpu_swapin().
Cleaned up some code and changed to KNF.


# 1.12 06-May-1995 ragge

Kernel message buffer implemented.


# 1.11 03-May-1995 ragge

Changed conf.c to new style. Took away double saving of regs in traps.
Changed boot() to use vfs_shutdown(). Updated setregs.


# 1.10 12-Apr-1995 ragge

Fixes to conf.c
Cleaning of code.


# 1.9 10-Apr-1995 mycroft

kernel_pmap --> pmap_kernel()


# 1.8 30-Mar-1995 ragge

Speed-up of pmap and trap.
Fixes due to uVAX support.


# 1.7 23-Feb-1995 ragge

Support for uVAXII, new tmscp driver added.


# 1.6 13-Feb-1995 ragge

Zillions of bugfixes. Obsolete files taken away. New style config
fixed. Inline assembler commonly used.


# 1.5 25-Nov-1994 ragge

Lots of fixes and updates.


# 1.4 26-Oct-1994 cgd

new RCS ID format.


# 1.3 08-Oct-1994 ragge

Lots of bug fixes; clock and mem files new.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.2 16-Aug-1994 ragge

branches: 1.2.2;
Lots of bug fixes. Generic console support added. Major changes in machdep.c.
pmap.c now supports user process mapping. Page faults handles correctly.


# 1.1 02-Aug-1994 ragge

Initial VAX port merging.