Commit Graph

935 Commits

Author SHA1 Message Date
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
dsl 02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
tsutsui 1832dc90cf Avoid "returned non-zero status" warning on make depend for kernels
without options FPSP on ports which have support for 68040 and FPSP.

Should close PR port-atari/40678.
2009-02-28 16:11:39 +00:00
martin f055e18205 Centralize fpu exception to siginfo code encoding for all m68k archs,
fixes a failure in the lib/libc/ieeefp/except regression test.
2009-01-27 20:30:12 +00:00
martin f7d75c4a14 fix include path in previous 2009-01-27 20:12:19 +00:00
martin 071773c11c Move FPSR_ register bit definitions into their own file 2009-01-27 20:03:12 +00:00
martin 2a9360026c The FE_* constants are used verbatim to set the RND field in the FPCR
register - so FE_UPWARD needs to be 3 and FE_DOWNWARD 2 - otherwise
our libc code for fpsetround(), fpgetround() and __flt_rounds() would
need to be adjust (and become slower). This fixes a failure in the
lib/libc/ieeefp/round regression test.

OK: matt
2009-01-27 19:04:39 +00:00
abs a192b2c217 Abstract out setting of '-m680X0' based on -DM68020, -DM68030,
-DM68040, and -DM68060 into sys/arch/m68k/Makefile.cmachflags and
include from both atari and amiga. Other m68k ports which build
kernels that support multiple CPU types can also switch across to
this.
2009-01-25 22:25:08 +00:00
tsutsui 7107680c9d In fpu_emul_arith(), check lower 7 bits in word1 rather than only 6 bits
to check 040/060 FP instructions, and don't call fpu_implode() and
fpu_upd_fpsr() if no vaild emulated result is set otherwise these
functions cause NULL pointer dereference.

Fixes panics triggered by 040/060's FDADD instruction
(which has the same lower 6 bits with fscale instruction)
on 020/030 machines (even with 68881/68882) running kernels
with options FPU_EMULATE.
Problem reported by John Carr on port-sun3.

Should be pulled up to netbsd-4-0, netbsd-4 and netbsd-5.

XXX: m68k 4.0 packages binaries on ftp have this FDADD instruction.
2009-01-20 14:57:21 +00:00
tsutsui 00ae5151a8 Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
2009-01-17 07:17:35 +00:00
tsutsui ac2053000c Make st_entry_t and pt_entry_t unsigned.
These values contain paddr_t and bitmap flags.

XXX paddr_t is unsigned long, not unsigned int.
2009-01-17 01:38:10 +00:00
cegger b4fe900840 adaption for making kgdb_dev a dev_t 2009-01-11 23:20:37 +00:00
martin 755cd7edcb Now that COMPAT_50 is needed inside the kernel for the time_t changes,
piggyback it and guard the copying of syscall return values on it. Our
libc has been fixed quite some time ago, time to get rid of the bogus copy.
2009-01-11 20:40:31 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
tsutsui 970121f868 Use the global kernel_pmap_ptr pointer in each MD pmap_bootstrap.c
(where MMU is not enabled yet) and make kernel_pmap_store static again.
Also consistently use uintptr_t on address conversion in RELOC() macro.

