Commit Graph

371 Commits

Author SHA1 Message Date
petrov
49f3f8ccaf Port of OpenBSD ffb driver written by Jason L. Wright. 2003-05-23 06:51:15 +00:00
nakayama
a8c34ddce5 Avoid comparison is always false warnings in gcc 3.3 w/ 32-bit kernels. 2003-05-17 01:49:59 +00:00
nakayama
67e3486872 Avoid integer constant is too large warnings in gcc 3.3. 2003-05-17 01:48:22 +00:00
nakayama
d0f6668f6d Avoid strict-alias warnings in gcc 3.3. 2003-05-17 01:38:39 +00:00
martin
57482255bc When overwriting the cache line size configuration, do not use the magic
value 0x10, but instead calculate a line size that is properly aligned
to the IOMMU strbuf cache and our external cache line size.
From FreeBSD.
2003-05-05 07:51:26 +00:00
martin
d22ec31292 Move the bus speed query code into it's own function and make it default
to 33 MHz. Cosmetics, no functional change.
2003-05-04 21:36:26 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
martin
d65cbab3ff Connect the front panel power button on psycho based machines to sysmon's
/dev/power.

XXX - due to the way interrupt handling is structured we have no easy
way to defer clearing the button interrupt until the sysmon callback
has  happened and the event is dispatched. We clear it imediately on
return from the interrupt handler. This means we get an interrupt storm
until the button is released, and then start to handle it.
This needs to be fixed! (But with the default application for the power
button does not make a user visible difference.)
2003-04-21 12:14:19 +00:00
nakayama
72911290d9 Comment fixes from OpenBSD. 2003-04-17 12:58:18 +00:00
thorpej
747aa1e024 Use PAGE_SIZE rather than NBPG. 2003-04-01 16:34:58 +00:00
nakayama
aad45dd3ad PCI-CardBus bridge support for sparc64:
- handle devices which has no OBP node.
- move PCI latency-timer initialization from pci_intr_map to
  pci_enumerate_bus.
- make PCI bus free space extents for cardbus devices.
- fix PCI config space map size.
- some code integrations.
2003-03-22 06:33:09 +00:00
perry
1f4ad37fe3 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-05 00:02:24 +00:00
pk
be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
petrov
6383ae6ccb Don't do anything if there are no streaming buffer cache. 2003-01-16 21:55:52 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
thorpej
9c1214153c Use aprint_normal() for cfprint routines. 2003-01-01 02:20:47 +00:00
pk
725a6aebf7 Remove the `flags' argument from bus_intr_establish(). 2002-12-10 13:44:47 +00:00
pk
68817a2024 bus_intr_establish() signature change.
The additional `fast trap' argument is ignored in these drivers.
BUS_INTR_ESTABLISH_FASTTRAP and BUS_INTR_ESTABLISH_SOFTINTR are no longer used.
2002-12-10 12:24:05 +00:00
petrov
45a2f80742 Remove duplicate code in iommu_dvmamap_sync. 2002-10-24 23:24:01 +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
martin
fdeb300692 We are not going to get a "upa at mainbus" autoconfig entity, since
UPA is just a physical incarnation of our mainbus0.

Evidence:

 - There can only be one!
 - The firmware node coresponding to it is the root of the OF tree

So: remove the unused (and uncompilable) upa.c, remove upavar.h after
moving the only declaration used from it to autoconf.h.
2002-10-20 15:53:16 +00:00
martin
9b3cdc3ab5 Make 32bit sparc64 kernels with DEBUG and DIAGNOSTIC compile. 2002-10-16 11:05:10 +00:00
petrov
86b5bbfddd rearrange streming cache flushes in iommu_dvmamap_sync 2002-10-13 20:17:55 +00:00
jdolecek
a3e314bfcb tag the cdevsw as D_TTY 2002-10-10 10:12:00 +00:00
martin
57801e8fb7 Pass a struct cons_channel * to cc_iclose, not a struct kbd_softc *.
This argument has been previously unused, thus undetected due to void*
typing. Mmm, copy & paste. Note that sparc got it right though.

Many thanks to Valeriy E. Ushakov <uwe@netbsd.org> for debugging support.
2002-10-10 00:22:19 +00:00
martin
bbdf4c9e6d Remove unused file, superseeded by syssrc/dev/sun/fb.c. 2002-10-07 14:57:53 +00:00
thorpej
4bf871a755 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:02:08 +00:00
thorpej
34c3944c08 Use CFATTACH_DECL(). 2002-10-01 18:40:06 +00:00
martin
f525cb862b Fix broken timeval comparison.
Reported by Takeshi Nakayama in PR sparc64/18453, but fixed a bit
differently.
2002-09-28 20:56:05 +00:00
martin
7965adf3bb Set the PCI latency timer for bus master devices.
Slightly different to the patch suggested by Takeshi Nakayama in PR 18451
(idea from FreeBSD).

