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

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

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


Revision tags: netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
# 1.123 23-May-2022 andvar

s/boundries/boundaries/, s/itterate/iterate/ and few more typos.


Revision tags: netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
# 1.122 06-Feb-2019 mrg

compare pointers with NULL not nul.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.121 20-Jan-2018 skrll

branches: 1.121.4;
Switch cobalt to common bus_space.

Tested on raq 2


Revision tags: tls-maxphys-base-20171202
# 1.120 06-Nov-2017 christos

Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

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

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806
# 1.118 27-Jul-2016 skrll

Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc


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

branches: 1.117.2;
use cpu_startup_common


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.116 03-Apr-2014 joerg

branches: 1.116.6;
GC nsym


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
# 1.115 24-Mar-2014 christos

use cpu_{g,s}etmodel


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

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


# 1.113 28-Jul-2012 matt

Remove declartions of physmem


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.112 09-Jul-2011 matt

branches: 1.112.2;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase bouyer-quota2-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.111 20-Feb-2011 tsutsui

Remove leftover debug stuff.


# 1.110 20-Feb-2011 matt

Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).


Revision tags: uebayasi-xip-base7 bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 08-Feb-2010 joerg

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

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


Revision tags: uebayasi-xip-base
# 1.108 18-Dec-2009 matt

branches: 1.108.2;
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.


# 1.107 17-Dec-2009 matt

Enable mips64 support for cobalt.


# 1.106 16-Dec-2009 matt

Make cobalt build again.


# 1.105 14-Dec-2009 matt

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


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

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


# 1.103 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


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

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


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

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


# 1.100 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

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

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

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

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


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

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


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.97 26-May-2008 tsutsui

branches: 1.97.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2
# 1.96 14-May-2008 tsutsui

Normalize my licenses.


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14
# 1.95 22-Mar-2008 tsutsui

branches: 1.95.2; 1.95.4; 1.95.6;
Use C99 initializer.


# 1.94 22-Mar-2008 tsutsui

Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.93 18-Mar-2008 tsutsui

Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.

Should fix "long download, network frozen" problems reported on
port-cobalt by several people.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base hpcarm-cleanup-base
# 1.92 09-Jan-2008 wiz

branches: 1.92.2; 1.92.6;
Fix typo in macro name and comments.


Revision tags: vmlocking2-base3 matt-armv6-base
# 1.91 22-Dec-2007 tsutsui

In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.

Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.90 03-Dec-2007 ad

branches: 1.90.2; 1.90.6;
Interrupt handling changes, in discussion since February:

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


Revision tags: jmcneill-base bouyer-xenamd64-base2 bouyer-xenamd64-base
# 1.89 27-Oct-2007 tsutsui

branches: 1.89.2;
Assume netboot if "nfsroot=/path" is specified in bootstring.


Revision tags: yamt-x86pmap-base4
# 1.88 17-Oct-2007 garbled

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 ppcoea-renovation-base vmlocking-base
# 1.87 10-Aug-2007 tsutsui

branches: 1.87.2; 1.87.6;
More style nits.


# 1.86 10-Aug-2007 tsutsui

Some style nits.


# 1.85 10-Aug-2007 tsutsui

Lookup boothowto flags in bootinfo.


Revision tags: nick-csl-alignment-base matt-mips64-base mjf-ufs-trans-base
# 1.84 03-Jul-2007 tsutsui

branches: 1.84.4; 1.84.8;
Don't clear BSS even if ksyms(4) is not configured.


# 1.83 27-May-2007 tsutsui

- Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.


# 1.82 17-May-2007 yamt

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

from doc/BRANCHES:

idle lwp, and some changes depending on it.

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


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.81 17-Mar-2007 tsutsui

branches: 1.81.4;
Use char * where pointer arithmetics are required.


# 1.80 05-Mar-2007 dogcow

branches: 1.80.2; 1.80.4; 1.80.6;
semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.79 04-Mar-2007 christos

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


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

TRUE -> true, FALSE -> false


# 1.77 16-Feb-2007 tsutsui

branches: 1.77.2;
Remove hacks for now removed spllowersoftclock(9).


Revision tags: post-newlock2-merge newlock2-nbase newlock2-base
# 1.76 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

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


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base netbsd-4-base
# 1.75 16-Sep-2006 tsutsui

branches: 1.75.2; 1.75.4; 1.75.6;
Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.


Revision tags: yamt-pdpolicy-base9
# 1.74 10-Sep-2006 tsutsui

Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.


# 1.73 10-Sep-2006 tsutsui

Remove or comment out now unused code after MI mips3_clockintr migration.


Revision tags: rpaulo-netinet-merge-pcb-base
# 1.72 07-Sep-2006 gdamore

branches: 1.72.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7
# 1.71 18-Jul-2006 tsutsui

- always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.


Revision tags: yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base chap-midi-base
# 1.70 10-Jun-2006 tsutsui

space nits.


Revision tags: simonb-timecounters-base
# 1.69 31-May-2006 tsutsui

Remove unneeded #include headers.


# 1.68 31-May-2006 tsutsui

Use __predict_true() and __predict_false() in some critical handlers.


# 1.67 31-May-2006 tsutsui

Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>


Revision tags: yamt-pdpolicy-base5 elad-kernelauth-base
# 1.66 21-Apr-2006 tsutsui

branches: 1.66.2;
Fix an include path.


# 1.65 21-Apr-2006 tsutsui

Account interrupts by evcnt(9).


# 1.64 21-Apr-2006 tsutsui

Handle interrupts in priority order.


# 1.63 21-Apr-2006 tsutsui

Make a local variable static.


# 1.62 21-Apr-2006 tsutsui

- initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips


# 1.61 21-Apr-2006 tsutsui

- add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics


# 1.60 15-Apr-2006 tsutsui

Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.


Revision tags: yamt-pdpolicy-base4
# 1.59 09-Apr-2006 tsutsui

Replace some magic numbers with macro.


# 1.58 09-Apr-2006 tsutsui

Remove declaration for cpu_model[] since it's in <sys/systm.h>.


# 1.57 05-Apr-2006 tsutsui

- ANSIfy
- KNF
- u_intXX_t -> uintXX_t


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.56 24-Dec-2005 perry

branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10; 1.56.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.55 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.54 04-Jun-2005 tsutsui

branches: 1.54.2;
Add const and fix for -Wshadow.


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

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


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.52 28-Aug-2004 tsutsui

branches: 1.52.4;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.


# 1.51 02-Apr-2004 tsutsui

Tidy up messages for total/avail memory.

before:
---
NetBSD 2.0B (COLT) #67: Sat Apr 3 06:29:50 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
256 MB memory, 247 MB freemainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
after:
---
NetBSD 2.0B (COLT) #68: Sat Apr 3 07:54:17 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
total memory = 256 MB
avail memory = 247 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---


Revision tags: netbsd-2-0-base
# 1.50 07-Jan-2004 cdi

branches: 1.50.2;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.


# 1.49 30-Dec-2003 pk

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

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

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


# 1.48 26-Sep-2003 simonb

Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.


# 1.47 12-Sep-2003 tsutsui

Use common mips generic software interrupt routines.


# 1.46 12-Sep-2003 tsutsui

Remove a redundant function declaration.


# 1.45 12-Sep-2003 tsutsui

TAB/space cleanup.


# 1.44 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.43 26-Apr-2003 ragge

branches: 1.43.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.42 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.41 17-Jan-2003 thorpej

Merge the nathanw_sa branch.


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

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


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

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


# 1.38 09-Aug-2002 gmcgarry

Garbage-collect cpu_sysctl(). From Shin'ichiro TAYA in PR-17888.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.37 13-Jan-2002 augustss

branches: 1.37.8;
Implement pci_intr_disestablish().


# 1.36 23-Nov-2001 soren

Make sure to hook into DDB/KGDB if so requested.


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

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

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

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.34 22-Jul-2001 wiz

branches: 1.34.2;
bzero -> memset


# 1.33 17-Jun-2001 cyber

branches: 1.33.2;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.


# 1.32 02-Jun-2001 chs

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


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

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


# 1.30 24-Apr-2001 thorpej

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

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


# 1.29 23-Apr-2001 thorpej

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


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

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


# 1.27 15-Mar-2001 chs

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

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


# 1.26 05-Feb-2001 tsutsui

branches: 1.26.2;
db_machine_init() is no longer needed.
From Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12123.


