Commit Graph

592 Commits

Author SHA1 Message Date
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
simonb 5d8b1ef3e4 g/c REAL_CLISTS. 1999-04-25 02:56:26 +00:00
simonb b7c062102c Oops, deleted a register_t instead of register in previous. 1999-04-24 15:04:32 +00:00
simonb dc1d3940db Nuke register and remove trailling white space. 1999-04-24 08:01:01 +00:00
thorpej 94682a459b These are no longer used: replaced by locore_mips1.S and locore_mips3.S. 1999-04-23 00:10:15 +00:00
ad d79296c5e9 Disable ntohl/htonl due to duplication in libkern/arch/mips. 1999-04-15 15:30:46 +00:00
drochner 3b45055cd1 adapt to uvm_pagealloc() changes - use UVM_PGA_USERESERVE to allocate
page table pages
1999-04-12 17:59:29 +00:00
drochner ca88198b65 while symbol support in DDB is good to have one _can_ live without it 1999-04-10 15:10:56 +00:00
simonb c7a769fc26 Make unconditional clock cycle counter display conditional on DEBUG
being defined.
1999-04-07 23:04:34 +00:00
soda 009107c3e1 do not include <machine/regdef.h>, but include <mips/regdef.h>,
requested by Matthias Drochner and Toru Nishimura.
1999-04-01 09:02:53 +00:00
soda 678807689c fix error in previous my change 1999-03-30 17:34:55 +00:00
soda 530794ac61 - add _C_LABEL() to IMPORT(), to make this consistent with EXPORT().
- fix some oversight of previous my changes on defined(USE_AENT) or
  !defined(__NO_LEADING_UNDERSCORES__) case.
1999-03-30 16:50:04 +00:00
soda 83c01decb0 ALIAS() is not needed, use XLEAF() or XNESTED() instead 1999-03-30 14:27:56 +00:00
soda 2f780c89c9 - regdef.h is back, so use it.
- ALIAS() is not needed, use XLEAF() or XNESTED() instead
- use AENT() instead of .aent
- _END_LABEL() is not needed (and was wrong)
- define ALEAF(), NLEAF(), NON_LEAF(), NNON_LEAF() by
  XLEAF(), LEAF_NONPROFILE(), NESTED(), NESTED_NONPROFILE()
1999-03-30 14:26:42 +00:00
soda e5eb2cfa3f - protect from multiple inclusion
- incorporate changes to comments from asm.h
1999-03-30 14:22:58 +00:00
simonb c902cc84ca Don't install intr.h - there's only a kernel function prototype in
this file.
1999-03-30 02:16:03 +00:00
mycroft 9c6b797796 Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.
1999-03-26 23:41:25 +00:00
tsubai 670d76b7ea Remove ifdef UVM. 1999-03-26 03:40:41 +00:00
thorpej 567cda0537 Don't bother allocating mb_map on these systems. Mbuf clusters are
allocated from a pool, and the MIPS and Alpha use KSEG to map pool
pages.  So, mb_map wasn't actually being used.  Saves around 4MB of
kernel virtual address space in a typical configuration.

Garbage-collect the related VM_MBUF_SIZE constant.
1999-03-26 00:15:04 +00:00
mrg 7b93dd1117 remove opt_uvm.h 1999-03-25 00:41:46 +00:00
drochner 88a179595a regdef.h is back 1999-03-24 21:15:17 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
nisimura f719570f0a - Restore 'regdef.h' lost since last January. 1999-03-24 03:45:36 +00:00
simonb aca34380db If on entry the stack is within 4kB of _start, don't reset the stack
pointer to just underneath _start.  Allows bootblocks (or other kernel
calling programs) to pass more than 4 arguments if it sets up the stack
properly.

The 4kB figure may be overkill - on the pmax it only needs to be a dozen
of so bytes.
1999-03-23 22:43:18 +00:00
simonb f93b8168c0 Include <machine/db_machdep.h> instead of <mips/db_machdep.h>. 1999-03-23 22:15:36 +00:00
simonb 41febd3a3c Move DB_{AOUT,ELF}_SYMBOLS (and DB_ELFSIZE) definition to port-specific
db_machdep.h file.
1999-03-23 22:07:06 +00:00
simonb 027594b1eb Add CPU_BOOTED_KERNEL to CTL_MACHDEP definition. 1999-03-23 22:04:01 +00:00
thorpej a77ccfe460 Garbage-collect. 1999-03-20 01:40:25 +00:00
chs ab7269f62a if uvm_fault() fails with KERN_RESOURCE_SHORTAGE, send a SIGKILL
and print a message about it.  this will be used to recover from
out-of-swap conditions.
1999-03-18 04:56:01 +00:00
nisimura cfbd3e5737 - Adjust function declarations. 1999-03-15 03:25:33 +00:00