History log of /netbsd-current/sys/arch/mips/include/cpuregs.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.116 16-Nov-2021 simonb

Use the architecture documented name ULR for the RDHWR user local
register.


# 1.115 16-Nov-2021 simonb

Add some comments for the RDHWR register numbers.


# 1.114 16-Nov-2021 simonb

Only need one #define for MIPS_HWR_CPUNUM.


# 1.113 01-Nov-2021 andvar

fix typos, mainly in words minimum and maximum, but also few others.


# 1.112 09-Aug-2021 andvar

s/definitons/definitions/


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.111 29-May-2021 simonb

Update the FPU register names and bit definitions to something somewhat
modern (MIPS32/MIPS64) and convert to __BIT/__BITS.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
# 1.110 17-Mar-2021 simonb

branches: 1.110.4; 1.110.6;
Handle gas/gcc generating a break/trap 6 for integer overflow and
break/trap 7 for integer divide by zero and setting the SIGFPE
si_code of FPE_INTOVF or FPE_INTDIV respectively. The break/trap
6/7 seems to have existed since the early days of MIPS but not
well documented anywhere.

Fixes ATF lib/libc/gen/t_siginfo::sigfpe_int .


# 1.109 22-Aug-2020 simonb

branches: 1.109.2;
Remove bogus duplicate MIPS_COP_0_CONTEXT definition, it's not a MIPS32/64
specific reg and we already define MIPS_COP_0_TLB_CONTEXT elsewhere.


# 1.108 02-Aug-2020 simonb

Add a few more perfcnt CP0 registers.


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.113 01-Nov-2021 andvar

fix typos, mainly in words minimum and maximum, but also few others.


# 1.112 09-Aug-2021 andvar

s/definitons/definitions/


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.111 29-May-2021 simonb

Update the FPU register names and bit definitions to something somewhat
modern (MIPS32/MIPS64) and convert to __BIT/__BITS.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
# 1.110 17-Mar-2021 simonb

branches: 1.110.4; 1.110.6;
Handle gas/gcc generating a break/trap 6 for integer overflow and
break/trap 7 for integer divide by zero and setting the SIGFPE
si_code of FPE_INTOVF or FPE_INTDIV respectively. The break/trap
6/7 seems to have existed since the early days of MIPS but not
well documented anywhere.

Fixes ATF lib/libc/gen/t_siginfo::sigfpe_int .


# 1.109 22-Aug-2020 simonb

branches: 1.109.2;
Remove bogus duplicate MIPS_COP_0_CONTEXT definition, it's not a MIPS32/64
specific reg and we already define MIPS_COP_0_TLB_CONTEXT elsewhere.


# 1.108 02-Aug-2020 simonb

Add a few more perfcnt CP0 registers.


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.112 09-Aug-2021 andvar

s/definitons/definitions/


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
# 1.111 29-May-2021 simonb

Update the FPU register names and bit definitions to something somewhat
modern (MIPS32/MIPS64) and convert to __BIT/__BITS.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
# 1.110 17-Mar-2021 simonb

branches: 1.110.4; 1.110.6;
Handle gas/gcc generating a break/trap 6 for integer overflow and
break/trap 7 for integer divide by zero and setting the SIGFPE
si_code of FPE_INTOVF or FPE_INTDIV respectively. The break/trap
6/7 seems to have existed since the early days of MIPS but not
well documented anywhere.

Fixes ATF lib/libc/gen/t_siginfo::sigfpe_int .


# 1.109 22-Aug-2020 simonb

branches: 1.109.2;
Remove bogus duplicate MIPS_COP_0_CONTEXT definition, it's not a MIPS32/64
specific reg and we already define MIPS_COP_0_TLB_CONTEXT elsewhere.


# 1.108 02-Aug-2020 simonb

Add a few more perfcnt CP0 registers.


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.111 29-May-2021 simonb

Update the FPU register names and bit definitions to something somewhat
modern (MIPS32/MIPS64) and convert to __BIT/__BITS.


Revision tags: cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.110 17-Mar-2021 simonb