# 1.25 15-Jan-2001 thorpej

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


# 1.24 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.23 05-Oct-2000 cgd

branches: 1.23.2;
clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.


# 1.22 24-Sep-2000 jdolecek

add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.


# 1.21 13-Sep-2000 thorpej

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


# 1.20 14-Jul-2000 jeffs

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


# 1.19 27-Jun-2000 soren

Don't include <vm/vm.h>.


# 1.18 26-Jun-2000 mrg

remove/move more mach vm header files:

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

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


Revision tags: netbsd-1-5-base
# 1.17 14-Jun-2000 soren

branches: 1.17.2;
Reenable hard interrupts before processing soft interrupts.


Revision tags: minoura-xpg4dl-base
# 1.16 27-May-2000 soren

branches: 1.16.2;
Remove stacktrace() prototype.


# 1.15 26-May-2000 thorpej

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.14 29-Apr-2000 soren

ECOFF hook is in arch/mips.


# 1.13 28-Apr-2000 soren

Add microtime().


# 1.12 28-Apr-2000 soren

Adapt to cpu_intr() change.


# 1.11 12-Apr-2000 nisimura

Backout the previous change; safepri is an evil idea after all.


# 1.10 12-Apr-2000 nisimura

MIPS1_PSL_LOWIPL -> PSL_LOWPSL. No functional change is expected.


# 1.9 09-Apr-2000 soren

Be a little more careful parsing boot parameters.


# 1.8 31-Mar-2000 soren

Typo.


# 1.7 31-Mar-2000 soren

Some cleanups.


# 1.6 27-Mar-2000 nisimura

- Nuke unnecessary cast.
- Change comments on cpu_startup() so as what it does (XXX found mostly
common across ports).
- Retain UNIX heritage of /* Good {morning,afternoon,evening,night} */.


# 1.5 27-Mar-2000 nisimura

Remove unnecessary bzero() op for proc0's USPACE as pmap_steal_memory()
returns a nullified area.


# 1.4 25-Mar-2000 nisimura

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

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

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


# 1.3 21-Mar-2000 soren

Blocking soft interrupts can be useful..


# 1.2 21-Mar-2000 soren

Extend the evil interrupt kludge to the second ethernet.


# 1.1 19-Mar-2000 soren

NetBSD/cobalt. Work-in-progress.


# 1.123 23-May-2022 andvar

s/boundries/boundaries/, s/itterate/iterate/ and few more typos.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
# 1.122 06-Feb-2019 mrg

compare pointers with NULL not nul.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.121 20-Jan-2018 skrll

branches: 1.121.4;
Switch cobalt to common bus_space.

Tested on raq 2


Revision tags: tls-maxphys-base-20171202
# 1.120 06-Nov-2017 christos

Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

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

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806
# 1.118 27-Jul-2016 skrll

Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc


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

branches: 1.117.2;
use cpu_startup_common


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.116 03-Apr-2014 joerg

branches: 1.116.6;
GC nsym


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
# 1.115 24-Mar-2014 christos

use cpu_{g,s}etmodel


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

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


# 1.113 28-Jul-2012 matt

Remove declartions of physmem


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.112 09-Jul-2011 matt

branches: 1.112.2;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase bouyer-quota2-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.111 20-Feb-2011 tsutsui

Remove leftover debug stuff.


# 1.110 20-Feb-2011 matt

Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).


Revision tags: uebayasi-xip-base7 bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 08-Feb-2010 joerg

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

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


Revision tags: uebayasi-xip-base
# 1.108 18-Dec-2009 matt

branches: 1.108.2;
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.


# 1.107 17-Dec-2009 matt

Enable mips64 support for cobalt.


# 1.106 16-Dec-2009 matt

Make cobalt build again.


# 1.105 14-Dec-2009 matt

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


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

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


# 1.103 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


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

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


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

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


# 1.100 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

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

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

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

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


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

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


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.97 26-May-2008 tsutsui

branches: 1.97.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2
# 1.96 14-May-2008 tsutsui

Normalize my licenses.


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14
# 1.95 22-Mar-2008 tsutsui

branches: 1.95.2; 1.95.4; 1.95.6;
Use C99 initializer.


# 1.94 22-Mar-2008 tsutsui

Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.93 18-Mar-2008 tsutsui

Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.

Should fix "long download, network frozen" problems reported on
port-cobalt by several people.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base hpcarm-cleanup-base
# 1.92 09-Jan-2008 wiz

branches: 1.92.2; 1.92.6;
Fix typo in macro name and comments.


Revision tags: vmlocking2-base3 matt-armv6-base
# 1.91 22-Dec-2007 tsutsui

In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.

Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.90 03-Dec-2007 ad

branches: 1.90.2; 1.90.6;
Interrupt handling changes, in discussion since February:

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


Revision tags: jmcneill-base bouyer-xenamd64-base2 bouyer-xenamd64-base
# 1.89 27-Oct-2007 tsutsui

branches: 1.89.2;
Assume netboot if "nfsroot=/path" is specified in bootstring.


Revision tags: yamt-x86pmap-base4
# 1.88 17-Oct-2007 garbled

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 ppcoea-renovation-base vmlocking-base
# 1.87 10-Aug-2007 tsutsui

branches: 1.87.2; 1.87.6;
More style nits.


# 1.86 10-Aug-2007 tsutsui

Some style nits.


# 1.85 10-Aug-2007 tsutsui

Lookup boothowto flags in bootinfo.


Revision tags: nick-csl-alignment-base matt-mips64-base mjf-ufs-trans-base
# 1.84 03-Jul-2007 tsutsui

branches: 1.84.4; 1.84.8;
Don't clear BSS even if ksyms(4) is not configured.


# 1.83 27-May-2007 tsutsui

- Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.


# 1.82 17-May-2007 yamt

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

from doc/BRANCHES:

idle lwp, and some changes depending on it.

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


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.81 17-Mar-2007 tsutsui

branches: 1.81.4;
Use char * where pointer arithmetics are required.


# 1.80 05-Mar-2007 dogcow

branches: 1.80.2; 1.80.4; 1.80.6;
semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.79 04-Mar-2007 christos

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


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

TRUE -> true, FALSE -> false


# 1.77 16-Feb-2007 tsutsui

branches: 1.77.2;
Remove hacks for now removed spllowersoftclock(9).


Revision tags: post-newlock2-merge newlock2-nbase newlock2-base
# 1.76 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

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


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base netbsd-4-base
# 1.75 16-Sep-2006 tsutsui

branches: 1.75.2; 1.75.4; 1.75.6;
Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.


Revision tags: yamt-pdpolicy-base9
# 1.74 10-Sep-2006 tsutsui

Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.


# 1.73 10-Sep-2006 tsutsui

Remove or comment out now unused code after MI mips3_clockintr migration.


Revision tags: rpaulo-netinet-merge-pcb-base
# 1.72 07-Sep-2006 gdamore

branches: 1.72.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7
# 1.71 18-Jul-2006 tsutsui

- always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.


Revision tags: yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base chap-midi-base
# 1.70 10-Jun-2006 tsutsui

space nits.


Revision tags: simonb-timecounters-base
# 1.69 31-May-2006 tsutsui

Remove unneeded #include headers.


# 1.68 31-May-2006 tsutsui

Use __predict_true() and __predict_false() in some critical handlers.


# 1.67 31-May-2006 tsutsui

Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>


Revision tags: yamt-pdpolicy-base5 elad-kernelauth-base
# 1.66 21-Apr-2006 tsutsui

branches: 1.66.2;
Fix an include path.


# 1.65 21-Apr-2006 tsutsui

Account interrupts by evcnt(9).


# 1.64 21-Apr-2006 tsutsui

Handle interrupts in priority order.


# 1.63 21-Apr-2006 tsutsui

Make a local variable static.


# 1.62 21-Apr-2006 tsutsui

- initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips


# 1.61 21-Apr-2006 tsutsui

- add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics


# 1.60 15-Apr-2006 tsutsui

Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.


Revision tags: yamt-pdpolicy-base4
# 1.59 09-Apr-2006 tsutsui

Replace some magic numbers with macro.


# 1.58 09-Apr-2006 tsutsui

Remove declaration for cpu_model[] since it's in <sys/systm.h>.


# 1.57 05-Apr-2006 tsutsui

- ANSIfy
- KNF
- u_intXX_t -> uintXX_t


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.56 24-Dec-2005 perry

branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10; 1.56.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.55 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.54 04-Jun-2005 tsutsui

branches: 1.54.2;
Add const and fix for -Wshadow.


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

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


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.52 28-Aug-2004 tsutsui

branches: 1.52.4;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.


# 1.51 02-Apr-2004 tsutsui

Tidy up messages for total/avail memory.

before:
---
NetBSD 2.0B (COLT) #67: Sat Apr 3 06:29:50 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
256 MB memory, 247 MB freemainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
after:
---
NetBSD 2.0B (COLT) #68: Sat Apr 3 07:54:17 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
total memory = 256 MB
avail memory = 247 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---


Revision tags: netbsd-2-0-base
# 1.50 07-Jan-2004 cdi

branches: 1.50.2;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.


# 1.49 30-Dec-2003 pk

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

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

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


# 1.48 26-Sep-2003 simonb

Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.


# 1.47 12-Sep-2003 tsutsui

Use common mips generic software interrupt routines.


# 1.46 12-Sep-2003 tsutsui

Remove a redundant function declaration.


# 1.45 12-Sep-2003 tsutsui

TAB/space cleanup.


# 1.44 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.43 26-Apr-2003 ragge

branches: 1.43.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.42 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.41 17-Jan-2003 thorpej

Merge the nathanw_sa branch.


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

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


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

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


# 1.38 09-Aug-2002 gmcgarry

Garbage-collect cpu_sysctl(). From Shin'ichiro TAYA in PR-17888.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.37 13-Jan-2002 augustss

branches: 1.37.8;
Implement pci_intr_disestablish().


# 1.36 23-Nov-2001 soren

Make sure to hook into DDB/KGDB if so requested.


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

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

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

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.34 22-Jul-2001 wiz

branches: 1.34.2;
bzero -> memset


# 1.33 17-Jun-2001 cyber

branches: 1.33.2;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.


# 1.32 02-Jun-2001 chs

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


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

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


# 1.30 24-Apr-2001 thorpej

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

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


# 1.29 23-Apr-2001 thorpej

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


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

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


# 1.27 15-Mar-2001 chs

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

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


# 1.26 05-Feb-2001 tsutsui

branches: 1.26.2;
db_machine_init() is no longer needed.
From Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12123.


# 1.25 15-Jan-2001 thorpej

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


# 1.24 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.23 05-Oct-2000 cgd

branches: 1.23.2;
clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.


# 1.22 24-Sep-2000 jdolecek

add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.


# 1.21 13-Sep-2000 thorpej

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


# 1.20 14-Jul-2000 jeffs

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


# 1.19 27-Jun-2000 soren

Don't include <vm/vm.h>.


# 1.18 26-Jun-2000 mrg

remove/move more mach vm header files:

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

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


Revision tags: netbsd-1-5-base
# 1.17 14-Jun-2000 soren

branches: 1.17.2;
Reenable hard interrupts before processing soft interrupts.


Revision tags: minoura-xpg4dl-base
# 1.16 27-May-2000 soren

branches: 1.16.2;
Remove stacktrace() prototype.


# 1.15 26-May-2000 thorpej

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.14 29-Apr-2000 soren

ECOFF hook is in arch/mips.


# 1.13 28-Apr-2000 soren

Add microtime().


# 1.12 28-Apr-2000 soren

Adapt to cpu_intr() change.


# 1.11 12-Apr-2000 nisimura

Backout the previous change; safepri is an evil idea after all.


# 1.10 12-Apr-2000 nisimura

MIPS1_PSL_LOWIPL -> PSL_LOWPSL. No functional change is expected.


# 1.9 09-Apr-2000 soren

Be a little more careful parsing boot parameters.


# 1.8 31-Mar-2000 soren

Typo.


# 1.7 31-Mar-2000 soren

Some cleanups.


# 1.6 27-Mar-2000 nisimura

- Nuke unnecessary cast.
- Change comments on cpu_startup() so as what it does (XXX found mostly
common across ports).
- Retain UNIX heritage of /* Good {morning,afternoon,evening,night} */.


# 1.5 27-Mar-2000 nisimura

Remove unnecessary bzero() op for proc0's USPACE as pmap_steal_memory()
returns a nullified area.


# 1.4 25-Mar-2000 nisimura

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

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

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


# 1.3 21-Mar-2000 soren

Blocking soft interrupts can be useful..


# 1.2 21-Mar-2000 soren

Extend the evil interrupt kludge to the second ethernet.


# 1.1 19-Mar-2000 soren

NetBSD/cobalt. Work-in-progress.


Revision tags: isaki-audio2-base
# 1.122 06-Feb-2019 mrg

compare pointers with NULL not nul.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.121 20-Jan-2018 skrll

Switch cobalt to common bus_space.

Tested on raq 2


Revision tags: tls-maxphys-base-20171202
# 1.120 06-Nov-2017 christos

Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.


Revision tags: netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

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

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806
# 1.118 27-Jul-2016 skrll

Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc


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

branches: 1.117.2;
use cpu_startup_common


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.116 03-Apr-2014 joerg

branches: 1.116.6;
GC nsym


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
# 1.115 24-Mar-2014 christos

use cpu_{g,s}etmodel


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

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


# 1.113 28-Jul-2012 matt

Remove declartions of physmem


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.112 09-Jul-2011 matt

branches: 1.112.2;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase bouyer-quota2-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.111 20-Feb-2011 tsutsui

Remove leftover debug stuff.


# 1.110 20-Feb-2011 matt

Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).


Revision tags: uebayasi-xip-base7 bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 08-Feb-2010 joerg

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

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


Revision tags: uebayasi-xip-base
# 1.108 18-Dec-2009 matt

branches: 1.108.2;
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.


# 1.107 17-Dec-2009 matt

Enable mips64 support for cobalt.


# 1.106 16-Dec-2009 matt

Make cobalt build again.


# 1.105 14-Dec-2009 matt

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


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

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


# 1.103 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


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

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


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

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


# 1.100 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

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

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

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

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


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

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


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.97 26-May-2008 tsutsui

branches: 1.97.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2
# 1.96 14-May-2008 tsutsui

Normalize my licenses.


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14
# 1.95 22-Mar-2008 tsutsui

branches: 1.95.2; 1.95.4; 1.95.6;
Use C99 initializer.


# 1.94 22-Mar-2008 tsutsui

Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.93 18-Mar-2008 tsutsui

Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.

Should fix "long download, network frozen" problems reported on
port-cobalt by several people.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base hpcarm-cleanup-base
# 1.92 09-Jan-2008 wiz

branches: 1.92.2; 1.92.6;
Fix typo in macro name and comments.


Revision tags: vmlocking2-base3 matt-armv6-base
# 1.91 22-Dec-2007 tsutsui

In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.

Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.90 03-Dec-2007 ad

branches: 1.90.2; 1.90.6;
Interrupt handling changes, in discussion since February:

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


Revision tags: jmcneill-base bouyer-xenamd64-base2 bouyer-xenamd64-base
# 1.89 27-Oct-2007 tsutsui

branches: 1.89.2;
Assume netboot if "nfsroot=/path" is specified in bootstring.


Revision tags: yamt-x86pmap-base4
# 1.88 17-Oct-2007 garbled

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 ppcoea-renovation-base vmlocking-base
# 1.87 10-Aug-2007 tsutsui

branches: 1.87.2; 1.87.6;
More style nits.


# 1.86 10-Aug-2007 tsutsui

Some style nits.


# 1.85 10-Aug-2007 tsutsui

Lookup boothowto flags in bootinfo.


Revision tags: nick-csl-alignment-base matt-mips64-base mjf-ufs-trans-base
# 1.84 03-Jul-2007 tsutsui

branches: 1.84.4; 1.84.8;
Don't clear BSS even if ksyms(4) is not configured.


# 1.83 27-May-2007 tsutsui

- Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.


# 1.82 17-May-2007 yamt

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

from doc/BRANCHES:

idle lwp, and some changes depending on it.

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


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.81 17-Mar-2007 tsutsui

branches: 1.81.4;
Use char * where pointer arithmetics are required.


# 1.80 05-Mar-2007 dogcow

branches: 1.80.2; 1.80.4; 1.80.6;
semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.79 04-Mar-2007 christos

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


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

TRUE -> true, FALSE -> false


# 1.77 16-Feb-2007 tsutsui

branches: 1.77.2;
Remove hacks for now removed spllowersoftclock(9).


