History log of /netbsd-current/sys/arch/sun3/sun3x/locore.s
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.78 17-Jan-2024 thorpej

Make sigcode.s and sunos_sigcode.s build as their own stand-alone files.


# 1.77 17-Jan-2024 thorpej

Make compat_13_sigreturn13.s and compat_16_sigreturn14.s build as their
own stand-alone files and G/C the now-empty sigreturn.s.


# 1.76 16-Jan-2024 thorpej

Build m68k/support.s on its own; don't include it from locore.s


# 1.75 15-Jan-2024 thorpej

G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.


# 1.74 14-Jan-2024 thorpej

Switch the sun68k platforms over to the common m68k interrupt dispatch code.


# 1.73 13-Jan-2024 thorpej

G/C unreferenced copies of _spl() and _splraise().


# 1.72 12-Jan-2024 thorpej

We only need one copy of getvbr() and setvbr().


# 1.71 12-Jan-2024 thorpej

Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.


# 1.70 12-Jan-2024 thorpej

Remove getsp(); nothing uses it.


Revision tags: netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
# 1.69 16-Mar-2022 andvar

s/paniced/panicked/ and s/borken/broken/ in comments.


Revision tags: 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.68 31-Mar-2021 simonb

Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.


# 1.67 25-Jan-2021 tsutsui

branches: 1.67.2;
Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.66 19-Dec-2018 maxv

branches: 1.66.12;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE 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 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 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.65 24-Mar-2014 christos

branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.64 22-Dec-2011 tsutsui

branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base
# 1.63 15-Nov-2011 tsutsui

branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.62 08-Feb-2011 rmind

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

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3
# 1.61 15-Oct-2010 tsutsui

branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?


Revision tags: yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.60 25-Feb-2010 skrll

branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.59 10-Dec-2009 rmind

branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.


# 1.58 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.57 17-Oct-2007 garbled

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

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

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

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


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base ppcoea-renovation-base vmlocking-base
# 1.56 20-Jul-2007 tsutsui

branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.


Revision tags: nick-csl-alignment-base mjf-ufs-trans-base
# 1.55 18-May-2007 tsutsui

branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base 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.54 11-Dec-2005 christos

branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.


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 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base ktrace-lwp-base
# 1.53 05-Mar-2004 he

branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.


# 1.52 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.51 18-Jan-2003 thorpej

branches: 1.51.2;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base
# 1.50 02-Nov-2002 chs

finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.


Revision tags: kqueue-aftermerge kqueue-beforemerge
# 1.49 20-Oct-2002 chs

merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.


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 gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.48 22-Jul-2001 scw

branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.


# 1.47 30-May-2001 lukem

branches: 1.47.2;
add missing #include "opt_kgdb.h"


# 1.46 12-May-2001 kleink

Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.45 22-Feb-2001 chs

branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.


# 1.44 26-Nov-2000 jdolecek

split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate


# 1.43 03-Nov-2000 tsutsui

Fix typo in the previous revision. (s/LIdle/Lidle/)


# 1.42 20-Aug-2000 thorpej

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.


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.41 31-May-2000 thorpej

Add a comment on single-processor systems about p_cpu being initialized
by fork1().


# 1.40 31-May-2000 nathanw

Update for qs -> sched_qs change.
Kernel compiles again.


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

branches: 1.39.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.38 26-May-2000 thorpej

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.37 26-Oct-1999 itohy

Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.


Revision tags: chs-ubc2-base
# 1.36 01-Aug-1999 thorpej

branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.


# 1.35 30-Apr-1999 christos

Include opt_compat_sunos.h


# 1.34 19-Apr-1999 kleink

Add COMPAT_SVR4 for m68k.


Revision tags: netbsd-1-4-base
# 1.33 24-Mar-1999 mrg

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


# 1.32 26-Feb-1999 is

sun3 part of fix for PR 6152


Revision tags: kenh-if-detach-base
# 1.31 11-Nov-1998 thorpej

Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.


Revision tags: chs-ubc-base
# 1.30 30-Sep-1998 thorpej

Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s


# 1.29 30-Sep-1998 thorpej

Pull in opt_compat_netbsd.h


# 1.28 09-Sep-1998 thorpej

Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).


Revision tags: eeh-paddr_t-base
# 1.27 09-Jun-1998 gwr

First cut at UVM support. Compiles, but not tested yet.


# 1.26 05-Feb-1998 gwr

Merge arch/sun3x into arch/sun3


Revision tags: gwr-3x3-base
# 1.25 22-Jan-1998 gwr

branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.


# 1.24 22-Jan-1998 gwr

Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.


# 1.23 02-Jan-1998 thorpej

Make pmap_activate() take a proc *.


# 1.22 16-Oct-1997 gwr

MONSTART/monstart symbol


# 1.21 29-May-1997 gwr

Add non-inline version of _splraise.


# 1.20 13-May-1997 gwr

Eliminate references to vmspace.vm_pmap
(also fix some comments).


# 1.19 02-May-1997 jeremy

Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)


# 1.18 25-Apr-1997 gwr

Rename "Idle" to "_Idle" so clock.c can reference it.


# 1.17 25-Apr-1997 thorpej

Adjust for <m68k/m68k/trap_subr.s>


# 1.16 13-Apr-1997 thorpej

Use common m68k sigcode.


# 1.15 09-Apr-1997 thorpej

Use <m68k/m68k/proc_subr.s>


# 1.14 31-Mar-1997 jeremy

In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.


# 1.13 17-Mar-1997 gwr

