Commit Graph

1576 Commits

Author SHA1 Message Date
simonb 7f2fc41e2f In cpu_{set,get}context(), copy the FP registers themselves and the FP
CSR separately (and now from the correctly sized __fpregset_t).  The
FP CSR is copied separately to avoid endianness/alignment issues.

Part of fix for PR port-mips/25942.  Thanks to Christos Zoulas and
Klaus Klein for help with debugging this.
2004-07-03 05:08:34 +00:00
simonb 7b72fd9dc6 Drop the "catchall" __fpregset_t, and use either a 32-bit or 64-bit
structure depending on the current ABI.

Part of fix for PR port-mips/25942.  Thanks to Christos Zoulas and
Klaus Klein for help with debugging this.
2004-07-03 05:06:37 +00:00
simonb f41923b7dd Fix a precedence problem setting uc_flags.
Part of fix for PR port-mips/25942.  From Christos Zoulas.
2004-07-02 12:32:16 +00:00
thorpej e33c2bb5d5 Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
2004-06-04 04:45:49 +00:00
drochner 19f047f8d0 SIGTRAMP_VALID() should not pollute the user namespace 2004-05-10 21:51:49 +00:00
kleink 7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
thorpej cdac01064e Rename the COM16650 option to COM_16650, for consistency with other
com variant options.
2004-05-01 19:03:59 +00:00
simonb f95ed9ec0f Print the address of a problem instruction when we panic. 2004-04-26 22:29:07 +00:00
simonb 24798155ac Enable top-down VM if USE_TOPDOWN_VM is defined. 2004-04-26 22:25:54 +00:00
simonb 374ed5ae2b Fix bogus gcc -Wuninitialised warning when SYSCALL_DEBUG is enabled. 2004-04-04 05:32:20 +00:00
drochner c83eb997b8 nothing cares about __HAVE_SIGINFO anymore, so nuke it 2004-03-26 21:39:57 +00:00
drochner d19f706361 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 17:34:18 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
cgd 6c8994da82 convert descriptor add/remove pointers to integer array indices. 2004-03-19 07:11:33 +00:00
cgd b79e782296 recognize PERIPH_REV3 DMA for BCM1250, too 2004-03-19 06:01:31 +00:00
cgd 50d45978ec bump RX and TX ring sizes to 256 entries each. would be better to make
them larger, but then i'd need to tweak the allocation mechanism so they
were *guaranteed* to be physically contiguous.
2004-03-18 06:59:30 +00:00
cgd 49d5d889b3 in PERIPH_REV3 DMA code, fix calculation of pkt size (not that it matters
for <= 4k packets), and also interrupt on end of pkt only.  cuts tx intrs
by a factor of >3 for simon's fave 100Mbps ttcp test.
2004-03-18 06:30:03 +00:00
simonb 0c55ae72f4 Fix pass3 Tx DMA - when an mbuf spans a page boundary, make sure that
it either is sitting in contiguous physical RAM or split the mbuf
 into two Tx descriptors.  Not the prettiest patch, but works well in
 practice - gets about an 8% decrease on CPU time for a simple ttcp TCP
 Tx benchmark.  Thanks to Chris Demetriou for some debugging help.
Add some event counters.
Remove some #if 0'd debug code.
2004-03-18 05:57:58 +00:00
nathanw 6b89d04a4a The Au1500 doesn't have an i2s interface. 2004-03-16 18:13:45 +00:00
simonb 15ae71a28c Call sbmac_start() at the end of the interrupt service function to try
to send more packets.  Fixes problems with high UDP Tx rates.
Thanks to Matt Thomas for applying clue.
2004-03-14 10:55:45 +00:00
cl ea5ec0212d add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
  * VP id
  * lock on VP data
  * LWP on VP
  * recently blocked LWP on VP
  * queue of LWPs woken which ran on this VP before sleep
  * faultaddr
  * LWP cache for upcalls
  * upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
2004-03-14 01:08:47 +00:00
cgd 965d1e331b update from SiByte Sample Software version 1.0.26 from:
http://sibyte.broadcom.com/public/resources/download-request.html?samplesw/samplesw-1.0.26.tar.bz2
2004-03-11 02:12:24 +00:00
cgd 9ace356dba proper name for SB-1 is ... SB-1 (not SB1). 2004-03-09 00:47:14 +00:00
simonb 38b2b82a1a Wrap some long lines. 2004-03-08 11:28:48 +00:00
drochner bb362b40bf fix some problems with FPU exception signaling:
-The MachFPTrap did generate pre-siginfo arguments to trapsignal(),
 leading to an immediate crash.
 Put the siginfo generation into a separate .c file for simplicity.