Revision tags: post-newlock2-merge newlock2-nbase newlock2-base
# 1.76 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

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


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base netbsd-4-base
# 1.75 16-Sep-2006 tsutsui

branches: 1.75.2; 1.75.4; 1.75.6;
Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.


Revision tags: yamt-pdpolicy-base9
# 1.74 10-Sep-2006 tsutsui

Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.


# 1.73 10-Sep-2006 tsutsui

Remove or comment out now unused code after MI mips3_clockintr migration.


Revision tags: rpaulo-netinet-merge-pcb-base
# 1.72 07-Sep-2006 gdamore

branches: 1.72.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7
# 1.71 18-Jul-2006 tsutsui

- always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.


Revision tags: yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base chap-midi-base
# 1.70 10-Jun-2006 tsutsui

space nits.


Revision tags: simonb-timecounters-base
# 1.69 31-May-2006 tsutsui

Remove unneeded #include headers.


# 1.68 31-May-2006 tsutsui

Use __predict_true() and __predict_false() in some critical handlers.


# 1.67 31-May-2006 tsutsui

Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>


Revision tags: yamt-pdpolicy-base5 elad-kernelauth-base
# 1.66 21-Apr-2006 tsutsui

branches: 1.66.2;
Fix an include path.


# 1.65 21-Apr-2006 tsutsui

Account interrupts by evcnt(9).


# 1.64 21-Apr-2006 tsutsui

Handle interrupts in priority order.


# 1.63 21-Apr-2006 tsutsui

Make a local variable static.


# 1.62 21-Apr-2006 tsutsui

- initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips


# 1.61 21-Apr-2006 tsutsui

- add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics


# 1.60 15-Apr-2006 tsutsui

Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.


Revision tags: yamt-pdpolicy-base4
# 1.59 09-Apr-2006 tsutsui

Replace some magic numbers with macro.


# 1.58 09-Apr-2006 tsutsui

Remove declaration for cpu_model[] since it's in <sys/systm.h>.


# 1.57 05-Apr-2006 tsutsui

- ANSIfy
- KNF
- u_intXX_t -> uintXX_t


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.56 24-Dec-2005 perry

branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10; 1.56.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.55 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.54 04-Jun-2005 tsutsui

branches: 1.54.2;
Add const and fix for -Wshadow.


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

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


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.52 28-Aug-2004 tsutsui

branches: 1.52.4;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.


# 1.51 02-Apr-2004 tsutsui

Tidy up messages for total/avail memory.

before:
---
NetBSD 2.0B (COLT) #67: Sat Apr 3 06:29:50 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
256 MB memory, 247 MB freemainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
after:
---
NetBSD 2.0B (COLT) #68: Sat Apr 3 07:54:17 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
total memory = 256 MB
avail memory = 247 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---


Revision tags: netbsd-2-0-base
# 1.50 07-Jan-2004 cdi

branches: 1.50.2;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.


# 1.49 30-Dec-2003 pk

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

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

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


# 1.48 26-Sep-2003 simonb

Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.


# 1.47 12-Sep-2003 tsutsui

Use common mips generic software interrupt routines.


# 1.46 12-Sep-2003 tsutsui

Remove a redundant function declaration.


# 1.45 12-Sep-2003 tsutsui

TAB/space cleanup.


# 1.44 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.43 26-Apr-2003 ragge

branches: 1.43.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.42 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.41 17-Jan-2003 thorpej

Merge the nathanw_sa branch.


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

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


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

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


# 1.38 09-Aug-2002 gmcgarry

Garbage-collect cpu_sysctl(). From Shin'ichiro TAYA in PR-17888.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.37 13-Jan-2002 augustss

branches: 1.37.8;
Implement pci_intr_disestablish().


# 1.36 23-Nov-2001 soren

Make sure to hook into DDB/KGDB if so requested.


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

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

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

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.34 22-Jul-2001 wiz

branches: 1.34.2;
bzero -> memset


# 1.33 17-Jun-2001 cyber

branches: 1.33.2;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.


# 1.32 02-Jun-2001 chs

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


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

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


# 1.30 24-Apr-2001 thorpej

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

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


# 1.29 23-Apr-2001 thorpej

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


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

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


# 1.27 15-Mar-2001 chs

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

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


# 1.26 05-Feb-2001 tsutsui

branches: 1.26.2;
db_machine_init() is no longer needed.
From Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12123.


# 1.25 15-Jan-2001 thorpej

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


# 1.24 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.23 05-Oct-2000 cgd

branches: 1.23.2;
clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.


# 1.22 24-Sep-2000 jdolecek

add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.


# 1.21 13-Sep-2000 thorpej

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


# 1.20 14-Jul-2000 jeffs

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


# 1.19 27-Jun-2000 soren

Don't include <vm/vm.h>.


# 1.18 26-Jun-2000 mrg

remove/move more mach vm header files:

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

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


Revision tags: netbsd-1-5-base
# 1.17 14-Jun-2000 soren

branches: 1.17.2;
Reenable hard interrupts before processing soft interrupts.


Revision tags: minoura-xpg4dl-base
# 1.16 27-May-2000 soren

branches: 1.16.2;
Remove stacktrace() prototype.


# 1.15 26-May-2000 thorpej

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.14 29-Apr-2000 soren

ECOFF hook is in arch/mips.


# 1.13 28-Apr-2000 soren

Add microtime().


# 1.12 28-Apr-2000 soren

Adapt to cpu_intr() change.


# 1.11 12-Apr-2000 nisimura

Backout the previous change; safepri is an evil idea after all.


# 1.10 12-Apr-2000 nisimura

MIPS1_PSL_LOWIPL -> PSL_LOWPSL. No functional change is expected.


# 1.9 09-Apr-2000 soren

Be a little more careful parsing boot parameters.


# 1.8 31-Mar-2000 soren

Typo.


# 1.7 31-Mar-2000 soren

Some cleanups.


# 1.6 27-Mar-2000 nisimura

- Nuke unnecessary cast.
- Change comments on cpu_startup() so as what it does (XXX found mostly
common across ports).
- Retain UNIX heritage of /* Good {morning,afternoon,evening,night} */.


# 1.5 27-Mar-2000 nisimura

Remove unnecessary bzero() op for proc0's USPACE as pmap_steal_memory()
returns a nullified area.


# 1.4 25-Mar-2000 nisimura

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

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

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


# 1.3 21-Mar-2000 soren

Blocking soft interrupts can be useful..


# 1.2 21-Mar-2000 soren

Extend the evil interrupt kludge to the second ethernet.


# 1.1 19-Mar-2000 soren

NetBSD/cobalt. Work-in-progress.


# 1.121 20-Jan-2018 skrll

Switch cobalt to common bus_space.

Tested on raq 2


Revision tags: tls-maxphys-base-20171202
# 1.120 06-Nov-2017 christos

Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

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

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806
# 1.118 27-Jul-2016 skrll

Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc


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

branches: 1.117.2;
use cpu_startup_common


Revision tags: netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.116 03-Apr-2014 joerg

branches: 1.116.6;
GC nsym


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
# 1.115 24-Mar-2014 christos

use cpu_{g,s}etmodel


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

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


# 1.113 28-Jul-2012 matt

Remove declartions of physmem


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.112 09-Jul-2011 matt

branches: 1.112.2;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase bouyer-quota2-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.111 20-Feb-2011 tsutsui

Remove leftover debug stuff.


# 1.110 20-Feb-2011 matt

Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).


Revision tags: uebayasi-xip-base7 bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 08-Feb-2010 joerg

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

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


Revision tags: uebayasi-xip-base
# 1.108 18-Dec-2009 matt

branches: 1.108.2;
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.


# 1.107 17-Dec-2009 matt

Enable mips64 support for cobalt.


# 1.106 16-Dec-2009 matt

Make cobalt build again.


# 1.105 14-Dec-2009 matt

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


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

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


# 1.103 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


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

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


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

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


# 1.100 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

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

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

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

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


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

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


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.97 26-May-2008 tsutsui

branches: 1.97.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2
# 1.96 14-May-2008 tsutsui

Normalize my licenses.


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14
# 1.95 22-Mar-2008 tsutsui

branches: 1.95.2; 1.95.4; 1.95.6;
Use C99 initializer.


# 1.94 22-Mar-2008 tsutsui

Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.93 18-Mar-2008 tsutsui

Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.

Should fix "long download, network frozen" problems reported on
port-cobalt by several people.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base hpcarm-cleanup-base
# 1.92 09-Jan-2008 wiz