Handle gas/gcc generating a break/trap 6 for integer overflow and
break/trap 7 for integer divide by zero and setting the SIGFPE
si_code of FPE_INTOVF or FPE_INTDIV respectively. The break/trap
6/7 seems to have existed since the early days of MIPS but not
well documented anywhere.

Fixes ATF lib/libc/gen/t_siginfo::sigfpe_int .


# 1.109 22-Aug-2020 simonb

branches: 1.109.2;
Remove bogus duplicate MIPS_COP_0_CONTEXT definition, it's not a MIPS32/64
specific reg and we already define MIPS_COP_0_TLB_CONTEXT elsewhere.


# 1.108 02-Aug-2020 simonb

Add a few more perfcnt CP0 registers.


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.110 17-Mar-2021 simonb

Handle gas/gcc generating a break/trap 6 for integer overflow and
break/trap 7 for integer divide by zero and setting the SIGFPE
si_code of FPE_INTOVF or FPE_INTDIV respectively. The break/trap
6/7 seems to have existed since the early days of MIPS but not
well documented anywhere.

Fixes ATF lib/libc/gen/t_siginfo::sigfpe_int .


Revision tags: thorpej-futex-base
# 1.109 22-Aug-2020 simonb

Remove bogus duplicate MIPS_COP_0_CONTEXT definition, it's not a MIPS32/64
specific reg and we already define MIPS_COP_0_TLB_CONTEXT elsewhere.


# 1.108 02-Aug-2020 simonb

Add a few more perfcnt CP0 registers.


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: 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 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.109 22-Aug-2020 simonb

Remove bogus duplicate MIPS_COP_0_CONTEXT definition, it's not a MIPS32/64
specific reg and we already define MIPS_COP_0_TLB_CONTEXT elsewhere.


# 1.108 02-Aug-2020 simonb

Add a few more perfcnt CP0 registers.


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.108 02-Aug-2020 simonb

Add a few more perfcnt CP0 registers.


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.107 31-Jul-2020 simonb

Add two cnMIPS III COP0 register names.


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.106 29-Jul-2020 simonb

Add definitions for the CP0 WatchLo/WatchHi registers.


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.105 26-Jul-2020 simonb

#define<tab>
Nuke trailing whitespace.


# 1.104 26-Jul-2020 simonb

Add CP0 Config Registers 6 and 7.


# 1.103 26-Jul-2020 simonb

Remove mostly duplicate MIPS spec CP0 regs from octeon_corereg.h, move
the Cavium specific CP0 regs to <mips/cpuregs.h> as done for other core
specific regs.


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.102 20-Jul-2020 simonb

Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code.


# 1.101 20-Jul-2020 simonb

Add an extra bitfield in MIPS_COP_0_EBASE.


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.100 13-Jul-2020 simonb

Remove a magic number.


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.99 24-May-2020 simonb

Add mipsNN_cp0_rdhwr_cpunum() which returns the current CPU number
read from the CPUNum hardware register on MIPS{32,64}R2.


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.98 23-May-2020 simonb

Add CX73xx and CXF75xx Cavium Octeon PRIDs.


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.97 07-May-2020 simonb

Add PRID definition for newer SiByte SB1 cores (rev 0x11).
Add a constant for SiByte/BCRM cacheable coherent TLB cache attribute.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE 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 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2
# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

branches: 1.95.8;
Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

branches: 1.88.12;
Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


# 1.96 07-May-2017 skrll

Trailing whitespace


Revision tags: prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


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 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.95 11-Jul-2016 matt

Change MIPS to use the common pmap code.
Switch to 8KB pages on CPUs with a R4K MMU.
Simplify cache code.
Merge in most of changes from matt-mips64 branch


Revision tags: 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.94 11-Jun-2015 matt

Add a few MIPS32 R3 bits


# 1.93 10-Jun-2015 matt

Add MIPS 1074K


# 1.92 07-Jun-2015 matt

Define COP0 register that use select value in <mips/cpuregs.h>
Use those new definitions


Revision tags: nick-nhusb-base-20150606
# 1.91 01-Jun-2015 matt

Rework cavium support in preparation for MULTIPROCESSOR support