s/fpu_type/fputype/g


# 1.12 16-Mar-1997 thorpej

Use <m68k/m68k/support.s>


# 1.11 13-Mar-1997 gwr

Sync with sun3 (Trap 1,2,15 handlers)


# 1.10 05-Mar-1997 gwr

Add ptest_addr


# 1.9 20-Feb-1997 jeremy

Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.


# 1.8 12-Feb-1997 gwr

Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.


# 1.7 11-Feb-1997 gwr

Add a few more coments. (i.e. why init a6=0)


# 1.6 11-Feb-1997 gwr

Sync with sun3.


# 1.5 02-Feb-1997 thorpej

branches: 1.5.2;
Remove an un-true comment.


# 1.4 23-Jan-1997 gwr

Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap


# 1.3 17-Jan-1997 gwr

Fix a comment (PCB_MMUCTX is a virtual address).


# 1.2 17-Jan-1997 gwr

Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.


# 1.1 14-Jan-1997 gwr

branches: 1.1.1;
Initial revision


# 1.75 15-Jan-2024 thorpej

G/C __HAVE_LEGACY_INTRCNT from the sun68k platforms.


# 1.74 14-Jan-2024 thorpej

Switch the sun68k platforms over to the common m68k interrupt dispatch code.


# 1.73 13-Jan-2024 thorpej

G/C unreferenced copies of _spl() and _splraise().


# 1.72 12-Jan-2024 thorpej

We only need one copy of getvbr() and setvbr().


# 1.71 12-Jan-2024 thorpej

Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.


# 1.70 12-Jan-2024 thorpej

Remove getsp(); nothing uses it.


Revision tags: netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
# 1.69 16-Mar-2022 andvar

s/paniced/panicked/ and s/borken/broken/ in comments.


Revision tags: 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.68 31-Mar-2021 simonb

Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.


# 1.67 25-Jan-2021 tsutsui

branches: 1.67.2;
Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.66 19-Dec-2018 maxv

branches: 1.66.12;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE 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 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 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.65 24-Mar-2014 christos

branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.64 22-Dec-2011 tsutsui

branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base
# 1.63 15-Nov-2011 tsutsui

branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.62 08-Feb-2011 rmind

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

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3
# 1.61 15-Oct-2010 tsutsui

branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?


Revision tags: yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.60 25-Feb-2010 skrll

branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.59 10-Dec-2009 rmind

branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.


# 1.58 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.57 17-Oct-2007 garbled

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

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

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

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


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base ppcoea-renovation-base vmlocking-base
# 1.56 20-Jul-2007 tsutsui

branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.


Revision tags: nick-csl-alignment-base mjf-ufs-trans-base
# 1.55 18-May-2007 tsutsui

branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base 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.54 11-Dec-2005 christos

branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.


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 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base ktrace-lwp-base
# 1.53 05-Mar-2004 he

branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.


# 1.52 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.51 18-Jan-2003 thorpej

branches: 1.51.2;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base
# 1.50 02-Nov-2002 chs

finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.


Revision tags: kqueue-aftermerge kqueue-beforemerge
# 1.49 20-Oct-2002 chs

merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.


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 gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.48 22-Jul-2001 scw

branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.


# 1.47 30-May-2001 lukem

branches: 1.47.2;
add missing #include "opt_kgdb.h"


# 1.46 12-May-2001 kleink

Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.45 22-Feb-2001 chs

branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.


# 1.44 26-Nov-2000 jdolecek

split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate


# 1.43 03-Nov-2000 tsutsui

Fix typo in the previous revision. (s/LIdle/Lidle/)


# 1.42 20-Aug-2000 thorpej

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.


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.41 31-May-2000 thorpej

Add a comment on single-processor systems about p_cpu being initialized
by fork1().


# 1.40 31-May-2000 nathanw

Update for qs -> sched_qs change.
Kernel compiles again.


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

branches: 1.39.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.38 26-May-2000 thorpej

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.37 26-Oct-1999 itohy

Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.


Revision tags: chs-ubc2-base
# 1.36 01-Aug-1999 thorpej

branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.


# 1.35 30-Apr-1999 christos

Include opt_compat_sunos.h


# 1.34 19-Apr-1999 kleink

Add COMPAT_SVR4 for m68k.


Revision tags: netbsd-1-4-base
# 1.33 24-Mar-1999 mrg

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


# 1.32 26-Feb-1999 is

sun3 part of fix for PR 6152


Revision tags: kenh-if-detach-base
# 1.31 11-Nov-1998 thorpej

Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.


Revision tags: chs-ubc-base
# 1.30 30-Sep-1998 thorpej

Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s


# 1.29 30-Sep-1998 thorpej

Pull in opt_compat_netbsd.h


# 1.28 09-Sep-1998 thorpej

Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).


Revision tags: eeh-paddr_t-base
# 1.27 09-Jun-1998 gwr

First cut at UVM support. Compiles, but not tested yet.


# 1.26 05-Feb-1998 gwr

Merge arch/sun3x into arch/sun3


Revision tags: gwr-3x3-base
# 1.25 22-Jan-1998 gwr

branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.


# 1.24 22-Jan-1998 gwr

Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.


# 1.23 02-Jan-1998 thorpej

Make pmap_activate() take a proc *.


# 1.22 16-Oct-1997 gwr

MONSTART/monstart symbol


# 1.21 29-May-1997 gwr

Add non-inline version of _splraise.


# 1.20 13-May-1997 gwr