branches: 1.92.2; 1.92.6;
Fix typo in macro name and comments.


Revision tags: vmlocking2-base3 matt-armv6-base
# 1.91 22-Dec-2007 tsutsui

In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.

Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.90 03-Dec-2007 ad

branches: 1.90.2; 1.90.6;
Interrupt handling changes, in discussion since February:

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


Revision tags: jmcneill-base bouyer-xenamd64-base2 bouyer-xenamd64-base
# 1.89 27-Oct-2007 tsutsui

branches: 1.89.2;
Assume netboot if "nfsroot=/path" is specified in bootstring.


Revision tags: yamt-x86pmap-base4
# 1.88 17-Oct-2007 garbled

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 ppcoea-renovation-base vmlocking-base
# 1.87 10-Aug-2007 tsutsui

branches: 1.87.2; 1.87.6;
More style nits.


# 1.86 10-Aug-2007 tsutsui

Some style nits.


# 1.85 10-Aug-2007 tsutsui

Lookup boothowto flags in bootinfo.


Revision tags: nick-csl-alignment-base matt-mips64-base mjf-ufs-trans-base
# 1.84 03-Jul-2007 tsutsui

branches: 1.84.4; 1.84.8;
Don't clear BSS even if ksyms(4) is not configured.


# 1.83 27-May-2007 tsutsui

- Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.


# 1.82 17-May-2007 yamt

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

from doc/BRANCHES:

idle lwp, and some changes depending on it.

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


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.81 17-Mar-2007 tsutsui

branches: 1.81.4;
Use char * where pointer arithmetics are required.


# 1.80 05-Mar-2007 dogcow

branches: 1.80.2; 1.80.4; 1.80.6;
semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.79 04-Mar-2007 christos

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


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

TRUE -> true, FALSE -> false


# 1.77 16-Feb-2007 tsutsui

branches: 1.77.2;
Remove hacks for now removed spllowersoftclock(9).


Revision tags: post-newlock2-merge newlock2-nbase newlock2-base
# 1.76 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

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


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base netbsd-4-base
# 1.75 16-Sep-2006 tsutsui

branches: 1.75.2; 1.75.4; 1.75.6;
Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.


Revision tags: yamt-pdpolicy-base9
# 1.74 10-Sep-2006 tsutsui

Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.


# 1.73 10-Sep-2006 tsutsui

Remove or comment out now unused code after MI mips3_clockintr migration.


Revision tags: rpaulo-netinet-merge-pcb-base
# 1.72 07-Sep-2006 gdamore

branches: 1.72.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7
# 1.71 18-Jul-2006 tsutsui

- always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.


Revision tags: yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base chap-midi-base
# 1.70 10-Jun-2006 tsutsui

space nits.


Revision tags: simonb-timecounters-base
# 1.69 31-May-2006 tsutsui

Remove unneeded #include headers.


# 1.68 31-May-2006 tsutsui

Use __predict_true() and __predict_false() in some critical handlers.


# 1.67 31-May-2006 tsutsui

Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>


Revision tags: yamt-pdpolicy-base5 elad-kernelauth-base
# 1.66 21-Apr-2006 tsutsui

branches: 1.66.2;
Fix an include path.


# 1.65 21-Apr-2006 tsutsui

Account interrupts by evcnt(9).


# 1.64 21-Apr-2006 tsutsui

Handle interrupts in priority order.


# 1.63 21-Apr-2006 tsutsui

Make a local variable static.


# 1.62 21-Apr-2006 tsutsui

- initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips


# 1.61 21-Apr-2006 tsutsui

- add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics


# 1.60 15-Apr-2006 tsutsui

Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.


Revision tags: yamt-pdpolicy-base4
# 1.59 09-Apr-2006 tsutsui

Replace some magic numbers with macro.


# 1.58 09-Apr-2006 tsutsui

Remove declaration for cpu_model[] since it's in <sys/systm.h>.


# 1.57 05-Apr-2006 tsutsui

- ANSIfy
- KNF
- u_intXX_t -> uintXX_t


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.56 24-Dec-2005 perry

branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10; 1.56.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.55 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.54 04-Jun-2005 tsutsui

branches: 1.54.2;
Add const and fix for -Wshadow.


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

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


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.52 28-Aug-2004 tsutsui

branches: 1.52.4;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.


# 1.51 02-Apr-2004 tsutsui

Tidy up messages for total/avail memory.

before:
---
NetBSD 2.0B (COLT) #67: Sat Apr 3 06:29:50 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
256 MB memory, 247 MB freemainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
after:
---
NetBSD 2.0B (COLT) #68: Sat Apr 3 07:54:17 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
total memory = 256 MB
avail memory = 247 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---


Revision tags: netbsd-2-0-base
# 1.50 07-Jan-2004 cdi

branches: 1.50.2;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.


# 1.49 30-Dec-2003 pk

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

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

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


# 1.48 26-Sep-2003 simonb

Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.


# 1.47 12-Sep-2003 tsutsui

Use common mips generic software interrupt routines.


# 1.46 12-Sep-2003 tsutsui

Remove a redundant function declaration.


# 1.45 12-Sep-2003 tsutsui

TAB/space cleanup.


# 1.44 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.43 26-Apr-2003 ragge

branches: 1.43.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.42 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.41 17-Jan-2003 thorpej

Merge the nathanw_sa branch.


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

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


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

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


# 1.38 09-Aug-2002 gmcgarry

Garbage-collect cpu_sysctl(). From Shin'ichiro TAYA in PR-17888.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.37 13-Jan-2002 augustss

branches: 1.37.8;
Implement pci_intr_disestablish().


# 1.36 23-Nov-2001 soren

Make sure to hook into DDB/KGDB if so requested.


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

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

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

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.34 22-Jul-2001 wiz

branches: 1.34.2;
bzero -> memset


# 1.33 17-Jun-2001 cyber

branches: 1.33.2;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.


# 1.32 02-Jun-2001 chs

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


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

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


# 1.30 24-Apr-2001 thorpej

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

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


# 1.29 23-Apr-2001 thorpej

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


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

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


# 1.27 15-Mar-2001 chs

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

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


# 1.26 05-Feb-2001 tsutsui

branches: 1.26.2;
db_machine_init() is no longer needed.
From Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12123.


# 1.25 15-Jan-2001 thorpej

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


# 1.24 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.23 05-Oct-2000 cgd

branches: 1.23.2;
clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.


# 1.22 24-Sep-2000 jdolecek

add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.


# 1.21 13-Sep-2000 thorpej

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


# 1.20 14-Jul-2000 jeffs

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


# 1.19 27-Jun-2000 soren

Don't include <vm/vm.h>.


# 1.18 26-Jun-2000 mrg

remove/move more mach vm header files:

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

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


Revision tags: netbsd-1-5-base
# 1.17 14-Jun-2000 soren

branches: 1.17.2;
Reenable hard interrupts before processing soft interrupts.


Revision tags: minoura-xpg4dl-base
# 1.16 27-May-2000 soren

branches: 1.16.2;
Remove stacktrace() prototype.


# 1.15 26-May-2000 thorpej

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.14 29-Apr-2000 soren

ECOFF hook is in arch/mips.


# 1.13 28-Apr-2000 soren

Add microtime().


# 1.12 28-Apr-2000 soren

Adapt to cpu_intr() change.


# 1.11 12-Apr-2000 nisimura

Backout the previous change; safepri is an evil idea after all.


# 1.10 12-Apr-2000 nisimura

MIPS1_PSL_LOWIPL -> PSL_LOWPSL. No functional change is expected.


# 1.9 09-Apr-2000 soren

Be a little more careful parsing boot parameters.


# 1.8 31-Mar-2000 soren

Typo.


# 1.7 31-Mar-2000 soren

Some cleanups.


# 1.6 27-Mar-2000 nisimura

- Nuke unnecessary cast.
- Change comments on cpu_startup() so as what it does (XXX found mostly
common across ports).
- Retain UNIX heritage of /* Good {morning,afternoon,evening,night} */.


# 1.5 27-Mar-2000 nisimura

Remove unnecessary bzero() op for proc0's USPACE as pmap_steal_memory()
returns a nullified area.


# 1.4 25-Mar-2000 nisimura

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

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

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


# 1.3 21-Mar-2000 soren

Blocking soft interrupts can be useful..


# 1.2 21-Mar-2000 soren

