Commit Graph

27 Commits

Author SHA1 Message Date
rmind
3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
matt
11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
rmind
448807fa21 Catch-up Xen and usermode with lwp_getpcb() and unbreak Xen build. 2009-11-21 05:54:04 +00:00
cegger
9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
snj
176f5f951d Drop 3rd and 4th clauses. OK jmcneill (copyright holder). 2009-10-21 16:06:59 +00:00
matt
b2a95bab1e Remove all declarations of physmem from sys/arch. Add an include of
<sys/systm.h> to the one file that did not already contain it.
This now means that physmem can be changed by updating systm.h and uvm_page.c
(excluding fixing printfs)
2009-08-11 17:04:14 +00:00
cegger
1d89a182fb change pmap flags argument from int to u_int.
discussed with christos@ on source-changes-d@
2009-04-21 21:29:58 +00:00
jym
92ae85d18e Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
2009-02-06 18:50:26 +00:00
tls
fca9d633b9 Add accept filters to GENERIC kernels where they exist. 2008-08-10 15:31:20 +00:00
ad
b94f79f0e8 Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@. 2008-07-02 17:28:54 +00:00
agc
2481b1e8b9 Re-enable INCLUDE_CONFIG_FILE in the GENERIC kernel config files for
i386, amd64 and usermode - it is necessary for retrieving information
on kernel configuration for running kernels - cf config -x.
2008-05-25 19:05:16 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
joerg
e69482d49d Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
2008-02-12 17:30:57 +00:00
joerg
6e869e402d Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
  They call a backend function cpu_in_cksum after possibly
  computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
  The default implementation is moderate fast on most platforms
  and provides a 32bit accumulator with 16bit addends for L32 platforms
  and a 64bit accumulator with 32bit addends for L64 platforms.
  It handles edge cases like very large mbuf chains (could happen with
  native IPv6 in the future) and provides a good base for new native
  implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
2008-01-25 21:12:10 +00:00
joerg
3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
joerg
e47a5502a7 Use gettimeofday as timecounter. 2008-01-07 17:27:12 +00:00
reinoud
fc7694435a Add GENERIC32 configuration file for 32 bit architectures. This
configuration includes GENERIC but disables EXEC_ELF64.
2007-12-29 20:22:25 +00:00
reinoud
0202db78c9 define opt constants away for i386 2007-12-29 20:21:01 +00:00
reinoud
39e4fad4c1 *** empty log message *** 2007-12-29 20:19:37 +00:00
reinoud
ebc09eacd8 To make NetBSD/userland to boot on i386 choose some defaults in vmparam.h
since for i386 they are defined in page size constants wich NetBSD/userland
doesn't know yet. Also undefine ptrace's __HAVE_PTRACE_MACHDEP since i386
has that but NetBSD/userland not.
2007-12-29 20:07:22 +00:00
reinoud
540893b8f7 Fix enough to get i386 more-or-less compiling. The i386 needs u_long to be
an unsigned long too or uvm will complain.
2007-12-29 18:30:17 +00:00
jmcneill
402a3d3535 -Dfree=kernfree, to match -Dmalloc=kernmalloc 2007-12-29 17:48:23 +00:00
jmcneill
aed987feb1 Add -z to usage strings. 2007-12-29 16:28:40 +00:00
jmcneill
a724fac145 Define init_main's main away to kernmain, and provide our own MD main entry
point. We do this since we don't have a proper bootloader, so we can
instead parse boot arguments here.

  $ ./netbsd -h
  -h: unknown flag
  usage: ./netbsd [-acdqsvx]
	 (ex. "./netbsd -s")
2007-12-29 16:13:46 +00:00
jmcneill
372f1f5260 #ifdef _X86_foo_H -> _ARCH_USERMODE_INCLUDE_foo_H, to match the rest of
the sources.
2007-12-29 15:44:31 +00:00
jmcneill
38365ca359 Import work-in-progress NetBSD/usermode port. 2007-12-29 14:38:30 +00:00