Eliminate references to vmspace.vm_pmap
(also fix some comments).


# 1.19 02-May-1997 jeremy

Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)


# 1.18 25-Apr-1997 gwr

Rename "Idle" to "_Idle" so clock.c can reference it.


# 1.17 25-Apr-1997 thorpej

Adjust for <m68k/m68k/trap_subr.s>


# 1.16 13-Apr-1997 thorpej

Use common m68k sigcode.


# 1.15 09-Apr-1997 thorpej

Use <m68k/m68k/proc_subr.s>


# 1.14 31-Mar-1997 jeremy

In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.


# 1.13 17-Mar-1997 gwr

s/fpu_type/fputype/g


# 1.12 16-Mar-1997 thorpej

Use <m68k/m68k/support.s>


# 1.11 13-Mar-1997 gwr

Sync with sun3 (Trap 1,2,15 handlers)


# 1.10 05-Mar-1997 gwr

Add ptest_addr


# 1.9 20-Feb-1997 jeremy

Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.


# 1.8 12-Feb-1997 gwr

Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.


# 1.7 11-Feb-1997 gwr

Add a few more coments. (i.e. why init a6=0)


# 1.6 11-Feb-1997 gwr

Sync with sun3.


# 1.5 02-Feb-1997 thorpej

branches: 1.5.2;
Remove an un-true comment.


# 1.4 23-Jan-1997 gwr

Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap


# 1.3 17-Jan-1997 gwr

Fix a comment (PCB_MMUCTX is a virtual address).


# 1.2 17-Jan-1997 gwr

Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.


# 1.1 14-Jan-1997 gwr

branches: 1.1.1;
Initial revision


# 1.73 13-Jan-2024 thorpej

G/C unreferenced copies of _spl() and _splraise().


# 1.72 12-Jan-2024 thorpej

We only need one copy of getvbr() and setvbr().


# 1.71 12-Jan-2024 thorpej

Make getsr() an inline in <m68k/psl.h> and G/C all of the now-redudant
copies.


# 1.70 12-Jan-2024 thorpej

Remove getsp(); nothing uses it.


Revision tags: netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
# 1.69 16-Mar-2022 andvar

s/paniced/panicked/ and s/borken/broken/ in comments.


Revision tags: 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.68 31-Mar-2021 simonb

Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.


# 1.67 25-Jan-2021 tsutsui

branches: 1.67.2;
Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.66 19-Dec-2018 maxv

branches: 1.66.12;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE 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 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 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.65 24-Mar-2014 christos

branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.64 22-Dec-2011 tsutsui

branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base
# 1.63 15-Nov-2011 tsutsui

branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.62 08-Feb-2011 rmind

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

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3
# 1.61 15-Oct-2010 tsutsui

branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?


Revision tags: yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.60 25-Feb-2010 skrll

branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.59 10-Dec-2009 rmind

branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.


# 1.58 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.57 17-Oct-2007 garbled

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

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

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

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


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base ppcoea-renovation-base vmlocking-base
# 1.56 20-Jul-2007 tsutsui

branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.


Revision tags: nick-csl-alignment-base mjf-ufs-trans-base
# 1.55 18-May-2007 tsutsui

branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base 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.54 11-Dec-2005 christos

branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.


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 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base ktrace-lwp-base
# 1.53 05-Mar-2004 he

branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.


# 1.52 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.51 18-Jan-2003 thorpej

branches: 1.51.2;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base
# 1.50 02-Nov-2002 chs

finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.


Revision tags: kqueue-aftermerge kqueue-beforemerge
# 1.49 20-Oct-2002 chs

merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.


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 gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.48 22-Jul-2001 scw

branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.


# 1.47 30-May-2001 lukem

branches: 1.47.2;
add missing #include "opt_kgdb.h"


# 1.46 12-May-2001 kleink

Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.45 22-Feb-2001 chs

branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.


# 1.44 26-Nov-2000 jdolecek

split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate


# 1.43 03-Nov-2000 tsutsui

Fix typo in the previous revision. (s/LIdle/Lidle/)


# 1.42 20-Aug-2000 thorpej

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.


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.41 31-May-2000 thorpej

Add a comment on single-processor systems about p_cpu being initialized
by fork1().


# 1.40 31-May-2000 nathanw

Update for qs -> sched_qs change.
Kernel compiles again.


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

branches: 1.39.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.38 26-May-2000 thorpej

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.37 26-Oct-1999 itohy

Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.


Revision tags: chs-ubc2-base
# 1.36 01-Aug-1999 thorpej

branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.


# 1.35 30-Apr-1999 christos

Include opt_compat_sunos.h


# 1.34 19-Apr-1999 kleink

Add COMPAT_SVR4 for m68k.


Revision tags: netbsd-1-4-base
# 1.33 24-Mar-1999 mrg

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


# 1.32 26-Feb-1999 is

sun3 part of fix for PR 6152


Revision tags: kenh-if-detach-base
# 1.31 11-Nov-1998 thorpej

Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.


Revision tags: chs-ubc-base
# 1.30 30-Sep-1998 thorpej

Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s


# 1.29 30-Sep-1998 thorpej

Pull in opt_compat_netbsd.h


# 1.28 09-Sep-1998 thorpej

Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).


Revision tags: eeh-paddr_t-base
# 1.27 09-Jun-1998 gwr

First cut at UVM support. Compiles, but not tested yet.


# 1.26 05-Feb-1998 gwr

Merge arch/sun3x into arch/sun3


Revision tags: gwr-3x3-base
# 1.25 22-Jan-1998 gwr

branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.


# 1.24 22-Jan-1998 gwr

Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.


# 1.23 02-Jan-1998 thorpej

Make pmap_activate() take a proc *.


# 1.22 16-Oct-1997 gwr

MONSTART/monstart symbol


# 1.21 29-May-1997 gwr

Add non-inline version of _splraise.


# 1.20 13-May-1997 gwr

Eliminate references to vmspace.vm_pmap
(also fix some comments).


# 1.19 02-May-1997 jeremy

Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)


# 1.18 25-Apr-1997 gwr

Rename "Idle" to "_Idle" so clock.c can reference it.


# 1.17 25-Apr-1997 thorpej

Adjust for <m68k/m68k/trap_subr.s>


# 1.16 13-Apr-1997 thorpej

Use common m68k sigcode.


# 1.15 09-Apr-1997 thorpej

Use <m68k/m68k/proc_subr.s>


# 1.14 31-Mar-1997 jeremy

In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.


# 1.13 17-Mar-1997 gwr

s/fpu_type/fputype/g


# 1.12 16-Mar-1997 thorpej

Use <m68k/m68k/support.s>


# 1.11 13-Mar-1997 gwr

Sync with sun3 (Trap 1,2,15 handlers)


# 1.10 05-Mar-1997 gwr

Add ptest_addr


# 1.9 20-Feb-1997 jeremy

Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.


# 1.8 12-Feb-1997 gwr

Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.


# 1.7 11-Feb-1997 gwr

Add a few more coments. (i.e. why init a6=0)


# 1.6 11-Feb-1997 gwr

Sync with sun3.


# 1.5 02-Feb-1997 thorpej

branches: 1.5.2;
Remove an un-true comment.


# 1.4 23-Jan-1997 gwr

Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap


# 1.3 17-Jan-1997 gwr

Fix a comment (PCB_MMUCTX is a virtual address).


# 1.2 17-Jan-1997 gwr

Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.


# 1.1 14-Jan-1997 gwr

branches: 1.1.1;
Initial revision


# 1.69 16-Mar-2022 andvar

s/paniced/panicked/ and s/borken/broken/ in comments.


Revision tags: 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.68 31-Mar-2021 simonb

Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.


# 1.67 25-Jan-2021 tsutsui

branches: 1.67.2;
Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.66 19-Dec-2018 maxv

branches: 1.66.12;
Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE 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 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 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.65 24-Mar-2014 christos

branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.64 22-Dec-2011 tsutsui

branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base
# 1.63 15-Nov-2011 tsutsui

branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.62 08-Feb-2011 rmind

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

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3
# 1.61 15-Oct-2010 tsutsui

branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?


Revision tags: yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.60 25-Feb-2010 skrll

branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.59 10-Dec-2009 rmind

branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.


# 1.58 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.57 17-Oct-2007 garbled

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

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

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

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


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base ppcoea-renovation-base vmlocking-base
# 1.56 20-Jul-2007 tsutsui

branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.


Revision tags: nick-csl-alignment-base mjf-ufs-trans-base
# 1.55 18-May-2007 tsutsui

branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base 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.54 11-Dec-2005 christos

branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.


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 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base ktrace-lwp-base
# 1.53 05-Mar-2004 he

branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.


# 1.52 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.51 18-Jan-2003 thorpej

branches: 1.51.2;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base
# 1.50 02-Nov-2002 chs

finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.


Revision tags: kqueue-aftermerge kqueue-beforemerge
# 1.49 20-Oct-2002 chs

merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.


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 gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.48 22-Jul-2001 scw

branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.


# 1.47 30-May-2001 lukem

branches: 1.47.2;
add missing #include "opt_kgdb.h"


# 1.46 12-May-2001 kleink

Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.45 22-Feb-2001 chs

branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.


# 1.44 26-Nov-2000 jdolecek

split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate


# 1.43 03-Nov-2000 tsutsui

Fix typo in the previous revision. (s/LIdle/Lidle/)


# 1.42 20-Aug-2000 thorpej

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.


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.41 31-May-2000 thorpej

Add a comment on single-processor systems about p_cpu being initialized
by fork1().


# 1.40 31-May-2000 nathanw

Update for qs -> sched_qs change.
Kernel compiles again.


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

branches: 1.39.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.38 26-May-2000 thorpej

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.37 26-Oct-1999 itohy

Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.


Revision tags: chs-ubc2-base
# 1.36 01-Aug-1999 thorpej

branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.


# 1.35 30-Apr-1999 christos

Include opt_compat_sunos.h


# 1.34 19-Apr-1999 kleink

Add COMPAT_SVR4 for m68k.


Revision tags: netbsd-1-4-base
# 1.33 24-Mar-1999 mrg

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


# 1.32 26-Feb-1999 is

sun3 part of fix for PR 6152


Revision tags: kenh-if-detach-base
# 1.31 11-Nov-1998 thorpej

Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.


Revision tags: chs-ubc-base
# 1.30 30-Sep-1998 thorpej

Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s


# 1.29 30-Sep-1998 thorpej

Pull in opt_compat_netbsd.h


# 1.28 09-Sep-1998 thorpej

Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).


Revision tags: eeh-paddr_t-base
# 1.27 09-Jun-1998 gwr

First cut at UVM support. Compiles, but not tested yet.


# 1.26 05-Feb-1998 gwr

Merge arch/sun3x into arch/sun3


Revision tags: gwr-3x3-base
# 1.25 22-Jan-1998 gwr

branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.


