Commit Graph

991 Commits

Author SHA1 Message Date
uebayasi
52232a9d0d Pull in uvm/uvm.h where UVM's page level interface is used. 2010-11-12 13:18:56 +00:00
uebayasi
04cf143fd6 Use more VM_PHYSMEM_*() accessors. No functional changes. 2010-11-10 09:27:21 +00:00
tsutsui
bb3ae5174d Get rid of more #ifdef COMPAT_AOUT_M68K dependent part.
Now compat_aoutm68k can be a module.

XXX: linux/svr4 ELF binaries also require a syscall return value in %a0?
2010-10-15 10:40:52 +00:00
tsutsui
f350eccac6 Fix typo. 2010-10-15 10:20:09 +00:00
tsutsui
eee2fbcce4 Un-ifdef COMPAT_AOUT_M68K for MODULAR kernel. 2010-10-14 16:34:29 +00:00
tsutsui
b2c1aff3d8 Fix reloc calcurations (mechanically pulled from working i386 and sh3).
Now options MODULAR works at least on news68k:

# uname -mrs
NetBSD 5.99.39 news68k
# modstat|grep filesys
coredump         misc       filesys    2     2790     -
exec_aout        misc       filesys    0     1866     coredump
exec_elf32       misc       filesys    0     6072     coredump
exec_script      misc       filesys    0     972      -
kernfs           vfs        filesys    0     9734     -
mfs              vfs        filesys    0     3656     ffs
procfs           vfs        filesys    0     23924    -
#
2010-10-14 16:33:50 +00:00
christos
1a7202d2d0 cargo cult the x86 changes. 2010-09-20 16:13:35 +00:00
tsutsui
d52a314491 - add m68k/conf/std.m68k, which includes common standard options for m68k,
options EXEC_ELF32, EXEC_SCRIPTS, and CPU_IN_CKSUM for md cpu_in_cksum.c
- make all m68k ports include common arch/m68k/conf/std.m68k
  from MD std.${MACHINE}
2010-09-19 02:09:27 +00:00
tsutsui
4a614dd9e5 Remove MD m68k/in_cksum.c which is obsolete since cpu_in_cksum refactoring
in 2008 and now superseded by m68k/cpu_in_cksum.c.
2010-09-19 01:39:48 +00:00
tsutsui
fa0b9f38f6 Add m68k MD cpu_in_cksum.c.
Based on sys/netinet/cpu_in_cksum.c but just modified
to use traditional MD m68k/oc_cksum.s.

Makes ~5% improvements of ttcp(1) xfer rates on ATARI TT030 + SMC_TT.
2010-09-19 01:35:43 +00:00
mrg
6ba01f04a1 look for the m680[2346]0 options in the opt_m68k_arch.h and set them
appropriately in the kernel config, if not already set.

restores the settings before the M680x0 options became _KERNEL_OPT
options.  tested by myself and mhitch.
2010-07-12 02:45:31 +00:00
chs
7ddf89ffa3 enable usermode RAS for sun[23] also. 2010-07-07 01:23:08 +00:00
chs
9ea6b6e3f2 implement ucas_* for m68k. 2010-07-07 01:16:23 +00:00
rmind
3c507045e2 Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
2010-07-01 02:38:26 +00:00
tnozaki
9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
he
df6736b3e1 Only include opt_m68k_arch.h if _KERNEL_OPT is defined, so that librump
builds again.  OK'ed by mrg@.
2010-06-06 11:41:06 +00:00
mrg
fb81c7d694 fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h.  FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
2010-06-06 04:51:33 +00:00
mrg
bd01b4a30e fix PR 6724 - convert m68k options to defflag's. this means that
M680[12346] are now available from opt_m68k_arch.h.  FPSP meantioned
in the PR has already been fixed, and i could not find any more.

i built these kernels to ensure i did not break their builds:

amiga: GENERIC DRACO
atari: HADES FALCON MILAN-PCIIDE
mac68k: GENERIC
sun2: GENERIC
sun3: GENERIC GENERIC3X
cesfic: attempted GENERIC, does not build due to lack of machine/bus.h
hp300: GENERIC
luna68k: GENERIC
mvme68k: GENERIC
news68k: GENERIC
next68k: GENERIC
x68k: GENERIC
2010-06-06 04:50:05 +00:00
tnozaki
dc71c99d49 fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
2010-05-29 17:33:57 +00:00
tsutsui
9ce7892d8f lwp_uc_pool has been replaced with kmem(9)
so also replace <sys/pool.h> with <sys/kmem.h>.
2010-04-26 15:07:01 +00:00
rmind
13f624ca0f Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
2010-04-23 19:18:09 +00:00
tnozaki
377cb4e4f9 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
   it may pass through compiler type check, it's harmful.
   so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
