Commit Graph

65 Commits

Author SHA1 Message Date
thorpej 0bc2a57e26 Use named indices for RA, SR, MULLO, MULHI, and EPC in the
trapframe.
2002-11-04 20:02:09 +00:00
thorpej c8fbf16072 Define named constants for the trapframe register idices (they
are different from the normal register numbers).  Use these names
in genassym.cf.  (Wow, how ever did that test kernel boot before...)
2002-11-04 19:40:04 +00:00
simonb 8b4906e391 Add prototypes for the 64-bit pagezero functions.
Bracket some function prototypes with #ifdef/#endif.
2002-06-03 01:51:05 +00:00
simonb 341ed8c0d3 Use CPU_MIPS_USE_WAIT and CPU_MIPS_NO_WAIT in the CPU table, and use
the generic name "mips_wait_idle" for the old function that had both
rm52xx_idle and mipsNN_idle entry points.
2002-06-01 13:45:45 +00:00
simonb c790dd34b6 Add a comment after an #endif to match up with an #ifdef. 2002-05-13 04:15:40 +00:00
uch 552fdb7e1b make this compile and work with MIPS3_5900. 2002-03-11 16:39:39 +00:00
simonb f38d391749 Add support for MIPS32 and MIPS64 architectures:
- Add mips32 and mips64 locore function prototypes.
 - Add mips3_lw_a64() and mips3_sw_a64() for access data at any
   64bit address (from Broadcom Corp).
 - Add Broadcom and Sandcraft CPU company ids.
2002-03-05 15:36:51 +00:00
thorpej af66038f73 Merge the thorpej-mips-cache branch onto the trunk. This is an
overhaul of how caches are handled for NetBSD's MIPS ports.
2001-11-14 18:15:10 +00:00
uch d8c8db85ef 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.
2001-10-16 16:31:32 +00:00
simonb 11362870f4 Reorder some function prototypes more logically. 2001-08-18 04:13:28 +00:00
simonb d1cb410de4 Add Alchemy and SiByte company IDs (from oss.sgi.com). 2001-08-15 02:45:08 +00:00
simonb 4c76cec1d3 Remove parameter names from function prototypes. 2001-08-15 02:43:34 +00:00
thorpej ba52d7a5d0 Always indirect through the "locoresw" to get the cache ops, since
there are just far too many combinations to handle with magic
#ifdefs in any sane way.  Also, add a HitFlushDCache op to the
"locoresw", and fill it in as appropriate (it's NULL on MIPS-I,
so watch out).

These changes ensure that my R4600 Indy (with 2-way cache) gets
the correct cache ops when the kernel is built with only MIPS3
support, resulting in a kernel that is significantly more stable.
2001-06-11 23:52:38 +00:00
jeffs 196e858c40 Add mips_pagecopy/zero assembly loops for use by pmap_copy/zero_page*()
to allow the almost-64-bit compilation use ld/sd.
2000-10-31 23:39:24 +00:00
jeffs 11ef576801 Add mips_indexof() macro to make code for checking the cache index
easier to read.
2000-10-31 21:21:10 +00:00
nisimura 89e5c346a4 mips1_ConfigCache() has gone. 2000-10-09 07:33:31 +00:00
cgd 59706f1322 clean up and consistency for CP0 Count, Compare, Wired, and Config
access function names and prototypes.
2000-10-05 02:36:44 +00:00
cgd 36123017cb nuke mips3_clearBEV(). There's really no point in coding a
special-purpose assembly routine for things like this.
2000-10-05 01:06:06 +00:00
cgd 3f1d3c3066 tweak cpu_arch. Eliminate all direct checks of it (making them
use the macro CPUISMIPS3 -- which is badly misnamed), and set it
from #defines named CPU_ARCH_N (where N is 1..5, 32, 64).
2000-10-05 00:52:59 +00:00
cgd e9e1084ea3 rename mips_read_causereg -> mips_cp0_cause_read. nuke prototype
for mips_read_statusreg (which was apparently never implemented).
Provide prototypes and implementations for mips_cp0_cause_write,
mips_cp0_status_read, and mips_cp0_status_write.  (Writing can, of
course, be quite dangerous.)
2000-10-04 22:44:01 +00:00
cgd 11e8e89dd4 add some additional info re: MIPS32 PRID encoding, derived from
the ``MIPS32 4K Processor Core Family Software User's Manual
Revision 01.07 June 19, 2000", available on the web from:
http://www.mips.com/declassified/Declassified_2000/MD00016-2B-4K-SUM-01.07.pdf
2000-10-03 23:15:58 +00:00
cgd 8dbc5c0c51 provide mips3_ld() and mips3_sd(), functions which provide safe wrappers
for mips3 (and later) 'ld' and 'sd' instructions.  These currently
only are properly implemented for the _MIPS_BSD_API_LP32 and
_MIPS_BSD_API_LP32_64CLEAN 'API's.  They're pretty messy, but when you
need them, you really need them.
2000-10-02 22:13:38 +00:00
nisimura 70a97ab16c Introduce new MIPS1 direct mapped cache capacity detection logics. 2000-09-16 07:20:16 +00:00
chuck 9dc2f5ced0 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
2000-09-16 00:04:57 +00:00
chuck 0dcdf1214c kill mips3_write_xcontext_upper 2000-09-13 01:20:41 +00:00
cgd b63ed164a1 convert PRID handling to use macros on an int, not bit-fields.
there's no reason to use bit-fields, and they just complexity to
the header.
2000-07-27 17:29:05 +00:00
jeffs 2ebdfcd251 Make pmap_prefer() use a global setting based on cache size
instead of assuming 64KB.   This allows best fit and will
support bigger caches.
2000-07-20 18:33:40 +00:00
cgd 7e975cacbe un-__P, clean up spacing a little bit, put fwd struct decl(s) near top
rather than embedded.  no functional changes.
2000-06-29 06:00:43 +00:00
nisimura 074a952030 Abandon {mips1,mips3}_TBRPL()s which have little gain. They were
expected to be better than MachTLBUpdate(). After all, TLBUpdate()
is rather harmful and should be replaced with TBIS().
2000-06-26 02:55:45 +00:00
soda 76baab0725 3rd argument of TBRPL() is not paddr_t but PTE.
XXX - mips3_TBRPL seems to be never called.
2000-06-20 05:54:03 +00:00
soren d78ff1cd5b Add mips3_write_config(). 2000-06-20 02:57:17 +00:00
soren 5e4ca4defb Rename RM5200 cache ops to mips3_*_2way in anticipation of using them
for other CPUs with 2-way set associative L1 caches as well.
2000-06-06 17:41:07 +00:00
soren a255740671 MachForceCacheUpdate and cacheflush_bug have never been used in NetBSD,
so remove references them, and do a little other cleanup.
2000-05-23 04:21:39 +00:00
soren 2779a53005 Include opt_cputype.h. 2000-05-21 03:23:15 +00:00
nisimura de13b44edd Have mips_locoresw[] of 3 entry pointer array for different
implementation of locore routines between MIPS1 and MIPS3.  It's
independent from mips_locore_jumpvec_t which is for cache/TLB
manipulating routines peculiar to processor designs.  mips_locore_jumpvec_t
will be replaced with "processor closures" encapsulating implementation
parameters (cpuinfo) and pointers to conventaion routines (cpuops),
eventually.
2000-05-10 01:34:13 +00:00
nisimura 85f3855a8c - Implement mips3_TBIAP().
- Remove obsoluted routines in locore_mips3.S
- addiu -> addu, andi -> and, ori -> or.
2000-04-12 01:05:34 +00:00
simonb ef89d70178 Don't `extern' function declarations. While we're there, remove trailing
blank lines and white space.
2000-03-28 02:58:44 +00:00
nisimura 06b4feb7d6 Have TBIA/TBIAP an argument refering to a global variable instead
of a compile time constant.
2000-03-27 05:30:40 +00:00
nisimura 5987070300 - Rename some of TLB ops to have handy abbrivations hired from VAX and
ALPHA; mips1_TBIA, mips1_TBIAP, mips1_TBIS.
- Make sure TBIA and TBIAP ops to have an argument for the size of TLB
  which varies across even for MIPS1 implementations.