# 1.24 22-Jan-1998 gwr

Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.


# 1.23 02-Jan-1998 thorpej

Make pmap_activate() take a proc *.


# 1.22 16-Oct-1997 gwr

MONSTART/monstart symbol


# 1.21 29-May-1997 gwr

Add non-inline version of _splraise.


# 1.20 13-May-1997 gwr

Eliminate references to vmspace.vm_pmap
(also fix some comments).


# 1.19 02-May-1997 jeremy

Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)


# 1.18 25-Apr-1997 gwr

Rename "Idle" to "_Idle" so clock.c can reference it.


# 1.17 25-Apr-1997 thorpej

Adjust for <m68k/m68k/trap_subr.s>


# 1.16 13-Apr-1997 thorpej

Use common m68k sigcode.


# 1.15 09-Apr-1997 thorpej

Use <m68k/m68k/proc_subr.s>


# 1.14 31-Mar-1997 jeremy

In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.


# 1.13 17-Mar-1997 gwr

s/fpu_type/fputype/g


# 1.12 16-Mar-1997 thorpej

Use <m68k/m68k/support.s>


# 1.11 13-Mar-1997 gwr

Sync with sun3 (Trap 1,2,15 handlers)


# 1.10 05-Mar-1997 gwr

Add ptest_addr


# 1.9 20-Feb-1997 jeremy

Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.


# 1.8 12-Feb-1997 gwr

Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.


# 1.7 11-Feb-1997 gwr

Add a few more coments. (i.e. why init a6=0)


# 1.6 11-Feb-1997 gwr

Sync with sun3.


# 1.5 02-Feb-1997 thorpej

branches: 1.5.2;
Remove an un-true comment.


# 1.4 23-Jan-1997 gwr

Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap


# 1.3 17-Jan-1997 gwr

Fix a comment (PCB_MMUCTX is a virtual address).


# 1.2 17-Jan-1997 gwr

Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.


# 1.1 14-Jan-1997 gwr

branches: 1.1.1;
Initial revision


# 1.68 31-Mar-2021 simonb

Adjust the number of entries in the intrcnt array to match the number
of names in the intrnames list.


Revision tags: thorpej-cfargs-base
# 1.67 25-Jan-2021 tsutsui

Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.


Revision tags: thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.66 19-Dec-2018 maxv

Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE 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 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 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.65 24-Mar-2014 christos

branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.64 22-Dec-2011 tsutsui

branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base
# 1.63 15-Nov-2011 tsutsui

branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.62 08-Feb-2011 rmind

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

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3
# 1.61 15-Oct-2010 tsutsui

branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?


Revision tags: yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.60 25-Feb-2010 skrll

branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.59 10-Dec-2009 rmind

branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.


# 1.58 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.57 17-Oct-2007 garbled

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

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

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

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


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base ppcoea-renovation-base vmlocking-base
# 1.56 20-Jul-2007 tsutsui

branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.


Revision tags: nick-csl-alignment-base mjf-ufs-trans-base
# 1.55 18-May-2007 tsutsui

branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base 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.54 11-Dec-2005 christos

branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.


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 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base ktrace-lwp-base
# 1.53 05-Mar-2004 he

branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.


# 1.52 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.51 18-Jan-2003 thorpej

branches: 1.51.2;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base
# 1.50 02-Nov-2002 chs

finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.


Revision tags: kqueue-aftermerge kqueue-beforemerge
# 1.49 20-Oct-2002 chs

merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.


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 gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.48 22-Jul-2001 scw

branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.


# 1.47 30-May-2001 lukem

branches: 1.47.2;
add missing #include "opt_kgdb.h"


# 1.46 12-May-2001 kleink

Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.45 22-Feb-2001 chs

branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.


# 1.44 26-Nov-2000 jdolecek

split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate


# 1.43 03-Nov-2000 tsutsui

Fix typo in the previous revision. (s/LIdle/Lidle/)


# 1.42 20-Aug-2000 thorpej

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.


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.41 31-May-2000 thorpej

Add a comment on single-processor systems about p_cpu being initialized
by fork1().


# 1.40 31-May-2000 nathanw

Update for qs -> sched_qs change.
Kernel compiles again.


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

branches: 1.39.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.38 26-May-2000 thorpej

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.37 26-Oct-1999 itohy

Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.


Revision tags: chs-ubc2-base
# 1.36 01-Aug-1999 thorpej

branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.


# 1.35 30-Apr-1999 christos

Include opt_compat_sunos.h


# 1.34 19-Apr-1999 kleink

Add COMPAT_SVR4 for m68k.


Revision tags: netbsd-1-4-base
# 1.33 24-Mar-1999 mrg

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


# 1.32 26-Feb-1999 is

sun3 part of fix for PR 6152


Revision tags: kenh-if-detach-base
# 1.31 11-Nov-1998 thorpej

Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.


Revision tags: chs-ubc-base
# 1.30 30-Sep-1998 thorpej

Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s


# 1.29 30-Sep-1998 thorpej

Pull in opt_compat_netbsd.h


# 1.28 09-Sep-1998 thorpej

Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).


Revision tags: eeh-paddr_t-base
# 1.27 09-Jun-1998 gwr

First cut at UVM support. Compiles, but not tested yet.


# 1.26 05-Feb-1998 gwr

Merge arch/sun3x into arch/sun3


Revision tags: gwr-3x3-base
# 1.25 22-Jan-1998 gwr

branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.


# 1.24 22-Jan-1998 gwr

Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.