2010-03-27 22:14:09 +00:00
chs
04aa4da3b0 fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
2010-03-20 23:31:27 +00:00
snj
6ea9f5a749 Spell "exception" properly. 2010-02-27 22:12:31 +00:00
skrll
158aca4053 s/cpu_fork/cpu_lwp_fork/ in comment. 2010-02-25 07:14:48 +00:00
wiz
65b4cc1cbf Fix typo. 2010-02-09 23:07:13 +00:00
joerg
d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
tsutsui
c0bd792af4 Move declaration of setfunc_trampoline() into <m68k/m68k.h>. 2009-12-19 18:06:51 +00:00
tsutsui
f2aff26797 Move declaration of lwp_trampoline() into <m68k/m68k.h>. 2009-12-19 13:08:26 +00:00
tsutsui
a63e99e26f Remove extern struct pcb *curpcb declaration. Now it's in <m68k/pcb.h>. 2009-12-19 12:31:34 +00:00
tsutsui
1a8ce335ce - update some comments
- use unsigned constant for shift op
2009-12-13 12:32:46 +00:00
tsutsui
cf5f9350fc Define SYSMAP_VA in <m68k/pmap_motorola.h>
where the Sysmap pointer is declared.
2009-12-11 18:57:44 +00:00
tsutsui
1401e77eb0 Move uvm_setpagesize() calls from locore.s to pmap_bootstrap_finalize().
Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.

XXX: There is #ifdef !defined(amiga) && !defined(atari) workaround
XXX: because they have different pmap initialization functions.
2009-12-11 18:28:35 +00:00
tsutsui
465857f028 Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
  to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
  (that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
  implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
  used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

Tested on atari, hp300, and news68k.
2009-12-11 17:53:22 +00:00
matt
0a8b38422e Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge).  These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
2009-12-11 05:52:03 +00:00
matt
6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
rmind
e9f7af26e6 Rename L_ADDR to L_PCB and amend some comments accordingly. 2009-12-10 05:10:00 +00:00
tsutsui
5f1f616644 Remove unused M68K_SEG_SIZE macro. All sources use NBSEG directly.
XXX: It looks NBSEG definitions in <machine/param.h>
XXX: for all m68k port are incorrect, since 1997 or 2002.
2009-12-08 15:32:01 +00:00
tsutsui
127e92aba6 Remove "#if defined(amiga) || defined(atari)" for PG_SHIFT.
Use PGSHIFT from <machine/param.h> instead.
2009-12-07 14:23:45 +00:00
tsutsui
31af389001 Move initialization of protection_codes[] and kernel_pmap()
from MD pmap bootstrap sources to common pmap_bootstrap_finalize().

Tested on atari, hp300, mac68k, and news68k.

XXX: Why is protection_codes[] array initialized at run time?
2009-12-06 06:41:28 +00:00
tsutsui
a1e417bc5e pm_stfree in struct pmap is a bitmap value so make it unsigned. 2009-12-06 00:33:58 +00:00
tsutsui
3c345377fe Add a common pmap_bootstrap_finalize() function which initializes
lwp0 uarea, curlwp, and curpcb after MMU is turned on, using
lwp0uarea variable saved during pmap_bootstrap() (or equivalent functions)
for pmap_motorola based ports.  Discussed with rmind@.
2009-12-02 15:47:45 +00:00
rmind
ce313d4fb1 Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork(). 2009-11-29 04:15:42 +00:00
rmind
3dc24f5a91 Use lwp_getpcb() on m68k ports, clean from struct user usage. 2009-11-23 00:11:42 +00:00
rmind
23d62c72ca Include sys/user.h for MD proc.h (hppa and m68k ports). 2009-11-21 15:13:14 +00:00
skrll
9bedfc746a Remove unnecessary and incorrect STRONG_ALIAS. 2009-11-11 11:25:52 +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
10758cb0f9 Simplify pmap_remove() a little by avoiding pmap_do_remove() layer, since
possibility to skip wired mappings is not needed anymore.  Apart from that,
no functional differences are intended.
2009-10-22 19:50:55 +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
4988388746 Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@. 2009-10-20 19:10:09 +00:00