- Nuke the unused cpu_isa field from processor personality list.

- XXX XXX XXX
  it's less-than-optimal and likely a mistake to have TLBUpdate().
  It's costy to try to invalidate a single TLB entry whenver a certain
  PTE is going to be modified by traversing the entire TLB looking
  for the modified PTE because the PTE in question is not in TLB in
  most cases.  ASID bump could do the invalidation smartly.  Solution
  is planned for now.
2000-03-27 05:23:42 +00:00
soren 1c965174b0 Make MIPS1+MIPS3 compile again. 2000-03-23 14:49:29 +00:00
soren 64bcb49a2e Updated RM5231 cache code from Jeff Smith and Ethan Solomita at Geocast.
Many thanks.
2000-03-19 19:16:13 +00:00
takemura ae6160e233 CPU specific idle hook and VR idle routine. 2000-01-28 15:08:36 +00:00
simonb ddc897f64e Prototype stacktrace() and logstacktrace(). 2000-01-09 10:05:55 +00:00
nisimura 95e2c7af76 Make sure wbflush symbol treated as a C function call. 1999-11-12 06:17:13 +00:00
shin 44c2553ded 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 */
1999-09-25 00:00:37 +00:00
simonb dc1d3940db Nuke register and remove trailling white space. 1999-04-24 08:01:01 +00:00
jonathan 63deecd7e6 Define C structures (struct kernframe, struct trapframe)
for kernel-to-user trapframe.  Use C structs in genassym.cf.
1999-02-27 02:54:05 +00:00
castor 48cbfb842a * Add prototype for mips1_clean_tlb
* Add the correct version of locore_mips1.S [ See previous revision for
	description of changes ]
* Use defopt'ed MIPS3_L2CACHE_ABSENT in mips_machdep.c and pmap.c
	to avoid generating extraneous code.
* GC pmap_set_referenced in pmap.c
1999-01-15 22:26:42 +00:00
castor 534c67a373 Protect defopt against -D_LKM 1999-01-15 10:07:12 +00:00
castor a84ec5a3c1 * Create mips_reg_t data type to allow register size to be
decoupled from long or int or long long.  Define macros in asm.h to facilitate
  choosing these on a port by port basis.

* Create <machine/pubassym.h> mechanism to allow jmp_buf structure size
  to be calculated at system build time.

* Define _MIPS_BSD_SIM macro which specifies what calling style is appropritae
  for the architecture.  For 64-bit oriented systems set the Status Register
  to allow 64-bit instructions.

* Remove UADDR related macros because kernel U structure is now mapped
  normally.
* Separate cpu.h into cpu.h and cpuarch.h to keep things neat.
* Add support for QED 52xx processors
1999-01-14 18:45:45 +00:00