summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Like on i386, eliminate pv_ptem (which was suggested by alc). Thispeter2004-07-142-30/+58
| | | | | | | | | | | | | | | | | reduces the size of the pv_entry structure a small but significant amount. This is implemented a little differently because it isn't so cheap to get the physical address of the page tabke page on amd64.. instead of it being directly accessible from the top level page directory, it is now two additional tree levels down. However.. In almost all cases, we recently had the physical address if the page table page a short while before we needed it, but it slipped through our fingers. This patch saves it for when we do need it. Also, for the one case where we do not have the ptp paddr, we are always running in curproc context and so we can do a vtopte-like trick. I've implemented vtopde() for this purpose. There is still a CYA entry in pmap_unuse_pt() that needs to be removed. I think it can be removed now but I forgot to test with it gone.
* 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.
* Push down the acquisition and release of the page queues lock intoalc2004-07-131-1/+2
| | | | | | | | pmap_remove_pages(). (The implementation of pmap_remove_pages() is optional. If pmap_remove_pages() is unimplemented, the acquisition and release of the page queues lock is unnecessary.) Remove spl calls from the alpha, arm, and ia64 pmap_remove_pages().
* 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...
* 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 the now unused GDB stubs. See src/sys/gdb/* for the new KDBmarcel2004-07-111-614/+0
| | | | backend.
* Mega update for the KDB framework: turn DDB into a KDB backend.marcel2004-07-103-488/+259
| | | | | | | | | | | | | | | | 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.
* 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.
* Implement makectx(). The makectx() function is used by KDB to createmarcel2004-07-102-0/+24
| | | | | | | | | 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/+52
| | | | | | | | | | | | | | | 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/+141
| | | | | | | | | 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.
* Change the following environment variables to kernel options:brian2004-07-081-11/+8
| | | | | | | | | | | | | bootp -> BOOTP bootp.nfsroot -> BOOTP_NFSROOT bootp.nfsv3 -> BOOTP_NFSV3 bootp.compat -> BOOTP_COMPAT bootp.wired_to -> BOOTP_WIRED_TO - i.e. back out the previous commit. It's already possible to pxeboot(8) with a GENERIC kernel. Pointed out by: dwmalone
* Change the following kernel options to environment variables:brian2004-07-081-8/+11
| | | | | | | | | | | | | | | | | | BOOTP -> bootp BOOTP_NFSROOT -> bootp.nfsroot BOOTP_NFSV3 -> bootp.nfsv3 BOOTP_COMPAT -> bootp.compat BOOTP_WIRED_TO -> bootp.wired_to This lets you PXE boot with a GENERIC kernel by putting this sort of thing in loader.conf: bootp="YES" bootp.nfsroot="YES" bootp.nfsv3="YES" bootp.wired_to="bge1" or even setting the variables manually from the OK prompt.
* MFi386: various io apic cleanupspeter2004-07-083-54/+147
|
* MFi386: use rman access methods instead of groping around insidepeter2004-07-081-4/+5
| | | | struct resource
* MFi386: whitespace nit fix (spare blank line)peter2004-07-081-1/+0
|
* MFi386: fix up CR0 settingspeter2004-07-081-23/+7
|
* MFi386: 1.57: transparently respect alignment/boundary tagspeter2004-07-081-11/+47
|
* Simplify the control flow in pmap_extract(), enabling the elimination of aalc2004-07-071-4/+3
| | | | PMAP_UNLOCK() call.
* White space and style changes only.alc2004-07-071-4/+1
|
* Style changes to pmap_extract().alc2004-07-061-5/+3
|
* Implement preemption of kernel threads natively in the scheduler ratherjhb2004-07-022-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* We need to make resources visible here as well.imp2004-06-301-0/+1
|
* Add machdep quirks functions. On i386, this disables acpi on systems withnjl2004-06-301-0/+6
| | | | BIOS dates earlier than Jan 1, 1999. Add prototypes and quirks flags.
* Fetch the actual acpi0 device_t and use device_is_attached() to see ifjhb2004-06-231-2/+3
| | | | | | it's alive rather than trying to fetch its softc pointer via its devclass. Glanced at by: imp, njl
* Implement the protection check required by the pmap_extract_and_hold()alc2004-06-231-8/+24
| | | | specification. This enables the elimination of Giant from that function.
* - Simplify pmap_remove_pages(), eliminating unnecessary indirection.alc2004-06-201-12/+12
| | | | | - Simplify the locking of pmap_is_modified() by converting control flow to data flow.
* Add pmap locking to pmap_is_prefaultable().alc2004-06-201-6/+9
|
* 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.
* Remove unused pt_entry_ts. Remove an unneeded semicolon.alc2004-06-191-7/+3
|
* Include <sys/_lock.h>'s prerequisite <sys/queue.h> before including thebde2004-06-191-1/+1
| | | | | | former, not after. Don't hide this bug by including <sys/queue.h> in <sys/_lock.h>.
* Try harder to give new processes a clean initial fpu state. fpu_cleanstatepeter2004-06-181-7/+5
| | | | | | | | | | | | | | | | | wasn't actually clean, it was saving the xmm registers as left over by the bios. fninit() doesn't clear those. In fpudna(), instead of doing a fninit() and forgetting to load the initial mxcsr, do a full fxrstor(&fpu_cleanstate). Otherwise we hand over whatever random values are left in the xmm registers by the last user. I'm not certain of whether this is excessive paranoia or not, but there was an outright bug in neglecting to set the mxcsr value that caused awk to SIGFPE in some case. Especially for Tim Robbins. :-) i386 probably should do something about the mxcsr setings too. Found by: tjr
* Revert last change. If acpi is loaded or compiled into the kernel, itsnjl2004-06-171-1/+1
| | | | | | | devclass will be present even if the driver was disabled by a hint. Using device_get_softc() provides the right info even if it's overkill. Explained by: jhb
* Do not preset PG_BUSY on VM_ALLOC_NOOBJ pages. Such pages are notalc2004-06-171-4/+0
| | | | accessible through an object. Thus, PG_BUSY serves no purpose.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-7/+7
| | | | Bump __FreeBSD_version accordingly.
* Add some lock assertions. Lock a small part of pmap_enter().alc2004-06-161-0/+4
|
* Correct an error in the implementation of pmap_is_prefaultable(). When Ialc2004-06-161-1/+1
| | | | | introduced this function in revision 1.441, I inverted one of the comparisons.
* Remove a stale comment.alc2004-06-151-6/+0
|
* Add pmap locking to pmap_extract(), pmap_mincore(), and pmap_remove().alc2004-06-151-4/+15
|
* We only need the devclass_find() result, not the softc.njl2004-06-151-1/+1
|
* Introduce pmap locking to many of the pmap functions. There is more toalc2004-06-142-0/+35
| | | | come later.
* The majority of FreeBSD/amd64 machines are SMP, so use ADAPTIVE_MUTEXESobrien2004-06-131-0/+1
| | | | by default to improve performance.
* Prevent the loss of a PG_M bit through an SMP race in pmap_ts_referenced().alc2004-06-131-1/+1
|
* Remove dead or unneeded code, e.g., spl calls.alc2004-06-131-32/+1
|
* - Remove an unused declaration.alc2004-06-131-3/+2
| | | | - Move a definition inside the scope of a #ifdef _KERNEL.
* In a multiprocessor, the PG_W bit in the pte must be changed atomically.alc2004-06-121-2/+2
| | | | | | | Otherwise, the setting of the PG_M bit by one processor could be lost if another processor is simultaneously changing the PG_W bit. Reviewed by: tegge@
* Deorbit COMPAT_SUNOS.phk2004-06-111-2/+2
| | | | | We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days.
* Argh. Add the mini-stack-frame back in for mcount's benefit for syscallpeter2004-06-101-0/+4
| | | | stubs.
OpenPOWER on IntegriCloud