Commit Graph

6267 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
yamt
8a7df6a14b (MULTIPROCESSOR version of) need_resched:
- nothing needs to be done if ci_want_resched is already set.
- if the cpu isn't running any lwp, send a no-op ipi to it
  so that it can resume immediately from halting in idle loop
  without having to wait until the next clock tick.
some advices from Stephan Uphoff.
2003-12-30 03:57:19 +00:00
yamt
26db734594 fixes and optimizations from Stephan Uphoff.
- pmap_enter: zap PTE and read attributes atomically to
  eliminate a race window which could cause lost of attributes.
- reduce number of TLB shootdown by using some assumptions
  about PTE handling.

for more details, see "SMP improvements for pmap" thread on port-i386@
around May 2003.
2003-12-30 03:55:01 +00:00
yamt
4cd02fe3d9 g/c unused x86_ipisend. 2003-12-30 03:52:01 +00:00
yamt
1d4f93e85b postpone freeing PTPs until TLBs are flushed
to avoid loading invalid TLB entries.  from Stephan Uphoff.

for more details,
see "i386 pmap bug" thread on port-i386@ around Feb, 2003.
2003-12-26 11:50:51 +00:00
jmc
0fe36533f0 Wrap some areas with #ifndef _LOCORE so assembly files can pick up some defs
from here. Needed for bioscall fixes in PR#14946
2003-12-25 21:03:55 +00:00
jmc
f84b0cd795 Partial fix for PR#14946. Make sure x86 symlinks exist also 2003-12-25 21:02:58 +00:00
kochi
71ef8c54d3 add ACPICA_PEDANTIC option. 2003-12-23 10:11:42 +00:00
dsl
4bf8ba6f30 Fix problems booting disks with extended partition from grub (and other
non-netbsd mbr code) - thanks to Joe Thiemann for finding this...
2003-12-21 20:56:40 +00:00
thorpej
54da81c66c A kernel configuration file suitable for Connectix Virtual PC 6. 2003-12-18 17:08:35 +00:00
tls
c58ee50077 Add "sk" driver for SysKonnect/Marvell GigE cards. 2003-12-17 09:18:45 +00:00
jdolecek
e1a0411746 print complete contents of the second feature byte; this also fixes
printing of DMA32 bit
2003-12-15 08:38:01 +00:00
dyoung
10d1fa6e70 Add ath(4) for Atheros 802.11a/b/g cards. 2003-12-14 09:54:01 +00:00
thorpej
2f2ca9e66b Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
2003-12-14 01:32:01 +00:00
thorpej
98f7d12017 Split out the Silicon Image SATALink support into its own driver,
"satalink".
2003-12-13 23:13:40 +00:00
thorpej
523e3bb618 I haven't had this laptop for a long time now. 2003-12-13 22:48:02 +00:00
nathanw
d7a0075027 Trap 0x8 (T_DOUBLEFLT) and 0x11 (T_ALIGNFLT) should be TRAP, not
ZTRAP; while the error code is always 0, the processor indeed pushes
the 0 on the stack, according to table 5-1 in the IA32 SPG.
2003-12-12 20:17:53 +00:00
drochner
bfae4c94ef if the code segment is not enlarged, return 0 in pmap_exec_fixup
so that the trap is not retried
(fixes cases where a program traps for good reasons)
2003-12-10 18:13:32 +00:00
drochner
e74e4d19cb Just checking a global marker (pm_hiexec) for the highest executable
address currently in effect does not always work: There might be more
instances of the code segment selector in other threads, on other CPUs
and in *jmp_bufs.
So always check whether the CS needs updating, if it is not already
set to the "BIG" value.
This code needs more cleanup, this is considered a stopgap fix only.
2003-12-10 13:59:48 +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
dsl
b31c4f649a Fix speling mistake in commennt. 2003-12-07 20:11:11 +00:00
jdolecek
cbff3c76c3 fix IPRINTF() code to compile if the printf()s are enabled; also print
lwp pointers rather than proc pointer
2003-12-05 21:24:57 +00:00
christos
f7e4c22afc Add a dummy darwin_slock 2003-12-05 20:34:45 +00:00
christos
6b364b0d7f Do the song and dance for the new indirect register mappings.
XXX: This driver's attach routine does not free resources on allocation
failure.
2003-12-05 19:00:07 +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
f1a738c8b7 add stub file so that the kernel compiles. 2003-12-04 01:17:19 +00:00
christos
f85ce17392 add stub function, so that kernel links 2003-12-02 04:53:11 +00:00
jdolecek
2f13a5654b throw in some default switch labels to pnpbios_update_dock_status(), so that
this compiles with PNPBIOSEVENTS option (such as with config DR-EVIL)
fixes kern/23564 by dheeraj reddy
2003-11-25 20:47:27 +00:00
abs
115bd31b73 Sync with GENERIC.MP (in particular add MPBIOS). Noted by Adam C. Migus 2003-11-21 09:29:11 +00:00
dsl
91f5ee90a4 Add .WAIT after first subdirectory to ensure we don't build the libraries
twice.
2003-11-20 16:16:41 +00:00
fvdl
56bf58a34b Add (commented out) and document NO_TSC_TIME. 2003-11-20 13:32:41 +00:00
fvdl
a8ea4f26c8 If NO_TSC_TIME is defined, do not use the tsc microtime. This option can
be used to make time pass a little more smoothly when running under
VMware.
2003-11-20 13:30:29 +00:00
junyoung
e58c050c81 Use predefined macro rather than hardcoded value. 2003-11-20 12:30:34 +00:00
jonathan
94d42f90db Add opencrypto and drivers for PCI cryptographic accelerators --
hifn (Hifn 7751), ubsec (Broadcom 582x) -- to i386 GENERIC kernel.
2003-11-18 23:07:37 +00:00
jonathan
9845fd1063 Add support for Broadcom and Intel gigabit lan devices on (i386)
laptop motherboards. From GENERIC_LAPTOP revisions 1.81->1.83.
2003-11-18 21:21:58 +00:00
jonathan
f95098aec9 Add wm* and igphy*/makphy*, for laptops with Intel Pro/1000-family
gigabit Ethernet on the motherboard.
2003-11-18 21:15:46 +00:00
jonathan
64f5634e18 Add bge* and brgphy*, for laptops with Broadcom gigabit on motherboard. 2003-11-18 20:54:44 +00:00
tls
2a94b617f1 We can't use bf_cbc.S if I386_CPU is defined; the 80386 doesn't have
bswapl, and bf_cbc.S uses it.  Unfortunately, this means that GENERIC
will no longer use the asm code -- though it will still use the asm
for the basic Blowfish transform.  This won't slow down the KAME IPsec
(since it rolls its own CBC) but may slow down fast-ipsec in kernels
that have I386_CPU defined.
2003-11-16 12:02:15 +00:00
christos
a0e314dfe4 add noop wrapper functions for i386 2003-11-13 01:44:36 +00:00
drochner
038b8b6573 Uhm - the last change broke everything but very simple setups.
(it only allowed to boot an nfs /netbsd automatically)
To make it work for people who can't tell the DHCP server to pass
the right kernel file to pxeboot, without losing flexibility for
people who can, do the following:
Use the filename given by the DHCP server if it contains a ":". A ":"
was already used to seperate filesystem and filename, so we don't
lose anything. Otoh, a path to pxeboot usually doesn't contain a ":",
so it should still work if we got the old pxeboot filename again.
2003-11-12 18:44:08 +00:00
dsl
ec098b8a13 Double space for memory disk to 5MB, this costs (almost) nothing on the
install media and the kernels (and sysinst) will still run on a 16MB system.
(They haven't run on an 8MB system for a while - might affect 12MB though.)
The additional space in the root filesystem lets sysinst core dump properly!
2003-11-12 11:47:34 +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
tsutsui
112c91d583 Use #if defined(_KERNEL_OPT) to protect #include "opt_xxx.h"
from building LKM etc. Suggested by mrg.
2003-11-09 05:29:59 +00:00
dsl
fcb78a6640 Remove depencency of vers.c on ${LIBLIST} - it messes up the depends and
I'm not sure why I added it now!
Default NWEVERSWHAT back to "BIOS Boot" - look better on boot banner page.
2003-11-08 00:02:02 +00:00
dsl
a7e45c127a stand/lib/crt/rom is no more, no need for it in .PATH 2003-11-07 23:44:56 +00:00
dsl
80e537250b Make 'dependall' generate the dependencies 2003-11-07 23:39:27 +00:00
dsl
6074f35279 Change getextmem2 to return 'configured' values from cx/dx if ax/bx zero,
make absolutely high the top 16bits of returned values are zero.
Ralf's list says that some BIOS need %eax = 0x0000e820 in getmementry.
Add a few comments.
Might fix problems with memory size detection on some systems.
2003-11-07 11:34:28 +00:00
dsl
a8af374602 Adjust location of 'extmem2' diagnostic print. 2003-11-07 11:30:39 +00:00
tron
0ad4493632 Update comment for wm(4) attachment because the driver supports more
than the Intel 82543 and 82544.
2003-11-05 07:51:12 +00:00
mycroft
06eb56a853 So, on other platforms we use the BOOTP/DHCP file name for the boot program
and use a default file name of "netbsd" for the kernel.  Do the same thing
here, as it hardly makes sense any other way.
2003-11-05 04:18:26 +00:00
fvdl
60a5dfd880 Add and enable igphy. 2003-11-04 23:38:41 +00:00
mycroft
94d9caaae4 Re-add ServerWorks IDE support, as "rccide". Note: this is untested, as I no
longer have a ServerWorks-based motherboard.
2003-11-04 16:57:57 +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
mycroft
4ac0e3e5c6 More cleanup:
* Use ACPI_FAILURE() and ACPI_SUCCESS().
* Output exception strings in a few more places.
2003-11-03 18:07:10 +00:00
mycroft
b910c03a32 Clean up some messages:
* Use AcpiFormatException() in a bunch of places.
* acpi_resource_parse() already prints an error, so don't do it in the callers.
2003-11-03 17:54:39 +00:00
kochi
84795bd3fd * now the size of ACPI_DEVICE_INFO is variable:
it can now accomodate multiple _CIDs
  sizeof(ACPI_DEVICE_INFO) should not be used
* make ad_devinfo member in acpi_devnode a pointer
* implement acpi_match_hid() to simplify matching devices;
  _CIDs are also taken into account now as well as _HID
2003-11-03 06:03:47 +00:00
yamt
c8d12c1c35 retire PG_ZERO zero-fill checks. uvm_pagefree now check it for us. 2003-11-03 04:02:13 +00:00
jdolecek
ec23fd5f28 properly initialize local variable in pnp_debugdump() 2003-11-02 11:32:03 +00:00
yamt
fe3e5aa0b8 as we know PTPs are zero-filled when being freed,
mark them PG_ZERO so that they'll be used to serve UVM_PGA_ZERO requests.
2003-11-01 15:21:02 +00:00
yamt
e36739df67 use explicit "l" suffixes.
(xor -> xorl)
2003-11-01 15:14:27 +00:00
yamt
f41e60e6a0 as there shouldn't be any mappings when pmap_destroy() is called,
assert there is no remaining PTPs at that point.
2003-11-01 09:07:11 +00:00
mycroft
a4061d6dec Update for structure changes. 2003-10-31 21:49:39 +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
hannken
ef301d7a07 Remove memset prototype. Already present in sys/lib/libsa/stand.h. 2003-10-31 10:49:25 +00:00
nisimura
51cdfee682 Added stpcide(4) driver for STMicroelectronics STPC IDE controllers. 2003-10-31 06:49:58 +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
fvdl
7d342b5852 * keep track of PCI buses that aren't known by firmware, but are found
by NetBSD
* use this info in in intr_find_mpmapping
* get rid of the last argument to intr_find_mpmapping, it was redundant
2003-10-30 21:19:54 +00:00
simonb
b6abb6ab1d Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
mycroft
a246f3b7a5 Reorder slightly to eliminate bogus initializers. 2003-10-29 02:02:05 +00:00
mycroft
659649b149 The previous change was wrong. The variables were legitimately uninitialized.
This code was broken on 2002/10/22 by christos.
2003-10-28 23:10:02 +00:00
mycroft
6ad04f2a27 XXX: gcc 2003-10-28 23:04:26 +00:00
mycroft
3aae7144ea Eliminate bogus initializer. 2003-10-28 22:52:53 +00:00
yamt
a059d6caf4 appease gcc "uninitialized" warning. 2003-10-28 14:49:53 +00:00
drochner
46e330c669 quell a gcc3 "uninitialized" warning by putting some more dead code
inside "#ifdef PNPBIOSEVENTS"
2003-10-28 11:17:14 +00:00
junyoung
68a06a8528 Fix indent level. 2003-10-28 04:59:18 +00:00
junyoung
2c4f6d0128 Nuke __P(). 2003-10-27 14:11:46 +00:00
junyoung
8f1ba94956 Nuke __P(). 2003-10-27 13:43:48 +00:00
christos
7f7c7b7d99 Back out the libretto related hacks I accidentally committed. They are
in CVS in case one wants them :-)
2003-10-27 04:10:43 +00:00
yamt
8122bbfb62 issue PAUSE during ipi rendezvous even with DIAGNOSTIC. 2003-10-26 11:09:13 +00:00
yamt
f16e031e00 don't grab kernel lock for SYCALL_MPSAFE syscalls. 2003-10-26 10:48:08 +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
dyoung
4b8cd4a6ea Make the tags: target create tags for the ath(4) HAL. 2003-10-26 00:17:46 +00:00
christos
b92846c162 Fix uninitialized variable warnings. 2003-10-25 21:34:07 +00:00
mycroft
ca57a40612 Remove bogus initializers. 2003-10-25 19:38:18 +00:00
mycroft
8fd2d44a41 Add a missing default. 2003-10-25 19:37:47 +00:00
christos
65235b9eb5 Fix uninitialized variable warnings 2003-10-25 18:40:37 +00:00
mycroft
0965dd2ada Recognize ESS1879. 2003-10-23 14:28:55 +00:00
chs
65d5587ddd rename pv_next to pv_node. use SPLAY_RIGHT() instead of expanding it inline. 2003-10-23 08:30:21 +00:00
provos
6a583bc5cb changed linked list in pmap_remove_pv to a splay tree; approved: fvdl@ 2003-10-23 03:03:20 +00:00
kleink
5d1a2f48d2 Use a common <machine/math.h> for amd64 and i386. 2003-10-22 11:54:23 +00:00
cl
ed9c2d7075 don't uvm_swapout LWPs which are LSONPROC on another cpu.
uvm_swapout_threads will swapout LWPs which are running on another CPU:
- uvm_swapout_threads considers LWPs running on another CPU for swapout
  if their l_swtime is high