# 1.90 29-Apr-2015 hikaru

Initial import of Cavium Octeon and Octeon Plus SoC and
specifically Ubiquiti Networks EdgeRouter LITE support.
Currently the ethernet and uart are worked.
This support was contributed by Internet Initiative Japan Inc.


Revision tags: nick-nhusb-base-20150406 nick-nhusb-base
# 1.89 22-Nov-2014 macallan

branches: 1.89.2;
deal with Ingenic XBurst CPUs


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base 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.88 29-Oct-2011 jakllsch

Add Broadcom BCM3302 CPU to the table.


# 1.87 22-Sep-2011 macallan

support BUS_SPACE_MAP_PREFETCH in order to allow mapping device memory and
DMA buffers with cacheing disabled but things like write combining, relaxed
ordering etc. allowed when the CPU supports it
so far enabled only on Loongson, should work on R1xk and probably newer CPUs


# 1.86 27-Aug-2011 bouyer

loongson2f support:
- Add some loongson2 definitions to cpuregs.h, from OpenBSD
- Make sure that the at register is useable before every jump register
instruction (exept when register is k0 or k1) because -mfix-loongson2f-btb
needs the at register for its workaround
- add code to mips_fixup.c to handle the instructions added by
-mfix-loongson2f-btb
- Add a ls2-specific tlb miss handler: it doesn't have separate handler
for the xtlbmiss exeption.
- Fixes for some #ifdef MIPS3_LOONGSON2 assembly code (using the wrong
register)


# 1.85 02-Aug-2011 matt

Add Loongson2 DIAG register definitions (partial)


# 1.84 31-Jul-2011 matt

Add define for loongson2 DIAG register


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase rmind-uvmplock-base jym-xensuspend-base
# 1.83 06-Apr-2011 matt

Fix some comments.


# 1.82 15-Mar-2011 matt

Add separate support for MIPS32R2 and MIPS64R2.
Use EHB/SSNOP and jr.hb ra as appropriate (COP0_SYNC now uses them).
Add support for COP_0_HWRENA and COP_0_USERLOCAL (use by rdhwr $3,$29
instruction for TLS support).
Add mips3+ reserved instruction handler to emulate rdhwr is many fewer
instructions.


Revision tags: bouyer-quota2-nbase
# 1.81 03-Mar-2011 matt

Change MIPS_CP0FL_CONFIG*
Add MIPS_CP0FL_HWRENA and USERLOCAL


# 1.80 20-Feb-2011 matt

Major merge forward from matt-nb5-mips64.
New fixup code.
New common SPL code.
New common interrupt code.
Move related variables into structures.
Cleanup locore (move MD variable into it).
Kill StudlyCaps
Use PCU for FPU


Revision tags: uebayasi-xip-base7 bouyer-quota2-base
# 1.79 26-Jan-2011 pooka

Add support for the Extensible MIPS ("eMIPS") platform. The
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.

eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.

NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.

Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.


Revision tags: 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.78 27-Feb-2010 snj

branches: 1.78.2; 1.78.4; 1.78.6;
Spell "exception" properly.


Revision tags: uebayasi-xip-base
# 1.77 14-Dec-2009 matt

branches: 1.77.2;
Merge from matt-nb5-mips64
Merge mips-specific arch files.


Revision tags: matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7
# 1.76 06-Aug-2009 matt

LOONGSON2 is a MIPS III


# 1.75 01-Aug-2009 matt

Add Loongson2 chip ids


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 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.74 19-Feb-2008 simonb

branches: 1.74.10; 1.74.28;
Add PrID's for MIPS's 24K, 24KE, 34K and 74K cores.

From Alexander Voropay in mail to port-mips@.


Revision tags: bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.73 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: ppcoea-renovation-base
# 1.72 16-Oct-2007 simonb

Recognise the R2000A cpu as found in some pmaxen.

From Dennis Grevenstein on port-pmax@.


Revision tags: nick-csl-alignment-base5 netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 nick-csl-alignment-base matt-mips64-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 netbsd-4-base rpaulo-netinet-merge-pcb-base
# 1.71 26-Aug-2006 matt

