Commit Graph

3405 Commits

Author SHA1 Message Date
pk 0a78c9e13a Define a few XCALL? shorthand macros to avoid clutter. 2003-01-03 15:44:55 +00:00
pk ff451161e2 Finish FPU context switching on SMP systems. 2003-01-03 15:12:02 +00:00
martin 87a073002c Make the *_stream_* methods always use the *_real accessors.
Define __BUS_SPACE_HAS_STREAM_METHODS.
2003-01-03 13:23:39 +00:00
mrg 7bd617d237 part one of bus_space(9) fixes to enable bus spaces to override the
bus_space_{read,write}_[1248]() functions, which will allow 16-bit
PCMCIA support to work without additional hacks in MI drivers.
this option is not enabled yet.
2003-01-03 11:57:45 +00:00
pk 947028ed94 reverse mailbox physical address check: now warn if it's not I/O space. 2003-01-03 09:22:11 +00:00
pk 3f5be1863e srmmu cache flush: use to the CPU context parameter; this is now required. 2003-01-03 09:19:03 +00:00
mrg c79ff46cb6 don't try to setup MXCC registers on non-primary CPU's on systems without
SMP support.
2003-01-02 09:42:09 +00:00
pk 9dd42c6155 SMP: lock kernel for soft interrupts < IPL_SCHED as well. 2003-01-01 16:17:10 +00:00
pk 3607bd7dca pmap_alloc_cpu: use flags from boot cpu for now, as the passed cpu_info
structure has not been fully setup yet.
2003-01-01 15:56:11 +00:00
pk 16305a65cb prom mailbox map: look for the property `mailbox-virtual' first. 2003-01-01 15:51:00 +00:00
mrg 2fff4ee989 fix a comment. 2003-01-01 08:24:48 +00:00
mrg d06249b555 KNF. 2003-01-01 06:33:29 +00:00
thorpej 9c1214153c Use aprint_normal() for cfprint routines. 2003-01-01 02:20:47 +00:00
pk 2aac3c7c89 Slight optimisation in proc_trampoline(). 2002-12-31 17:07:36 +00:00
pk 1df04e663f Make the schedintr() code common for all timers. 2002-12-31 16:45:52 +00:00
pk 7b7269ba42 New version of cpu_switch/switchexit, mostly to simplify SMP support. It's
currently conditional on ALT_SWITCH_CODE (defaults to `on' if MULTIPROCESSOR
is defined) until more testing rounds are completed.
2002-12-31 16:17:12 +00:00
pk 3d8def4865 Use a soft interrupt scheme to schedule schedclock(), so we can make
splsched() less than splhigh().
2002-12-31 15:57:26 +00:00
pk 67e16e38a4 Define IPL_SCHED at level 11 and make splsched() use it. 2002-12-31 15:51:18 +00:00
pk d358537b64 Pass the CPU context to all TLB flush routines. Because of this (and the
fact that cache flushes are also passed the context number), most
"long-term" context switches can be eliminated from the SRMMU versions
of the pmap functions.
2002-12-31 15:23:29 +00:00
pk 83dae8a821 * map the PROM CPU mailbox if available.
* map MXCC error/status registers if available.
* add MXCC-specific module error interrupt handler.
* use high priority interrupt level in mp_pause_cpus()
2002-12-31 15:10:28 +00:00
pk 2b59d26892 Add offset for `cpuinfo.ci_tt'. 2002-12-31 15:05:48 +00:00
pk c3bb05ff5b * Add level argument to raise_ipi()
* Add diagnostic field members to cpu_info.
2002-12-31 15:04:49 +00:00
pk 5c671fd10d nmi_sun4m: run handler at splhigh() 2002-12-31 14:34:54 +00:00
pk 43b86d0b59 rwindow debug code: display the current cpu number. 2002-12-31 13:17:23 +00:00
pk a1e9e5cae8 Add some more definitions: SRMMU and MXCC reset register. 2002-12-31 12:01:27 +00:00
mrg 122353da40 rename CPU_READY() to CPU_NOTREADY() seeing that's what it checks. 2002-12-28 02:35:56 +00:00
mrg 7d51aacb32 update the vme bus_space_tag_t to reality. 2002-12-28 01:33:00 +00:00
martin ffbcb6d927 Conditionalize T_DBPAUSE trap handling on #ifdef MULTIPROCESSOR to make
single CPU kernels compile again.
2002-12-26 12:14:31 +00:00
pk f8055a350c * Use correct PC value for displaying the called function.
* Merge code to display non-kernel frames.
2002-12-23 13:21:10 +00:00
pk f953a01835 xcallintr() receive a `clockframe *' argument, not a `trapframe *'.
Setup a DDB context for paused CPUs by defining a soft trap (T_DBPAUSE)
which uses the generic trap handler code to get the trapframe constructed
and then calls on a debugger-defined `suspend' routine.
2002-12-23 00:55:16 +00:00
pk 5c62f82bdf Upon trap exit, update the trapframe with data for the running CPU rather
than the one which was the last target of the `machine cpu' command.
2002-12-23 00:42:37 +00:00
mrg 6ee482ef5b change what 'hw.model' reports to be more inline with other netbsd ports, as
well as reporting the actual machine model & cpu, rather than first configured
CPU.  changes for two machines are:

old:
	hw.model = TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU
	hw.model = SUNW,UltraSPARC @ 143.002 MHz, version 0 FPU

new:
	hw.model = SUNW,SPARCstation-20 (TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU)
	hw.model = SUNW,Ultra-1 (SUNW,UltraSPARC @ 143.002 MHz, version 0 FPU)

as per discussion on port-sparc & port-sparc64.
2002-12-22 02:17:24 +00:00
manu 4a06119a9d Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.
2002-12-21 16:23:56 +00:00
pk 4e0634669b * xcallintr(): use cpuinfo directly again.
* nmi_soft(): remove most of the obsoleted requests.
2002-12-21 12:55:54 +00:00
pk 0408b1cbc8 tlb_flush_segment() and tlb_flush_region() now take a virtual address
argument instead of segment and region numbers.
2002-12-21 12:52:55 +00:00
pk 82815de0ad Use xcall() to broadcast MMU TLB flushes. 2002-12-21 12:13:38 +00:00
pk 8dcde9f5b1 * cpu_hatch(): enable interrupts upon return from cpu_setup().
* interrupt trap: acquire the kernel lock only for interrupt levels <= PIL_SCHED
2002-12-21 11:57:41 +00:00
pk 1d8dc4daf2 * getcacheinfo_obp(): also initialise the cacheinfo i/d associativity fields
in the case of a unified cache.
* xcall(): slightly optimise the `wait for other CPUs' loop.
2002-12-21 11:48:55 +00:00
pk f0a20f1305 * mark selected fields of `struct xpmsg' as volatile, instead of the whole
structure.
* change volatile => __volatile
2002-12-19 16:31:38 +00:00
pk 2fba4e01ff Mark CPUs that did not spin up properly and don't enable them later on. 2002-12-19 11:20:30 +00:00
pk 75c5f270d2 Brush-up the generic cross-call routine and use it to implement the SMP
cache flush ops.
Also a standard soft interrupt handler for standard cross-call notification
reserving the NMI level 15 softint for urgent cross calls.
2002-12-19 10:38:28 +00:00
pk eaf530d598 Sprinkle volatiles to avoid register allocation, esp. in cross-call
synchronisation functions used in SMP kernels.
2002-12-19 10:30:39 +00:00
pk ec2b1c3c64 smp_cache_flush() also takes a context parameter. 2002-12-19 10:27:19 +00:00
pk 2076dbdb04 Install the sparc V8 multiply/divide routines after we've collected some
basic information on the CPUs.
2002-12-18 11:56:43 +00:00
mrg 1a854929dd we use nmi_hard and nmi_soft on SUN4D as well 2002-12-18 06:20:36 +00:00
pk a26cbfba69 Deal with an `unimplemented flush' trap from kernel mode. 2002-12-17 10:04:19 +00:00
pk c2ddc52f2d The cache flush routines now take a CPU context parameter. This is going
to be necessary in SMP kernels.
2002-12-16 16:59:09 +00:00
pk b036b089a7 Multiple inclusion protection. 2002-12-16 16:24:40 +00:00
jdc 0a3a2262cb Increment version number for match function and Cycle 5 IP changes. 2002-12-16 13:02:58 +00:00
jdc 079b83cafa Extend the matching routine to take a function pointer, so that additional
(arbitrary) matching can be done.
Add match function and patch for Cycle 5 IP (Sparc 5 clone).

Reviewed by Uwe.
2002-12-16 13:01:01 +00:00
martin ae7d5baab6 Fix pasto - make it compile for !MULTIPROCESSOR 2002-12-15 23:01:09 +00:00
pk 9313f9570d Disable `unimplemented flush' traps during boot. Keep it disabled on
non-MULTIPROCESSOR kernels.
2002-12-15 15:01:08 +00:00
christos cc079cff49 release the kernel lock if trace_enter fails.
XXX[1]: We need to fix all platforms that do this.
XXX[2]: x86 does not check for MPSAFE syscalls before grabbing the lock.
2002-12-14 14:52:24 +00:00
pk f4fe3fda21 dumpsys(): Use pmap_kremove() to unmap pages mapped pmap_kenter(). 2002-12-12 09:34:04 +00:00
pk 047870f66e softintr_establish(): append handler to the list for the actually choosen
processor interrupt level.
2002-12-11 13:21:19 +00:00
pk e675712f0d * loadfile() return a file descriptor that must be closed.
* check the kernel size before loading
2002-12-11 10:35:06 +00:00
thorpej e8cc3884de Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is. 2002-12-10 17:14:02 +00:00
pk 725a6aebf7 Remove the `flags' argument from bus_intr_establish(). 2002-12-10 13:44:47 +00:00
pk 5446e96bac bus_intr_establish() now takes an optional `fast trap' handler argument.
BUS_INTR_ESTABLISH_FASTTRAP and BUS_INTR_ESTABLISH_SOFTINTR are no longer used.
2002-12-10 12:16:25 +00:00
pk 45c45fca81 intr_establish() signature change: pass NULL for the `fast trap' argument. 2002-12-10 12:13:24 +00:00
pk fe233fdc10 The `fast trap' handlers are now pssed as an optional argument to
bus_intr_establish(). Allow fall-back on a regular interrupt handler if
the interrupt level must be shared with another device.
2002-12-10 12:11:21 +00:00
pk 4f62e0f7c8 * intr_establish() now takes an optional `fast trap' routine argument.
* also remove __P().
2002-12-10 12:04:51 +00:00
pk 6f945ab887 Allow a `fast trap' handler installation to be undone if an interrupt level
must be shared. This requires drivers that request the installation of
a `fast trap' handler to supply a regular interrupt handler as well to fall
back on.

The `fast trap' routine (if present) is now passed as an additional
argument to intr_establish().
2002-12-10 12:03:08 +00:00
thorpej 78ea2dd367 Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
2002-12-10 05:14:24 +00:00
pk 04e582df1b setsoftint() is no longer used. 2002-12-09 16:13:58 +00:00
pk 48a30a2e35 Soft interrupts use their own set of handlers lists. 2002-12-09 16:13:23 +00:00
pk c822c6bd84 Finish the switch to the softintr(9) framework.
To make this work, we now have to use separate handler lists for hardware
and software interrupts as the soft interrupt handlers do not return
an `interrupt handled' status.

Thanks to Matt Fredette for providing an initial set of patches on port-sparc.
2002-12-09 16:11:50 +00:00
pk 74a8332ee9 cpu_switch(): avoid raising the interrupt level and enabling traps at the
same time as this may cause a spurious interrupt in some implementations.
Pointed out by uwe.
2002-12-08 16:16:59 +00:00
uwe 38b8c5689a Use 0x07ffffff for LOADADDR mask. This still provides for 128MB (and
given that PROM maps just 4 or 16 this is not going to be a bottle
neck).  Doesn't really affect normal kernels, need it for the changed
kernel base address (uncommitted) hack for broken javastation OFW.
Ok by pk.
2002-12-08 14:36:55 +00:00
pk 6c8d3fba22 Use MI versions of {set,rem}runqueue(). 2002-12-07 10:27:03 +00:00
pk 9ebe0ee7a6 ienab_bi[cs] are never used in a context common to both sun4/4c and sun4m,
so there's no point in constructing common entry points for them in locore.s.
2002-12-06 17:45:39 +00:00
pk 1b719337bb Pass the `device class interrupt level' on to intr_establish() and use to
raise the ipl in the interrupt handlers to the appropriate level. This avoids
interrupt handler interference if one of the devices actually interrupts at
a lower hardware level than the maximum level assined to a device class.

