summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Re-add the gdb command. It was removed to be replaced by somethingmarcel2004-07-121-0/+12
| | | | | | | | | more generic, but that didn't actually happen. Since the feature to switch backends (and historically this means from DDB to GDB) is important, make sure people can do just that until such the generic mechanism actually sees the light of day. Suggested by: rwatson@
* Make kdb_dbbe_select() available as an interface function. This allowsmarcel2004-07-122-9/+21
| | | | | | changing the backend from outside the KDB frontend. For example from within a backend. Rewrite kdb_sysctl_current to make use of this function as well.
* Use sockbuf_pushsync() to synchronize stack and socket buffer staterwatson2004-07-111-34/+47
| | | | | | | | | | | | | | | | | | | | | in soreceive() after removing an MT_SONAME mbuf from the head of the socket buffer. When processing MT_CONTROL mbufs in soreceive(), first remove all of the MT_CONTROL mbufs from the head of the socket buffer to a local mbuf chain, then feed them into dom_externalize() as a set, which both avoids thrashing the socket buffer lock when handling multiple control mbufs, and also avoids races with other threads acting on the socket buffer when the socket buffer mutex is released to enter the externalize code. Existing races that might occur if the protocol externalize method blocked during processing have also been closed. Now that we synchronize socket buffer and stack state following modifications to the socket buffer, turn the manual synchronization that previously followed control mbuf processing with a set of assertions. This can eventually be removed. The soreceive() code is now substantially more MPSAFE.
* Remove the last bits of SPECHASH.phk2004-07-111-6/+0
|
* Add sockbuf_pushsync(), an inline function that, following a change torwatson2004-07-111-0/+38
| | | | | | | | | | the head of the mbuf chains in a socket buffer, re-synchronizes the cache pointers used to optimize socket buffer appends. This will be used by soreceive() before dropping socket buffer mutexes to make sure a consistent version of the socket buffer is visible to other threads. While here, update copyright to account for substantial rewrite of much socket code required for fine-grained locking.
* Better descriptions of the cdev malloc class and mutex.phk2004-07-111-2/+2
|
* Add additional annotations to soreceive(), documenting the effects ofrwatson2004-07-111-1/+35
| | | | | | | | | | | locking on 'nextrecord' and concerns regarding potentially inconsistent or stale use of socket buffer or stack fields if they aren't carefully synchronized whenever the socket buffer mutex is released. Document that the high-level sblock() prevents races against other readers on the socket. Also document the 'type' logic as to how soreceive() guarantees that it will only return one of normal data or inline out-of-band data.
* MFi386: rev 1.213 -- fix DELAY while the debugger is active.marcel2004-07-111-12/+23
| | | | | | This also fixes the (runtime) breakage introduced in the previous commit that was the result of a botched merge. This hasn't even been compile-tested...
* Partially revert previous commit. Calling getit() unconditionally fixedmarcel2004-07-112-22/+44
| | | | | | | | | | | | | | a problem that could also be fixed differently without reverting previous attempts to fix DELAY while the debugger is active (rev 1.204). The bug was that the i8254 implements a countdown timer, while for (k)db_active a countup timer was implemented. This resulted in premature termination and consequently the breakage of DELAY. The fix (relative to rev 1.211) is to implement a countdown timer for the kdb_active case. As such the ability to step clock initialization is preserved and DELAY does what is expected of it. Blushed: bde :-) Submitted by: bde
* Expand and rewrite documentation using doxygen markup so that we candfr2004-07-111-49/+206
| | | | generate funky web pages from it.
* Pass doxygen doc comments through to the output.dfr2004-07-111-8/+33
|
* Experimental support for using doxygen to generate kernel documentation.dfr2004-07-112-0/+241
|
* Add sx_unlock() macro as a frontend to both sx_sunlock() and sx_xunlock(),darrenr2004-07-111-0/+7
| | | | | using sx_cnt to determine what state the lock is in and call the respective function appropriately.
* Until I'm ready to commit the better pccard probe/attach routines, effectivelyimp2004-07-111-0/+2
| | | | comment them out.
* Fix braino: Make sure there is a current backend before we return itsmarcel2004-07-111-2/+5
| | | | | | | name in the debug.kdb.current sysctl. All other dereferences are properly guarded, but this one was overlooked. Reported by: Morten Rodal (morten at rodal dot no)
* Introduce ttygone() which indicates that the hardware is detached.phk2004-07-1116-375/+117
| | | | Move dtrwait logic to the generic TTY level.
* MFi386: revision 1.212.nyan2004-07-113-39/+33
|
* MFi386: revision 1.406nyan2004-07-111-1/+3
|
* Clean up a bunch of white-space difference with IPFilter source as well asdarrenr2004-07-111-9/+8
| | | | | remove some superfluous assignments for .d_version/.d_flags in a cdevsw structure initialisation that never sees the light of day in FreeBSD.
* Bump __FreeBSD_version for the following (weak) reasons:marcel2004-07-111-1/+1
| | | | | | | | | | o Sources that are shared between kernel and userland and that may contain references to DDB or any of its functions may need to know this. o Userland tools may include <machine/gdb_machdep.h> from now on. Think kernel debugger... o The kernel core file now contains the TID of the kernel thread that made the dump.
* The SC_DISABLE_DDBKEY options has been renamed to SC_DISABLE_KDBKEY.marcel2004-07-111-1/+1
|
* Add options KDB and GDB. KDB takes on the function of what DDB usedmarcel2004-07-115-5/+15
| | | | to be. Both DDB and GDB specify which KDB backends to include.
* Now that the console setup is identical to that on other platforms,marcel2004-07-111-0/+2
| | | | | | we also need to have the right sio(4) flags: sio0: flags=0x10 so that it will be console. sio1: flags=0x80 so that it can be used as debug port.
* Add options KDB and GDB. KDB takes on the function of what DDB usedmarcel2004-07-111-1/+3
| | | | to be. Both DDB and GDB specify which KDB backends to include.
* Remove now unused files:marcel2004-07-114-708/+0
| | | | | | db_elf.c, db_kld.c: The new KDB backend supports both at the same time. db_sysctl.c: The functionality has been moved to sys/kern/subr_kdb.c. db_trap.c: The DDB entry point has been moved to sys/ddb/db_main.c.
* Remove the now unused GDB stubs. See src/sys/gdb/* for the new KDBmarcel2004-07-114-2552/+0
| | | | backend.
* In the 'dontblock' section of soreceive(), assert that the mbuf on handrwatson2004-07-111-0/+1
| | | | ('m') is in fact the first mbuf in the receive socket buffer.
* Update for the KDB framework:marcel2004-07-112-43/+29
| | | | | | | | | | | | | o Rename WITNESS_DDB to WITNESS_KDB. In the new world order KDB is the acronym to use for debugging related code. The DDB option is used to enable the DDB debugger backend only. o Likewise, rename DDB_TRACE to KDB_TRACE, rename DDB_UNATTENDED to KDB_UNATTENDED and rename SC_HISTORY_DDBKEY to SC_HISTORY_KDBKEY. o Remove DDB_NOKLDSYM. The new DDB backend supports pre-linker symbol lookups as well as KLD symbol lookups at the same time. o Remove GDB_REMOTE_CHAT. The GDB protocol hacks to allow this are FreeBSD specific. At the same time, the GDB protocol has packets for console output.
* Fix build for non-WITNESS casegrehan2004-07-111-0/+1
| | | | spotted by: Suleiman Souhlal <refugee@segfaulted.com>
* Break out non-inline out-of-band data receive code from soreceive()rwatson2004-07-111-38/+63
| | | | and put it in its own helper function soreceive_rcvoob().
* Assign pointers values of NULL rather than 0 in soreceive().rwatson2004-07-111-2/+2
|
* Make NdisReadPcmciaAttributeMemory() and NdisWritePcmciaAttributeMemory()wpaul2004-07-116-31/+91
| | | | | | | | | | | | | | | | | | | | | | | actually work. Make the PCI and PCCARD attachments provide a bus_get_resource_list() method so that resource listing for PCCARD works. PCCARD does not have a bus_get_resource_list() method (yet), so I faked up the resource list management in if_ndis_pccard.c, and added bus_get_resource_list() methods to both if_ndis_pccard.c and if_ndis_pci.c. The one in the PCI attechment just hands off to the PCI bus code. The difference is transparent to the NDIS resource handler code. Fixed ndis_open_file() so that opening files which live on NFS filesystems work: pass an actual ucred structure to VOP_GETATTR() (NFS explodes if the ucred structure is NOCRED). Make NdisMMapIoSpace() handle mapping of PCMCIA attribute memory resources correctly. Turn subr_ndis.c:my_strcasecmp() into ndis_strcasecmp() and export it so that if_ndis_pccard.c can use it, and junk the other copy of my_strcasecmp() from if_ndis_pccard.c.
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-1029-2343/+1689
| | | | | | | | | | | | | | | | Most of the changes are a direct result of adding thread awareness. Typically, DDB_REGS is gone. All registers are taken from the trapframe and backtraces use the PCB based contexts. DDB_REGS was defined to be a trapframe on all platforms anyway. Thread awareness introduces the following new commands: thread X switch to thread X (where X is the TID), show threads list all threads. The backtrace code has been made more flexible so that one can create backtraces for any thread by giving the thread ID as an argument to trace. With this change, ia64 has support for breakpoints.
* Hook the GDB backend into the build.marcel2004-07-107-5/+9
|
* Update for the KDB framework:marcel2004-07-103-25/+24
| | | | | | | | o Make debugging code conditional upon KDB instead of DDB. o Call kdb_enter() instead of Debugger(). o Remove implementation of Debugger(). o Check kdb_active instead of db_active. o Call kdb_trap() according to the new world order.
* Update for the KDB framework:marcel2004-07-101-1/+2
| | | | o Call kdb_enter() instead of Debugger().
* Remove obsolete prototype of kdb_trap().marcel2004-07-101-2/+0
|
* MFi386: Update for the KDB framework:marcel2004-07-102-24/+68
| | | | | | o Implement makectx(). o Call kdb_enter() instead of Debugger(). o Remove implementation of Debugger().
* Build uart_dbg.c for remote GDB support.marcel2004-07-101-1/+1
|
* Update for the KDB framework:marcel2004-07-105-117/+224
| | | | | | | | | | | | | | | | | | | | | o ksym_start and ksym_end changed type to vm_offset_t. o Make debugging support conditional upon KDB instead of DDB. o Call kdb_enter() instead of breakpoint(). o Remove implementation of Debugger(). o Call kdb_trap() according to the new world order. unwinder: o s/db_active/kdb_active/g o Various s/ddb/kdb/g o Add support for unwinding from the PCB as well as the trapframe. Abuse a spare field in the special register set to flag whether the PCB was actually constructed from a trapframe so that we can make the necessary adjustments. md_var.h: o Add RSE convenience macros. o Add ia64_bsp_adjust() to add or subtract from BSP while taking NaT collections into account.
* Update for the KDB framework:marcel2004-07-101-12/+15
| | | | | | | | o Make debugging code conditional upon KDB instead of DDB. o Declare ksym_start and ksym_end as extern and initialize them. This was previously and bogusly handled by DDB itself. o Call kdb_enter() instead of Debugger(). o Remove implementation of Debugger().
* MFi386: don't fake the time counter when the debugger is active.marcel2004-07-101-20/+12
| | | | | This breaks the fundamental property of DELAY(). Instead, avoid grabbing clock_lock when kdb_active is non-zero.
* Remove obsolete prototype of kdb_trap().marcel2004-07-101-2/+0
|
* Update for the KDB framework:marcel2004-07-103-45/+33
| | | | | | | | | o Make debugging support conditional upon KDB instead of DDB. o Remove implementation of Debugger(). o Don't make setjump() and longjump() conditional upon DDB. o s/ddb_on_nmi/kdb_on_nmi/g o Call kdb_reenter() when kdb_active is non-zero. Call kdb_trap() otherwise.
* Update fr the KDB framework:marcel2004-07-103-50/+28
| | | | | | | | | o Make debugging support conditional upon KDB instead of DDB. o Call kdb_trap() according to the new world order. o Kill the NO_SIO option completely. o Respect the boot_gdb environment variable. o Don't make debug specific kernel options conditional. o Remove implementation of Debugger().
* Update for the KDB framework. Sanitize the alpha console code now thatmarcel2004-07-1018-1203/+242
| | | | | | | | | | | | | | | | | | it's in the way even more. Basicly: remove all alpha specific console support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console initialization to be identical to all other platforms. In a nutshell: call cninit(). The platform specific code now only sets or clears RB_SERIAL and thus automaticly causes the right console to be selected. sio.c: o Replace the remote GDB hacks and use the GDB debug port interface instead. o Make debugging code conditional upon KDB instead of DDB. o Call kdb_alt_break() instead of db_alt_break(). o Call kdb_enter() instead of breakpoint(). o Remove the ugly compatibility of using the console as the debug port.
* Call getit() unconditionally and only grab clock_lock when themarcel2004-07-102-40/+26
| | | | | | debugger is not active. The fixes breakages of DELAY() when running in the debugger, because not calling getit() when the debugger is active yields a DELAY that doesn't.
* Increase the scope of the page queues lock in vm_page_alloc() to coveralc2004-07-101-1/+1
| | | | a diagnostic check that accesses the cache queue count.
* Update for the KDB framework:marcel2004-07-102-26/+22
| | | | | | | | | | o s/ddb_on_nmi/kdb_on_nmi/g o Rename sysctl machdep.ddb_on_nmi to machdep.kdb_on_nmi o Make debugging support conditional upon KDB instead of DDB. o Call kdb_reenter() when kdb_active is non-zero. o Call kdb_trap() to enter the debugger when not already active. o Update comments accordingly. o Remove misplaced prototype of kdb_trap().
* Update for the KDB framework:marcel2004-07-101-2/+0
| | | | | o Remove prototype of Debugger(). o Remove prototype of backtrace().
OpenPOWER on IntegriCloud