branches: 1.71.6; 1.71.12; 1.71.20; 1.71.22; 1.71.30; 1.71.32; 1.71.34;
Don't cast pointers using unsigned and/or int. Use intptr_t or uintptr_t
as appropriate.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base simonb-timecounters-base
# 1.70 15-May-2006 simonb

Fix typo in MIPS3_SR_EIE.
From Anders Gavare.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.69 20-Dec-2005 tron

branches: 1.69.4; 1.69.6; 1.69.8; 1.69.12;
Add basic support for Alchemy Au1550 processor (CPU and devices).
Patch contributed by Garrett D'Amore in PR port-evbmips/32030.


# 1.68 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base ktrace-lwp-base
# 1.67 05-Nov-2005 tsutsui

Remove unused and incorrect MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2()
macro.


# 1.66 04-Nov-2005 tsutsui

Check MIPS3_CONFIG_CS and adjust csizebase at runtime on MIPS_R4100 CPUs,
and remove "XXXCDC: THIS MIPS3_4100 SPECIAL CASE SHOULD GO AWAY" part
from cpuregs.h. Tested on gxemul.

BTW, cache.c doesn't have MIPS_RC32364 config which was added
in mips_machdep.c rev 1.101?


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-vop-base3 netbsd-2-0-3-RELEASE yamt-vop-base2 thorpej-vnode-attr-base netbsd-2-1-RELEASE yamt-vop-base netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 yamt-km-base4 netbsd-2-0-2-RELEASE yamt-km-base3 netbsd-3-base yamt-km-base2 yamt-km-base kent-audio2-base netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.65 29-Oct-2003 simonb

branches: 1.65.14; 1.65.16;
Add some more MTI CPU ids.


# 1.64 28-Sep-2003 tsutsui

- Add MIPS_KSEG2_TO_PHYS() and MIPS_PHYS_TO_KSEG2() macro.
- Add definitions of the MIPS4 config register.

From Christopher SEKIYA.


# 1.63 28-Sep-2003 tsutsui

Add another R4000 CPU revision ID. From Christopher SEKIYA.


# 1.62 07-Aug-2003 agc

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

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


# 1.61 10-Jun-2003 simonb

branches: 1.61.2;
Change MIPS3_SR_FR_32 to MIPS3_SR_FR. Both the old R4000 manual and the
current MIPS64 manuals don't use the "32" in the bit name.


# 1.60 09-Jun-2003 simonb

Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.


Revision tags: nathanw_sa_before_merge nathanw_sa_base
# 1.59 10-Jan-2003 rafal

Add the MIPS3_CONFIG_SE (name taken from Rm52xx manual) bit, which is the
external cache enable bit -- this allows software to enable or disable the
(external) L2 cache on the R5k and Rm527x and the (external) L3 cache on
the Rm7k. If the (external) cache is disabled, treat it as if there were
no cache for the purposes of the cache setup code.

Also, update sgimips code to use the new name.


Revision tags: fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base
# 1.58 15-Nov-2002 simonb

Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.


# 1.57 03-Nov-2002 nisimura

Add two PRiD values.
- 0x55 for NEC Vr5500. ISA might be MIPS64.
- 0x38 for Toshiba TX79. This has thirty-two 128bit GPRs while
maintaining 32bit only virtual address space. Any of pointer related
registers have 32bit.


Revision tags: kqueue-aftermerge kqueue-beforemerge gehenna-devsw-base kqueue-base
# 1.56 28-Aug-2002 simonb

Add the Toshiba TX4927 CPU.


# 1.55 26-Jul-2002 simonb

Add support for detecting Alchemy Semiconductor CPUs. Alchemy use the
processor ID field to donote the CPU core revision and the company
options field do donate the SOC chip type, so we need to add an extra
field to the "pridtab" structure to identify these CPUs.


# 1.54 06-Jul-2002 gmcgarry

Overhaul the emulation facility. We do this by:

- accumulating all emulation code (including floating-point) in one place
- steal MachFPInterrupt() back from SOFTFLOAT for use only with interrupts
and traps from *real* FPUs
- introducing MachEmulateInst() as a common dispatch point for all
emulated instructions
- cleaning up emulation dispatch in trap()