Extend the evil interrupt kludge to the second ethernet.


# 1.1 19-Mar-2000 soren

NetBSD/cobalt. Work-in-progress.


# 1.120 06-Nov-2017 christos

Cleanup and clarify the ELFSIZE mess:

We now have 2 variables automatically set in elf_machdep.h:

ARCH_ELFSIZE: the size for userland binaries
KERN_ELFSIZE: the size for the kernel binaries

DB_ELFSIZE has been deleted and KERN_ELFSIZE should have always the
same values DB_ELFSIZE used to have.

In sys/exec_elf.h, if ELFSIZE is not set, it is set to KERN_ELFSIZE
for the kernel and ARCH_ELFSIZE for userland. These defaults should
eliminate the need for most manual ELFSIZE setting.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.119 22-Dec-2016 cherry

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

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806
# 1.118 27-Jul-2016 skrll

Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc


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

branches: 1.117.2;
use cpu_startup_common


Revision tags: netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.116 03-Apr-2014 joerg

branches: 1.116.6;
GC nsym


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
# 1.115 24-Mar-2014 christos

use cpu_{g,s}etmodel


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

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


# 1.113 28-Jul-2012 matt

Remove declartions of physmem


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.112 09-Jul-2011 matt

branches: 1.112.2;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase bouyer-quota2-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.111 20-Feb-2011 tsutsui

Remove leftover debug stuff.


# 1.110 20-Feb-2011 matt

Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).


Revision tags: uebayasi-xip-base7 bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 08-Feb-2010 joerg

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

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


Revision tags: uebayasi-xip-base
# 1.108 18-Dec-2009 matt

branches: 1.108.2;
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.


# 1.107 17-Dec-2009 matt

Enable mips64 support for cobalt.


# 1.106 16-Dec-2009 matt

Make cobalt build again.


# 1.105 14-Dec-2009 matt

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


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

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


# 1.103 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


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

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


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

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


# 1.100 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

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

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

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

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


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

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


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.97 26-May-2008 tsutsui

branches: 1.97.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2
# 1.96 14-May-2008 tsutsui

Normalize my licenses.


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14
# 1.95 22-Mar-2008 tsutsui

branches: 1.95.2; 1.95.4; 1.95.6;
Use C99 initializer.


# 1.94 22-Mar-2008 tsutsui

Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.93 18-Mar-2008 tsutsui

Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.

Should fix "long download, network frozen" problems reported on
port-cobalt by several people.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base hpcarm-cleanup-base
# 1.92 09-Jan-2008 wiz

branches: 1.92.2; 1.92.6;
Fix typo in macro name and comments.


Revision tags: vmlocking2-base3 matt-armv6-base
# 1.91 22-Dec-2007 tsutsui

In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.

Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.90 03-Dec-2007 ad

branches: 1.90.2; 1.90.6;
Interrupt handling changes, in discussion since February:

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


Revision tags: jmcneill-base bouyer-xenamd64-base2 bouyer-xenamd64-base
# 1.89 27-Oct-2007 tsutsui

branches: 1.89.2;
Assume netboot if "nfsroot=/path" is specified in bootstring.


Revision tags: yamt-x86pmap-base4
# 1.88 17-Oct-2007 garbled

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 ppcoea-renovation-base vmlocking-base
# 1.87 10-Aug-2007 tsutsui

branches: 1.87.2; 1.87.6;
More style nits.


# 1.86 10-Aug-2007 tsutsui

Some style nits.


# 1.85 10-Aug-2007 tsutsui

Lookup boothowto flags in bootinfo.


Revision tags: nick-csl-alignment-base matt-mips64-base mjf-ufs-trans-base
# 1.84 03-Jul-2007 tsutsui

branches: 1.84.4; 1.84.8;
Don't clear BSS even if ksyms(4) is not configured.


# 1.83 27-May-2007 tsutsui

- Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.


# 1.82 17-May-2007 yamt

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

from doc/BRANCHES:

idle lwp, and some changes depending on it.

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


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.81 17-Mar-2007 tsutsui

branches: 1.81.4;
Use char * where pointer arithmetics are required.


# 1.80 05-Mar-2007 dogcow

branches: 1.80.2; 1.80.4; 1.80.6;
semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.79 04-Mar-2007 christos

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


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

TRUE -> true, FALSE -> false


# 1.77 16-Feb-2007 tsutsui

branches: 1.77.2;
Remove hacks for now removed spllowersoftclock(9).


Revision tags: post-newlock2-merge newlock2-nbase newlock2-base
# 1.76 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

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


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base netbsd-4-base
# 1.75 16-Sep-2006 tsutsui

branches: 1.75.2; 1.75.4; 1.75.6;
Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.


Revision tags: yamt-pdpolicy-base9
# 1.74 10-Sep-2006 tsutsui

Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.


# 1.73 10-Sep-2006 tsutsui

Remove or comment out now unused code after MI mips3_clockintr migration.


Revision tags: rpaulo-netinet-merge-pcb-base
# 1.72 07-Sep-2006 gdamore

branches: 1.72.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7
# 1.71 18-Jul-2006 tsutsui

- always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.


Revision tags: yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base chap-midi-base
# 1.70 10-Jun-2006 tsutsui

space nits.


Revision tags: simonb-timecounters-base
# 1.69 31-May-2006 tsutsui

Remove unneeded #include headers.


# 1.68 31-May-2006 tsutsui

Use __predict_true() and __predict_false() in some critical handlers.


# 1.67 31-May-2006 tsutsui

Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>


Revision tags: yamt-pdpolicy-base5 elad-kernelauth-base
# 1.66 21-Apr-2006 tsutsui

branches: 1.66.2;
Fix an include path.


# 1.65 21-Apr-2006 tsutsui

Account interrupts by evcnt(9).


# 1.64 21-Apr-2006 tsutsui

Handle interrupts in priority order.


# 1.63 21-Apr-2006 tsutsui

Make a local variable static.


# 1.62 21-Apr-2006 tsutsui

- initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips


# 1.61 21-Apr-2006 tsutsui

- add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics


# 1.60 15-Apr-2006 tsutsui

Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.


Revision tags: yamt-pdpolicy-base4
# 1.59 09-Apr-2006 tsutsui

Replace some magic numbers with macro.


# 1.58 09-Apr-2006 tsutsui

Remove declaration for cpu_model[] since it's in <sys/systm.h>.


# 1.57 05-Apr-2006 tsutsui

- ANSIfy
- KNF
- u_intXX_t -> uintXX_t


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.56 24-Dec-2005 perry

branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10; 1.56.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.55 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.54 04-Jun-2005 tsutsui

branches: 1.54.2;
Add const and fix for -Wshadow.


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

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


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.52 28-Aug-2004 tsutsui

branches: 1.52.4;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.


# 1.51 02-Apr-2004 tsutsui

Tidy up messages for total/avail memory.

before:
---
NetBSD 2.0B (COLT) #67: Sat Apr 3 06:29:50 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
256 MB memory, 247 MB freemainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
after:
---
NetBSD 2.0B (COLT) #68: Sat Apr 3 07:54:17 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
total memory = 256 MB
avail memory = 247 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---


Revision tags: netbsd-2-0-base
# 1.50 07-Jan-2004 cdi

branches: 1.50.2;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.


# 1.49 30-Dec-2003 pk

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

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

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


# 1.48 26-Sep-2003 simonb

Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.


# 1.47 12-Sep-2003 tsutsui

Use common mips generic software interrupt routines.


# 1.46 12-Sep-2003 tsutsui

Remove a redundant function declaration.


# 1.45 12-Sep-2003 tsutsui

TAB/space cleanup.


# 1.44 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.43 26-Apr-2003 ragge

branches: 1.43.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.42 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.41 17-Jan-2003 thorpej

Merge the nathanw_sa branch.


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

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


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

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


# 1.38 09-Aug-2002 gmcgarry

Garbage-collect cpu_sysctl(). From Shin'ichiro TAYA in PR-17888.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.37 13-Jan-2002 augustss

branches: 1.37.8;
Implement pci_intr_disestablish().


# 1.36 23-Nov-2001 soren

Make sure to hook into DDB/KGDB if so requested.


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

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

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

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.34 22-Jul-2001 wiz

branches: 1.34.2;
bzero -> memset


# 1.33 17-Jun-2001 cyber

branches: 1.33.2;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.


# 1.32 02-Jun-2001 chs

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


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

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