Based on code from Art Grabowski in openbsd.
2002-12-06 16:04:11 +00:00
pk 721e534a25 Use IPL_SOFTFDC. 2002-12-06 15:37:55 +00:00
pk e093913db8 Use IPL_SOFTAUDIO. 2002-12-06 15:37:39 +00:00
pk 060fa93542 Start using IPL_* constants from intr.h; phase out PIL_* in psl.h 2002-12-06 15:36:45 +00:00
fredette 0fee3368c3 Fixed a null pointer passed to printf(). 2002-12-05 18:05:33 +00:00
uwe 6c05e7879f Fix an options<space><tab> nit. 2002-12-04 23:30:40 +00:00
uwe 23c0293ee7 The chip treats weekday 1 == Sunday, correct dt_wday adjustment logic
appropriately.  NB: the old code would never write weekday zero that,
I've been told, might cause the RTC to reset.
Pointed out by kenh.
2002-12-03 17:54:54 +00:00
pk 59c9274871 Always get the `mid' cpu property. Whine if it's not set on an actual
multi-processor machine.
2002-11-29 08:29:57 +00:00
pk 03549142e0 Find the CPU architecture version early in the bootstrap phase, and switch
to the V8 specific .mul/.div/.rem routines while we still have a writable
.text section.
2002-11-29 08:02:05 +00:00
pk 565cedc81e Provide the V8 mul/div routines for SUN4D as well. 2002-11-29 07:56:50 +00:00
pk 6564749632 Move the installation of v8 specific .mul/.div functions into a separate
routine to be called when we're sure the CPU is actually sparc version 8.
2002-11-28 15:32:15 +00:00
pk 8d141cba88 Not all sun4m platforms have version 8 sparc CPUs. So go out to the PROM
and get the CPU architecture version from the PROM cpu node `sparc-version'
property.
2002-11-28 15:29:53 +00:00
pk f19c04e3ed Move timer{match,attach}_mainbus() back into timer.c, since the `timer at
mainbus' configuration declaration is orthogonal to the configured SUN4[CM]
platform options.
2002-11-28 14:18:31 +00:00
pk ba4983b5db Provide sparc v8 multiply/divide routines which are copied over the base
v7 versions on sun4m and sun4d machines. Based on Chris Torek's BSD/OS
code.
2002-11-27 16:08:34 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
christos 729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +00:00
thorpej 09dfaace39 The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
2002-11-26 18:51:12 +00:00
pk 007c037980 * pmap_destroy(): reset the region gap
* pmap_quiet_check(): add check for pmeg leaks on sun4/4c (this is DEBUG only).
2002-11-26 15:09:56 +00:00
pk 0fad562c7c The presence of the `timer at obio' attachment is independent of the
various CPU support settings.
2002-11-26 14:43:39 +00:00
pk ec667a0f51 Add `machdep.cpu_arch' sysctl to determine the CPU architecture version.
Currrently, cpu types `sun4' and `sun4c' produce version 7, all others
version 8.
2002-11-26 14:36:10 +00:00
martin 070e18f3f3 Assign a major number for "lpt* at ebus?". 2002-11-24 20:58:06 +00:00
wiz e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00
manu d584ed9598 Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
2002-11-15 20:06:00 +00:00
uwe 7e95293c56 Use BOOT_FLAG() macro to process flags. 2002-11-09 01:35:54 +00:00
uwe 7a7c188182 Oh, COPTS in config overrides optimizations again. 2002-11-08 22:51:53 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
petrov 71614764a4 Compile with an ISO C preprocessor. 2002-10-30 01:46:09 +00:00
chs f921b6a46c make this compile with DEBUG (name changes missed in rev. 1.172). 2002-10-27 18:39:17 +00:00
jdolecek c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
uwe af2a75546d Clean-up kbd driver layers a bit more. Lift common code into the upper layer.
Add some wskbd TODO remarks (hi, martin).
2002-10-21 15:36:35 +00:00
uwe 35ec23469c Correct zstty interface attribute (cf files.sparc64 1.69).
Comment out unused kbd_tty and ms_tty attachments.
2002-10-21 15:25:42 +00:00
martin f19a67c55f Allow hyphen in kernel names. Bump version.
Should fix PR 13429 and PR 18691.
2002-10-20 20:55:38 +00:00
junyoung e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
martin 9b3cdc3ab5 Make 32bit sparc64 kernels with DEBUG and DIAGNOSTIC compile. 2002-10-16 11:05:10 +00:00
jdc 86fda61426 Uncomment audioamd0 at obio0. 2002-10-15 13:53:01 +00:00
jdc d1f466e658 Add audioamd at obio attachment. Now we have working audio on 4/600's :
audioamd0 at obio0 slot 0 offset 0x500000 level 13 softpri 4
  audio0 at audioamd0: full duplex
