Commit Graph

981 Commits

Author SHA1 Message Date
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
mhitch 8d2f7e8644 Fix DEBUG build - pv_flags does not exist anymore. 2009-10-11 20:37:47 +00:00
thorpej b5fd5d5727 Minor tweak to the pv_table management in the Hibler-derived m68k pmaps:
The head of the list is now a pv_header, which contains the first pv_entry
as well as a 16-bit attributes field (replaces the pmap_attributes array
plus the pv_entry::pv_flags field) as a 16-bit count of caller-specified
cache-inhibited mappings.

Tested on hp300 (shared pmap_motorola.c), changes to atari and amiga copies
are purely mechanical.
2009-08-26 00:30:01 +00:00
thorpej 97a2657a66 Add a real API for testing if a page is a managed page, and adjust callers
to stop relying on vm_physseg_find() for this purpose.
2009-08-18 18:06:53 +00:00
matt 209a0b42e3 Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
2009-08-15 23:44:57 +00:00
martin 18d36d7f38 Do not use lwp_trampoline for cpu_setfunc, we do not want to call
lwp_startup() after a setfunc. Grow a simplified setfunc_trampoline
instead.
2009-05-30 17:52:05 +00:00
skrll e03976623a Add TLS relocation definitions. 2009-05-30 05:56:52 +00:00
mhitch 0742f912f5 Add memory clobber to the instructions that change the IPL in the status
register.  See also kern/38637.
2009-05-06 21:37:40 +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
dsl 82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl 454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00