Commit Graph

158 Commits

Author SHA1 Message Date
chs
4ee5744873 add decl for hppa_ras(). de-__P. 2004-07-18 23:31:26 +00:00
chs
0d86a5cd52 add hppa support for RAS, context stuff, siginfo and scheduler activations:
- add a RAS hook in cpu_switch().
 - fill in the definition of struct mcontext.
 - implement cpu_upcall(), cpu_getmcontext(), cpu_getmcontext() and
   cpu_switchto().
 - for now, force the right priviledge bits and space regs in setcontext().
 - use correct values for __SIMPLELOCK_*.
 - move the user stack to start at a multiple of the pthread stack size
   so that libpthread can use the sp-masking trick.
2004-07-18 23:21:35 +00:00
chs
807ed3c6d2 store the kernel stack pointer for a sleeping LWP in its PCB instead of
in its trapframe.  this is needed for scheduler activations, so that we can
change the user stack pointer via the trapframe.  from openbsd.
2004-07-18 20:27:11 +00:00
atatat
f68a9f1ff2 Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
2004-07-15 03:53:44 +00:00
bouyer
21e9a36edc Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
2004-06-28 21:07:47 +00:00
jkunz
61c5baa29e Ignore disklabel errors. Needed to make netbooting work again on some
old 700 machines and to be able to boot from LIF images on disk.
2004-06-28 16:40:44 +00:00
jkunz
0751bf5e12 The bootloader overwrites itself when relocated to 0x720000 and booting a
"big" kernel like GENERIC. So relocate the boot loader just below kernel text.
2004-06-28 16:27:15 +00:00
abs
bd8eb3b5ed Add (commented out) ALTQ options to all GENERIC-like files 2004-06-26 07:32:05 +00:00
itojun
596aec9a47 have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
2004-06-22 14:09:49 +00:00
christos
c22e4ed8cd ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM 2004-06-18 15:02:29 +00:00
chs
3dc76deeeb pick up some updates from OpenBSD:
----------------------------
  revision 1.25
  date: 2003/07/15 17:15:32;  author: mickey;  state: Exp;  lines: +2 -2
  model and revision were swappedplaces in the struct
  ----------------------------
  revision 1.23
  date: 2003/03/29 01:00:49;  author: mickey;  state: Exp;  lines: +2 -1
  add some author refs from the older versions of these from much older projects
  ----------------------------
  revision 1.22
  date: 2002/12/15 21:07:26;  author: mickey;  state: Exp;  lines: +22 -4
  max size for the iodc entry point is 64k, by the iodc spec;
  add sysmap defs, used on newer machines.
  ----------------------------
  revision 1.21
  date: 2002/12/15 17:52:02;  author: mickey;  state: Exp;  lines: +2 -1
  pdc device class for fibrechannel; from the iodc spec
  ----------------------------