# 1.23 02-Jan-1998 thorpej

Make pmap_activate() take a proc *.


# 1.22 16-Oct-1997 gwr

MONSTART/monstart symbol


# 1.21 29-May-1997 gwr

Add non-inline version of _splraise.


# 1.20 13-May-1997 gwr

Eliminate references to vmspace.vm_pmap
(also fix some comments).


# 1.19 02-May-1997 jeremy

Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)


# 1.18 25-Apr-1997 gwr

Rename "Idle" to "_Idle" so clock.c can reference it.


# 1.17 25-Apr-1997 thorpej

Adjust for <m68k/m68k/trap_subr.s>


# 1.16 13-Apr-1997 thorpej

Use common m68k sigcode.


# 1.15 09-Apr-1997 thorpej

Use <m68k/m68k/proc_subr.s>


# 1.14 31-Mar-1997 jeremy

In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.


# 1.13 17-Mar-1997 gwr

s/fpu_type/fputype/g


# 1.12 16-Mar-1997 thorpej

Use <m68k/m68k/support.s>


# 1.11 13-Mar-1997 gwr

Sync with sun3 (Trap 1,2,15 handlers)


# 1.10 05-Mar-1997 gwr

Add ptest_addr


# 1.9 20-Feb-1997 jeremy

Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.


# 1.8 12-Feb-1997 gwr

Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.


# 1.7 11-Feb-1997 gwr

Add a few more coments. (i.e. why init a6=0)


# 1.6 11-Feb-1997 gwr

Sync with sun3.


# 1.5 02-Feb-1997 thorpej

branches: 1.5.2;
Remove an un-true comment.


# 1.4 23-Jan-1997 gwr

Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap


# 1.3 17-Jan-1997 gwr

Fix a comment (PCB_MMUCTX is a virtual address).


# 1.2 17-Jan-1997 gwr

Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.


# 1.1 14-Jan-1997 gwr

branches: 1.1.1;
Initial revision


# 1.67 25-Jan-2021 tsutsui

Remove #undefs against INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG.

They have been defined in <m68k/asm.h> for years.


Revision tags: thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.66 19-Dec-2018 maxv

Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE 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 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 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.65 24-Mar-2014 christos

branches: 1.65.28; 1.65.30;
avoid dup defs, use global macros


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.64 22-Dec-2011 tsutsui

branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base
# 1.63 15-Nov-2011 tsutsui

branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.62 08-Feb-2011 rmind

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

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3
# 1.61 15-Oct-2010 tsutsui

branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?


Revision tags: yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.60 25-Feb-2010 skrll

branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.59 10-Dec-2009 rmind

branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.


# 1.58 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.57 17-Oct-2007 garbled

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

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

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

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


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base ppcoea-renovation-base vmlocking-base
# 1.56 20-Jul-2007 tsutsui

branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.


Revision tags: nick-csl-alignment-base mjf-ufs-trans-base
# 1.55 18-May-2007 tsutsui

branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base 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.54 11-Dec-2005 christos

branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.


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 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base ktrace-lwp-base
# 1.53 05-Mar-2004 he

branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.


# 1.52 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.51 18-Jan-2003 thorpej

branches: 1.51.2;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base
# 1.50 02-Nov-2002 chs

finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.


Revision tags: kqueue-aftermerge kqueue-beforemerge
# 1.49 20-Oct-2002 chs

merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.


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 gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.48 22-Jul-2001 scw

branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.


# 1.47 30-May-2001 lukem

branches: 1.47.2;
add missing #include "opt_kgdb.h"


# 1.46 12-May-2001 kleink

Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.45 22-Feb-2001 chs

branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.


# 1.44 26-Nov-2000 jdolecek

split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate


# 1.43 03-Nov-2000 tsutsui

Fix typo in the previous revision. (s/LIdle/Lidle/)


# 1.42 20-Aug-2000 thorpej

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.


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.41 31-May-2000 thorpej

Add a comment on single-processor systems about p_cpu being initialized
by fork1().


# 1.40 31-May-2000 nathanw

Update for qs -> sched_qs change.
Kernel compiles again.


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

branches: 1.39.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.38 26-May-2000 thorpej

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.37 26-Oct-1999 itohy

Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.


Revision tags: chs-ubc2-base
# 1.36 01-Aug-1999 thorpej

branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.


# 1.35 30-Apr-1999 christos

Include opt_compat_sunos.h


# 1.34 19-Apr-1999 kleink

Add COMPAT_SVR4 for m68k.


Revision tags: netbsd-1-4-base
# 1.33 24-Mar-1999 mrg

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


# 1.32 26-Feb-1999 is

sun3 part of fix for PR 6152


Revision tags: kenh-if-detach-base
# 1.31 11-Nov-1998 thorpej

Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.


Revision tags: chs-ubc-base
# 1.30 30-Sep-1998 thorpej

Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s


# 1.29 30-Sep-1998 thorpej

Pull in opt_compat_netbsd.h


# 1.28 09-Sep-1998 thorpej

Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).


Revision tags: eeh-paddr_t-base
# 1.27 09-Jun-1998 gwr

First cut at UVM support. Compiles, but not tested yet.


# 1.26 05-Feb-1998 gwr

Merge arch/sun3x into arch/sun3


Revision tags: gwr-3x3-base
# 1.25 22-Jan-1998 gwr

branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.


# 1.24 22-Jan-1998 gwr

Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.


# 1.23 02-Jan-1998 thorpej

Make pmap_activate() take a proc *.