2002-10-15 13:49:52 +00:00
elric 5ab71e20b0 Added commented out cgd(4)s to GENERIC configs. 2002-10-14 18:39:22 +00:00
takemura 900b200c92 Moved MI APM definitions into dev/apm. 2002-10-14 02:08:37 +00:00
jdc 050645f10a Check only the physical address of serial ports on a Sun 4.
Reviewed by Uwe.
2002-10-09 08:56:25 +00:00
uwe a931c80c22 G/c unnecessary includes. 2002-10-08 18:00:46 +00:00
martin 44a2c6cb31 All sparc64 CPUs do __HAVE_CPU_COUNTER (aka %tick). 2002-10-07 13:26:56 +00:00
provos 2f7a0aaac8 add SYSTRACE; approved perry. 2002-10-06 02:11:54 +00:00
elric d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
uwe fbcf88f171 Add wscons. Misc catch-up with GENERIC. 2002-10-03 17:45:20 +00:00
uwe fa76f154c6 Add majors for wscons devices.
And, no!  This does not mean that sparc switches to wscons.
Only Krups has experimental wscons support so far.
2002-10-03 17:06:18 +00:00
uwe 7235b5d479 First cut at PS/2 keyboard and mouse drivers that talk Sun firm events.
Console and Xsun for Mr.Coffee.
2002-10-03 16:27:04 +00:00
uwe fb2195ae8f Search children of the "8042" node to check if keyboard is the stdin. 2002-10-03 16:22:46 +00:00
uwe 191626f788 Refactor kbd and mouse drivers so that they can use different middle
layers.  Common middle layer shared by kbd_zs and sunkbd is moved into
the new file.  Move shared config directives to files.sun and adjust
ports' files.* accordingly.

