Commit Graph

54171 Commits

Author SHA1 Message Date
marcel
05e2ece9bf For ISA DMA maps, the chipsets scatter/gather feature is used. As
such, the segments pointer in the DMA tag will always be NULL. In
bus_dmamap_load(), temporarily point the segments pointer in the
DMA tag to a local variable so that we don't dereference a NULL
pointer. Reset the segments pointer to NULL after calling the
callback function with it.

PR: alpha/30486
MFC after: 1 week
2005-05-25 07:25:12 +00:00
cognet
a02cf1a2b2 MFp4: Setup arm9 to write back by default.
Obtained from:	NetBSD
2005-05-24 23:57:22 +00:00
cognet
abb47e9266 Remove kcopy(), we don't use it. 2005-05-24 23:55:09 +00:00
jmg
fc2ba3e1d1 make stat return an zero'd struct, and be a FIFO again... This is only
to fix libc_r since it requires stat to close fd's, and so commented in
the code...

PR:		threads/75795
Reviewed by:	ps
MFC after:	1 week
2005-05-24 23:42:50 +00:00
cognet
e96dedd1be We need to decrease p->p_lock after vm_fault() has been called. 2005-05-24 23:06:02 +00:00
cognet
dcf8e2f4c8 Correctly setup the UND stack in cpu_set_upcall(), and the trapframe in
cpu_thread_setup(), as done in cpu_fork().
2005-05-24 23:05:26 +00:00
cognet
626bb69925 Don't set the default of kern.fallback_elf_brand to FreeBSD for arm, as
binutils now do the job for us
2005-05-24 22:21:44 +00:00
cognet
7c55d0df01 - Try to avoid calling malloc() in bus_dmamap_create() and bus_dmamem_alloc()
for the dmamap by using static dmamaps.
- Don't do anything for BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTWRITE in
bus_dmamap_sync(), it's not needed anymore.
2005-05-24 22:10:35 +00:00
cognet
af966d34c8 Write back affected pages in pmap_qremove() as well. This removes the need
to change the DACR when switching to a kernel thread, thus making
userland thread => kernel thread => same userland thread switch cheaper by
totally avoiding data cache and TLB invalidation.
2005-05-24 21:47:10 +00:00
cognet
02506b5510 Use a more sane value for HZ. 2005-05-24 21:45:26 +00:00
cognet
046b8b69f5 Use asm versions of in_cksum() and friends. 2005-05-24 21:44:34 +00:00
grehan
85b2c4ecf8 Since the BAT mapping was removed a long time back, it can't
be assumed that modules are contiguous in memory (they're not)
so don't blindly __syncicache start/end. In fact, don't bother
syncing the icache for modules since the kernel will do it after
fixing up relocations.

This fixes the trap when loading modules at boot time.

Reported by:	orlando at break dot net
2005-05-24 21:43:49 +00:00
cognet
d9d4e43ad6 Asm version of bswap16().
Obtained from: 	NetBSD
2005-05-24 21:43:16 +00:00
cognet
9376af4bb3 Make sure we clean the RAS start address once we're done.
This fixes the random segfaults which occurs at high interrupts rate.
2005-05-24 21:42:31 +00:00
cognet
3e5a375712 Don't set the tuner type to TUNER_MT2032 if BKTR_OVERRIDE_TUNER is defined or
if hw.bt848.tuner has been set, so that we can force the tuner.
2005-05-24 21:12:49 +00:00
cognet
fe8fe14021 Fix one more misuse of u_long when uint32_t is actually meant.
Submitted by:	oliver
MFC after:	3 days
2005-05-24 20:42:08 +00:00
mux
2e90bcee0c - Move the REISERFS option in the MD NOTES file for i386, it doesn't
exist on other architectures yet.
- While I'm here, fix the formatting of the options line.  The keyword
  "options" should be followed by a space and then a tab, not 2 tabs.
2005-05-24 18:31:34 +00:00
ps
81540a9c61 Copyout to userland if kern_sigaction succeeds 2005-05-24 17:52:14 +00:00
damien
d885bfa6e7 Add new ral(4) and ural(4) drivers.
Approved by:	silby (mentor)
2005-05-24 16:48:07 +00:00
imura
2a558ffb50 Fix kiconv on the 64bit plathomes.
- Correct idxp pointer to point the properly address of the
  each array of the kiconv character conversion tables,
  so that character conversion work properly when file
  systems are mounted with kiconv options.

- The definition of ICONV_CSMAXDATALEN was also bogus
  because it was defined as if all machines were 32bit
  computers.

Tested on:	amd64
MFC after:	1 month
2005-05-24 15:38:08 +00:00
dumbbell
30ec81f513 Connect the ReiserFS filesystem to the modules build (i386 only).
Approved by:	mux (mentor)
2005-05-24 12:30:13 +00:00
dumbbell
b97d89edc7 Connect the ReiserFS filesystem to the build (i386 only).
Approved by:	mux (mentor)
2005-05-24 12:28:21 +00:00
dumbbell
3136c5e6e6 Import of ReiserFS filesystem support (currently limited to read-only on
i386). Source code is under the GNU GPL license.

Approved by:	mux (mentor)
2005-05-24 12:24:45 +00:00
ups
c7a88d69a7 Use low level constructs borrowed from interrupt threads to wait for
work in proc0.
Remove the TDP_WAKEPROC0 workaround.
2005-05-23 23:01:53 +00:00
ps
aca70e24bc Rewrite of tcp_sack_option(). Kentaro Kurahone (NetBSD) pointed out
that if we sort the incoming SACK blocks, we can update the scoreboard
in one pass of the scoreboard. The added overhead of sorting upto 4
sack blocks is much lower than traversing (potentially) large
scoreboards multiple times. The code was updating the scoreboard with
multiple passes over it (once for each sack option). The rewrite fixes
that, reducing the complexity of the main loop from O(n^2) to O(n).

Submitted by:   Mohan Srinivasan, Noritoshi Demizu.
Reviewed by:    Raja Mukerji.
2005-05-23 19:22:48 +00:00
obrien
bd0d6be5ed Sync the style of these two files. 2005-05-23 17:36:54 +00:00
mlaier
65c6d1a6d9 Fix semantics of ph_busy_count == -1 to pass instead of block.
PR:		kern/81128
Submitted by:	Joost Bekkers
MFC-after:	2 weeks
2005-05-23 17:07:16 +00:00
glebius
5ba4fbcb02 Remove local error variable, which leads to hiding error from return
value.

PR:		kern/81371
Submitted by:	Wojciech A. Koszek
MFC after:	1 week
2005-05-23 13:49:49 +00:00
glebius
ea3343d141 Return EINVAL for incorrect hook names.
PR:		kern/81349
Submitted by:	Wojciech A. Koszek
2005-05-23 13:39:20 +00:00
harti
5205334f5b This commit was generated by cvs2svn to compensate for changes in r146539,
which included commits to RCS files with non-trunk default branches.
2005-05-23 13:08:32 +00:00
harti
64a08be33a Virgin import of NgATM kernel part 1.2 2005-05-23 13:08:32 +00:00
pjd
0b7ab4a169 Add some debug code to diagnose root-on-mirror problems with recent -current.
Reported by:	Daniel Eriksson
2005-05-23 13:05:07 +00:00
yongari
6a87302f88 Make snd_maestro3(4) mpsafe
- Let m3_pchan_trigger()/m3_rchan_trigger() acquire lock and call
   m3_pchan_trigger_locked()/m3_rchan_trigger_locked() respectivly.
 - Mark interrupt handler INTR_MPSAFE.
 - Add locks in sound/channel interface.

Tested by:	nork
2005-05-23 06:27:07 +00:00
yongari
2a7869e8bf According to STP2002QFP User's Guide, it seems that driver should
program RXMAC to discard frames with SA field matching the stations's
MAC address. Experimentation shows that HME receives its own frames
when it operates at 10Mbps half-duplex. With this change HME runs at
10Mbps half-duplx should work with IPv6.
(No more "DAD detected duplicate IPv6 address".)

Reported by:	jacques brierre <jbrierre AT bellsouth DOT net>
Reviewed by:	marius
2005-05-23 05:45:36 +00:00
peter
dd49dbf269 Fix some of the problems Bruce observed with this code. 2005-05-22 23:28:17 +00:00
pjd
c5b85c7bb5 Protect fsid in freebsd4_getfsstat() in simlar way as it is done in
getfsstat().
2005-05-22 23:05:27 +00:00
pjd
95ef09329d The code is under '#ifdef not_that_way', but anyway:
- Add missing prison_check_mount() check.
2005-05-22 22:30:31 +00:00
pjd
519106bd3e Add missing jail.h include. 2005-05-22 22:23:37 +00:00
pjd
a3926e9f24 This code seems to be dead, but anyway:
- Don't leak fsid.
- Don't forget about prison_check_mount().
- Don't use additional variable when there is no need to.
2005-05-22 22:20:46 +00:00
pjd
62d8717c03 If we need to hide fsid, kern_statfs()/kern_fstatfs() will do it for us,
so do not duplicate the code in cvtstatfs().
Note, that we now need to clear fsid in freebsd4_getfsstat().

This moves all security related checks from functions like cvtstatfs()
and will allow to add more security related stuff (like statfs(2), etc.
protection for jails) a bit easier.
2005-05-22 21:52:30 +00:00
alc
27e73f829c Swap in can occur safely without Giant. Release Giant on entry to
scheduler().
2005-05-22 21:06:07 +00:00
damien
4ce5e9e3bf o Clear device-specific PCI register 0x41 (Retry Timeout) during attach
and on resume (reported to fix issues with ACPI)
o Add monitor mode support
o Add WPA (802.11i) support (not tested extensively though!)
o Add a device specific sysctl to control the tx antenna (default to
  antenna diversity)
o Fix sensitivity setting
o Fix setting of the capinfo field when associating
o Temporarly disable 802.11a channels scanning that was causing firmware
  panics with 2915ABG adapters until I find a better fix.  This breaks
  802.11a support.
o Temporarly switch back to software WEP until I implement hardware
  encryption for AES and TKIP too.

Approved by:    silby (mentor)
2005-05-22 18:55:32 +00:00
damien
230eeacfaa Fix WPA (802.11i) support.
Approved by:	silby (mentor)
2005-05-22 18:34:20 +00:00
damien
b2a4bb5d9e Clear device-specific PCI register 0x41 during attach and on resume.
Appoved by:	silby (mentor)
2005-05-22 18:31:08 +00:00
peter
eb1de278b6 MFi386: set PMC vector 2005-05-22 16:32:02 +00:00
peter
5a9d134a36 MFi386: remove comment 2005-05-22 16:31:32 +00:00
silby
c747fe3ac1 Add PCI ID for BCM5789.
Submitted by:	S. Aeschbacher
2005-05-22 03:16:45 +00:00
alc
eb36523310 Remove GIANT_REQUIRED from swapout_procs(). 2005-05-22 00:30:50 +00:00
marius
b316085fed - Hook up machfb(4) to the sparc64 build, not enabled in GENERIC
by default, yet.
- Replace "graphics cards" with "framebuffers" in the description
  of creator(4) in order to make it uniform with the description of
  machfb(4) and the latter occur both on-board and as add-on cards.
2005-05-21 20:50:45 +00:00
marius
33cec3e54e Add machfb(4), a driver for ATI Mach64 graphics chips intended for
use with syscons(4) on sparc64. It's based on the respective NetBSD
driver with some additional info (initialisation/hardware cursor)
obtained from the Xorg 'ati' driver and some ideas taken from
creator(4). ATI Mach64 chips ("ATI Rage") are quite common as low-
end graphics chips in PCI-based sun4u machines and are used on-board
in e.g. Blade 100 and a couple of OEM products. Most if not all of
the Sun PGX add-on cards family (descriptions of the PGX32 are
conflicting but most say it's a Rage Pro) are also based on these
chips. Depending on the version of the OBP Mach64 cards destined for
use in i386 machines also work in sun4u machines.
The driver uses pixel mode with hardware acceleration as far as
syscons(4) currently permits on sparc64 so text mode is already
quite fast. The hardware cursor is used for the mouse pointer;
for one because this is a "restriction" induced in syscons(4) on
sparc64 by creator(4) and also because of issues with mapping
the aperture when used as a low-level early during boot. Due to
insufficiencies in the available documentation I didn't manage to
get mode switch work properly (sync problems), yet. So for now
this driver relies on the OBP having initialised a mode (as does
creator(4)). On all of the tested machines is even true when using
a serial console (and also not only when the OBP switched to a
serial console because no keyboard is present). In general however
the states the Mach64 chips are left in by the OBP vary a lot
depending on the version of the OBP. This e.g. includes the aperture
not being mapped in even when used as the console and the OBP just
barfing when asked to map it. The latter is also the reason for the
existence of this native driver in FreeBSD rather than taking an
OFW frambuffer approach.
Xorg is also happy to talk to these chips by mmap'ing them through
this driver. For some hardware configs like on the Blade 100 a fix
for the Xorg sparc64 MD bus code is however needed (added in version
6.8.2_2 of the xorg-server port).
The video driver font loading and saving methods are not implemented,
yet, as syscons(4) needs more work in that area to work viable on
sparc64.
With minor modifications machfb(4) would most likely also work on
powerpc, when #ifdef'ing the OFW and possibly implementing mode
setting probably also on the other archs. The latter is however
not very practible at the moment as it would conflict with vga(4).

Tested/developed with:	Rage II+ add-on card on AX1105 and AXi board,
			AXe board (on-board Rage Pro)
Additional testing by:	marcel (Ultra 5 w/ on-board Rage Pro),
			scottl (Naturetech GENIALstation 777S w/ on-board
			Rage Mobility M1),
			Michiel Boland and Ilmar S. Habibulin (Blade 100
			w/ on-board Rage XL)
2005-05-21 20:47:38 +00:00