Commit Graph

3621 Commits

Author SHA1 Message Date
pk 90c49c51c7 When powering down, first ask the PROM to do it for us. 2003-12-30 14:29:30 +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
mrg 490518af32 convert __ldstub() from a ({}) macro into a properly static inline function.
the latter is not valid for C++ so says GCC3.
2003-12-26 06:00:58 +00:00
martin 6c7d761c0e Fix commented out pcmcia entries: adjust comments, add FULL_SPARC_BUS_SPACE,
adapt wd* at pcmcia to new atabus attachment, and add wi* at pcmcia.
Noticed by Michael Wolfson.
2003-12-17 08:08:02 +00:00
jmc d9948df6dd Clean up tmp files on exit. Fixes PR#23723 2003-12-15 20:07:39 +00:00
martin b7019538c6 Add config files for Mr.Coffee JavaStatin 1 machines.
Unfortunately we need two slightly different ones for now (OBP vs. OF)
2003-12-15 19:33:01 +00:00
martin 170c19e9bf Rename the JavaStation network boot loader: bootjs.elf -> bootjs.net. 2003-12-15 17:34:36 +00:00
martin 9eead0293e Make this look more like GENERIC. 2003-12-14 17:26:58 +00:00
uwe b9588a2c89 There's no such thing as "JavaStation-10". Krups official name is
"JavaStation-NC".  Pointed out by Pete Zaitcev (long ago).
2003-12-14 03:25:46 +00:00
martin b4467b848f Don't touch the PROM VA on JavaStations. From Valeriy. 2003-12-13 10:26:13 +00:00
martin d741bf72ed Remove a comment - this is no longer experimental and works with an
unpatched tree.
2003-12-13 09:31:20 +00:00
martin ef9590543d Add support to build bootjs.elf - the secondary bootstrap used to netboot
JavaStations. Based on patches from Valeriy E. Ushakov.
2003-12-12 22:15:59 +00:00
martin 119a91826a If compiling for JavaStations, modify kernal VA layout to not conflict
with the PROM. From Valeriy E. Ushakov. This is a hack, but as long as
we don't have a way to arrange for a proper VA layout on this machines
(i.e. beyound the PROM) it is needed.
2003-12-12 14:51:48 +00:00
martin 808a75e1c5 Use the new split hard/softinterrupt handlers to avoid running mouse/keyboard
input functions to be run at IPL_SERIAL (instead of the intended IPL_TTY).
2003-12-12 14:31:39 +00:00
agc 7db1d33cba Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
2003-12-10 12:06:25 +00:00
jmc 695a2a2f9f Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
2003-12-10 02:04:00 +00:00
mrg a777988c2a ofwboot.net is gone. from hannken@ 2003-12-07 23:16:03 +00:00
christos 5173151e16 add altq 2003-12-07 19:12:56 +00:00
christos 489763f22c whitespace fixes. 2003-12-07 19:12:31 +00:00
mrg 8ae92b7455 merge ultrasparc ofwboot / ofwboot.net. 2003-12-07 09:05:18 +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
keihan 29c72c57f0 netbsd.org -> NetBSD.org
All "netbsd.org" is now gone from src/sys/arch.
2003-12-04 13:05:15 +00:00
keihan 8476e6755a NetBSD.ORG -> NetBSD.org
Now all "NetBSD.ORG" are gone from src/sys.
2003-12-04 12:42:54 +00:00
christos a21fdf3b43 bye, bye _MCONTEXT_TO_SIGCONTEXT and vice versa. 2003-11-25 23:11:52 +00:00
pk dbaf4e4ad1 Drop the old cpu_switch() code. 2003-11-16 14:56:05 +00:00
pk 95ad31d40c __cpu_simple_unlock: use __insn_barrier() instead of a "memory" clobber. 2003-11-16 11:22:30 +00:00
pk fdd5b03782 Use __insn_barrier() in all bus_space read/write operations. 2003-11-16 11:09:07 +00:00
pk 97bb6a9d59 Introduce __insn_barrier(), designed to prevent instruction re-ordering
with minimal side-effects across its location in the source code.
2003-11-16 11:07:57 +00:00
bouyer 6fb817f5dd Commit changes proposed on tech-kern Thu, 6 Nov 2003
- factor out disksubr.c between sun3, sparc and sparc64. Keep the sun3
  groveling code to find a NetBSD disklabel in the first sector (so that it
  can find a label at the old sun3 LABELOFFSET) as a fallback is not
  label at LABELOFFSET, or sun label is present.