Need this to support console/Xsun on Mr.Coffee JavaStation.

Tested on sparc, sparc64 (by martin) and sun3 (by jdc).
2002-10-03 16:13:24 +00:00
thorpej 4bf871a755 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:02:08 +00:00
thorpej c1077f220d Use CFATTACH_DECL(). 2002-10-01 18:57:48 +00:00
wiz b1c7ac0e6d "definitions" has lots of 'i's, but that's not reason to leave one out. 2002-09-29 23:23:56 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
thorpej 274c086b22 Remove <sys/map.h> 2002-09-26 18:54:30 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
martti 81e8d78cd4 Add one space between "#option" and "<tab>IPFILTER_DEFAULT_BLOCK" 2002-09-25 11:49:48 +00:00
thorpej 787cbc6921 Fix some const warnings. 2002-09-24 18:14:35 +00:00
simonb 63096043b3 Use "#define\t" instead of "#define ". 2002-09-22 08:30:56 +00:00
chs c081614ea2 it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not.  doh.
2002-09-22 07:53:39 +00:00
chs 55e1f79335 add pmap_remove_all() hook (empty on most platforms so far). 2002-09-22 07:17:08 +00:00
gmcgarry dca80f08fd Add __HAVE_MD_RUNQUEUE flag for MD code to override MI run queue primitives. 2002-09-22 04:11:32 +00:00
martti 3b553bac54 Added (commented out) IPFILTER_DEFAULT_BLOCK. 2002-09-20 10:39:48 +00:00
ragge b3abfee038 Do not include <sys/clist.h>, it's not used in NetBSD at all. 2002-09-19 10:37:59 +00:00
lukem 3ea2e21f82 enable USERCONF by default; it's small and extremely useful to have available. 2002-09-18 02:43:53 +00:00
uwe 917eac2212 RCSID should go to .ident section.
While here add __KERNEL_RCSID.
2002-09-17 15:28:28 +00:00
ad ca0ac2c78c Driver for the Sun ZX/Leo framebuffer. This would be called leo, but the
amiga port already has a driver by that name.
2002-09-13 14:03:52 +00:00
tsutsui be0f4cfb13 Rename some auto variables which might cause misleadings. 2002-09-08 05:35:42 +00:00
tsutsui bf49a76d3b Call setcontext{4,4m}() directly when we already know the CPU type.
(inspired by OpenBSD)
2002-09-07 18:51:05 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
thorpej c9dafdb84c Increase the default stack limit to 2M (from 512K on sparc and 1M
on sparc64).
2002-09-03 16:24:35 +00:00
thorpej d1523404bb Fix missing error check in sparc_bus_map(). Pointed out by uwe. 2002-08-30 20:38:31 +00:00
uwe 082c4cf032 Make sun ports use common keyboard/firm events related includes
from dev/sun.
2002-08-27 09:47:41 +00:00
thorpej 139cdc3125 Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
2002-08-25 20:21:33 +00:00
thorpej a9f285b0ac Put a bus's ranges in the bus space tag, and make sparc_bus_map()
perform the translation and recursion if t->ranges != NULL.  Make
sbus, cpuunit, and bootbus inherit the parent's map/mmap routines,
and delete the now-unused mapping functions.  Update all places where
bus space tags are statically allocated.
2002-08-25 17:54:57 +00:00
thorpej 067a64da4d Split the timer code up into Sun4/Sun4c, Sun4m, and MS-IIep bits, mostly
to make it more readable.
2002-08-25 16:10:35 +00:00
thorpej 0570742a0b Add a generic function to translate a device address using a
parent's "ranges" property, and use it.
2002-08-25 16:05:41 +00:00