Commit Graph

295 Commits

Author SHA1 Message Date
tsubai 4833accce2 In mem_regions(), remove zero sized entry returned from OF.
Since this function uses size == 0 to delimiter, valid entries must not
contain 0 in size field.

G4 Cube should boot now. :-)
2000-09-24 15:57:03 +00:00
tsubai 4317291e1a Make HTABSIZE calculation work with >1GB RAM. 2000-09-24 15:26:34 +00:00
thorpej 72a24b4eae Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.
2000-09-13 15:00:15 +00:00
tsubai 365ec2aa42 Scheduler locking changes. 2000-08-21 18:46:03 +00:00
tshiozak 51a53de0d5 Preparation for the future introduction of multibyte locale.
- MB_LEN_MAX is increased to 32.
 - To ensure binary compatibility for old executables
   under multibyte locale, versioned setlocale is added.
 - __mb_len_cur definision is added in setlocale.c
   and enable it in stdlib.h .
   It is also important for multibyte locale stuffs,
   but I just forgot.
2000-08-08 22:31:13 +00:00
tsubai 2c691df1ec uvm/uvm_inherit.h was removed. 2000-08-02 09:06:56 +00:00
tsubai 7314c0eba6 Clear the reservation in __cpu_simple_lock_try even if it failed to lock.
(From ws@tools.de)
2000-07-08 04:36:56 +00:00
tsubai 9ad1103d98 Make it compile with "options MULTIPROCESSOR". 2000-07-06 22:56:22 +00:00
tsubai 212a0a08d2 Implement powerpc spin lock functions. 2000-07-06 03:52:25 +00:00
itojun d738f90fd7 raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory.  MHLEN is too small
  already (less than 80) and there are chances for unwanted packet loss due
  to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
  (even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
  extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
2000-06-30 17:55:11 +00:00
mrg fa00dc597a remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 07:44:02 +00:00
kleink bb2ed0f487 G/c _BSD_INTPTR_T_ and _BSD_UINTPTR_T_. 2000-06-27 05:53:22 +00:00
kleink 47b5c5e3b1 Resolve some formatting nits; add __intptr_t and __uintptr_t. 2000-06-27 04:58:51 +00:00
kleink e695f72a2e Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
2000-06-26 15:42:16 +00:00
mrg 4c698e84f6 <vm/vm_param.h> -> <uvm/uvm_param.h> 2000-06-26 14:58:58 +00:00
mrg 2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
mrg f5f84f80c5 <vm/vm_prot.h> becomes <uvm/uvm_prot.h> 2000-06-25 13:37:51 +00:00
kleink 133ea38323 Add a WEAK_ALIAS() macro. 2000-06-23 12:18:45 +00:00
tsubai 1bfa0fc6b6 Add cpu_counter(). 2000-06-11 16:32:42 +00:00
tsubai abc5d88356 Make this compile again. 2000-06-11 10:02:15 +00:00
kleink 2a258cd5c8 Pull in missing DDB headers. 2000-06-09 14:09:45 +00:00
kleink 4d8e50f1ce Need <sys/syscallargs.h> for declaration of sys_sysarch(). 2000-06-09 14:08:45 +00:00
kleink bcd7f512f5 Pull in missing headers for declarations, and add missing local function
declarations.
2000-06-09 14:07:13 +00:00
kleink 080f786189 Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-09 14:05:47 +00:00
kleink 4d6a384b1b Need <sys/ptrace.h> for declarations. 2000-06-09 14:05:04 +00:00
kleink 18495b9efa Need <sys/systm.h> for declaration of bzero(). 2000-06-08 07:30:47 +00:00
kleink c2715f98ce Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-08 07:29:22 +00:00
kleink 78009a319f Need <netinet/in.h> for declaration. 2000-06-08 06:50:46 +00:00
kleink 149050ce7b Need <sys/systm.h> for panic() declaration. 2000-06-08 06:48:45 +00:00
kleink 186d2ccb7f Need <sys/systm.h> for declaration, and make argument declarations match. 2000-06-08 06:47:17 +00:00
tsubai 0552fd6de2 Dump fp regs into core file. 2000-06-04 12:12:13 +00:00
tsubai 5257d23759 Add fpreg area in struct md_coredump. 2000-06-04 11:57:17 +00:00
tsubai 86ac32df3d Add PT_GETFPREGS and PT_SETFPREGS support. 2000-06-04 09:30:43 +00:00
thorpej e03e9e8086 Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
2000-05-28 05:48:59 +00:00
sommerfeld 40339b39f9 Reduce use of curproc in several places:
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()
2000-05-27 00:40:29 +00:00
thorpej a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
jhawk 8e44b27348 Rename the machine-specific stack trace printing functions
from db_stack_trace_cmd() to db_stack_trace_print(),
and add an additional argument, a function pointer for an
output routine (i.e. printf() or db_printf()).

Add db_stack_trace_cmd() in db_command.[ch], calling
db_stack_trace_print() with db_printf() as the printer.

Move count==-1 special handling from db_stack_trace_print() [nee
db_stack_trace_cmd()] to db_stack_trace_cmd() [nascent here].

Again, I'm unable to test compilation on all affected platforms,
so advance apologies for potential brokenness.
2000-05-26 03:34:24 +00:00
is 8a6db88c1d Prepare for AmigaPPC. 2000-05-25 21:10:14 +00:00
thorpej 1140468205 Use preempt(), not an open-coded equivalent (which won't be
equivalent for long).
2000-05-24 16:48:33 +00:00
tsubai b906075964 Compile dk_* functions only when __BROKEN_DK_ESTABLISH is defined. 2000-05-23 13:25:43 +00:00
thorpej 855b79db92 Let each platform typedef the new __cpu_simple_lock_t, which should
be the most efficient type used for the atomic operations in the
simplelock structure, and should also be __volatile.
2000-05-02 04:41:04 +00:00
thorpej f51470a514 Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
2000-04-29 03:31:45 +00:00
tsubai be4988ee6d Make kernel profiling work. 2000-04-18 17:06:01 +00:00
tsubai c1acffff5c When call a signal handler, don't pass the kernel (local) address in r5. 2000-04-03 10:23:24 +00:00
minoura 78b105698a Move dl* function definitions to libc on ELF.
Based on the patch supplied by Takuya Shiozaki <tshiozak@astec.co.jp>.
See http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html.
2000-04-02 15:35:47 +00:00
jdolecek fde0c4e6e0 Prototype vtophys() before defining it. Needed for compilation with
-Wstrict prototypes on macppc.

Problem noted by  Hans-Christian Becker <hcb@phc.chalmers.se> in private mail.
2000-03-30 16:18:24 +00:00
kleink 230876cf26 Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
2000-03-26 20:42:21 +00:00
tron e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00
mycroft 9e21b6555a In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
2000-03-17 00:09:18 +00:00