Commit Graph

2368 Commits

Author SHA1 Message Date
matt c9aff328d9 Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
2000-06-01 00:49:49 +00:00
cgd 47449a63d2 kill __P in these files. (I had to look at them anyway with an eye for
adding some protos... and adding them with __P seems wrong, but mixing
__P and not __P in the same file seems wrong too, so...)
2000-06-01 00:04:50 +00:00
thorpej 370a47ecac Add a few systypes. 2000-05-31 18:29:17 +00:00
thorpej 0d866249d4 - In the MULTIPROCESSOR case, initialize p_cpu before a process is
marked SONPROC.
- Always make curproc, fpcurproc, astpending, and want_resched per-CPU
  variables in struct cpu_info.  Restructure code accordingly, and trim
  a few instructions from a few spots in various places in locore.
2000-05-31 05:14:26 +00:00
mycroft 65ace9d5d8 Yessiree! It's softdep time! 2000-05-31 04:57:20 +00:00
matt 3f4005113e funciton != function 2000-05-29 23:34:08 +00:00
matt c7c33f1747 make egcs happy: ioasic.c:327: warning: suggest parentheses
around arithmetic in operand of |
2000-05-29 02:16:57 +00:00
thorpej 8576ef9a13 Add Cyclades-Z. 2000-05-28 23:06:39 +00:00
thorpej 0936213012 Add Cyclades Y and Z multiport serial adapters. 2000-05-28 23:05:19 +00:00
gmcgarry 6eb4356ecf IOASIC_INTR_ISDN is used for interrupts on every sample. We use DMA so
need IOASIC_INTR_ISDN_TXLOAD|IOASIC_INTR_ISDN_RXLOAD.
2000-05-28 06:07:31 +00:00
thorpej e03e9e8086 Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
2000-05-28 05:48:59 +00:00
thorpej 5410ee3607 Update a couple of comments for reality. 2000-05-27 06:29:35 +00:00
sommerfeld 40339b39f9 Reduce use of curproc in several places:
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()
2000-05-27 00:40:29 +00:00
thorpej a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
jhawk 8e44b27348 Rename the machine-specific stack trace printing functions
from db_stack_trace_cmd() to db_stack_trace_print(),
and add an additional argument, a function pointer for an
output routine (i.e. printf() or db_printf()).

Add db_stack_trace_cmd() in db_command.[ch], calling
db_stack_trace_print() with db_printf() as the printer.

Move count==-1 special handling from db_stack_trace_print() [nee
db_stack_trace_cmd()] to db_stack_trace_cmd() [nascent here].

Again, I'm unable to test compilation on all affected platforms,
so advance apologies for potential brokenness.
2000-05-26 03:34:24 +00:00
thorpej 8964c35eca Introduce a new process state distinct from SRUN called SONPROC
which indicates that the process is actually running on a
processor.  Test against SONPROC as appropriate rather than
combinations of SRUN and curproc.  Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
2000-05-26 00:36:42 +00:00
jhawk f3528d725d Interface change: db_printsym() takes a third argument, pr, a function
pointer indicating how to print the symbol. This allows db_printsym()
to called in places where db_printf() is not an appropriate output
function.

