summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Add ptrace_clear_single_step(), alpha already has it for years, the functiondavidxu2004-07-131-0/+7
| | | | will be used by ptrace to clear a thread's single step state.
* 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-111-1/+3
| | | | to be. Both DDB and GDB specify which KDB backends to include.
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-103-217/+178
| | | | | | | | | | | | | | | | 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.
* 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
|
* Implement makectx(). The makectx() function is used by KDB to createmarcel2004-07-102-0/+16
| | | | | | | | | a PCB from a trapframe for purposes of unwinding the stack. The PCB is used as the thread context and all but the thread that entered the debugger has a valid PCB. This function can also be used to create a context for the threads running on the CPUs that have been stopped when the debugger got entered. This however is not done at the time of this commit.
* Introduce the KDB debugger frontend. The frontend provides a frameworkmarcel2004-07-101-0/+50
| | | | | | | | | | | | | | | in which multiple (presumably different) debugger backends can be configured and which provides basic services to those backends. Besides providing services to backends, it also serves as the single point of contact for any and all code that wants to make use of the debugger functions, such as entering the debugger or handling of the alternate break sequence. For this purpose, the frontend has been made non-optional. All debugger requests are forwarded or handed over to the current backend, if applicable. Selection of the current backend is done by the debug.kdb.current sysctl. A list of configured backends can be obtained with the debug.kdb.available sysctl. One can enter the debugger by writing to the debug.kdb.enter sysctl.
* Introduce the GDB debugger backend for the new KDB framework. Themarcel2004-07-102-0/+127
| | | | | | | | | backend improves over the old GDB support in the following ways: o Unified implementation with minimal MD code. o A simple interface for devices to register themselves as debug ports, ala consoles. o Compression by using run-length encoding. o Implements GDB threading support.
* - Add missing <sys/module.h>. [1]marius2004-07-091-1/+3
| | | | | | | - Remove unused includes. - Sort includes. Reported by: Pyun YongHyeon <yongari@kt-is.co.kr> [1]
* These don't need RMAN_RESOURCE_VISIBLE now that rman is visibleimp2004-07-034-4/+0
|
* Really remove __RMAN_RESORUCE_VISIBLEimp2004-07-032-2/+0
|
* Use the rman_* functions in preference to reaching into struct resource.imp2004-07-032-5/+5
| | | | | Remove __RMAN_RESOURCE_VISIBLE after compilation confirms it is now not needed.
* Implement preemption of kernel threads natively in the scheduler ratherjhb2004-07-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than as one-off hacks in various other parts of the kernel: - Add a function maybe_preempt() that is called from sched_add() to determine if a thread about to be added to a run queue should be preempted to directly. If it is not safe to preempt or if the new thread does not have a high enough priority, then the function returns false and sched_add() adds the thread to the run queue. If the thread should be preempted to but the current thread is in a nested critical section, then the flag TDF_OWEPREEMPT is set and the thread is added to the run queue. Otherwise, mi_switch() is called immediately and the thread is never added to the run queue since it is switch to directly. When exiting an outermost critical section, if TDF_OWEPREEMPT is set, then clear it and call mi_switch() to perform the deferred preemption. - Remove explicit preemption from ithread_schedule() as calling setrunqueue() now does all the correct work. This also removes the do_switch argument from ithread_schedule(). - Do not use the manual preemption code in mtx_unlock if the architecture supports native preemption. - Don't call mi_switch() in a loop during shutdown to give ithreads a chance to run if the architecture supports native preemption since the ithreads will just preempt DELAY(). - Don't call mi_switch() from the page zeroing idle thread for architectures that support native preemption as it is unnecessary. - Native preemption is enabled on the same archs that supported ithread preemption, namely alpha, i386, and amd64. This change should largely be a NOP for the default case as committed except that we will do fewer context switches in a few cases and will avoid the run queues completely when preempting. Approved by: scottl (with his re@ hat)
* These need __RMAN_RESOURCE_VISIBLE, too.marius2004-06-306-0/+8
|
* Retire BUS_DMAMAP_NSEGS for sparc64scottl2004-06-282-9/+1
|
* Switch sparc64 busdma to use a dynamically allocated segment list ratherscottl2004-06-283-60/+45
| | | | | | than a a stack-limited list. This removes the artifical limit on s/g list size. cvs: ----------------------------------------------------------------------
* Better OFW console support on Sun Ultra2 machines.obrien2004-06-241-0/+2
| | | | | | | | | Ultra2 users may want to set OFWCONS_POLL_HZ to a value of '20'. I have left default value at '4' as higher values can consume a more than is acceptable amount of CPU, and we don't have a consensus yet what is an optimal value. Submitted by: Pyun YongHyeon <yongari@kt-is.co.kr>
* Backed out previous commit. Blind substitution of dev_t by `struct cdev *'bde2004-06-201-1/+1
| | | | was just wrong here because the dev_t's are user dev_t's.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-164-10/+10
| | | | Bump __FreeBSD_version accordingly.
* Add esp to the sparc64 GENERICscottl2004-06-101-0/+1
|
* Port the NetBSD esp(4) driver. This only includes the sbus front-end, soscottl2004-06-103-0/+1041
| | | | | | | | | | | its primary use is for the FEPS/FAS366 SCSI found in Sun Ultra 1e and 2 machines. Once the pci front-end is ported, this driver can replace the amd(4) driver. The code as-is is fairly stable. I've disabled tagged-queueing until I can figure out a corruption bug related to it. I'm importing it now so that people with these machines can (finally) stop netbooting and report bugs before 5.3.
* Remove filename+line number from panic messages.phk2004-06-061-4/+2
|
* Add missing <sys/module.h> #includesphk2004-06-046-0/+6
|
* Remove checks for curthread == NULL - it can't happen.tjr2004-06-031-5/+3
|
* Add missing <sys/module.h> instances which were shadowed by the nestedphk2004-06-036-0/+7
| | | | include in <sys/kernel.h>
* Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoidtjr2004-06-031-9/+4
| | | | | | | having to acquire sched_lock when manipulating it in lockmgr(), uiomove(), and uiomove_fromphys(). Reviewed by: jhb
* Bring in mbuma to replace mballoc.bmilekic2004-05-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mbuma is an Mbuf & Cluster allocator built on top of a number of extensions to the UMA framework, all included herein. Extensions to UMA worth noting: - Better layering between slab <-> zone caches; introduce Keg structure which splits off slab cache away from the zone structure and allows multiple zones to be stacked on top of a single Keg (single type of slab cache); perhaps we should look into defining a subset API on top of the Keg for special use by malloc(9), for example. - UMA_ZONE_REFCNT zones can now be added, and reference counters automagically allocated for them within the end of the associated slab structures. uma_find_refcnt() does a kextract to fetch the slab struct reference from the underlying page, and lookup the corresponding refcnt. mbuma things worth noting: - integrates mbuf & cluster allocations with extended UMA and provides caches for commonly-allocated items; defines several zones (two primary, one secondary) and two kegs. - change up certain code paths that always used to do: m_get() + m_clget() to instead just use m_getcl() and try to take advantage of the newly defined secondary Packet zone. - netstat(1) and systat(1) quickly hacked up to do basic stat reporting but additional stats work needs to be done once some other details within UMA have been taken care of and it becomes clearer to how stats will work within the modified framework. From the user perspective, one implication is that the NMBCLUSTERS compile-time option is no longer used. The maximum number of clusters is still capped off according to maxusers, but it can be made unlimited by setting the kern.ipc.nmbclusters boot-time tunable to zero. Work should be done to write an appropriate sysctl handler allowing dynamic tuning of kern.ipc.nmbclusters at runtime. Additional things worth noting/known issues (READ): - One report of 'ips' (ServeRAID) driver acting really slow in conjunction with mbuma. Need more data. Latest report is that ips is equally sucking with and without mbuma. - Giant leak in NFS code sometimes occurs, can't reproduce but currently analyzing; brueffer is able to reproduce but THIS IS NOT an mbuma-specific problem and currently occurs even WITHOUT mbuma. - Issues in network locking: there is at least one code path in the rip code where one or more locks are acquired and we end up in m_prepend() with M_WAITOK, which causes WITNESS to whine from within UMA. Current temporary solution: force all UMA allocations to be M_NOWAIT from within UMA for now to avoid deadlocks unless WITNESS is defined and we can determine with certainty that we're not holding any locks when we're M_WAITOK. - I've seen at least one weird socketbuffer empty-but- mbuf-still-attached panic. I don't believe this to be related to mbuma but please keep your eyes open, turn on debugging, and capture crash dumps. This change removes more code than it adds. A paper is available detailing the change and considering various performance issues, it was presented at BSDCan2004: http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf Please read the paper for Future Work and implementation details, as well as credits. Testing and Debugging: rwatson, brueffer, Ketrien I. Saihr-Kesenchedra, ... Reviewed by: Lots of people (for different parts)
* Retire cpu_sched_exit(); it is not used any more.tmm2004-05-261-5/+0
|
* Move the per-CPU vmspace pointer fixup that is required before atmm2004-05-265-36/+41
| | | | | | | | | | | | | struct vmspace is freed from cpu_sched_exit() to pmap_release(). This has the advantage of being able to rely on MI code to decide when a free should occur, instead of having to inspect the reference count ourselves. At the same time, turn the per-CPU vmspace pointer into a pmap pointer, so that pmap_release() can deal with pmaps exclusively. Reviewed (and embrassing bug spotted) by: jake
* Use unsigned types for the arguments of the atomic(9) operations,marius2004-05-221-4/+4
| | | | | | like described in the man page and done on all other architectures. OK'ed by: tmm
* Switch from BSD-style u_intXX_t to ISO C99 uintXX_t.marius2004-05-222-5/+5
|
* In cpu_sched_exit(), we must check vm_refcnt against 0, not 1, sincetmm2004-05-201-1/+1
| | | | exit1() decrements the reference count before calling this function.
* Moved most of the "MI" definitions and declarations from <machine/profile.h>bde2004-05-191-30/+1
| | | | | | to <sys/gmon.h>. Cleaned them up a little by not attempting to ifdef for incomplete and out of date support for GUPROF in userland, as in the sparc64 version.
* <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN isstefanf2004-05-181-1/+1
| | | | | | | | defined. Otherwise first including <wchar.h> and then <stdint.h> leads to no WINT_M{AX,IN} at all. PR: 64956 Approved by: das (mentor)
* Oops, I left a duplicate 'relocbase' declaration.peter2004-05-171-1/+0
| | | | Submitted by: Koop Mast <kwm@rainbow-runner.nl>
* Make a small revision to the api between the elf linker core and thepeter2004-05-161-4/+5
| | | | | | elf_reloc() backends for two reasons. First, to support the possibility of there being two elf linkers in the kernel (eg: amd64), and second, to pass the relocbase explicitly (for relocating .o format kld files).
* Prefer explicit ints to implicit ints in the prototype as well as inmux2004-05-101-1/+1
| | | | the function definition.
* - Fix a typo in a printf(). [1]mux2004-05-101-5/+4
| | | | | | | - Fix some other style bugs while I'm here. Submitted by: Koop Mast <kwm@rainbow-runner.nl> [1] Fixes PR: sparc64/66448 [1]
* Correct the implementation of pmap_page_is_mapped(): It should return TRUEalc2004-05-092-2/+19
| | | | only if the page has one or more managed mappings.
* Since revision 1.280 of vm/vm_page.c, vm_page_grab() always returns aalc2004-05-081-2/+0
| | | | | zeroed page when passed VM_ALLOC_ZERO. Thus, we can eliminate the check against PG_ZERO from pmap_pinit().
* - Remove the old sparc64 OFW PCI code (as opposed to the formermarius2004-05-0818-882/+22
| | | | | | | | | | | | | "options OFW_NEWPCI"). This is a bit overdue, the new sparc64 OFW PCI code which is meant to replace the old one is in place for 10 months and enabled by default in GENERIC for 8 months. FreeBSD 5.2 and 5.2.1 also shipped with the new code enabled by default. - Some minor clean-up, e.g. remove functions that encapsulated the #ifdefs for OFW_NEWPCI, remove unused resp. no longer required includes, etc. Approved by: tmm, no objections on freebsd-sparc64
* Fix bug introduced in revision 1.9; in nexus_probe_nomatch() get device namemarius2004-05-041-3/+2
| | | | | | | | | and type for printing info about the device that didn't probe from child, not parent. This fixes a panic on systems where not yet supported devices hang off of the nexus, e.g. on E450. Reported by: joerg
* Add option GEOM_GPT. This brings the ability to have a large number ofmarcel2004-05-021-0/+1
| | | | partitions on a single disk.
* Spell Ethernet correctly.obrien2004-05-021-4/+4
|
* Some cleanups to the nexus code:tmm2004-04-302-126/+50
| | | | | | | | | | - Remove second license, the first was not that different and should be fine. - Add nexus_attach(), and do not perform its task in nexus_probe() any more. - Remove nexus_write_ivar(), since it was quite pointless. - Remove superfluous devinfo members. - Clean up some comments, minor style issues and prototypes.
* Remove inclusion of opt_ebus.h.tmm2004-04-301-2/+0
|
* Remove the separate kernel option for Sun APB PCI-PCI bridges and makemarius2004-04-302-2/+0
| | | | | | support for them conditional on the pci(4) kernel option instead. OK'ed by: tmm
* Enable _KPOSIX_PRIORITY_SCHEDULING by default, it works fine on sparc64.marius2004-04-301-1/+1
| | | | OK'ed by: tmm
OpenPOWER on IntegriCloud