- uvm_swapout_threads considers LWPs on the runqueue for swapout if their
  l_swtime is high but these LWPs might be running by the time uvm_swapout
  is called

symptoms of failure: panic in setrunqueue

fixes PR kern/23095
2003-10-19 17:45:35 +00:00
lukem
184141db07 Use one 'atabus* at ata?' instead of multiple 'atabus* at FOOide? channel ?' 2003-10-18 08:12:07 +00:00
lukem
e1616bdc8a use 'atabus* at ata?'
use 'atapibus* at atapi?' instead of 'atapibus* at atabus?'
2003-10-18 08:11:02 +00:00
fvdl
6a6db3cbd9 Add hooks and structures to allow the MP table intr mapping code a
better shot at finding a mapping. For PCI interrupts, if a bus
has no mappings, try its parent, with the swizzled pin, and the
bridge's device number.
2003-10-16 22:56:29 +00:00
gson
d1298fd2a7 If a bootxx program already happened to be a multiple of 512 bytes in
length before padding, the shell command to conditionally pad it to
a multiple of 512 bytes returned a nonzero exit status, causing the
build to fail.
2003-10-15 03:49:57 +00:00
dsl
ca9f17c96d Add bsd.obj.mk so these directories get their own obj directory (for the
library objects shared by their subdirectories).
Needed when the obj directory isn't a parent of the subdirectories obj directory
2003-10-13 06:56:47 +00:00
dyoung
18cc6db280 For PCI attachment, ath(4) needs both the HAL binary and the files
listed in dev/pci/files.ath.
2003-10-13 06:40:14 +00:00
lukem
e076c47767 Instead of defining TERSE_ERROR by default (due to space constraints),
define NO_LBA_CHECK.  bootxx_msdos still needs TERSE_ERROR because its
BPB is larger than the default.
2003-10-13 06:15:00 +00:00