# 1.30 24-Apr-2001 thorpej

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

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


# 1.29 23-Apr-2001 thorpej

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


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

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


# 1.27 15-Mar-2001 chs

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

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


# 1.26 05-Feb-2001 tsutsui

branches: 1.26.2;
db_machine_init() is no longer needed.
From Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12123.


# 1.25 15-Jan-2001 thorpej

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


# 1.24 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.23 05-Oct-2000 cgd

branches: 1.23.2;
clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.


# 1.22 24-Sep-2000 jdolecek

add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.


# 1.21 13-Sep-2000 thorpej

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


# 1.20 14-Jul-2000 jeffs

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


# 1.19 27-Jun-2000 soren

Don't include <vm/vm.h>.


# 1.18 26-Jun-2000 mrg

remove/move more mach vm header files:

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

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


Revision tags: netbsd-1-5-base
# 1.17 14-Jun-2000 soren

branches: 1.17.2;
Reenable hard interrupts before processing soft interrupts.


Revision tags: minoura-xpg4dl-base
# 1.16 27-May-2000 soren

branches: 1.16.2;
Remove stacktrace() prototype.


# 1.15 26-May-2000 thorpej

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.14 29-Apr-2000 soren

ECOFF hook is in arch/mips.


# 1.13 28-Apr-2000 soren

Add microtime().


# 1.12 28-Apr-2000 soren

Adapt to cpu_intr() change.


# 1.11 12-Apr-2000 nisimura

Backout the previous change; safepri is an evil idea after all.


# 1.10 12-Apr-2000 nisimura

MIPS1_PSL_LOWIPL -> PSL_LOWPSL. No functional change is expected.


# 1.9 09-Apr-2000 soren

Be a little more careful parsing boot parameters.


# 1.8 31-Mar-2000 soren

Typo.


# 1.7 31-Mar-2000 soren

Some cleanups.


# 1.6 27-Mar-2000 nisimura

- Nuke unnecessary cast.
- Change comments on cpu_startup() so as what it does (XXX found mostly
common across ports).
- Retain UNIX heritage of /* Good {morning,afternoon,evening,night} */.


# 1.5 27-Mar-2000 nisimura

Remove unnecessary bzero() op for proc0's USPACE as pmap_steal_memory()
returns a nullified area.


# 1.4 25-Mar-2000 nisimura

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

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

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


# 1.3 21-Mar-2000 soren

Blocking soft interrupts can be useful..


# 1.2 21-Mar-2000 soren

Extend the evil interrupt kludge to the second ethernet.


# 1.1 19-Mar-2000 soren

NetBSD/cobalt. Work-in-progress.


# 1.119 22-Dec-2016 cherry

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

uvm_setpagesize() is now subsumed within this funciton.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806
# 1.118 27-Jul-2016 skrll

Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc


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

branches: 1.117.2;
use cpu_startup_common


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.116 03-Apr-2014 joerg

branches: 1.116.6;
GC nsym


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
# 1.115 24-Mar-2014 christos

use cpu_{g,s}etmodel


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

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


# 1.113 28-Jul-2012 matt

Remove declartions of physmem


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.112 09-Jul-2011 matt

branches: 1.112.2;
Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h
Use <mips/..> for db_machdep.h and psl.h


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase bouyer-quota2-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.111 20-Feb-2011 tsutsui

Remove leftover debug stuff.


# 1.110 20-Feb-2011 matt

Merge forward from matt-nb5-mips64.
(XXX generic kernels on raq2 die after interrupts are enabled but gxemul
works fine).


Revision tags: uebayasi-xip-base7 bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 yamt-nfs-mp-base9
# 1.109 08-Feb-2010 joerg

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

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


Revision tags: uebayasi-xip-base
# 1.108 18-Dec-2009 matt

branches: 1.108.2;
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.


# 1.107 17-Dec-2009 matt

Enable mips64 support for cobalt.


# 1.106 16-Dec-2009 matt

Make cobalt build again.


# 1.105 14-Dec-2009 matt

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


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

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


# 1.103 26-Nov-2009 matt

Kill proc0paddr. Use lwp0.l_addr instead.


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

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


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

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


# 1.100 12-Nov-2008 ad

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

Proposed on tech-kern@.


# 1.99 11-Nov-2008 dyoung

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

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

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

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


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

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


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.97 26-May-2008 tsutsui

branches: 1.97.2;
Remove all initialization of obsolete ci_divisor_recip in
mips struct cpu_info and related macroes.
The member was prepared for a hack in MD microtime(9) implementation
but it has been superseded by MI timecounter(9).


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2
# 1.96 14-May-2008 tsutsui

Normalize my licenses.


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14
# 1.95 22-Mar-2008 tsutsui

branches: 1.95.2; 1.95.4; 1.95.6;
Use C99 initializer.


# 1.94 22-Mar-2008 tsutsui

Reorganize interrupt handling on cobalt and allow multiple interrupts on
each icu irq to support multi function PCI devices in the Qube's PCI slot:

- split out interrupt stuff from machdep.c into new interrupt.c
- prepare struct *_intrhead to handle cpu and icu interrupts
- use LIST and malloc(9) to handle multiple interrupts per icu irq
(mostly taken from algor/pci/pcib.c and evbmips/malta/pci/pcib.c)
- move evcnt(9) stuff into *_intrhead from cobalt_intrhand
(i.e. make it per interrupt rather than per handler)
- in pci_intr_map(9) handle CPU interrupt separately and add a sanity check
- fixup interrupt lines for devices on the PCI slot in pci_conf_interrupt(9)
- move some device address definitions into <machine/cpu.h> and
remove <machine/leds.h>
- misc cosmetics

No objection on port-cobalt for three weeks.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.93 18-Mar-2008 tsutsui

Fix botched spl(9) bug I introduced back in 3.99.18 (rev 1.64):
Don't enable unhandled interrupts before all interrupts are processed.

Should fix "long download, network frozen" problems reported on
port-cobalt by several people.


Revision tags: nick-net80211-sync-base bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base hpcarm-cleanup-base
# 1.92 09-Jan-2008 wiz

branches: 1.92.2; 1.92.6;
Fix typo in macro name and comments.


Revision tags: vmlocking2-base3 matt-armv6-base
# 1.91 22-Dec-2007 tsutsui

In icu_intr_establish(), don't panic if the specified irq
is already in use and just return NULL instead.

Such situation could happen with devices which have
unconfigured PCI interrupt pins (because firmware
doesn't configure multiple function devices) and
each driver could handle the return value properly.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 vmlocking-nbase jmcneill-pm-base reinoud-bufcleanup-base
# 1.90 03-Dec-2007 ad

branches: 1.90.2; 1.90.6;
Interrupt handling changes, in discussion since February:

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


Revision tags: jmcneill-base bouyer-xenamd64-base2 bouyer-xenamd64-base
# 1.89 27-Oct-2007 tsutsui

branches: 1.89.2;
Assume netboot if "nfsroot=/path" is specified in bootstring.


Revision tags: yamt-x86pmap-base4
# 1.88 17-Oct-2007 garbled

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 ppcoea-renovation-base vmlocking-base
# 1.87 10-Aug-2007 tsutsui

branches: 1.87.2; 1.87.6;
More style nits.


# 1.86 10-Aug-2007 tsutsui

Some style nits.


# 1.85 10-Aug-2007 tsutsui

Lookup boothowto flags in bootinfo.


Revision tags: nick-csl-alignment-base matt-mips64-base mjf-ufs-trans-base
# 1.84 03-Jul-2007 tsutsui

branches: 1.84.4; 1.84.8;
Don't clear BSS even if ksyms(4) is not configured.


# 1.83 27-May-2007 tsutsui

- Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.


# 1.82 17-May-2007 yamt

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

from doc/BRANCHES:

idle lwp, and some changes depending on it.

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


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.81 17-Mar-2007 tsutsui

branches: 1.81.4;
Use char * where pointer arithmetics are required.


# 1.80 05-Mar-2007 dogcow

branches: 1.80.2; 1.80.4; 1.80.6;
semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.


# 1.79 04-Mar-2007 christos

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


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

TRUE -> true, FALSE -> false


# 1.77 16-Feb-2007 tsutsui

branches: 1.77.2;
Remove hacks for now removed spllowersoftclock(9).


Revision tags: post-newlock2-merge newlock2-nbase newlock2-base
# 1.76 21-Dec-2006 yamt

merge yamt-splraiseipl branch.

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


Revision tags: yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base netbsd-4-base
# 1.75 16-Sep-2006 tsutsui

branches: 1.75.2; 1.75.4; 1.75.6;
Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.


Revision tags: yamt-pdpolicy-base9
# 1.74 10-Sep-2006 tsutsui

Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.


# 1.73 10-Sep-2006 tsutsui

Remove or comment out now unused code after MI mips3_clockintr migration.


Revision tags: rpaulo-netinet-merge-pcb-base
# 1.72 07-Sep-2006 gdamore

branches: 1.72.2;
Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee). ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base8 yamt-pdpolicy-base7
# 1.71 18-Jul-2006 tsutsui

