Commit Graph

850 Commits

Author SHA1 Message Date
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 6147cc4ab2 More changes for providing lwpid for ktrace (sparc GENERIC built) 2003-06-29 09:56:24 +00:00
drochner 1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
thorpej 0eff671820 Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
2003-06-14 17:01:06 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
martin d7259b772a Make this compile with __FULL_SPARC_BUS_SPACE,
from Steve Rumble in PR 21398.
2003-04-30 22:12:34 +00:00
thorpej 02efafccdc Use PAGE_SIZE rather than NBPG. 2003-04-02 04:35:22 +00:00
pk 4eb3db09d9 Move all `ID prom' stuff into the prom library. 2003-02-26 17:39:05 +00:00
thorpej 3ea6b8be93 Add missing splbio() protecting of bufpool access. Add a clarifying
comment to <sys/buf.h> reminding everyone of the need for splbio().
2003-02-25 21:25:40 +00:00
thorpej eb14e86676 Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
use it.  This fixes a few places where either b_dep or b_interlock were
not properly initialized.
2003-02-25 20:35:31 +00:00
pk 338f31f581 Make the buffer cache code MP-safe. 2003-02-05 21:38:38 +00:00
hannken eea2fc320e Fix printf() problem caused by "daddr_t" change. 2003-01-30 16:33:50 +00:00
pk be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
fvdl a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
pk 9d33cc7115 Set the interrupt target to the current CPU when directly accessing
the chip for console I/O.
2003-01-22 22:00:39 +00:00
thorpej c464d72f40 Merge the nathanw_sa branch. 2003-01-18 06:44:56 +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
thorpej 9c1214153c Use aprint_normal() for cfprint routines. 2003-01-01 02:20:47 +00:00
mrg 7d51aacb32 update the vme bus_space_tag_t to reality. 2002-12-28 01:33:00 +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 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 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 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 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
fredette 0fee3368c3 Fixed a null pointer passed to printf(). 2002-12-05 18:05:33 +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
christos 729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +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
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
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
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
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
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
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 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 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
thorpej 41c25cb648 Add autoconfiguration support for the Sun4d "bootbus". Add a
zs @ bootbus attachment.
2002-08-24 05:26:56 +00:00
thorpej 90817e313c Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
2002-08-23 02:53:10 +00:00
hannken 80fb19da39 Convert to new device buffer queue interface.
Approved by: Paul Kranenburg <pk@netbsd.org>
2002-08-06 14:44:15 +00:00