summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* - Use PCIR_BAR().jhb2005-10-031-5/+2
| | | | - Remove unused TXP_PCI_INTLINE and TXP_DEVNAME macros.
* Add dma and aau.cognet2005-10-031-0/+2
|
* Import dummy drivers for the i80321 DMA controller and AAU.cognet2005-10-035-2/+628
| | | | | | The DMA controller driver only knows how to do memory to memory copies, and the AAU driver how to zero a chunk of memory. Use them to process big (>=1KB) copying/zeroing.
* Make mem.c know about the pages allocated with ARM_USE_SMALL_ALLOC.cognet2005-10-031-2/+12
|
* Export the variables needed for the copy/zero API.cognet2005-10-031-0/+5
|
* Make sure the interrupt is masked before processing it, or bad thingscognet2005-10-031-3/+3
| | | | can happen.
* If a thread already tries to allocate a new memory range, wait for itcognet2005-10-031-7/+22
| | | | instead of trying to do the same.
* Provide a dump_avail[] variable, which contains the page ranges to becognet2005-10-033-14/+39
| | | | | | | dumped. For iq31244_machdep.c, attempt to recognize hints provided by the elf trampoline.
* o Move a lot of parameter checking from netisr_poll() toglebius2005-10-031-68/+119
| | | | | | | | | | | | dedicated sysctl handlers. Protect manipulations with poll_mtx. The affected sysctls are: - kern.polling.burst_max - kern.polling.each_burst - kern.polling.user_frac - kern.polling.reg_frac o Use CTLFLAG_RD on MIBs that supposed to be read-only. o u_int32t -> uint32_t o Remove unneeded locking from poll_switch().
* - Provide the kernel l1pt physical address, for userland.cognet2005-10-031-13/+54
| | | | | | | - Use the new API for pmap_copy_page() and pmap_zero_page(). - Just write-back the pages in pmap_qenter(), and invalidate it in pmap_qremove(). - Nuke the cache flushing in pmap_enter_quick(), it's not needed anymore.
* Add a new API to let platform-specific ports provide functions for bigcognet2005-10-034-0/+159
| | | | copy/zeroing.
* Export the virtual and physical address in which the kernel was loaded,cognet2005-10-031-2/+9
| | | | needed for userland when reading kernel dumps.
* Makefile magic for the ELF trampoline.cognet2005-10-031-0/+9
|
* Import a small ELF trampoline, in which the kernel is embedded, and thatcognet2005-10-032-0/+233
| | | | | | is able to load the kernel into memory, symbol table included. This is needed to be able to access the symbol table from DDB without a boot loader.
* *blush*cognet2005-10-031-4/+47
| | | | | | Don't try to dereference map if it's NULL. While I'm there, increase the minimum value to write-back/invalidate the whole dcache in bus_dmamap_sync().
* Only save the registers that are used.cognet2005-10-031-2/+2
|
* asm versions of in_cksum_hdr() and in_pseudo().cognet2005-10-032-14/+80
|
* Define KERNELDUMP_ARM_VERSION.cognet2005-10-031-0/+1
|
* Implement savectx().cognet2005-10-031-0/+15
| | | | Obtained from: NetBSD
* Kernel dump for arm, ripped from the ia64/amd64 version.cognet2005-10-031-15/+353
|
* If sufficiently bad things happen during a call to kern_execve(), it iscperciva2005-10-031-0/+8
| | | | | | | | | | | | | | | | possible for do_execve() to call exit1() rather than returning. As a result, the sequence "allocate memory; call kern_execve; free memory" can end up leaking memory. This commit documents this astonishing behaviour and adds a call to exec_free_args() before the exit1() call in do_execve(). Since all the users of kern_execve() in the tree use exec_free_args() to free the command-line arguments after kern_execve() returns, this should be safe, and it fixes the memory leak which can otherwise occur. Submitted by: Peter Holm MFC after: 3 days Security: Local denial of service
* Unlock Giant symmetrically with respect to lock acquire order as that'srwatson2005-10-031-1/+1
| | | | | | | generally nicer. Spotted by: johan MFC after: 1 week
* Acquire Giant conditionally in in_addmulti() and in_delmulti() based onrwatson2005-10-031-0/+9
| | | | | | | | | | | whether the interface being accessed is IFF_NEEDSGIANT or not. This avoids lock order reversals when calling into the interface ioctl handler, which could potentially lead to deadlock. The long term solution is to eliminate non-MPSAFE network drivers. Discussed with: jhb MFC after: 1 week
* Reintroduce the lmc T1/E1/T3 WAN driver. This version is locked, supportsscottl2005-10-036-0/+8744
| | | | | | | | | | | interface polling, compiles on 64-bit platforms, and compiles on NetBSD, OpenBSD, BSD/OS, and Linux. Woo! Thanks to David Boggs for providing this driver. Altq, sppp, netgraph, and bpf are required for this driver to operate. Userland tools and man pages will be committed next. Submitted by: David Boggs
* make saved cpu level stackable.ume2005-10-031-30/+53
|
* Improve handling flags that must be propagatedyar2005-10-031-37/+84
| | | | | | | | | | to the parent interface, such as IFF_PROMISC and IFF_ALLMULTI. In addition, vlan(4) gains ability to migrate from one parent to another w/o losing its own flags. PR: kern/81978 MFC after: 2 weeks
* Clean up consistency checks in if_setflag():yar2005-10-031-18/+11
| | | | | | . use KASSERT for all checks so that the source of an error can be detected; . use __func__ instead of spelling function name each time; . fix a typo.
* Log a message about entering or leaving permanently promiscuous mode,yar2005-10-031-6/+10
| | | | | | as it is done for usual promiscuous mode already. This info is important because promiscuous mode in the hands of a malicious party can jeopardize the whole network.
* Always wire the sysctl output buffer in sysctl_kern_proc() beforetruckman2005-10-021-95/+113
| | | | | | | | | | | | | | | | | | calling sysctl_out_proc(). -- fix from jhb Move the code in fill_kinfo_thread() that gathers data from struct proc into the new function fill_kinfo_proc_only(). Change all callers of fill_kinfo_thread() to call both fill_kinfo_proc_only() and fill_kinfo() thread. When gathering data from a multi-threaded process, fill_kinfo_proc_only() only needs to be called once. Grab sched_lock before accessing the process thread list or calling fill_kinfo_thread(). PR: kern/84684 MFC after: 3 days
* - Call db_setup_paging() for traceall.cognet2005-10-022-5/+13
| | | | | | | | | | | - Make it so one can't call db_setup_paging() if it has already been called before. traceall needs this, or else the db_setup_paging() call from db_trace_thread() will reset the printed line number, and override its argument. This is not perfect for traceall, because even if one presses 'q' while in the middle of printing a backtrace it will finish printing the backtrace before exiting, as db_trace_thread() won't be notified it should stop, but it is hard to do better without reworking the pager interface a lot more.
* Do not packet filter in the bridge_start() routine, locally generated packetsthompsa2005-10-021-20/+9
| | | | | | | are already filtered by the higher layers. Approved by: mlaier (mentor) MFC after: 3 days
* * Fixed rate operation for es1370 chip to solve conflictingnetchild2005-10-021-118/+222
| | | | | | | | | | | | | | | sampling rate between playback and recording. This can be disabled / enabled via kernel hints (hint.pcm.<unit>.fixed_rate=0/4000-48000) or sysctl hw.snd.pcm<unit>.fixed_rate=0/4000-48000). Default to 48khz fixed rate. [1] * Basic cleanup. *_es1371x_* -> *_es137x_*. * Some locking fixes. [2] Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my> Discussed with: yongari [2] See also: http://lists.freebsd.org/pipermail/freebsd-multimedia/2005-September/002758.html [1] Reported by: Jos Backus <jos at catnook.com> [1]
* Emulate pcm mixer controller for any uaudio device without it.netchild2005-10-021-0/+9
| | | | Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
* The cmi9739_patch function which is referenced by ac97.c (rev. 1.56) now...netchild2005-10-022-0/+11
| | | | | Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my> Pointy hat to: netchild (for not committing it with rev. 1.56 of ac97.c)
* sys/dev/sound/pcm/sndstat.c:netchild2005-10-023-51/+42
| | | | | | | | | | | | | | | | | | | | * General spl* cleanup. It doesn't serve any purpose anymore. * Nuke sndstat_busy(). Addition of sndstat_acquire() / sndstat_release() for sndstat exclusive access. [1] sys/dev/sound/pcm/sound.c: * Remove duplicate SLIST_INIT() * Use sndstat_acquire() / release() to lock / release the entire sndstat during pcm_unregister(). This should fix LOR #159 [1] sys/dev/sound/pcm/sound.h: * Definition of SD_F_SOFTVOL (part of feeder volume) * Nuke sndstat_busy(). Addition of sndstat_acquire() / sndstat_release() for exclusive sndstat access. [1] Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my> LOR: 159 [1] Discussed with: yongari [1]
* General spl* cleanup. It doesn't serve any purpose anymore.netchild2005-10-021-34/+1
| | | | Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
* sys/dev/sound/pcm/ac97.c:netchild2005-10-024-19/+112
| | | | | | | | | | | | | | | | | | | * Added codec id for CMI9761. * feeder_volume *whitelist* through ac97_fix_volume() sys/dev/sound/pcm/ac97.h: * Added AC97_F_SOFTVOL definition. sys/dev/sound/pcm/channel.c: * Slight changes for chn_setvolume() to conform with OSS. * FEEDER_VOLUME is now part of feeder building process. sys/dev/sound/pcm/mixer.c: * General spl* cleanup. It doesn't serve any purpose anymore. * Main hook for feeder_volume. Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my> Tested by: multimedia@
* Soft volume implementation for audio devices without pcm mixer controller.netchild2005-10-023-1/+80
| | | | | Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my> Tested by: multimedia@
* Add a DDB "traceall" function, which stack traces all known processrwatson2005-10-021-0/+18
| | | | | | | | | | threads. This is quite useful if generating a debug log for post-mortem by another developer, in which case the person at the console may not know which threads are of interest. The output of this can be quite long. Discussed with: kris MFC after: 3 days
* Include kdb.h so that kdb_active is declared regardless of KDB beingrwatson2005-10-021-0/+1
| | | | | | included in the kernel. MFC after: 0 days
* Complete removal of mac_create_root_mount/mpo_create_root_mount MACrwatson2005-10-024-6/+0
| | | | | | | | interfaces. Obtained from: TrustedBSD Project Submitted by: Chris Vance <Christopher dot Vance at SPARTA dot com> MFC after: 3 days
* o Teach sysctl_drop() how to deal with the sockets in TIME_WAIT state.maxim2005-10-022-2/+10
| | | | | | | | This is a special case because tcp_twstart() destroys a tcp control block via tcp_discardcb() so we cannot call tcp_drop(struct *tcpcb) on such connections. Use tcp_twclose() instead. MFC after: 5 days
* Allow user to override default port numbers used by communicationbp2005-10-021-0/+2
| | | | | | protocols. This is very useful for tunneled SMB connections. MFC after: 4 weeks
* Fixing WEP bustage in hostap mode since 5.2-RELEASE.avatar2005-10-022-15/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - WEP TX fix: The original code called software crypto, ieee80211_crypto_encap(), which never worked since IEEE80211_KEY_SWCRYPT was never flagged due to ieee80211_crypto_newkey() assumes that wi always supports hardware based crypto regardless of operational mode(by virtue of IEEE80211_C_WEP). This fix works around that issue by adding wi_key_alloc() to force the use of s/w crypto. Also if anyone ever decides to cleanup ioctl handling where key changes wouldn't cause a call to wi_init() every time, we'll need wi_key_alloc() to DTRT. In addition to that, this fix also adds code to wi_write_wep() to force existing keys to be switched between h/w and s/w crypto such that an operation mode change(sta <-> hostap) will flag IEEE80211_KEY_SWCRYPT properly. - WEP RX fix: Clear IEEE80211_F_DROPUNENC even in hostap mode. Quote from Sam: "This is really gross but I don't see an easy way around it. By doing it we lose the ability to independently drop unencode frames (and support mixed wep/!wep use). We should really be setting the EXCLUDE_UNENCRYPTED flag written in wi_write_wep based on IEEE80211_F_DROPUNENC but with our clearing it we can't depend on it being set properly." Reported by: Holm Tiffe <holm at freibergnet dot de> Submitted by: sam MFC after: 3 days
* Honouring ic->ic_dtim_period.avatar2005-10-021-1/+1
| | | | | Submitted by: sam MFC after: 3 days
* Second attempt at a work-around for fifo-related socket panics duringrwatson2005-10-011-0/+4
| | | | | | | | make -j with high levels of parallelism: acquire Giant in fifo I/O routines. Discussed with: ups MFC after: 3 days
* Make sure the clone lists are sorted in the right order.phk2005-10-011-3/+5
| | | | | Explosion triggered by: pjd MFC: 3 days
* Correct previous commit to fix the sense of the TDP_NORUNNINGBUFtruckman2005-10-011-1/+1
| | | | | | | | | check in ffs_copyonwrite() that is a precondition for calling waitrunningbufspace(). Pointed out by: tegge Pointy hat to: truckman MFC after: 3 days
* Big polling(4) cleanup.glebius2005-10-0125-752/+854
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Axe poll in trap. o Axe IFF_POLLING flag from if_flags. o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handler. This fixes problem with idle polling. o Make registration and deregistration from polling in a functional way, insted of next tick/interrupt. o Obsolete kern.polling.enable. Polling is turned on/off with ifconfig. Detailed kern_poll.c changes: - Remove polling handler flags, introduced in 1.21. The are not needed now. - Forget and do not check if_flags, if_capenable and if_drv_flags. - Call all registered polling handlers unconditionally. - Do not drop poll_mtx, when entering polling handlers. - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx. - In netisr_poll() axe the block, where polling code asks drivers to unregister. - In netisr_poll() and ether_poll() do polling always, if any handlers are present. - In ether_poll_[de]register() remove a lot of error hiding code. Assert that arguments are correct, instead. - In ether_poll_[de]register() use standard return values in case of error or success. - Introduce poll_switch() that is a sysctl handler for kern.polling.enable. poll_switch() goes through interface list and enabled/disables polling. A message that kern.polling.enable is deprecated is printed. Detailed driver changes: - On attach driver announces IFCAP_POLLING in if_capabilities, but not in if_capenable. - On detach driver calls ether_poll_deregister() if polling is enabled. - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING flag. If there is no, then unlocks and returns. - In ioctl handler driver checks for IFCAP_POLLING flag requested to be set or cleared. Driver first calls ether_poll_[de]register(), then obtains driver lock and [dis/en]ables interrupts. - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable. If present, then returns.This is important to protect from spurious interrupts. Reviewed by: ru, sam, jhb
* Copy new process argument list in do_execve() before grabbing PROC_LOCKtruckman2005-10-011-10/+10
| | | | | | | | | | to avoid touching pageable memory while holding a mutex. Simplify argument list replacement logic. PR: kern/84935 Submitted by: "Antoine Pelisse" apelisse AT gmail.com (in a different form) MFC after: 3 days
OpenPOWER on IntegriCloud