Commit Graph

621 Commits

Author SHA1 Message Date
shin 359347c965 fix mips3 TLB printf format 1999-10-11 05:11:02 +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
nisimura ff559f77f0 'KB' for kilo-bytes as humanize_number(). 1999-09-24 00:37:52 +00:00
chs f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
mrg f75cf1688b install ieee.h 1999-08-30 00:51:57 +00:00
mycroft 4ef547e76d Add ieee.h. 1999-08-29 18:21:20 +00:00
simonb 3c185af5fd Include <sys/endian.h> after defining whether where are little- or
big-endian.  i386, pc532 and vax still include <machine/byte_swap.h>
and define macros for the {n,h}to{h,n}*() functions.  mips also
defines some endian-independent assembly-code aliases for unaligned
memory accesses.
1999-08-21 05:53:50 +00:00
simonb 06a92524c2 Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
1999-08-21 05:39:51 +00:00
nisimura 3708c0dfd6 - Replace three splx() calls with _splset(). splx() should not be
considered the equivalent of 'set processor register'.
1999-08-18 04:43:31 +00:00
nisimura 44861c8d16 - Fix a severe bug I introduced May 7th. MIPS kernel ran for long time
in kernel mode after master interrupt (MIPS_SR_INT_IE) disabled.  Tons
of appreciation for Noriyuki Soda and Masanari Tsubai for almost full
time help to spot of the issue.
1999-08-16 07:53:18 +00:00
simonb 299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
thorpej 28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej 3ebbe095e0 Change the pmap_extract() interface to:
boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.
1999-07-08 18:05:21 +00:00
nisimura b57c6ad0bc - _insque()/_remque() used by CODA. 1999-06-30 03:52:04 +00:00
itojun 427639cdce - Call ip6intr if INET6 is defined.
- remove "need-flag" for mac68k esp driver, as it is not used in anywhere
  and conflicts with IPsec ESP header.

This should be the only MD change in IPv6 support, except kernel config file.
Very sorry if you have any compilation problem with it (I believe it is okay).
If your favorite arch is not included in here, please add a
call to ip6intr() from softintr handle.
1999-06-28 08:20:40 +00:00
nisimura 1c949badf4 - Fix an large error I made last month in TLB mod improvement, still
wondering why not I was immediately blown away.
- Continuing invastigations on VM related panics on very high loads.
1999-06-18 08:17:50 +00:00
thorpej 0288ffb53a pmap_change_wiring() -> pmap_unwire(). 1999-06-17 19:23:20 +00:00
thorpej f5a527bb4e Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
1999-06-17 18:21:21 +00:00
mhitch d9be0d6e6b When entering a read-only page for MIPS3, va does not need to be adjusted by PAGE_SIZE
when flushing the I-cache.
1999-06-08 03:44:18 +00:00
nisimura 540b02ab76 - Exterminate haunted evil soul of MIPS va_arg(). Verified OK with
either endian.  Not a perfect solution which would be revealed on
a certain condition when va_arg() is applied to magical struct
arguments passed by value.  format_bytes() is now saved.  With the
help from Noriyuki Soda and Masanari Tsubai.
1999-06-08 00:46:38 +00:00
castor 6b1b77230e in switch_exit() previous fix forgot to guard REG_L with REG_PROLOGUE and
REG_EPILOGUE.
1999-06-04 21:43:12 +00:00
castor 4f92d800a6 fix register restore to be safe for n32 model. 1999-06-04 21:35:47 +00:00
nisimura fad2c4c762 - A little attention for TLBUpdate(). 1999-05-31 06:10:32 +00:00
nisimura ce19767c8b - Make a modification to reduce the cost of TLBmod exception handling.
TLBUpdate() routine is used for dual purposes.  In TLBmod case, just ok
to call 'tlbwi' (as designed).  Result in saving of extraneous execution
path.  MIPS1 only this moment.
1999-05-29 09:38:28 +00:00
thorpej dbc1dd921a Clone vmapbuf() and vunmapbuf() from the Alpha port. 1999-05-28 22:59:40 +00:00
nisimura d116bc4a0d - Make this compilable with MIPS1 or MIPS3 only configuration. 1999-05-28 07:23:38 +00:00
nisimura 58cf81db34 - Change a symbolic name of TLB entrylo from 'PG_M' to 'PG_D' to reflect
processor design.  MIPS 'dirty bit' is not the same as i386 'dirty bit'.
There is a growing concern of misuse in NetBSD/mips.
1999-05-27 01:56:32 +00:00
thorpej beb8d06638 Generally update the comment above vunmapbuf(). 1999-05-26 22:19:33 +00:00
thorpej a2d06a4721 Generally update the comment above the vmapbuf() implementations. 1999-05-26 22:07:36 +00:00
nisimura 10d1acd4ea - Backout the last code change. I found it broke pmax kernel. It's
retained for future use of pmap.new.c, though.

