Commit Graph

788 Commits

Author SHA1 Message Date
davidxu
0a29616acf Add ptrace_clear_single_step(), alpha already has it for years, the function
will be used by ptrace to clear a thread's single step state.
2004-07-13 07:22:56 +00:00
grehan
60a55c7a06 Rename low-level code ddb -> db. Use KDB instead of DDB.
Fix bug in setup of stack frame where 8 bytes wasn't being
saved for the callee's frame pointer and saved LR.
2004-07-12 22:32:08 +00:00
grehan
94e8bc7955 Bring into KDB new order. 2004-07-12 22:26:20 +00:00
grehan
f05f1634a3 - DDB -> KDB, with kdb routines
- ddb -> db for low-level trapcode
- implement makectx. I think it only matters that the stack is setup
  correctly.
- bring over ddb_trap_glue and rename to db_trap_glue
2004-07-12 22:25:09 +00:00
grehan
a33f31931d No need for ddb option. Never a need for ipkdb option. 2004-07-12 22:22:53 +00:00
grehan
4505b37f92 Catch up with gratuitous ddb -> db renaming 2004-07-12 22:22:09 +00:00
grehan
7ab8fbe2ac Bring into line with KDB. Bring in NetBSD updates for backtrace routine,
although it really needs a decent re-work.
2004-07-12 22:21:34 +00:00
grehan
2312a73897 Remove unused NetBSD code. Bring mem r/w routines into here in line
with sparc64, although keep the size deref checks: they are useful
when accessing PCI space where some devices may not implement byte
access.
2004-07-12 22:20:01 +00:00
grehan
a73dd12638 Gratuitous namechange to avoid low-level association with ddb. 2004-07-12 22:18:02 +00:00
grehan
9006058072 Add prototype for KDB's makectx routine 2004-07-12 22:17:20 +00:00
grehan
e272511bfa Remove old NetBSD-derived unused code and stuff that is now obsolete
due to KDB.
2004-07-12 22:16:50 +00:00
grehan
a9b5e762ae DDB -> KDB, and rename low-level trap handler to avoid name conflict. 2004-07-12 22:16:04 +00:00
grehan
e0f0e7381e kdb.h for PowerPC. Stubs for now. 2004-07-12 22:15:03 +00:00
grehan
a0724f3f5a Add new KDB option, and also drop in long-held fxp/dc eth drivers. 2004-07-12 22:14:21 +00:00
alc
582e79f50a pmap_remove_pages() must not remove wired mappings. Since
pmap_remove_pages() is an optimization, its implementation is optional.

Discussed with:	grehan
2004-07-12 04:40:26 +00:00
grehan
6c7bd73286 - correctly set the return value for the copyin/out fault buffer to 1
so setfault would return correctly when a page fault was invalid
  (e.g. a syscall with a bad parameter).

  This caused an endless DSI loop, seen when running sendmail which
  does a setlogin() call with a NULL pointer.

- introduce KTR_SYSC tracing. expose the syscallnames[] array to
  make the tracing more readable.
2004-07-09 11:00:41 +00:00
grehan
ac03732d3c G4 requires isync after 256Mb ibat/dbat update, G3 requires
isync after each bat update. Otherwise, pmap_bootstrap causes
an ISI exception. A fall-out of loader BAT removal.
2004-07-08 12:47:36 +00:00
grehan
858232d10a - trailing white-space cleanup
- add call to thread_user_enter for P_SA processes before
  trap processing ala all other arches