While straightforward, apologies in advance if I've introduced any minor
syntax errors; I was unable to test compilation this on all the affected
platforms.
2000-05-25 19:57:30 +00:00
mycroft 57f3751ca1 Add ipfilter-related stuff. 2000-05-25 16:33:13 +00:00
thorpej 1140468205 Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).
2000-05-24 16:48:33 +00:00
thorpej f6cea17c36 Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.
2000-05-23 05:12:53 +00:00
thorpej d3ea31501b Add an MP version of this config, and add come commented out
debugging options.
2000-05-23 05:01:56 +00:00
thorpej 0aae1fb638 Note that KN300 is also for AlphaServer 1200. 2000-05-23 02:04:28 +00:00
thorpej b97e178455 Add kernel config for my AlphaServer 1200 MP hacking box. 2000-05-23 02:02:41 +00:00
thorpej 2c49ab816e When checking for netboot, also check for MOP protocol. 2000-05-22 20:13:31 +00:00
thorpej 800573dc5f Normalize determination of scsiboot and netboot. 2000-05-22 20:09:12 +00:00
thorpej 09e72ae7e2 Remove the adjustment of VM_PHYS_SIZE for `large memory machines'. The
only adjustment that was really necessary was for VM_KMEM_SIZE, and that
is no longer necessary because there is now generic auto-sizing for
kmem_map.
2000-05-22 17:13:53 +00:00
thorpej 7e078f081c Kernel config for my Alphastation 200 file server + wireless network
gateway.
2000-05-22 16:46:11 +00:00
thorpej 20241c549c These systems haven't been available to NetBSD/alpha developers
for a very very very long time, and there are more up-to-date
example configs for the BUNNY case.
2000-05-22 16:45:30 +00:00
thorpej 61ae567197 Rename CANE to MINI-ME to reflect that my Multia hasn't been
parked at my (former) NASA office for quite some time.
2000-05-22 16:38:24 +00:00
thorpej b0600483b9 bishop.nas.nasa.gov and nostromo.nas.nasa.gov are no more. 2000-05-22 16:35:25 +00:00
thorpej 071aed40ac A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well.  This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
2000-05-19 18:54:22 +00:00
matt f7b0b612b4 Add PCMCIA. 2000-05-18 04:03:30 +00:00
thorpej 463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
thorpej 26f56b9cab Only use __builtin_va_alist_t if using GCC 2.96 or later. Fixes
pkg/10080, from Matthias Scheler.
2000-05-12 23:49:11 +00:00
thorpej c52b8eabae Make stdarg/varargs work with GCC 2.96. 2000-05-10 17:53:45 +00:00
hubertf 9f48bba3ae Add "install" target, so "make install" after building the kernel
does something useful.  The target can be redefined by putting a
install-kernel-${MACHINE_NAME} target that fits your needs into
/etc/mk.conf.
2000-05-09 00:56:21 +00:00
thorpej 6a33c86623 HAVE_GCC28 -> HAVE_EGCS, and make it match gcc 2.9 as well. Also,
make the use of -Wno-uninitialized explicit, don't rely on a compiler
hack to do it for us.
2000-05-09 00:32:19 +00:00
augustss 3a6e3a4670 Add (sometimes commented out) MIIVERBOSE option. 2000-05-08 13:49:44 +00:00
augustss 8abcd395fd Add bba(4) attachment. 2000-05-02 08:04:24 +00:00
thorpej 855b79db92 Let each platform typedef the new __cpu_simple_lock_t, which should
be the most efficient type used for the atomic operations in the
simplelock structure, and should also be __volatile.
2000-05-02 04:41:04 +00:00
thorpej dc8f3d3b3f Oops, install <machine/lock.h> on these systems, too. 2000-04-29 03:45:42 +00:00
thorpej f51470a514 Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
2000-04-29 03:31:45 +00:00
ad db06ac868b Attach cac* and ca*. 2000-04-28 13:51:56 +00:00
ad 8f9b06a9e6 - Enable ca(4) device.
- Fix a couple of nits.
2000-04-28 13:50:25 +00:00
thorpej 0cde36f780 Carve off the ISA configuration bits from the floppy driver. Driver is
still ISA-specific, but we can attach ISA instances with different
configuration mechanisms now.
2000-04-23 16:47:45 +00:00
thorpej bedbdf87a4 rl -> rtk 2000-04-22 16:28:48 +00:00
haya 784977f319 Changes the name of RealTek driver. The new name is `rtk'. This used
to be called `rl' and it conflict with RL vax disks, canonical and
historical unix driver name.

This changes are minimal: it only changes the name of RealTek driver.
The filename of source code and a lot of the letter `rl' in source
files should be changed shortly.
2000-04-19 08:44:31 +00:00
itojun 3be41bae18 add stf pseudo interface (commented out due to possible security risks) 2000-04-19 06:50:27 +00:00
tron 939041f1aa Fix typo in last commit. 2000-04-18 14:48:53 +00:00
drochner 13c9f8d398 implement bus_space_vaddr() 2000-04-17 17:24:48 +00:00