Tested on hp300 (PA != VA) and news68k (PA == VA).
2008-12-28 05:15:59 +00:00
tsutsui f1f16fdb45 Prepare kernel_pmap_ptr as well as other m68k ports which have own pmap.c. 2008-12-10 17:13:53 +00:00
tsutsui cf4bdf5d25 Restore kernel_pmap_store declaration since it's still used by
most m68k ports in pmap_bootstrap.c.
2008-12-10 17:12:07 +00:00
pooka ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
tsutsui b8f301461c Add #ifdef _KERNEL_OPT. 2008-11-25 14:02:16 +00:00
ad 92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
ad d1b01a3709 Provide a small inline wrapper for sysent::sy_call() and use it to store
the active syscall description in struct lwp. To be used at some future
point to prevent unloading of modules that provide syscalls, while the
syscalls are in use.
2008-10-21 12:16:58 +00:00
apb 96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
martin f219f266bb Include saframe.h, fixes PR port-m68k/39761 2008-10-18 13:38:42 +00:00
wrstuden 4fb41e761e Merge wrstuden-revivesa into HEAD. Catch some files that I forgot
to revive on HEAD in previous commit.
2008-10-15 06:52:38 +00:00
wrstuden fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
matt 91d4704c12 Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones.  Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
2008-08-05 16:47:41 +00:00
rmind 160268aca6 Remove proc_representative_lwp(), use a simple LIST_FIRST() instead.
OK by <ad>.
2008-07-02 19:49:58 +00:00
tsutsui 2bea7e173d - use TAILQ macro
- use NULL rather than 0 for pointers
No binary change.
2008-06-28 13:22:14 +00:00
tsutsui 99644a6f1e Remove ({ }) gcc extensions and use static inline functions instead. 2008-06-27 13:05:12 +00:00
ad 06c343ac94 vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both. 2008-06-04 12:41:40 +00:00
chs 6740bb5440 enable profiling of assembly functions. 2008-05-25 15:56:11 +00:00
wrstuden 97003b024b Oops. These are supposed to come alive on the branch, not the head. 2008-05-11 00:18:09 +00:00
wrstuden dbbab92bc9 Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
2008-05-10 23:48:44 +00:00
martin f6c08ca517 Move to 2 clause TNF license 2008-05-03 23:57:21 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui 7fbd55774a Use mutex(9) for uvm_kernel_object. From Greg Oster. 2008-04-27 12:34:54 +00:00
ad 284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
tsutsui c3b129605a Use generic atomic_cas_uint() for mutex(9) and rwlock(9), and
remodel old RAS based _lock_cas() implementation for m68010
into genereic atomic_cas_32().
Now sun2 kernel compiles and even works on multiuser. (hehe)

Tested on tme (emulationg 2/120 and 3/150) and (real) 3/80.
2008-04-05 22:47:52 +00:00
apb e6806c2c83 Adapt to changes in m68k/060sp/asm2gas script: pass SED=${TOOL_SED:Q}
instead of TOOL_SED=${TOOL_SED:Q} in the environment.
2008-03-28 22:29:16 +00:00
apb 87f370a116 Synchronise the two asm2gas scripts in sys/arch/m68k/060sp and
sys/arch/m68k/fpsp:

* The fpsp/asm2gas sed script previously hardcoded the fact that
  registers needed a '%' prefix, and the 060sp/asm2gas sed scrip
  previously did not have rules related to inserting '%' before register
  names.  Now, both scripts have the same rules, but the rules are
  parapeterised to use "$P", which is set to '' or '%' as appropriate.

* Some other minor changes to the sed scripts.

The new asm2gas scripts have been verified to produce identical output
to the old asm2gas scripts, for all inputs in 060sp/dist/*.sa and
fpsp/*.sa, except for some differences inside comments.

Thanks to Izumi Tsutsui for suggesting that these scripts should be
synchronised.
2008-03-28 22:27:33 +00:00
apb a749c03e28 Use "${TOOL_SED}" instead of just "sed" in sys/arch/m68k/060sp/asm2gas. 2008-03-27 07:15:16 +00:00
yamt c2ade09841 remove an empty file. 2008-03-24 11:52:07 +00:00
xtraeme f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
dsl c2a8c787c3 Remove the 'args' parameter to 'trace_exit()' it is no longer used.
Instead of passing the (un)real system call code and syscall table pointer,
just pass the number of arguments - which is what ktrace really wants.
Ride forthcoming 4.99.53
2008-02-06 22:12:39 +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
skrll ebb5deb738 Define PT_MACHDEP_STRINGS 2008-01-25 11:59:20 +00:00