- always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
(XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
by default.


Revision tags: yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base chap-midi-base
# 1.70 10-Jun-2006 tsutsui

space nits.


Revision tags: simonb-timecounters-base
# 1.69 31-May-2006 tsutsui

Remove unneeded #include headers.


# 1.68 31-May-2006 tsutsui

Use __predict_true() and __predict_false() in some critical handlers.


# 1.67 31-May-2006 tsutsui

Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>


Revision tags: yamt-pdpolicy-base5 elad-kernelauth-base
# 1.66 21-Apr-2006 tsutsui

branches: 1.66.2;
Fix an include path.


# 1.65 21-Apr-2006 tsutsui

Account interrupts by evcnt(9).


# 1.64 21-Apr-2006 tsutsui

Handle interrupts in priority order.


# 1.63 21-Apr-2006 tsutsui

Make a local variable static.


# 1.62 21-Apr-2006 tsutsui

- initialize cpuspeed and curcpu() according to cobalt model id
- switch to cpu cyclecounter based delay(9), taken from evbmips


# 1.61 21-Apr-2006 tsutsui

- add prefix ih_ to cookie_type member in struct cobalt_intrhand
- clear the cookie type in disestablish functions
- some cosmetics


# 1.60 15-Apr-2006 tsutsui

Identify cobalt models at boot and store it to a variable cobalt_id.
Tested on and Qube2 by several people on port-cobalt and my RaQ2.


Revision tags: yamt-pdpolicy-base4
# 1.59 09-Apr-2006 tsutsui

Replace some magic numbers with macro.


# 1.58 09-Apr-2006 tsutsui

Remove declaration for cpu_model[] since it's in <sys/systm.h>.


# 1.57 05-Apr-2006 tsutsui

- ANSIfy
- KNF
- u_intXX_t -> uintXX_t


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.56 24-Dec-2005 perry

branches: 1.56.4; 1.56.6; 1.56.8; 1.56.10; 1.56.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.55 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.54 04-Jun-2005 tsutsui

branches: 1.54.2;
Add const and fix for -Wshadow.


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

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


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.52 28-Aug-2004 tsutsui

branches: 1.52.4;
- Reset timer0 of GT64111 in gt_attach() and start it
in cpu_initclocks(9) via a callback function.
Fixes the "hardclock(9) is called before cpu_initclocks(9)" problem
reported by KIYOHARA Takashi on port-cobalt.
- Use bus_space(9) functions to access GT64111 registers and
add register definitions for GT64111 in gtreg.h.
(XXX this could be in sys/dev/marvell?)
- Move microtime(9) from machdep.c to clock.c, and read timer0 register
via a callback function. Also change microtime(9) like other ports
to guarantee that the time will be greater than the value obtained
by a previous call.


# 1.51 02-Apr-2004 tsutsui

Tidy up messages for total/avail memory.

before:
---
NetBSD 2.0B (COLT) #67: Sat Apr 3 06:29:50 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
256 MB memory, 247 MB freemainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---
after:
---
NetBSD 2.0B (COLT) #68: Sat Apr 3 07:54:17 JST 2004
tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/COLT
total memory = 256 MB
avail memory = 247 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
---


Revision tags: netbsd-2-0-base
# 1.50 07-Jan-2004 cdi

branches: 1.50.2;
Pass some info from the boot loader to the kernel:

- Kernel image name
- Symbol table
- A flag indicating console presence (could be clobbered if not passed)

Add _rtt() entry to the boot loader code.


# 1.49 30-Dec-2003 pk

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

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

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


# 1.48 26-Sep-2003 simonb

Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.


# 1.47 12-Sep-2003 tsutsui

Use common mips generic software interrupt routines.


# 1.46 12-Sep-2003 tsutsui

Remove a redundant function declaration.


# 1.45 12-Sep-2003 tsutsui

TAB/space cleanup.


# 1.44 15-Jul-2003 lukem

__KERNEL_RCSID()


# 1.43 26-Apr-2003 ragge

branches: 1.43.2;
Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)


# 1.42 02-Apr-2003 thorpej

Use PAGE_SIZE rather than NBPG.


# 1.41 17-Jan-2003 thorpej

Merge the nathanw_sa branch.


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

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


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

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


# 1.38 09-Aug-2002 gmcgarry

Garbage-collect cpu_sysctl(). From Shin'ichiro TAYA in PR-17888.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.37 13-Jan-2002 augustss

branches: 1.37.8;
Implement pci_intr_disestablish().


# 1.36 23-Nov-2001 soren

Make sure to hook into DDB/KGDB if so requested.


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

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

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

Reviewed by Jason.


Revision tags: thorpej-devvp-base
# 1.34 22-Jul-2001 wiz

branches: 1.34.2;
bzero -> memset


# 1.33 17-Jun-2001 cyber

branches: 1.33.2;
Change the way boot strings are handled and the way the root device
is determined. This allows multiple internal disks in a raq2 to work.


# 1.32 02-Jun-2001 chs

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


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

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


# 1.30 24-Apr-2001 thorpej

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

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


# 1.29 23-Apr-2001 thorpej

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


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

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


# 1.27 15-Mar-2001 chs

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

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


# 1.26 05-Feb-2001 tsutsui

branches: 1.26.2;
db_machine_init() is no longer needed.
From Shigeji Ishikawa <psybear@ogre.rim.or.jp> in port-cobalt/12123.


# 1.25 15-Jan-2001 thorpej

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


# 1.24 27-Nov-2000 soren

Consistently use pmap_steal_memory() to allocate USPACE.


# 1.23 05-Oct-2000 cgd

branches: 1.23.2;
clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.


# 1.22 24-Sep-2000 jdolecek

add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.


# 1.21 13-Sep-2000 thorpej

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


# 1.20 14-Jul-2000 jeffs

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


# 1.19 27-Jun-2000 soren

Don't include <vm/vm.h>.


# 1.18 26-Jun-2000 mrg

remove/move more mach vm header files:

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

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


Revision tags: netbsd-1-5-base
# 1.17 14-Jun-2000 soren

branches: 1.17.2;
Reenable hard interrupts before processing soft interrupts.


Revision tags: minoura-xpg4dl-base
# 1.16 27-May-2000 soren

branches: 1.16.2;
Remove stacktrace() prototype.


# 1.15 26-May-2000 thorpej

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.14 29-Apr-2000 soren

ECOFF hook is in arch/mips.


# 1.13 28-Apr-2000 soren

Add microtime().


# 1.12 28-Apr-2000 soren

Adapt to cpu_intr() change.


# 1.11 12-Apr-2000 nisimura

Backout the previous change; safepri is an evil idea after all.


# 1.10 12-Apr-2000 nisimura

MIPS1_PSL_LOWIPL -> PSL_LOWPSL. No functional change is expected.


# 1.9 09-Apr-2000 soren

Be a little more careful parsing boot parameters.


# 1.8 31-Mar-2000 soren

Typo.


# 1.7 31-Mar-2000 soren

Some cleanups.


# 1.6 27-Mar-2000 nisimura

- Nuke unnecessary cast.
- Change comments on cpu_startup() so as what it does (XXX found mostly
common across ports).
- Retain UNIX heritage of /* Good {morning,afternoon,evening,night} */.


# 1.5 27-Mar-2000 nisimura

Remove unnecessary bzero() op for proc0's USPACE as pmap_steal_memory()
returns a nullified area.


# 1.4 25-Mar-2000 nisimura

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

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

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


# 1.3 21-Mar-2000 soren

Blocking soft interrupts can be useful..


# 1.2 21-Mar-2000 soren

Extend the evil interrupt kludge to the second ethernet.


# 1.1 19-Mar-2000 soren

NetBSD/cobalt. Work-in-progress.