the 1.22 change fixes the bootloader on my B180L.
2004-06-17 15:35:15 +00:00
christos
0399e839cf Add pseudo-device ptm on all the generic flavored kernels. 2004-06-16 15:07:39 +00:00
jkunz
95f5074f87 Rework code to identify the boot device. 2004-06-15 20:43:41 +00:00
jkunz
2b62e6e461 Use correct disklabel offset. 2004-06-15 20:40:17 +00:00
chs
508451c5cd include opt_ddb.h 2004-06-15 16:28:37 +00:00
itohy
064488f724 Add xxboot 2004-06-15 03:10:56 +00:00
itohy
b119940e75 NetBSD/hp700 FFS/LFS Primary Bootstrap 2004-06-15 03:10:30 +00:00
chs
a9402ad488 convert another %b to bitmask_snprintf(). 2004-06-11 13:59:40 +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
kleink
7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
simonb
9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
drochner
80bded6289 To the rest of the kernel, pretend that hppa supports SIGINFO.
There are still only "sigcontext" stackframes passed to the user,
but at least we can clean up the MI sources now.
2004-03-26 14:11:01 +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
bjh21
dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
jkunz
1917acaf35 Make new Intel i82596 Ethernet driver default for hp700. 2004-03-12 11:44:13 +00:00
jkunz
098a6e75bb Import hp700 MD part of new Intel i82596 Ethernet driver. 2004-03-12 11:41:39 +00:00
jkunz
7006f1c550 Import ipmlementations for _bus_dmamap_load_buffer(), mbus_dmamap_load(), mbus_dmamap_load_mbuf(), mbus_dmamap_load_uio() and mbus_dmamem_mmap(), from sys/arc/vax/vax/bus_dma.c and rework mbus_dmamap_sync() based on sys/arc/arm/arm32/bus_dma.c. 2004-02-20 20:22:10 +00:00
jkunz
c43db93399 hp700 has no PCI support yet. Enabling PCI devices breaks compilation, so disable all PCI devices for the moment. 2004-02-20 20:18:37 +00:00
wiz
d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
jonathan
abb59e6f0c Add support for opencrypto, PCI accelerators to sys/arch/*/conf/GENERIC
files for machines I know to have genuine PCI slots.  As sent to tech-kern
for feedback in December 2003. Based on feedback, opencrypto is commented
out in the macppc GENERIC (due to absense of GENERIC_SOFTINT support),
and added to the sparc64 config (sys/arch/sparc64/conf/GENERIC32).
2004-01-14 22:29:03 +00:00
jdolecek
d0210c07a4 update to recent changes - exit2() doesn't exist anymore and the
exit path always calls lwp_exit2()
pointed out Martin Husemann, change reviewed by Chuck Silvers

also update comment with switch_exit() prototype while here
2004-01-05 08:59:55 +00:00
chs
7e6508e29e add a PMAP_NC flag for pmap_kenter_pa() to specific a non-cached mapping.
use this in mbus_dmamem_map() to fix corruption of DMA memory.
note that this TLB bit is ignored on some CPUs (PA7100 and probably
others of that era), so this doesn't fix the problem in general,
but it does work on newer models and will make things easier later.
2004-01-05 02:25:32 +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
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
jmc
43bf89bfc6 Fixes from PR#23177. Various lint/logic fixes:
Fix some non-initialized variables
close the output files when done
Redo the printing for RCS strings so they don't expand in the awk script too
Do proper tests for variables existance before accessing

Verified output from all scripts is identical to original versions
2003-12-15 07:32:20 +00:00
agc
7db1d33cba Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
2003-12-10 12:06:25 +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
chs
6ca2b78b74 enable com console. 2003-12-08 14:59:26 +00:00
chs
961d62cfa5 add console support, based on other platforms. from Jochen Kunz. 2003-12-07 02:17:22 +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
chs
06abe054f9 bcopy -> memcpy 2003-11-28 19:03:03 +00:00
chs
8205afea7d de-__P, remove register, ansify. 2003-11-24 02:51:35 +00:00
chs
36ff370721 de-__P, remove register, ansify. 2003-11-23 17:09:29 +00:00
chs
6cca27ceb0 add cnmagic support to pdc console driver. 2003-11-21 00:25:36 +00:00
chs
0b0e802177 de-__P, remove register, ansify. 2003-11-20 03:58:47 +00:00
chs
5dcca2231a restructure autoconf for [ABCDJK]-class machines. add phantomas bus.
adapted from OpenBSD by Jochen Kunz.
2003-11-18 04:04:42 +00:00
chs
d277a48ec3 a stripped-down config to work around netboot problems. 2003-11-18 04:03:32 +00:00
chs
cfb436dcf3 remove link_set hack, new toolchain doesn't need it. 2003-11-18 03:25:48 +00:00
tsutsui
addcf5d254 #if defined(_KERNEL_OPT) is enough, #if !defined(_LKM) isn't needed
in that case. Pointed out by mrg.
2003-11-08 15:19:20 +00:00
tsutsui
7a6d021fe2 Include "opt_lockdebug.h" only #if !defined(_LKM) && defined(_KERNEL_OPT). 2003-11-08 12:06:20 +00:00