Commit Graph

496 Commits

Author SHA1 Message Date
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
jmc c594ed376d Needs a .WAIT before doing boot/bootxx 2003-12-12 15:57:32 +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
tsutsui ab60f77a08 Declare sc_regbase as volatile, so that if_sn.c works with gcc3.
XXX We should switch to MI SONIC driver.
2003-12-02 13:19:06 +00:00
taca c6f4b234b4 Move initialization of `ssym' and `esym' to inside of
#if NKSYMS || defined(DDB) || defined(LKM) ... #endif.

Now GENERIC and INSTALL kernel can be compiled again.
2003-11-23 08:54:57 +00:00
tsutsui 31cf2e3911 Suppress uninitialized warnings. 2003-11-23 00:09:11 +00:00
tsutsui 3fb3c2b562 Revert previous DPRINTF changes since gcc3 properly removes text strings
in while(0) statements during optimization.
2003-11-21 19:44:53 +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
dsl 0c8ed6072c default: to 1024x768 landscape if unknown geometry (avoids uninitialised vars) 2003-11-07 19:21:39 +00:00
tsutsui 2ddfa78de4 Adapt MI mk48txx(4) changes. Tested on NWS-3470D (hb) and NWS-5000X (apbus). 2003-11-01 22:50:45 +00:00
tsutsui bf9fad7ca4 Cast through (void *) to appease gcc3. (now it's also warned on mipseb) 2003-10-26 14:52:52 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
simonb 916e13afc6 Add COMPAT_16 where missing.
Remove the unused COMPAT_15.
Comment out/remove COMPAT_* from INSTALL kernels.
2003-10-25 13:21:13 +00:00
tsutsui 62c9f07679 Switch to use MI mk48txx(4) and todr(9) for MK48T02 todclocks on newsmips. 2003-10-25 04:07:28 +00:00
tsutsui 75ebe04013 Add options COMPAT_16. 2003-10-24 15:58:31 +00:00
jdolecek ee510816af add wsfont major to archs which have the other wscons devices 2003-10-22 16:53:22 +00:00
jdolecek ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek 4e915c9ccd update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
2003-10-10 21:21:25 +00:00
simonb 970b12080e Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
2003-10-08 01:40:22 +00:00
jdolecek e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
itojun fc918f8713 add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more.  see tech-security
2003-09-06 03:25:23 +00:00
chs c023b4180f add "makeoptions MACHINE_ARCH=..." in std.* for mips ports
where it is constant (to ease cross-building).
2003-08-30 22:44:38 +00:00
itojun 4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
itojun 3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
thorpej 063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
lukem ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
drochner 1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
tsutsui 0cd4c10ed3 Make this compile with no scsibus. 2003-06-14 16:18:30 +00:00
simonb 789329a94f Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.
2003-06-09 12:20:37 +00:00
tsutsui 8f188ee39f Remove unused cpu_spl? functions. 2003-05-25 15:03:21 +00:00
tsutsui 1f8c44a20a Use splbio to block SCSI interrupts. 2003-05-25 15:00:38 +00:00
tsutsui d054fe07eb Remove __BROKEN_CONFIG_UNIT_USAGE.
It seems fixed long ago.
2003-05-25 14:40:30 +00:00
tsutsui c9058cdc00 Add MI softintr(9) support with common mips/softintr.c. 2003-05-25 14:02:47 +00:00
tsutsui 7ae6d5f5fd - Add some comments about hyper-bus and apbus devices.
- Sort some device entries.
- Use options<sparc><tab>
2003-05-21 13:10:08 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
tsutsui 52827752dc Rename apbus_intr_call() -> apbus_intr_dispatch(). 2003-05-10 10:19:59 +00:00
tsutsui 764da5a461 - Prepare common structures for interrupt handler and share them between
Hyper-bus and AP-bus.
- Use LIST rather than static array for interrupt dispatcher.
2003-05-10 09:46:24 +00:00
tsutsui 29c7efafce Use wildcard for scsibus at sc0. 2003-05-10 04:11:53 +00:00
tsutsui fc900e1be2 Add a cast missed in the previous. 2003-05-10 03:57:28 +00:00
tsutsui fb67a7f5f5 Call zshard() twice in zshard_hb() interrupt handler for workaround
otherwise news3400 sometimes losts zs interrupts.

This should fix "serial console hiccups on sysinst" problem
reported by Mauricio <raub at kudria.com> on port-newsmips.
2003-05-10 03:27:33 +00:00
tsutsui dac2b81da3 Remove bogus comments. 2003-05-09 17:39:12 +00:00
tsutsui f69620555a - Define and use struct hb_attach_args rather than struct confargs
for hb devices.
- Move declarations for hb functions and macros to dev/hbvar.h.
- Define and use hb_badaddr() macro for hb devices.
- Declare news3400_badaddr() in machine/cpu.h rather than machine/autoconf.h.
- Remove unused stuff from machine/autoconf.h.
2003-05-09 13:36:39 +00:00
tsutsui 21358084e4 Rename some variables for readability. 2003-05-09 11:58:21 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
tsutsui 3f61e596f5 Remove one more register declaration. 2003-04-26 19:13:53 +00:00