Also, while we're here, implement MIPS2 LL/SC/SYNC emulation for MIPS1.

Tested on r3k with and without SOFTFLOAT enabled.


# 1.53 27-Jun-2002 simonb

Add the 20Kc processor ID.


# 1.52 05-Jun-2002 simonb

For the CP0 status register bit definitions- add the MX, PX and NMI bits
and rename TLB_SHUTDOWN and SOFT_RESET to TS and SR (the abbreviations
in the MIPS documentation).

XXX: this file really needs to be cleaned up one day...


# 1.51 01-Jun-2002 simonb

Standardise on the name "MIPS_SR_BEV" instead of a couple of different
#defines for the same status bit.


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
# 1.50 13-Mar-2002 simonb

branches: 1.50.4;
Add R4400 reg 0x60 to the MIPS CPU table.
From PR port-mips/15894 from Thilo Manske.


Revision tags: newlock-base
# 1.49 05-Mar-2002 simonb

Add support for MIPS32 and MIPS64 architectures:
- Add XKPHYS macros (from Broadcom Corp).
- Add some r5900 register bit definitions.
- Add extra exception vector addresses for mips32/mips64 and r5900.
- Make the mips cp0 register definitions available from both asm and C.
- Add some Alchemy and Sandcraft CPU ids.
- Add r3000, tx39xx and r4x00 CPU revision ids.
- Remove defines for the number of TLBs on some CPUs.


Revision tags: ifpoll-base
# 1.48 28-Dec-2001 shin

R4000/R4400 always detects virtual alias as if
primary cache size is 32KB. Actual primary cache size
is ignored wrt VCED/VCEI.


Revision tags: thorpej-mips-cache-base
# 1.47 16-Oct-2001 uch

branches: 1.47.4;
R5900 support.
COP0_SYNC
In R5900 mtc0, tlbr, tlbp, tlbwi, tlbwr must be followed by sync.p.
if defined MIPS3_5900, COP0_SYNC is defined as sync.p. else nothing.
IPL_ICU_MASK
mask interrupt directly ICU instead of SR.IM.
I've added this feature to support software interrupt for R5900.
and this option may be useful for platform which has cascaded ICU.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.46 17-Aug-2001 simonb

Describe the widths of various coprocessor 0 registers (for mips1,
mips3, mips32 and mips64).


# 1.45 15-Aug-2001 simonb

_Never_ make a cosmetic change to a comment without test-compiling...


# 1.44 15-Aug-2001 simonb

Add some MIPS, Alchemy and SiByte CPU PRIDs (from oss.sgi.com).


# 1.43 31-May-2001 nisimura

branches: 1.43.2;
PRiD 0x18 is shared by RC32334, 332 and 355. These SoCs are
distinguished by SYSID register in the system controller. Note
that PRiD 0x20 is for a standalone RC32364 processor which has the
same 32300 core inside. Rather better to name them MIPS32 ISA.


# 1.42 30-May-2001 soren

Pasto.


# 1.41 30-May-2001 nisimura

Add PRiD 0x18 for IDT RC32332/RC32334 processors.


# 1.40 15-May-2001 simonb

Add the processor IDs for the 4Kc and 5Kc CPUs and some MIPS32/64
coprocessor 0 registers.


Revision tags: thorpej_scsipi_beforemerge
# 1.39 24-Apr-2001 nisimura

Add PRiD register imp value 0x2d for Toshiba TX4900 family.


Revision tags: thorpej_scsipi_nbase thorpej_scsipi_base
# 1.38 27-Nov-2000 soren

branches: 1.38.2;
Correct a few cpu/fpu ids.


# 1.37 27-Nov-2000 nisimura

Use only one TLB entry to wire down process's USPACE since it's
now guranteed to be aligned on 8KB boundary in kernel virutal
address. Retain one more free TLB entry.


# 1.36 16-Sep-2000 chuck

IDT32364's Config register uses a different base for IC/DC (instruction
and data cache sizes). R4000 uses 2^(12+IC) and 2^(12+DC). IDT32364
uses 2^(9+IC) and 2^(9+DC).

