Commit Graph

1129 Commits

Author SHA1 Message Date
aymeric f45c23b807 fix an obvious typo which prevented the machdep.cacheinfo table from being
published.
This generated the following warning message at boot time:
sysctl_createv: sysctl_create(cacheinfo) returned 17
2004-01-03 00:09:15 +00:00
pk 70f20a1217 Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
2003-12-30 12:33:13 +00:00
manu fe7a5ddf22 Fix PowerPC ports build with KGDB. 2003-12-30 11:23:20 +00:00
mjl df0cb86d0d Add some casts to printf() args to make it compile w/ DEBUG set. 2003-12-27 13:35:52 +00:00
pk 5218af0651 Use uvm_km_zalloc(...) instead of uvm_km_alloc1(...,1). 2003-12-18 14:15:55 +00:00
simonb 4805123b12 Nuke register prefix for local variables, clean up indentation a little. 2003-12-17 04:04:40 +00:00
manu d2b4a2c0fa Enable SA_SIGINFO for COMPAT_DARWIN 2003-12-16 13:38:25 +00:00
manu c3eb252046 GPR5 does not hold code, it holds the signal number (this is the first
argument to the signal handler). It's an extraordinary luck that test
programs worked so far.
2003-12-16 13:36:18 +00:00
scw 6222bc14b8 Fix a typo in bswr2rb() which resulted in an 8-bit load instead 16-bit.
Pointed out by Derek Godfrey.
2003-12-11 23:52:25 +00:00
matt 0ecc4c35b5 Copy ksi->ksi_info, not all of ksi, to user stack. 2003-12-11 18:33:52 +00:00
simonb 8b18b565b8 Make some comments line up. 2003-12-09 09:49:01 +00:00
hannken 8e29a1a664 Make it compile without PPC_OEA. 2003-12-05 11:00:57 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
manu 057381d1b4 Move machine dependent definitions to machine dependent headers. 2003-12-03 18:25:44 +00:00
simonb 9c334e285d Remove unused ddbsave define. 2003-11-30 07:41:54 +00:00
manu 097771219f Implement vm_read, vm_write, and a framework for vm_machine_attribute.
THe machine dependent bit nees to be written.
2003-11-29 23:56:08 +00:00
simonb 2350e98506 Fix some white space nits. 2003-11-26 03:56:38 +00:00
simonb 19a9d14f26 Remove the prototype for the non-existent intr_md_register() function. 2003-11-26 03:55:38 +00:00
simonb da33cec9b3 Need offset of ci_curpm in struct cpu_info on 4xx as well. 2003-11-26 03:51:39 +00:00
matt 99f7a6b7db More PPC64 changes. (latent for now). 2003-11-21 22:57:14 +00:00
matt d765841d3e Restore ci_curpm since it re-enables 603 to working state. 2003-11-21 18:07:29 +00:00
matt 13e522ee98 Add PowerPC64 definitions 2003-11-21 17:40:48 +00:00
scw 1ba37196a9 Include arch/powerpc/ibm4xx/intr.c only if a particular board actually
uses the generic 4xx interrupt implementation.
There are some 4xx boards with entirely different interrupt controllers.
2003-11-19 14:27:24 +00:00
manu b6b7d129a1 Added mach_thread_set_state 2003-11-11 18:12:40 +00:00
manu a2bed85761 Implement mach_thread_get_state.
While we are here, try to tag machine dependent functions in header files.
also transformed darwin_ppc_*_state into mach_ppc_*_state, as this is
what they really are (COMPAT_DARWIN is on the top of COMPAT_MACH, not the
other way around)
2003-11-11 17:31:59 +00:00
he 1995f8d682 Replace an overlooked instance of p->p_nras with LIST_EMPTY(&p->p_raslist). 2003-11-06 08:49:13 +00:00
dsl 2ffbd2ab99 Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
2003-11-04 10:33:15 +00:00
cl ef56cc40ab Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
2003-10-31 16:44:34 +00:00
simonb 6d85c5e0d5 Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
2003-10-31 03:28:12 +00:00
chs 6ef2bc9b82 make this compile again. 2003-10-28 15:28:24 +00:00
kleink 39dd1b6e20 pmap_print_mmuregs(): move initialization of addr before its first use;
reported by David Young.
2003-10-27 23:35:41 +00:00
dyoung 9dbaa63583 Stop false uninitialized variable warning. 2003-10-27 23:08:12 +00:00
dyoung 9a73ec4e1e Stop false uninitialized variable warning. 2003-10-27 22:48:20 +00:00
simonb 499ef1c1bb Remove (the now non-compiling) support for 128bit FP emulation, which
isn't needed for PowerPC anyway.
2003-10-27 04:32:02 +00:00
simonb 354075932d Fix a bogus uninitialised warning. 2003-10-27 04:30:32 +00:00
simonb 1baeb1502a Keep bogus gcc -Wuninitialised warnings happy. 2003-10-27 03:58:17 +00:00
kleink a3fabb9e7f Use <sys/ieee754.h> where applicable. 2003-10-26 20:55:30 +00:00
chs cac49e5cf0 clear pcb_onfault before calling uvm_fault() and restore it afterward.
if the fault handler generates a pagefault, we'd like to panic rather
than invoking the onfault handler.
2003-10-25 16:31:39 +00:00
matt 425743428c Fix some indentation problems. Turn off PSL_EE when calling OFW. 2003-10-24 05:10:02 +00:00
matt 7e1d1cca33 s/SSR/SRR 2003-10-22 17:29:18 +00:00
matt 3f37cf2db7 Rework ddblow so that if PSL_PR == 1, it dispatches directly to the
trap handler and bypasses the ddbtrap code.
2003-10-22 17:27:58 +00:00
simonb d4b0d4911f Remove some numeric asm labels that aren't used. 2003-10-20 05:52:55 +00:00
simonb 066683efa3 Need Data Relocate in the MSR for the dcbf in pmap_procwr().
From Matt Thomas.
2003-10-20 05:47:52 +00:00
matt 421dd6cc28 Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>.  Remove unneeded <machine/cpufunc.h>.  To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
2003-10-20 00:12:09 +00:00
matt ba34947f80 Add powerpc-specific isa and isadma machdep code. (Merge common code from
prep and sandpoint and ...)
2003-10-19 03:19:32 +00:00
matt 3575370e0a Remove worthless load.
Save curcpu before doing uniprocessor dispatch.
2003-10-17 22:21:38 +00:00
matt 12ecf72b47 Don't zero curlwp/curpcb in cpu_switchto.
Use correct register in the store conditional.
Add DIAGNOSTIC check for null curpcb on cpu_switch exit.
2003-10-17 21:08:57 +00:00
matt 67ab911529 Add a KASSERT() to verify the pcb is not NULL. 2003-10-17 19:56:18 +00:00
simonb ef41f16231 Correct a test for setting IFF_OACTIVE on the interface. 2003-10-15 02:10:00 +00:00
matt 4b22ee736b Add support for MPC74[45]7 2003-10-09 20:49:06 +00:00