> New codes always use current ASID holded in EntryHi register.
1999-05-22 02:35:35 +00:00
nisimura fd243bd393 - Redefine symbols and parameters to represent CPU design with MIPS
nomenclature, retaining the old heritage.
- Remove API-related definitions for now obsolete utiltity routines.
1999-05-21 06:37:39 +00:00
nisimura e5ecc1bc87 - Typos, I made... 1999-05-21 06:36:37 +00:00
nisimura 28c74563b6 - Make sure ASID PARANOIADIAG work with MIPS3. 1999-05-21 06:19:55 +00:00
nisimura 1b332b28e2 - Now completing MIPS1 side change. Introduce MIPS_TBIS and MIPS_TBDATA
(correct name, vax?) replacing mips1_TLBFlushAddr and mips1_TLBUpdate,
respectively.  New codes always use current ASID holded in EntryHi
register.  In most occations, the register already contains a necessary
value before (re-)written, ugh.  'sva | asid' ops for their arguments are
now verbose, to be removed when MIPS3 side changes are done.
1999-05-21 06:01:14 +00:00
nisimura 634cb79411 - Rename '#ifdef DIAGNOSTIC' to '#ifdef PARANOIADIAG' to detect
catastrophic events to break VM machinary.  Add some more diags to
track ASID.
1999-05-21 05:28:31 +00:00
nisimura 90d9a14b01 - Avoid recomputations inside inner-most loop which produce identical
values evreytime.
1999-05-20 10:50:08 +00:00
lukem e4a87aa1a9 * convert to using MI allocsys(). most ports were using an MD allocsys(),
although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes
1999-05-20 08:21:42 +00:00
nisimura a784d093ea - Change pmap_alloc_asid() and pmap_activate() to make sure that
'pm_asid' member of 'pmap' structure is assigned a new value after
uvmspace_alloc() provides afresh pmap.
- ASID generation number 0 is not a reserved value anymore.
1999-05-20 05:32:06 +00:00
nisimura 7d44b47145 - Make tlb dump DDB command have 'D' indication for TLB 'dirty bit'. MIPS
processor is one of processors with no 'referenced bit' nor 'modified bit'
processor machinary.  Those functions are implemented combining two
hardware bits, 'dirty bit' and 'valid bit', with TLBmod exception handler.
1999-05-20 03:34:06 +00:00
nisimura a5a47c3772 - Implement MIPS_TBIAP() which invalidates all TLB entries belong to
per process user spaces, replacing mips1_TBLFlush().  This reserves
kernel space TLB entries when TLBPID generation number about to wrap.
- Correct comments a bit, nuke unused routines.
1999-05-19 07:08:43 +00:00
nisimura 523983b88b - Forgot to change 'tlbpid' to 'asid'. But, why does the MIPS TLBmod
handler touch the value anyway?
1999-05-18 03:13:37 +00:00
nisimura c99765853f - Move MachSetPID(1) call to pmap_bootstrap() adajacent to kernel pmap
initialization code.
- Abandon mips_init_proc0() and do the 4 lines straightly in MD mach_init().
- Restore a block of code accidentally lost in prevous commit.
- Change the term 'tlbpid' to a MIPS3 nomenclature 'asid'.
- Hide PTE size exposures by symbolic names in locore.S
1999-05-18 01:36:51 +00:00
nisimura f2119ffdfb - Nuke one unused global variable 'mem_size'.
- Kernel pmap is now dectected by "if (pmap = pmap_kernel())" clause.
1999-05-17 11:12:44 +00:00
nisimura b7876c4182 - Minor code and comment adjustments for pmap_alloc_tlbpid() and
pmap_activate(), no functional change.
1999-05-17 01:10:51 +00:00
nisimura 7a50b38cbd - Adjust descriptive comment of cpu_fork() which returns nothing and
returns once.
- Minor fixes in mips/vm_machdep.c.
1999-05-14 02:11:59 +00:00
thorpej c10a926030 Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior).  Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
1999-05-13 21:58:32 +00:00
nisimura 9c2eefcae6 - Introduce MIPS processor interrupt control routines;
_splraise, _spllower, _splset, _splget, _setsoftintr, _clrsoftintr, _splnone.

They manipulate MIPS processor's 8 interrupt sources and are used
as building blocks for NetBSD spl(9) kernel interface.  Note that
MIPS processor doesn't enforce inclusive 'interrupt levels' found
in other processors, then the hierarchal nature of IPL must be
implemented by composing MIPS processor interrupt masks appropriately.

With the simplest target port in which small number of devices are
independently assigned with 6 external interrupt signal lines,
spl(9) kernel interface will be implemented with #define's of
processor interrupt controls mentioned above.  In more general
cases, in which target computers have many devices and 'system
registers' indicating pending interrupt sources at any moment,
spl(9) will be implemented with more complex machinary manipulating
processor interrupts and system registers in target port dependent
ways.

- Nuke unused code and reorder locore definitions.  XXX Following
routines will be replaced with C language version; setrunqueue,
remrunqueue, switchfpregs, savefpregs, MachFPInterrupt.
1999-05-07 01:30:26 +00:00
christos c596c324e3 Define __builtin_*() for lint 1999-05-03 16:30:31 +00:00
cgd 1bce8c40fc ep_arglen is in units of 'sizeof (char *)', not in units of bytes. use
howmany(value, sizeof (char *)) to get the right value.
1999-04-30 23:02:06 +00:00
nisimura 56a9b84b91 - 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.
1999-04-26 09:42:14 +00:00