abstract around the problem by making the base a parameter to the
MIPS3_CONFIG_CACHE_SIZE macro. we pass the base down from mips_vector_init
to mips3_vector_init and to mips3_ConfigCache (where it is used).

XXX: someone with an MIPS3_4100 should switch to this and get rid
of the ugly ifdefs in cpuregs.h


# 1.35 17-Jul-2000 jeffs

if MIPS3_ENABLE_CLOCK_INTR is defined, set MIPS3_[HARD_]INT_MASK
appropriately. This supports ports that use the internal clock.
Add 2 diag register defines that are specific to QED processors.


Revision tags: netbsd-1-5-base
# 1.34 09-Jun-2000 soda

branches: 1.34.2;
Decrease MIPS3_TLB_WIRED_ENTRIES from 8 to 2,
and rename it to MIPS3_TLB_WIRED_UPAGES.
The value of wired register becomes variable on arc port,
and arc is the only mips3 port which uses the wired TLB entries 2..7.


# 1.33 06-Jun-2000 soren

Typo.


Revision tags: minoura-xpg4dl-base
# 1.32 23-May-2000 soren

branches: 1.32.2;
MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.


# 1.31 21-May-2000 soren

Add R12K PRID.


# 1.30 25-Mar-2000 nisimura

Add QED RM7000 PrID.


# 1.29 24-Mar-2000 soren

Remove FPU PRIDs that are identical to the CPU ones.


# 1.28 19-Mar-2000 soren

Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.


# 1.27 07-Mar-2000 soren

Garbage collect MIPS_SR_INT_ENAB/MIPS_SR_INT_ENA_CUR definitions.


Revision tags: chs-ubc2-newbase
# 1.26 27-Dec-1999 castor

Add macro for MIPS_PHYS_MASK and document use of bits in system status
registers.


# 1.25 22-Dec-1999 jun

FIX:
port-mips/9016 [serious/medium]:
MIPS FPU emulator points wrong epc on exception case

Responsible: port-mips-maintainer (NetBSD/mips Portmasters)
State: open
Class: sw-bug
Originator: Shuichiro URATA
Release: current 12/11/1999
Arrival-Date: Fri Dec 17 10:18:00 1999
commit patch
http://www.a-r.org/~ur/softfloat1211.diff.gz
by Shuichiro URATA (ur@a-r.org)


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.24 29-Nov-1999 uch

TX3912/22 support. ENABLE_MIPS_TX3900 enables it.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.23 25-Sep-1999 shin

branches: 1.23.2; 1.23.8;
Changes for NetBSD/hpcmips.

Support VR4100.
Support 16KB page.
Support CPU without FPU.

Fix virtual alias problem(physio() case).

[new options]

options MIPS3_4100 /* VR4100 core */
options MIPS_16K_PAGE /* enable kernel support for 16k pages */
options SOFTFLOAT /* No FPU; avoid touching FPU registers */


Revision tags: chs-ubc2-base
# 1.22 21-May-1999 nisimura

- Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.


# 1.21 26-Apr-1999 nisimura

- MIPS processors do not impose inclusive (nesting) interrupt levels with
their interrupt lines. The notion and implemention of 'spl' are left
for how target ports approach to it.


# 1.20 24-Apr-1999 simonb

Nuke register and remove trailling white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.19 23-Jan-1999 nisimura

branches: 1.19.4;
- Add NEC Vr5400 processor ID.


# 1.18 16-Jan-1999 nisimura

- Update 'cpuregs.h' and decline 'cpuarch.h'.


Revision tags: kenh-if-detach-base
# 1.17 04-Dec-1998 nisimura

- Fix an error in primary cache line size detection logic; when IC and/or DC
bit is 1, then line size is 32. Otherwise, 16.


Revision tags: chs-ubc-base nisimura-pmax-wscons-base
# 1.16 01-Oct-1998 jonathan