2004-07-06 11:46:56 +00:00
obrien
f8b4065a75 In the spirit of amd64/include/stdarg.h rev 1.6; add __va_copy
(but keep it conditional on __ISO_C_VISIBLE >= 1999.

Why?  Our out /usr/src/contrib assumes it, and more than a few ports have
an autoconf that looks for __va_copy because it is available on glibc.
It is critical that we use it on PowerPC.  It generally isn't a problem
for i386 and its ilk because those platforms can get away with cheating
the C standard, using a plain assignment.
2004-07-06 07:47:09 +00:00
grehan
77b3bfa737 Add 32-bit framebuffer support. Tested on PearPC at lo-res, too painful
to watch at hi-res.
2004-07-06 03:22:05 +00:00
alc
f2aa52f71a Correct pmap_extract()'s return type. It should be vm_paddr_t, not
vm_offset_t.
2004-07-05 23:08:27 +00:00
jhb
696704716d Implement preemption of kernel threads natively in the scheduler rather
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)
2004-07-02 20:21:44 +00:00
grehan
e6d783678a Modify loop test when cycling through phys_avail array. It's possible
for an OpenFirmware implementation to have a single memory region
(hello PearPC).
2004-07-01 08:01:49 +00:00
grehan
9583041d2c Catch up with __RMAN_RESOURCE_VISIBLE change 2004-07-01 07:59:08 +00:00
grehan
c157e8aff4 Move soft structs back to C files to avoid exposing rman fields
to clients now that it's protected with __RMAN_RESOURCE_VISIBLE
2004-07-01 07:56:56 +00:00
grehan
976ffba921 Catchup to now-required <sys/module.h> for PowerPC 2004-06-25 13:42:48 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
tjr
48c79c9521 Remove checks for curthread == NULL - it can't happen. 2004-06-03 10:22:47 +00:00
tjr
7a46b27935 Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(),
and uiomove_fromphys().

Reviewed by:	jhb
2004-06-03 01:47:37 +00:00
tmm
7b769ce88f Retire cpu_sched_exit(); it is not used any more. 2004-05-26 12:09:39 +00:00
bde
f309a749f5 Moved most of the "MI" definitions and declarations from <machine/profile.h>
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.
2004-05-19 15:41:26 +00:00
grehan
2376cee533 trap_pfault() shouldn't be acquiring Giant. Found to blow up
with MUTEX_PROFILING.

Submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
2004-05-19 06:05:42 +00:00
stefanf
e784f59f15 <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN is
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)
2004-05-18 16:04:57 +00:00
peter
ea4215c521 Make a small revision to the api between the elf linker core and the
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).
2004-05-16 20:00:28 +00:00
marcel
381147f827 Add option GEOM_GPT. This brings the ability to have a large number of
partitions on a single disk.
2004-05-02 20:40:19 +00:00
obrien
3937b2c0ab Spell Ethernet correctly. 2004-05-02 18:57:29 +00:00
das
0d58ef0153 Hide FLT_EVAL_METHOD and DECIMAL_DIG in pre-C99 compilation
environments.

PR:		63935
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-04-25 02:36:29 +00:00
grehan
37a55c7ec4 - Catch up with recent ATA changes.
- Remove trailing space in ata_macio.c
2004-04-23 23:39:53 +00:00
grehan
4173466ca4 Include <machine/pte.h> since it has been removed from <machine/param.h>. 2004-04-21 22:59:33 +00:00
grehan
893762b745 <machine/pte.h> has no business being here. Finally exposed by F77 build
failure.
2004-04-21 22:58:39 +00:00
alc
3edd6abfa6 MFamd64
Simplify the sf_buf implementation.  In short, make it a veneer
 over the direct virtual-to-physical mapping.
2004-04-18 08:10:04 +00:00
alc
0f6d9cd13e Remove avail_end. It is not used. 2004-04-11 06:02:24 +00:00
imp
ebf059d1df Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 05:00:01 +00:00
alc
c5bba2b0af Remove avail_start on those platforms that no longer use it. (Only amd64
does anything with it beyond simple initialization.)
2004-04-05 04:08:00 +00:00
alc
19e5eda309 Remove unused arguments from pmap_init(). 2004-04-05 00:37:50 +00:00
alc
1ec4d75266 In some cases, sf_buf_alloc() should sleep with pri PCATCH; in others, it
should not.  Add a new parameter so that the caller can specify which is
the case.

Reported by:	dillon
2004-04-03 09:16:27 +00:00
grehan
d768acf3fe Match the specific MPC106 host bridge PCI ID rather than all
generic host bridges: this avoids a race with the UniNorth
generic match.
2004-04-01 07:34:36 +00:00
grehan
c23e677e84 The end argument to bus_alloc_resource() should have been ~0 and
not ~1, but the call has been switched over to bus_alloc_resource_any()
which has the same effect.

Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
2004-03-31 07:40:46 +00:00
benno
79b30192e5 Replace td2 with td on the assumption that this was a typo. This should at
least unbreak the build.

Pointy hat to: peter
Not tested either by: benno
2004-03-30 13:57:34 +00:00
peter
09ff2f9fe5 Finish tidying up a couple of leftovers from the KSTACK_PAGES stuff. Some
files still #included the opt_ file.  powerpc hadn't been updated yet.
2004-03-29 19:38:05 +00:00