Commit Graph

66 Commits

Author SHA1 Message Date
elad
8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
thorpej
bf53a8ce6f Use device_unit(). 2006-03-26 04:39:40 +00:00
he
927b30ab63 Remove yet another instance of the macro triplet SET/CLR/ISSET, now
found in <sys/types.h>.
2006-03-08 12:10:58 +00:00
thorpej
3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
perry
5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt
bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
kleink
aece7a90fd Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges.  Noted by David Holland in PR kern/31126.
2005-09-06 21:40:37 +00:00
drochner
44bf0a7ee2 s/locdesc_t/int/g 2005-08-26 13:19:34 +00:00
he
79220f0c2a Fix one more missed clockframe -> irqframe transition. 2005-08-14 21:08:32 +00:00
drochner
996c273eda adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes 2005-06-30 17:03:51 +00:00
he
24b7db0ccd Fix shadowing warnings by renaming local variables and by
removing parameter names in function prototype.
2005-06-04 21:19:23 +00:00
yamt
6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
drochner
46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
wiz
ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
matt
6bf111a80e Fix GCC 3.3.1 nits. 2003-09-21 19:32:37 +00:00
ichiro
22d06d95f5 fix typo
#if DEBUG -> #ifdef PCI_DEBUG
2003-09-15 05:11:31 +00:00
ichiro
4be788fe81 add address decode of "PCI Configuration type 1" 2003-09-15 05:07:29 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
igy
fcd9e244be Delaying to mask interrupt by hardware until actually it occurs.
The new code maintains two variables 'current_spl_level' and
'hardware_spl_level'.  Variable hardware_spl_level reflects actual
priority level at the hardware's point of view.  hardware_spl_level is
always synchronized to hardware.

splraise() just increases current_spl_level.  splx() sets
current_spl_level.  If (and only if) hardware_spl_level and
current_spl_level is not same, splx() synchronizes interrupt mask
register and hardware_spl_level to current_spl_level.

In most case, splraise() raises current_spl_level and splx() restores
only current_spl_level.

When an interrupt occurs, hardware_spl_level and interrupt mask
register are synchronized to current_spl_level.

In this implementation, during a higher priority interrupt handler is
running, lower priority interrupts never cause intr_dispatch() to run.
It will avoid some race condition.
2003-07-21 06:17:32 +00:00
igy
b449da1391 KNF 2003-07-13 09:25:50 +00:00
igy
a90b1b8eca code clean up 2003-07-13 08:56:16 +00:00
igy
3e9598d4fa move window of pci i/o cycle to higher address 2003-07-13 08:26:31 +00:00
igy
cdb56b83f6 mapping pci configuration space (not subregion) 2003-07-13 07:15:22 +00:00
igy
1087696257 using common bus_space_tag in ixpsip too 2003-07-13 02:48:41 +00:00
igy
365f7e1994 sharing bus_space_tag among ixpio, pci mem and i/o. 2003-07-13 02:11:58 +00:00
igy
2a9dfe7684 using devmap for static mapping 2003-07-13 01:01:50 +00:00
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
ichiro
904951f445 struct proc * -> struct lwp * 2003-06-29 11:10:35 +00:00
thorpej
452a8fdae2 Rename IPL_IMP -> IPL_VM. 2003-06-16 20:00:56 +00:00
fvdl
7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
igy
4691b478a0 Add __KERNEL_RCSID tags 2003-03-25 06:12:46 +00:00
igy
9ead47682a catch up to consdev update 2003-03-06 07:39:34 +00:00
igy
3c0a5d1f13 Remove #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS switch and old interrupt
support.  Ixp12x0 port always uses generic soft interrupt.
2003-03-06 06:17:43 +00:00
igy
edcaa77675 insert macro to protect itself against multiple includion. 2003-03-06 06:14:16 +00:00
igy
d399d9df43 fix incorrect interrupt mask handling.
pci_imask[IPL_NET] is incorrectly ORed on imask[IPL_SOFTSERIAL].
imask[IPL_NET] should be ORed.
2003-02-22 11:13:10 +00:00
igy
4e8142fde2 correct physical/virtual address handling
- to identify device instance, using hardware address.
	- when console accesses device, using statically mapped address.
	- when tty accesses device, using handler given by bus_space_map().
2003-02-22 05:32:00 +00:00
igy
a7a7697279 Don't use dv_unit to determine console. Back to comparing iobase again.
We always assume ixpcom is at statically mapped address (0xf0000000).
2003-02-21 01:53:35 +00:00
igy
6248ef9b7e implement ioctl 2003-02-21 00:31:08 +00:00
ichiro
4b8928ad4a files.ixp12x0
no need device ixpcom in evbarm/conf/files.evbarm move it to
arm/ixp12x0/files.ixp12x0

ixp12x0_com.c:
some fix around address handling
1. Do not call bus_space_map() in ixpcominit().  Calling bus_space_map()
   is not safe here, because bus_space_map() calls uvm_km_valloc() but
   uvm is not yet initialized.
2. Use dv_unit to determine console instead comparering iobase.
   Now you can attach ixpcom0 with physical address like this:
        ixpcom*         at ixpsip? addr 0x90000000 size 0x4000
Statically mapped address (0xf0000000) is still usable.

ixp12x0_clk:
1. access PLL_CFG register via bus_space
2. Make the delay() working correctly.  (bug fix)
3. Start the timer device without interrupt on attach time.
   Now delay() called before cpu_initclocks() works fine.

ixp12x0_pci:
1.Mapping PCI type0/1 configuration space to the upper address.
2."PCI I/O Cycle Access" mapping to same virtual address(VA==PA)
   but size of this mapping increase to 1MByte because fails
   cause couldnt set L2 table.
3.use bus_space address handling in ixp12x0_pci.c.
2003-02-17 20:51:52 +00:00
thorpej
b179f9cf73 Use the generic irq_dispatch.S 2003-01-03 00:55:59 +00:00
thorpej
6c9c7f3b21 Garbage-collect prev_intr_depth; nothing uses it. 2003-01-02 23:54:39 +00:00
thorpej
359ed65495 Use aprint_normal() for cfprint routines. 2003-01-01 00:46:13 +00:00
ichiro
7bda39e405 Use generic_bs_wr_4 for writing region 2002-12-22 11:28:37 +00:00
ichiro
2c9ff5a338 Use generic_bs_sr_4 2002-12-22 11:24:07 +00:00
ichiro
51b12685a4 change flags of pmap_enter() in ixp12x0_io.c, ixpsip_io.c
bug fix: ixp12x0_pci.c
2002-12-08 13:21:44 +00:00
ichiro
ad74b473f7 initialize ixpcomconsaddr
use splserial()
fix IXPCOM registers
2002-12-03 09:28:27 +00:00
ichiro
1e213be17b use bus_space map 2002-12-02 14:10:13 +00:00
ichiro
f2de71b067 changes&fix name of mapping registers 2002-12-02 14:08:57 +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