Commit Graph

1811 Commits

Author SHA1 Message Date
he 7ce138ffc9 Hm, let ipfresend also compile; move <machine/intr.h> include
in under the _KERNEL_OPT define.
2004-05-19 23:15:43 +00:00
he 78e8bae64a Since we are using the spl() functions here, also include <machine/intr.h>. 2004-05-19 22:50:09 +00:00
kleink 7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
ragge ee27da2673 Fix bug that were introduced together with the merge of nathanw_sa:
SCSI on VS2k/VS3100 stopped working.  Spotted and fixed by Anders Hjalmarsson.
This fixes PR#25307.
2004-05-02 08:16:52 +00:00
atatat d731ba57d2 The second "console_device" node should really be called "booted_device". 2004-04-24 04:56:59 +00:00
matt 4f9c0f6775 Add ${_MKTARGET_LINK} to the link step 2004-04-21 22:01:44 +00:00
ragge 8177977394 Add 11/730 to recognized cpu-types. 2004-03-28 19:52:01 +00:00
drochner c83eb997b8 nothing cares about __HAVE_SIGINFO anymore, so nuke it 2004-03-26 21:39:57 +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
mhitch 1e8e2dc0c7 Add commented-out entries for the VS4000/(60,VLC} LCG graphics.
Add the wsmux psuedo-device to allow the keyboard to attach to the
wsdisplay device when the wsdisplay device is not the console.
2004-03-19 20:21:08 +00:00
matt d06905d5ce Add CPU_INFO_INTERATOR/FOREACH support. 2004-03-19 20:17:51 +00:00
mhitch 3ff01ef842 Add the lcspx and lcg display drivers to the console table so they will
get properly probed and initialized.  This also fixes the problem of the
keyboard getting the console output and the keyboard port getting the wrong
serial baud rate.  The lcg driver is not currently present, but should be
"real soon now".
2004-03-19 20:15:21 +00:00
mhitch a5e785cccf Don't map the framebuffer again when attaching the lcspx driver if it was
already mapped in the early console startup.

The software cursor isn't going to blink if we don't start it - set up the
callout when attaching.

Now that the cursor blink routine is actually called, blink the entire cursor
line rather than just the first pixel.

Don't try to clear the current cursor if the pointer to it hasn't been
initialized.  This seems to happen when using the display as console, but
not when using a serial console.

On early console startup, use the framebuffer sizes, not the character cell
size to compute how much to clear.