- Fix the sun3 LABELOFFSET (was 64, but the kernel wrote the NetBSD label at
  128)
- Make next68k disksubr.c always write a next-compatible disklabel.
- remove #ifdef __sparc__ hack from disklabel(8), and change it to issue
  a DIOCWDINFO after writing the disklabel to the raw partition in the
  -r/-I case (so that the kernel can convert the label if needed).
2003-11-15 17:52:30 +00:00
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
pk bb69a241e8 Remove ancient DDB-dependent `hide/integrate'.
Simplify lewrcsr/lerdcsr; read-back after write doesn't hurt on sun4 so
skip the cpu type test in generic kernels.
2003-11-11 15:01:05 +00:00
wiz ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
pk 72c519a615 __cpu_simple_unlock: avoid instruction re-ordering by the compiler. 2003-11-09 21:04:44 +00:00
tsutsui addcf5d254 #if defined(_KERNEL_OPT) is enough, #if !defined(_LKM) isn't needed
in that case. Pointed out by mrg.
2003-11-08 15:19:20 +00:00
pk 582c396832 Construct arguments properly and update comment in previous bzero -> memset
changes.
2003-11-08 14:04:26 +00:00
martin 6e204ff9bc Fix previous (bzero -> memset), it overlooked the delay slot.
Use set and clr pseudo instructions to simplify the code a bit.
2003-11-08 13:21:36 +00:00
jdolecek 117242ea83 use "mov 0, %o1" instead of kinda strange "sethi 0, %o1" in previous
pointed out by Matthew Green
2003-11-08 08:09:38 +00:00
jdolecek 587e0e3497 use memset() instead of bzero() 2003-11-08 07:39:18 +00:00
pk d6565c303c cpu_switch: values in global registers are not preserved across function calls. 2003-11-07 14:54:29 +00:00
pk 0bd2c4a2ea swift_cache_enable: set cache enable bits after resetting the cache tags. 2003-11-07 14:50:21 +00:00
pk 1fac26c0a5 * Set ksi_code to SI_NOINFO where we used to return zero.
* Fill in ksi_errno if we have an error code to report.
2003-11-04 14:24:25 +00:00
tsutsui c7058a99ee Fix leftover of MI mk48txx(4) changes inside #if defined(SUN4).
Pointed out by Juergen Hannken-Illjes.
2003-11-02 12:59:18 +00:00
tsutsui deb5638bdc Adapt to MI mk48txx(4) changes.
Tested on SS1+ (mainbus), but not tested on sun4/sun4m (obio).

XXX maybe this file should be split into mainbus and obio attachments
XXX and moved into sys/arch/sparc/dev or sys/dev/sun.
2003-11-01 22:59:24 +00:00
cl b936d40f39 Avoid sneaking past signal delivery in sa_upcall_userret():
generate unblocked upcalls in sa_unblock_userret(), before signal
delivery/p_userret handling in userret().

Also defer getting state for preempted upcalls because on some ports
preemption can happen between sa_unblock_userret() and sa_upcall_userret().
2003-11-01 01:38:46 +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
kleink bff4c04c64 Make the extended-precision definitions available for _KERNEL (i.e. the
FPU support package), too; reported by Chuck Silvers.
2003-10-28 15:55:09 +00:00
chs cd23cf5c7c uninitialized variables. 2003-10-28 15:25:27 +00:00
kleink 964d6747b5 Err, rename some members added in previous to make them reflect their
semantics better.
2003-10-27 01:11:46 +00:00
kleink b37192f049 For convenient use in libc, add unions of the C floating types and their
corresponding structure definitions.
2003-10-26 21:46:46 +00:00
kleink a3fabb9e7f Use <sys/ieee754.h> where applicable. 2003-10-26 20:55:30 +00:00