# 1.22 16-Oct-1997 gwr

MONSTART/monstart symbol


# 1.21 29-May-1997 gwr

Add non-inline version of _splraise.


# 1.20 13-May-1997 gwr

Eliminate references to vmspace.vm_pmap
(also fix some comments).


# 1.19 02-May-1997 jeremy

Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)


# 1.18 25-Apr-1997 gwr

Rename "Idle" to "_Idle" so clock.c can reference it.


# 1.17 25-Apr-1997 thorpej

Adjust for <m68k/m68k/trap_subr.s>


# 1.16 13-Apr-1997 thorpej

Use common m68k sigcode.


# 1.15 09-Apr-1997 thorpej

Use <m68k/m68k/proc_subr.s>


# 1.14 31-Mar-1997 jeremy

In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.


# 1.13 17-Mar-1997 gwr

s/fpu_type/fputype/g


# 1.12 16-Mar-1997 thorpej

Use <m68k/m68k/support.s>


# 1.11 13-Mar-1997 gwr

Sync with sun3 (Trap 1,2,15 handlers)


# 1.10 05-Mar-1997 gwr

Add ptest_addr


# 1.9 20-Feb-1997 jeremy

Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.


# 1.8 12-Feb-1997 gwr

Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.


# 1.7 11-Feb-1997 gwr

Add a few more coments. (i.e. why init a6=0)


# 1.6 11-Feb-1997 gwr

Sync with sun3.


# 1.5 02-Feb-1997 thorpej

branches: 1.5.2;
Remove an un-true comment.


# 1.4 23-Jan-1997 gwr

Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap


# 1.3 17-Jan-1997 gwr

Fix a comment (PCB_MMUCTX is a virtual address).


# 1.2 17-Jan-1997 gwr

Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.


# 1.1 14-Jan-1997 gwr

branches: 1.1.1;
Initial revision


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.66 19-Dec-2018 maxv

Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.


Revision tags: pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE 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 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 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.65 24-Mar-2014 christos

branches: 1.65.28;
avoid dup defs, use global macros


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.64 22-Dec-2011 tsutsui

branches: 1.64.6; 1.64.10;
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base
# 1.63 15-Nov-2011 tsutsui

branches: 1.63.4;
Move spread getsfc() and getdfc() functions into common m68k/support.s.

Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base rmind-uvmplock-base jym-xensuspend-nbase jym-xensuspend-base
# 1.62 08-Feb-2011 rmind

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

Extra verification by snj@.


Revision tags: jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3
# 1.61 15-Oct-2010 tsutsui

branches: 1.61.2; 1.61.4;
Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?


Revision tags: yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.60 25-Feb-2010 skrll

branches: 1.60.2;
s/cpu_fork/cpu_lwp_fork/ in comment


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.59 10-Dec-2009 rmind

branches: 1.59.2;
Rename L_ADDR to L_PCB and amend some comments accordingly.


# 1.58 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base 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 mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.57 17-Oct-2007 garbled

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

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

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

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


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base ppcoea-renovation-base vmlocking-base
# 1.56 20-Jul-2007 tsutsui

branches: 1.56.6;
Sync with sun3/locore.s rev 1.88:
> Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
> was optimizing away modifications to the frame contents (it's not nice to
> trick gcc). Pass the pointer as the first argument to reduce the number
> of places that would be changed otherwise. Fixes the getcwd regression
> test on most m68k ports.
Fixes MMU fault panic in trap() on sun3x.

This should be pulled up to netbsd-4 too.


Revision tags: nick-csl-alignment-base mjf-ufs-trans-base
# 1.55 18-May-2007 tsutsui

branches: 1.55.2; 1.55.4;
Adapt sun68k ports to yamt-idlelwp.
Tested on TME (sun2 and sun3) and 3/80 (sun3x).


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base 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.54 11-Dec-2005 christos

branches: 1.54.24; 1.54.30; 1.54.32; 1.54.38; 1.54.40;
merge ktrace-lwp.


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 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base ktrace-lwp-base
# 1.53 05-Mar-2004 he

branches: 1.53.16;
Remove the local proc_trampoline definition from this file as well.


# 1.52 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.51 18-Jan-2003 thorpej

branches: 1.51.2;
Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base
# 1.50 02-Nov-2002 chs

finish conversion to the common m68k cacheops:
add support for machine-specific flavors of the ops for off-chip caches.
many thanks to Izumi Tsutsui for his help with this.


Revision tags: kqueue-aftermerge kqueue-beforemerge
# 1.49 20-Oct-2002 chs

merge the 12 copies of vm_machdep.c on the m68k platforms.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.


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 gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base kqueue-base
# 1.48 22-Jul-2001 scw

branches: 1.48.6;
ptest_addr() is prototyped (in pmap.c) to return a u_long not a pointer.
Therefore the return value should be in %d0, not %a0.


# 1.47 30-May-2001 lukem

branches: 1.47.2;
add missing #include "opt_kgdb.h"


# 1.46 12-May-2001 kleink

Update to reflect that unlike in m68k a.out environments, where the .align
directive is given a log2 argument, .align is given a linear argument in
m68k ELF environments.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.45 22-Feb-2001 chs

branches: 1.45.2;
switch sun3 to ELF. highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.


# 1.44 26-Nov-2000 jdolecek

split m68k SunOS and SVR4-specific sigcode.s code to sunos_sigcode.s
and svr4_sigcode.s respectively
adjust individual m68k port's locore.s to include new sigcode files if
appropriate


# 1.43 03-Nov-2000 tsutsui

