Commit Graph

390 Commits

Author SHA1 Message Date
xtraeme f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
drochner bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
joerg 127bc48d95 Add missing assym.h dependencies. 2008-02-19 14:38:14 +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 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
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
ad 9f6b8c4d04 Remove COMPAT_HPUX. 2007-12-31 13:38:47 +00:00
tsutsui 99221a563b Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro. 2007-12-05 12:31:25 +00:00
ad 4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
ad dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
ad bd6663fc4d Don't set l_usrpri / spc_curpriority here. mi_userret() does it. 2007-11-05 20:37:48 +00:00
xtraeme 4ba09b41c3 Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
2007-11-04 14:34:19 +00:00
garbled d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
mhitch 9b0f085da1 68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer.  The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection.  The page would
be read-only and the instruction would fault over and over.

A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.

When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.

68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.

Fixes PR#36848.
2007-09-01 21:31:55 +00:00
ad 9c6535a6de Add ci_cpuid where it's missing. 2007-08-04 09:49:51 +00:00
ad 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
mhitch d2eac2f631 Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc).  Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise.  Fixes the getcwd regression
test on most m68k ports.
2007-06-12 03:34:28 +00:00
martin c2534a819b Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
2007-06-04 08:55:18 +00:00
tsutsui 32b0b73c06 Move declarations of m68k common functions
from <machine/cpu.h> to <m68k/m68k.h>.
While here, remove some obsolete function decls.
2007-05-21 16:37:03 +00:00
tsutsui 85b0c3a013 Remove an obsolete "extern int want_resched" decl. 2007-05-21 15:54:58 +00:00
tsutsui c6262d2d8d Remove obsolete decralations of switch_exit() and switch_lwp_ext(). 2007-05-21 15:34:22 +00:00
tsutsui f06d68f845 curlwp can't be NULL so no need to check it. 2007-05-21 15:22:21 +00:00
tsutsui 7d0fcadf39 Initialize curlwp as well as lwp0.l_addr right after MMU is enabled. 2007-05-21 15:19:17 +00:00
he a7250fcaae Remove proc_trampoline() declaration that I added, we use
lwp_trampoline() now instead.
2007-05-21 13:36:16 +00:00
he 7a6dd773d0 Patterned after the changes to atari, restore the luna68k port to a
buildable state after the yamt-idlelwp merge.
Struct cpu_info now must contain ci_want_resched, so get rid of the
global want_resched.
The cpu_need_resched macro now takes two arguments.
We need to declare proc_trampoline() from for the new m68k vm_machdep.c.
The fields l_back and l_forw no longer exists in struct lwp, so excise
their definition from genassym.cf.
Remove the use of the apparently now obsolete m68k/proc_subr.s.
2007-05-20 16:37:53 +00:00
mhitch 9385473585 Add missing call to lwp_startup() in lwp_trampoline() (which was renamed
from proc_trampoline to match the other ports).

A DIAGNOSTIC kernel will now boot and run.  LOCKDEBUG still doesn't work yet.
Also, my amiga no longer loses time.
2007-05-20 04:29:47 +00:00
tsutsui 570ffc1b5b Update comments to sync yamt-km merge (Sysmap has been moved).
See also:
http://mail-index.netbsd.org/source-changes/2005/02/23/0004.html
2007-05-18 10:45:58 +00:00
thorpej 32a8b62d33 - Shrink ipl_cookie_t from 32-bits to 16-bits (large enough to hold
an SR value or an IPL_* constant).
- Take advange of the smaller ipl_cookie_t to shrink kmutex_t from
  16 bytes to 8 bytes by overlapping storage where possible.
- Implement a RAS-based _lock_cas() for mc68010 systems (Sun2).  See
  sun68k/sun68k/isr.c.

Tested on various m68k platforms, but NOT Sun2.  In any case, at least
Sun2 compiles now.
2007-03-11 05:22:24 +00:00
tsutsui d5a5c6095d Allocate msgbufaddr in pmap_bootstrap.c where it's initilized,
and move its declaration into <m68k/pmap_motorola.h>.
2007-03-05 12:50:15 +00:00
tsutsui abbae2fb20 - add missed '*'
- vmmap is (char *) in pmap_motorola.h
2007-03-04 12:49:41 +00:00
tsutsui a4a1365daf Remove an unnecessary cast and use (char *) on pointer arith. 2007-03-04 12:49:10 +00:00
tsutsui 6286e7e090 Use (uint8_t *) for framebuffer address. 2007-03-04 12:48:38 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui 1b20cebad5 Hide #include <m68k/softintr.h> inside #ifdef _KERNEL in <machine/intr.h>
to avoid exporting unnecessary files to userland.
Should fix build.sh failure, which was pointed out by isaki@.

XXX: which userland program would require contents of <machine/intr.h>?
2007-03-04 05:28:38 +00:00
tsutsui 78ad5c2b07 Add MI softintr(9) support for luna68k with common m68k/softintr.c.
Compile test only.
2007-03-04 02:23:16 +00:00
thorpej 09c5f9cc49 TRUE -> true, FALSE -> false 2007-02-28 04:21:51 +00:00
ad 3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
scw e07faf8a74 Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
2006-11-25 11:59:55 +00:00
wiz 6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
plunky 57c0199dcf Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
2006-11-12 19:00:42 +00:00
jmmv 7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
mrg 648bbec934 in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
2006-10-21 05:54:31 +00:00
elad e8373398dc Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks! 2006-10-01 18:56:21 +00:00
gdamore 8e61a34d9f Update luna68k to MI todr and timecounters. 2006-09-14 15:04:07 +00:00
christos e0df1e4c51 PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
2006-08-26 20:26:43 +00:00
tsutsui 6ff205ce76 Remove obsolete #options VERIFIED_EXEC, found by grep(1). 2006-08-26 07:59:21 +00:00
christos b300b74469 Disable SYSTRACE by default on all kernels (discussed with core) 2006-08-12 15:29:52 +00:00