branches: 1.16.2;
More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa.
* fixup mistake over mips/include/cpuregs.h.
* mips/mips_machdep.c:
set L2 cache-size for arc, cleanup use of L2cache present
vs L2 cache-size variables. check for no L2 cache on kernels
configured to require one. misc cleanups.
* mips/mpis/trap.c: more locore stack-traceback label cleanup.
XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.


# 1.15 11-Sep-1998 jonathan

Changes to sys/arch/mips from ARC port, from Noriyuki Soda <soda@sra.co.jp>.
Adds (most) support for ARC platform to port-independent mips code.

Some changes (e.g., clean up of overlapping CPU/FPU ids) inspired by
comparison to the OpenBSD 2.1 codebase of Soda's ARC port.

Open issues:
* Still no support for r4600 or mipsIV CPUs with two-way L1 cache.
Code derived from Per Fogelstrom's OpenBSD source doesn't work
on mips3 pmaxes with L2 cache.

* Still some port-specific #ifdefs, for interrupt enable and
pmax L2 cache-size. Needs more thought, but overlaps with
work-in-progress by Tohru and Tsubai on spl()s and related stuff.


Revision tags: eeh-paddr_t-base
# 1.14 23-Apr-1998 jonathan

define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter)


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base thorpej-signal-base marc-pcmcia-bp marc-pcmcia-base
# 1.13 22-Jun-1997 jonathan

* Change Sprite MACH_xxx prefix to MIPS_xxx.

* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
(more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).


# 1.12 22-Jun-1997 jonathan

Final changes for configuring MIPS1 and MIPS3 in a single kernel.

* cpuregs.h:
rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
Add compile-time MIPS3-only, compile-time MIPS1-only, and
runtime (both) definitions for number of TLB ASIDs (tlb pids)
and shift count to extract a TLB pid.

* locore.h:
Delete unused vector slot for indexed TLB writes.
mips1 and mips3 TLBs are different enough that we have
to break them out at the caller anyway.

* Add compile-time MIPS3-only andcompile-time MIPS1-only
macros to call locore functions directly by name.
Use the existing method table only if

* mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
Use MIPS3_ or MIPS1_ specific names for TLB pids in
mips3 and mips1 specific code paths (e.g., creating the kernel stack
for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.


# 1.11 21-Jun-1997 jonathan

More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
Delete unused VMMACH_ names (e.g., duplicates of PTE bits in pte.h).
Change remaining VMMACH_xxx names to MIPS1_xxx or MIPS3_xx.
Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
use MIPS1_, MIPS3_ symbolic names for Cause register bits.
change _R3K to MIPS1_, _R4K to MIPS3. Conditionalize for mips1 only,
mips3 only, or when both are defined, use runtime CPUISMIPS3 test.


# 1.10 16-Jun-1997 jonathan

Fix idempotent inclusion test macro: _MACHCONST -> _MIPS_CPUREGS_H_
to avoid collision with obsolete Sprite-derived NetBSD/pica header file.


# 1.9 16-Jun-1997 jonathan

Garbage-collect MIPS_3K_xxx, MIPS_4K_xxx outidde mips/include/cpuregs.h:
MIPS_3K_xxx -> MIPS1_xxx
MIPS_4K_xxx -> MIPS3_xxx


# 1.8 15-Jun-1997 mhitch

More merged MIPS1/MIPS3 support: still only allows single-architecture
support.


# 1.7 19-May-1997 jonathan

Fix typo.


# 1.6 18-May-1997 jonathan

Add defines for increasing SPL levels, assuming devices are wired up
in to CPU interrupt pins in order of increasing priority.


Revision tags: is-newarp-before-merge is-newarp-base netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.5 28-Mar-1996 jonathan

Resolve all differences between the Pica and pmax versions of machConst.h:
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.

Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.

Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.

TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.4 26-Oct-1994 cgd

new RCS ID format.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base netbsd-pmax-base
# 1.3 27-May-1994 glass

bsd 4.4-lite pmax port as ported to NetBSD


Revision tags: bsd44-lite
# 1.2 27-May-1994 glass

upgrade to bsd 4.4-lite code base. only mod is rcsids


# 1.1 12-Oct-1993 deraadt

branches: 1.1.1;
Initial revision