Fix typo in the previous revision. (s/LIdle/Lidle/)


# 1.42 20-Aug-2000 thorpej

Add a lock around the scheduler, and use it as necessary, including
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler
lock is held upon entry to mi_switch() and cpu_switch(), and
cpu_switch() releases the lock before returning.

Largely from Bill Sommerfeld, with some minor bug fixes and
machine-dependent code hacking from me.


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.41 31-May-2000 thorpej

Add a comment on single-processor systems about p_cpu being initialized
by fork1().


# 1.40 31-May-2000 nathanw

Update for qs -> sched_qs change.
Kernel compiles again.


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

branches: 1.39.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.38 26-May-2000 thorpej

Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.37 26-Oct-1999 itohy

Fix the problem that single-step tracing of a trap instruction
drops the system into kernel debugger.


Revision tags: chs-ubc2-base
# 1.36 01-Aug-1999 thorpej

branches: 1.36.2; 1.36.4; 1.36.6;
Make sure the branch target of the delay loop is aligned to a cache
half-line (8-byte) boundary. Inspired by a discussion w/ Scott Reynolds.


# 1.35 30-Apr-1999 christos

Include opt_compat_sunos.h


# 1.34 19-Apr-1999 kleink

Add COMPAT_SVR4 for m68k.


Revision tags: netbsd-1-4-base
# 1.33 24-Mar-1999 mrg

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


# 1.32 26-Feb-1999 is

sun3 part of fix for PR 6152


Revision tags: kenh-if-detach-base
# 1.31 11-Nov-1998 thorpej

Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.


Revision tags: chs-ubc-base
# 1.30 30-Sep-1998 thorpej

Garbage collect trap #1 and trap #2 handlers; they're moved to
trap_subr.s


# 1.29 30-Sep-1998 thorpej

Pull in opt_compat_netbsd.h


# 1.28 09-Sep-1998 thorpej

Adjust for the new "reaper" kernel thread: do not free the vmspace and
u-area in machine-dependent code. Instead, call exit2() to schedule
the reaper to free them for us, once it is safe to do so (i.e. we are
no longer running on the dead proc's vmspace and stack).


Revision tags: eeh-paddr_t-base
# 1.27 09-Jun-1998 gwr

First cut at UVM support. Compiles, but not tested yet.


# 1.26 05-Feb-1998 gwr

Merge arch/sun3x into arch/sun3


Revision tags: gwr-3x3-base
# 1.25 22-Jan-1998 gwr

branches: 1.25.4;
Separate pmap_activate() from _pmap_switch(), so the latter can remain
equivalent to what locore.s:cpu_switch does with in-line assembly when
PMAP_DEBUG is not defined. Also do splimp/splx in pmap_activate.


# 1.24 22-Jan-1998 gwr

Use MONEND instead of DVMA_SPACE_START in the "DDB convenience" symbols.


# 1.23 02-Jan-1998 thorpej

Make pmap_activate() take a proc *.


# 1.22 16-Oct-1997 gwr

MONSTART/monstart symbol


# 1.21 29-May-1997 gwr

Add non-inline version of _splraise.


# 1.20 13-May-1997 gwr

Eliminate references to vmspace.vm_pmap
(also fix some comments).


# 1.19 02-May-1997 jeremy

Wrap all label references with new macros in m68k/asm.h in preperation
for ELF switchover. (eventually)


# 1.18 25-Apr-1997 gwr

Rename "Idle" to "_Idle" so clock.c can reference it.


# 1.17 25-Apr-1997 thorpej

Adjust for <m68k/m68k/trap_subr.s>


# 1.16 13-Apr-1997 thorpej

Use common m68k sigcode.


# 1.15 09-Apr-1997 thorpej

Use <m68k/m68k/proc_subr.s>


# 1.14 31-Mar-1997 jeremy

In-tree GNU ``as'' does not know of 'pmove <reg>,tt0' instruction. Changed
instances of this instruction to hardcoded opcode statements. Thanks to
jthorpe for pointing this out.


# 1.13 17-Mar-1997 gwr

s/fpu_type/fputype/g


# 1.12 16-Mar-1997 thorpej

Use <m68k/m68k/support.s>


# 1.11 13-Mar-1997 gwr

Sync with sun3 (Trap 1,2,15 handlers)


# 1.10 05-Mar-1997 gwr

Add ptest_addr


# 1.9 20-Feb-1997 jeremy

Added the '@' symbols that GAS needs for address register indirect addressing
statements that are used when PMAP_DEBUG is undefined.


# 1.8 12-Feb-1997 gwr

Reinstate call to pmap_activate() for now, because it is helpful
for debugging the pmap code. The in-line version of the same is
still here and will be used if PMAP_DEBUG is not defined.


# 1.7 11-Feb-1997 gwr

Add a few more coments. (i.e. why init a6=0)


# 1.6 11-Feb-1997 gwr

Sync with sun3.


# 1.5 02-Feb-1997 thorpej

branches: 1.5.2;
Remove an un-true comment.


# 1.4 23-Jan-1997 gwr

Load the root pointer using VM_PMAP_MMUCRP
Also rename nodb_trap to _nodb_trap


# 1.3 17-Jan-1997 gwr

Fix a comment (PCB_MMUCTX is a virtual address).


# 1.2 17-Jan-1997 gwr

Adapt to rename of pcb_mmuctx to pcb_mmucrp, and corrected
prototype of loadcrp(), which kills some bogus type casts.


# 1.1 14-Jan-1997 gwr

branches: 1.1.1;
Initial revision