Additional input from Jason Thorpe: do not hard code the bus frequency,
instead get it from OpenFirmware.
2002-09-28 20:23:53 +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
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
eaaed308cf Compare driver name, don't check against zstty_cd. 2002-09-26 20:51:44 +00:00
chs
f54a093e81 many improvements:
- use struct vm_page_md for attaching pv entries to struct vm_page
 - change pseg_set()'s return value to indicate whether the spare page
   was used as an L2 or L3 PTP.
 - use a pool for pv entries instead of malloc().
 - put PTPs on a list attached to the pmap so we can free them
   more efficiently (by just walking the list) in pmap_destroy().
 - use the new pmap_remove_all() interface to avoid flushing the cache and TLB
   for each pmap_remove() that's done as we are tearing down an address space.
 - in pmap_enter(), handle replacing an existing mapping more efficiently
   than just calling pmap_remove() on it.  also, skip flushing the
   TSB and TLB if there was no previous mapping, since there can't be
   anything we need to flush.  also, preload the TSB if we're pre-setting
   the mod/ref bits.
 - allocate hardware contexts like the MIPS pmap:
   allocate them all sequentially without reuse, then once we run out
   just invalidate all user TLB entries and flush the entire L1 dcache.
 - fix pmap_extract() for the case where the va is not page-aligned and
   nothing is mapped there.
 - fix calculation of TSB size.  it was comparing physmem (which is
   in units of pages) to constants that only make sense if they are
   in units of bytes.
 - avoid sleeping in pmap_enter(), instead let the caller do it.
 - use pmap_kenter_pa() instead of pmap_enter() where appropriate.
 - remove code to handle impossible cases in various functions.
 - tweak asm code to pipeline a little better.
 - remove many unnecessary spls and membars.
 - lots of code cleanup.
 - no doubt other stuff that I've forgotten.

the result of all this is that a fork+exit microbenchmark is 34% faster
and a fork+exec+exit microbenchmark is 28% faster.
2002-09-22 07:19:43 +00:00
petrov
e2107815a0 Use /options instead of /chosen to find out where console is.
(found by Rafal Boni).
2002-09-21 09:29:33 +00:00
abs
4bebaafe44 Protect extern zstty_cd with (NKBD > 0) || (NMS > 0) 2002-09-12 12:51:37 +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
chs
d8a392f619 wrap Debugger() in #ifdef DDB. fixes PR 15881. 2002-08-29 04:43:43 +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
petrov
0e426c8d8b Port Jason L. Wright's sab82532 driver. From OpenBSD. 2002-08-16 08:47:13 +00:00
wiz
e00173a7f2 Spell 'should' correctly. 2002-07-18 11:59:06 +00:00
eeh
c05c5884e6 Turn on parity checking for the PCI bus. 2002-06-29 02:35:22 +00:00
eeh
691c4d1179 Fix compilation problems in DEBUG code. 2002-06-24 18:48:13 +00:00
eeh
fb5318516e The FFB interrupt mapping registers need to compare IGN as well as INO since
they are totally programmable.
2002-06-21 02:48:42 +00:00
eeh
5c6bf5ad03 Overhaul streaming buffer handling:
sysio streaming buffer flushes write a single 8-byte aligned 8-byte
	value.

	psycho streaming buffer flushes write a 64-byte aligned 64-byte block.

So separate out the streaming buffers into their own structure and pass those
in to all iommu operations.  This also means we only flush the correct
streaming buffer for psycho rather than needing to flush both just in case.
2002-06-20 18:26:23 +00:00
eeh
efad9de6ca NEVER CAST REFERENCE PARAMETERS!!!!! 2002-06-14 00:11:07 +00:00
eeh
9984a8bbcc Fix some corner cases in bus_dmamap_load_mbuf().
From Takeshi Nakayama <tn@catvmics.ne.jp>
2002-06-12 17:06:15 +00:00
eeh
c08cac5019 Use the correct bus handle to generate the handle for the streaming buffers. 2002-06-12 00:43:22 +00:00
drochner
d2b9876081 move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
2002-06-02 14:44:35 +00:00