-The exception bits in MIPS_FPU_CSR didn't get cleared, leading to
 trouble later ("kernel used FPU" on pmax).
 XXX This should probably be done for the "unimplemented fpu instruction"
  case as well, but I don't know how to test this. Or, even better -
  centralize the CSR clearing before the branch in MachFPTrap.
2004-03-04 20:17:01 +00:00
simonb a50cc8bd42 Catch up with the November 2002 (!!) change to remove ABI exposure
from cpu_fork and the proc trampoline.  pthreads programs that fork
now work (at least the regress test case does).
Program reported by Florian Stöhr on port-sgimips.
2004-02-28 16:02:03 +00:00
simonb 7e050bc20e ANSIfy, wrap long lines. 2004-02-28 15:44:34 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
martin da4e67accc Do not export __HAVE_RAS to userland. Applications are supposed to try
rasctl() and detect failure with EOPNOTSUPP.
2004-01-18 18:23:19 +00:00
jdolecek 089abdad44 Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
2004-01-04 11:33:29 +00:00
simonb 9c7cfca904 ANSIfy, KNF. 2003-12-31 02:40:26 +00:00
pk 70f20a1217 Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

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

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
2003-12-30 12:33:13 +00:00
nisimura eef6d5b9ab Vr4100 and Vr4300 are not capable of having external caches. 2003-12-21 07:59:25 +00:00
simonb 210a9530eb Use UART_SIZE instead of a (redefined) COM_NPORTS. 2003-12-15 09:13:41 +00:00
sekiya c0996cb32c Remove preprocessor conditional MIPS3_L2CACHE_ABSENT, which was rendered
superfluous by Tsutsui-san's previous changes.

(this change differs slightly from that posted to port-mips@, as
mips_flushcache_allpvh should be compiled iff MIPS3_PLUS is defined and
MIPS3_L2CACHE_ABSENT should be removed from files.mips as well)
2003-12-12 14:55:58 +00:00
simonb c26ed27f0c Only compile in sysctl_machdep_booted_kernel() if __HAVE_BOOTINFO_H
is defined.
2003-12-06 15:20:04 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
keihan 29c72c57f0 netbsd.org -> NetBSD.org
All "netbsd.org" is now gone from src/sys/arch.
2003-12-04 13:05:15 +00:00
he ea56bcee84 Hide the register number constants behind an _R_ prefix, and also
rename FPBASE to _FPBASE, so that we avoid polluting the user's
name space when e.g. <sys/ptrace.h> is included.  Previously, the
PC symbol in mips/regnum.h would conflict with the declaration of
the external variable by the same name in termcap.h, as discovered
by the ``okheaders'' regression test.
2003-11-26 08:36:49 +00:00
christos a21fdf3b43 bye, bye _MCONTEXT_TO_SIGCONTEXT and vice versa. 2003-11-25 23:11:52 +00:00
simonb 4ebec9cd61 Add a define for the size of the UART register block. 2003-11-08 05:49:08 +00:00
simonb edaec67118 Use the COM_AU1x00 option for Au1x00 feature support. 2003-11-08 05:12:51 +00:00
simonb 52f438d9a8 Sync with com.c, rev 1.222. 2003-11-08 05:10:11 +00:00
simonb 8899101173 Add a "COM_AU1x00" option, similar to COM_PXA2X0, for enabling Au1x00
features in the "com" driver.
2003-11-08 05:05:14 +00:00
simonb 4116da8027 Sync with dev/ic/com.c rev 1.221. 2003-11-07 02:08:35 +00:00
simonb f3bced434d Try using matching numbers of open and close parentheses to make this
compile again.
2003-11-06 04:17:11 +00:00
dsl 2ffbd2ab99 Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
2003-11-04 10:33:15 +00:00
simonb 20db9285ba Kill trailing blank lines. 2003-11-02 08:29:06 +00:00
christos 38dd4ae2dc Initialize another fp instance 2003-11-02 08:27:41 +00:00
christos 6dba5c3bc3 only assign to fp when we have a valid lwp. Thanks simon 2003-11-02 08:20:48 +00:00