The lcspx display will now initialize when booting with the display console,
but the dz device is not detected and the keyboard will not work yet.  I
haven't tracked down why the dz device isn't found (it works fine when
using a serial console).
2004-03-19 20:12:07 +00:00
kleink 554392dedc Fix == vs = typo from rev. 1.13 in __va_copy; from David H. Gutteridge
in PR port-vax/24846.
2004-03-19 08:38:28 +00:00
jmc 6fe4ead562 Convert to usage of UUDECODE_FILES and standardize on filename extension 2004-03-19 08:07:22 +00:00
kleink 5ba92ad7be Normalize multiple inclusion protection symbol names. 2004-03-18 13:59:14 +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
kleink 8e54f10bf7 * Turn isinf(3) and isnan(3) into C99-style macros.
* Make it possible for ports to override these (i.e., VAX).
* Remove isnanl(), which was internal to libc only.
2004-03-04 23:42:38 +00:00
drochner 61c3181dd6 plug obvious kernel lock leaks
(untested)
2004-02-13 18:27:14 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
wiz f582138c1b Uppercase CPU. 2004-02-13 10:11:56 +00:00
matt 82ad975738 Add #define cpu_lwp_free do { } while (/*CONSTCOND*/0)
(VAX systems don't need to do anything in cpu_lwp_free)
2004-01-22 01:24:10 +00:00
kleink 15afe0b4fc Move FP_ROP and FP_DIRTYZERO from <math.h> to <vax/math.h> (where they
would have ended up if I hadn't missed the latter file in the commit).
2004-01-20 19:52:40 +00:00
matt 85d908affc Add multiple protection inclusion.
s/u_int/unsigned int/
Fix typo.
2004-01-20 19:09:27 +00:00
matt ecdec9d579 Add proper boot/autoconf support for SDN devices. Take from Hugh Graham;
see http://mail-index.netbsd.org/port-vax/2002/06/28/0005.html
2004-01-06 17:01:48 +00:00
wiz a5bf3b3c4c Spell controller with two ls. Inspired by miod@openbsd. 2004-01-04 16:19:43 +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
cl e7045955c7 kernel part of no-syscall upcall stack return: libpthread registers
an offset between ss_sp and struct sa_stackinfo_t (located in struct
__pthread_st) when calling sa_register.  The kernel increments the
sast_gen counter in struct sastack when an upcall stack is used.
libpthread increments the sasi_stackgen counter in struct
sa_stackinfo_t when an upcall stack is freed.  The kernel compares the
two counters to decide if a stack is free or in use.

- add struct sa_stackinfo_t with sasi_stackgen to count stack use in
  userland
- add sast_gen to struct sastack to count stack use in kernel
- add SA_FLAG_STACKINFO to enable the stackinfo_offset argument in the
  sa_register syscall
- add sa_stackinfo_offset to struct sadata for offset between ss_sp
  and struct sa_stackinfo_t
- add ssize_t stackinfo_offset argument to sa_register, initialize
  struct sadata's sa_stackinfo_offset from it if SA_FLAG_STACKINFO is
  set
- add sa_getstack, sa_getstack0, sa_stackused and sa_setstackfree
  functions to find/use/free upcall stacks and use these where
  appropriate
- don't record stack for upcall in sa_upcall0
- pass sau to sa_switchcall instead of l2 (l2 = curlwp in sa_switchcall)
- add sa_vp_blocker to struct sadata to pass recently blocked lwp to
  sa_switchcall
- delay finding a stack for blocked upcalls to sa_switchcall
- add sa_stacknext to struct sadata pointing to next most likely free
  upcall stack; also g/c sa_stackslist in struct sadata and sast_list
  in struct sastack
- add L_SA_WOKEN flag: LWP is on sa_woken queue
- add L_SA_RECYCLE flag: LWP should be recycled in sa_setwoken
- replace l_upcallstack with L_SA_WOKEN/L_SA_RECYCLE/L_SA_BLOCKING
  flags
- g/c now unused sast_blocker in struct sastack
- make sa_switchcall, sa_upcall0 and sa_upcall_getstate static in
  kern_sa.c
- call sa_upcall_userret only once in userret
- split sa_makeupcalls out of sa_upcall_userret and use to process
  the sa_upcalls queue
- on process exit: mark LWPs sleeping in saunblock interruptible; also
  there are no LWPs sleeping on l->l_upcallstack anymore; also clear
  sa_wokenq_head to prevent unblocked upcalls

additional changes:
- cleanup timerupcall sa_vp == curlwp check
- add check in sa_yield if we didn't block on our way here and we
  wouldn't any longer be the LWP on the VP
- invalidate sa_vp_ofaultaddr after resolving pagefault
2004-01-02 18:52:17 +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
pk 20ad8911d9 hpfinish: pass correct buffer to diskerr(); 2003-12-29 16:23:58 +00:00
ragge 57fa6bb861 TOPDOWN_VM is now mandatory on vax. 2003-12-14 19:39:24 +00:00
ad 3234027240 Add write barriers (a no-op on vax). 2003-12-13 23:02:33 +00:00
matt 0ecc4c35b5 Copy ksi->ksi_info, not all of ksi, to user stack. 2003-12-11 18:33:52 +00:00
matt 786b602bd3 Rework things to move common stuff into Makefile.inc. 2003-12-11 17:34:09 +00:00
simonb fa8e22ca2d Make unimpl_emul.o depend on assym.h so that "make -j N" kernel builds
work.
2003-12-10 04:59:35 +00:00
jmc 695a2a2f9f Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
2003-12-10 02:04:00 +00:00
matt 031990a547 Make sure to include <bsd.own.mk> to pick up the definition of HAVE_GCC3 2003-12-09 04:54:54 +00:00
matt 48b7ea2255 Strings (even ifdef'ed out) can't run past the end of the line. Use
ANSI string concatenation.
2003-12-08 09:29:30 +00:00
matt 840a2d6df7 Make -mno-asm-pic dependend on HAVE_GCC3 == no 2003-12-08 09:28:36 +00:00
matt 52f58bd42a Suppress a gcc3 type-punning warning. 2003-12-08 07:33:12 +00:00
matt 31ba84cb6a Move common CFLAGS/AFLAGS to Makefile.inc.
For now, only suppy -mno-asm-pic when not using gcc3.
2003-12-08 07:32:19 +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
ragge 86f405ed49 Bugfixes for emulated instructions MOVTC and MOVTUC, from Bertram Barth:
> - condition-codes should be set from (unmodified) srclen vs. dstlen
>   instead from the modified (register-) values after completion.
>
> - for MOVTUC the V-bit should be set if the esc-char was found.
>
> - the arguments for comparison should be reversed.
>
> - count is unsigned word, but for condition-codes the comparison
>   should be done with signed words (ie. N = srclen LSS dstlen)
2003-11-30 10:02:21 +00:00
jhawk e7d0c2b26a Manually moved from Attic/ in the repository since cvs failed to do so. 2003-11-28 23:57:49 +00:00
wiz 4bbfee09ca Various typo fixes from Jonathon Gray via jmc@openbsd. 2003-11-17 11:16:10 +00:00
wiz ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
he 69c90d9f70 Initialize 'p' to NULL, to work around that the compiler otherwise
can't know that 'p' is initialized before it's being used.

Reviewed by ragge.
2003-11-06 00:35:23 +00:00
he 4a1426d85c Pull up the initialization of 'minnex', so that the compiler can know
that it's going to be set before it's used.
2003-11-06 00:33:36 +00:00
he 11f834a44a Add a default: branch with a panic() to the switch statement to
handle "impossible" segment types, so that the compiler can know
that 'pt' has been initialized after the switch statement.
2003-11-06 00:32:27 +00:00
he 93d88e5e12 Work around gcc 2.95.3's inability to detect that 'ck' will be set
in rounds 129 and 130 through the loop.  Will be noted in doc/HACKS,
and should be reviewed when gcc 3.3.2 is ready for vax.
2003-11-06 00:30:13 +00:00