Commit Graph

2117 Commits

Author SHA1 Message Date
tsutsui 8e2bef0189 Pull the following amiga's pmap changes to atari:
arch/amiga/amiga/amiga_init.c		1.95-1.97, 1.100-1.102
arch/amiga/amiga/pmap.c			1.123, 1.126-1.131, 1.142, 1.145
arch/amiga/amiga/pmap_bootstrap.c	1.1, 1.2, 1.3, 1.4
arch/amiga/conf/files.amiga		1.137
arch/amiga/include/pcb.h		1.16
arch/amiga/include/pmap.h		1.44
arch/amiga/include/pte.h		1.19
arch/amiga/include/vmparam.h		1.35

- change kernel address space layout (i.e. move Sysmap to the end of KVA)
  to match other m68k ports, which should be done on yamt-km merge
- rework pmap_zero_page(), pmap_copy_page() and some more other functions
  to make them compatible with m68k/pmap_motorola.c
- move pmap_bootstrap() into a separate file to allow using either
  the atari pmap.c or the m68k common pmap_motorola.c
- use common m68k include files, pcb.h, pmap_motorola.h, and pte_motorola.h
- misc style and cosmetic changes

Most merge work is done by Tuomo Makinen, and
miscellaneous fixes and cleanups are done by me.

Tested on Falcon with both 68030 and 68060 by Tuomo, and
also tested on TT030 by David Ross on port-atari.

Should be pulled up to netbsd-4 (it requires at least Sysmap changes)
and netbsd-5.
2009-01-01 04:10:25 +00:00
tsutsui d38ce2ebbc Pull a change from amiga/pmap.c rev 1.124 for yamt-idlelwp merge. 2009-01-01 03:43:30 +00:00
tsutsui baffe80103 Remove quite obsolete pcb_cmap2. 2008-12-31 11:11:05 +00:00
tsutsui 7d8d4998c1 Fix broken RCS Id. 2008-12-28 23:00:39 +00:00
tsutsui fd6ad22aed Clear bp->b_oflags (introduced on vmlocking2 merge) before read
rather than calling brelse(9) after read.
Tested by Tuomo Makinen on port-atari.

Should fix pool panics during installation reported by David Ross
on port-atari:
http://mail-index.NetBSD.org/port-atari/2008/11/13/msg000113.html
and actually close PR port-atari/39850.
2008-12-28 03:13:59 +00:00
tsutsui 8a0754e5d7 Account idepth in all interrupt handlers in locore.s. 2008-12-27 16:17:24 +00:00
tsutsui d79dc17147 Sprinkle volatile to bus_space(9) access functions. 2008-12-27 16:14:12 +00:00
cegger dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00
he 1c6fe739fe Correct two typos and remove a now-unused variable to make this
build again.
2008-12-18 10:58:17 +00:00
christos 9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
pooka ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
pooka 29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
martin 719a906ef5 As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
2008-11-30 18:21:31 +00:00
ad 93ea4650a6 dumpsys: don't spew numbers into the log. 2008-11-25 15:51:34 +00:00
ad 6ba528b5bc Remove softdep, pass 1. We are focused on improving journalling.
Proposed on tech-kern@.
2008-11-24 11:41:07 +00:00
abs b53939be13 To be safe, do not use DMA for Falcon - from Tuomo 2008-11-15 21:35:31 +00:00
abs 5dd888f5c3 Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
2008-11-15 21:33:12 +00:00
abs 58051692c8 Remove bogus DEBUG uvm_map() calls - (sync with amiga pmap). From Tuomo 2008-11-15 21:30:50 +00:00
abs 85609809d6 Regenerate: Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:22:03 +00:00
abs 53aa0265b2 Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:21:23 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
dyoung 94d985722a It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
2008-11-11 06:46:40 +00:00
abs 66b0aa634e Regenerate from GENERIC.in 1.75
Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:50:39 +00:00
abs 0282f5b26e Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:49:59 +00:00
abs 96dc40fee6 Add the following note to README:
Please commit changes to 'GENERIC.in' and other source files *first*, then
 run 'makeconf' and commit the generated files to ensure the 'Created from:'
 tags are correct.

Then follow it. Noted by tsutsui@
2008-11-06 17:12:20 +00:00
abs 09149f66a7 Add a note that SERCONSOLE breaks on the Falcon, and remove from
FALCON config.
2008-11-05 23:55:06 +00:00
abs d36d67412b Another fix from Tuomo Makinen - Use brelse() to unbusy bp buffer
to allow user to swap floppy disks when prompted.
2008-11-04 17:08:45 +00:00
abs 7bb734ab12 Move tc_init(&clk_timecounter); to stop the "timecounter:" message
appearing in the middle of the clock0 attach message. Tested by
Tuomo Makinen
2008-11-04 16:43:47 +00:00
abs 87d661967a Cleanup spelling and syntax in a comment 2008-10-29 14:31:01 +00:00
abs eb89868e67 Remove unwanted 'xs->xs_status |= XS_STS_DONE' which caused scsipi_done()
to bail out early.
Found by T. Makinen, and additional confirmation by David Ross
2008-10-28 11:44:14 +00:00
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +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
wrstuden fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
simonb dc9029a896 Regen for "options WAPBL". 2008-07-31 07:48:37 +00:00
simonb ef38d7e5a7 Move "options WAPBL" so that it also gets added to INSTALL kernels. 2008-07-31 07:47:43 +00:00
simonb 0751ba4bff Add "options WAPBL" to standard GENERIC/INSTALL type configs. 2008-07-31 07:40:59 +00:00
tsutsui 1a160ac866 Specify volatile to some pointers to access DMA registers. 2008-07-20 16:35:27 +00:00
tsutsui 471f4d63c3 No need to specify '&' to get array's address.
No binary changes.
2008-07-20 16:28:24 +00:00
tsutsui b55114eae7 Fix pointer arithmetic botch in rev 1.37. 2008-07-20 16:23:38 +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
tsutsui 2c77262457 Sync with arch/m68k/m68k/pmap_motorola.c rev 1.38:
> Remove ({ }) gcc extensions and use static inline functions instead.
2008-06-29 09:03:47 +00:00
isaki 3e6d14da34 Unify splraiseipl(9) implementation among m68k ports,
discussed with tsutsui@ on port-m68k. OK'ed by jdc@.

For atari:
- export ipl2psl_table[] and make it uint16_t
- make makeiplcookie(9) inline
- put PSL_S bit into ipl2psl_table[] rather than adding it in makeiplcookie(9)
- vme/if_le_vme.c: fix a wrong usage of IPL_NET
2008-06-28 05:26:33 +00:00
cegger 947c9ab610 use device_lookup_private to get softc 2008-06-13 08:49:15 +00:00
tsutsui cb09de1924 Use device_private() and device_lookup_privat() to get softc. 2008-06-11 14:35:53 +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
ad 48ced055d4 pci_intr_setattr(), allows PCI interrupts to be marked MPSAFE on x86, and
other platforms if the code is added.

pci_intr_map(...)
pci_intr_setattr(pc, ih, PCI_INTR_MPSAFE, 1);
pci_intr_establish(...)
2008-05-30 19:26:35 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui 285b0f56d9 Fix warnings #ifdef DEBUG case. 2008-04-27 14:44:25 +00:00
tsutsui c070e2d90e - use mutex(9) for uvm_kernel_object
- fix warnings in #ifdef DEBUG
2008-04-27 14:44:04 +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 d9941582bf Split device_t/softc for le(4) and variants and misc cosmetic changes. 2008-04-04 12:25:06 +00:00
cube a27f79f69e Use M_TEMP for allocations instead of the now deceased M_IOCTLOPS. 2008-03-23 15:50:51 +00:00
cube 7aa6248cdf Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
2008-03-18 20:46:35 +00:00
yamt b09761a4bb arint_normal -> aprint_normal 2008-03-17 00:00:55 +00:00
cube bb192d4cfd Split device_t and softc for the ... wait for it ... [air quotes] MI
variant of fdc(4)/fd(4).  Other cosmetic changes as appropriate.
2008-03-16 00:58:56 +00:00
cube 8ecf8999bf Split the softc from the device_t for all lpt(4) variants and attachments
except the ppbus stuff (which doesn't compile) and ulpt(4) which is
unrelated and can be dealt with separately.

As usual, it comes with related cosmetic changes.
2008-03-07 17:15:51 +00:00
rmind c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
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 d28597deae Add some assym.h dependencies. 2008-01-25 20:02:06 +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
he 4b2e779458 Include <sys/simplelock.h> to pull in appropriate definitions. 2008-01-11 14:03:47 +00:00
joerg 732cd3c8a0 Convert Atari to generic TODR and timecounter. 2008-01-08 18:04:15 +00:00
he 75fc209bcf Fix a cv_timedwait() usage after the vmlocking2 merge, and remove
a now-no-longer-used local variable.
2008-01-03 16:06:24 +00:00
joerg c8ad2035a8 Simplify delay based on x86 version. 2008-01-03 01:02:04 +00:00
joerg 62fcc14f1c ANSIfy. 2008-01-03 00:31:28 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
tsutsui b7b9eda05d - add a missing brace in the previous
- print error message on failure to map aux register
2007-12-04 16:36:54 +00:00
tsutsui 704f93353b Apply missed following MI wdc changes to atari's mainbus wdc backend:
- make bus space handles an array for each command register
  http://mail-index.netbsd.org/source-changes/2003/11/27/0036.html
  (note we no longer have to specify stride for wdc after this change)
- add the notion of "shadow register"
  http://mail-index.netbsd.org/source-changes/2004/05/25/0048.html

Problem reported by Alan Hourihane in PR port-amiga/37464.
2007-12-04 15:28:58 +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
joerg d238692c3e Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
2007-10-18 18:54:56 +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
he 663275b41c Fix typo: in disk_init() call: fd -> sc. 2007-10-17 17:58:56 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad 2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +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
adrianp 475217d719 Remove iso(4) from GENERIC kernels, as discussed on tech-net@
Ok'ed by core@
2007-08-06 21:26:53 +00:00
ad 9c6535a6de Add ci_cpuid where it's missing. 2007-08-04 09:49:51 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
he a4d164aaef Same change as -r1.133 of src/sys/arch/amiga/amiga/pmap.c:
As per hint from ad@, change uvm.kernel_object to uvm_kernel_object,
  to adapt to the recent uvm changes.
2007-07-23 23:13:04 +00:00
macallan a1457f5905 change pmap_phys_address()s parameter to paddr_t since that's what it gets
fed from mmap*() anyway
approved by gimpy
2007-07-16 23:48:03 +00:00
he 3bb4d9ddb8 Regenerate configurations after adding COMPAT_40 to GENERIC.in. 2007-07-16 06:35:53 +00:00
he 13a06ef4a8 The COMPAT_AOUT_M68K option now requies COMPAT_40 after the changes
to mount(), so define COMPAT_40 too.
2007-07-16 06:26:54 +00:00
ad 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
he 150caa6d8c Adapt to new signature for callout_init(). 2007-07-11 19:13:23 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +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 7003cf1903 regen 2007-06-06 08:21:08 +00:00
martin 400bdf5863 Add pseudo-device agr 2007-06-06 08:20:26 +00:00
mhitch 719ec3a2b9 From pmap_motorols,c:
Allow pmap_enter_ptpage to fail, sometimes. Pass WAIT/NOWAIT flags and
fix some obvious locking problems. This allows us to run a LOCKDEBUG
ernel now.
2007-05-22 05:05:32 +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 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
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
isaki 8bd92b6261 indent fix. 2007-05-20 02:54:11 +00:00
he 57451082bc Adapt to the merge of the yamt-idlelwp branch.
curcpu()->ci_want_resched is now required, so get rid of the
want_resched global.  Also, cpu_need_resched() now takes two arguments.
The l_next and l_back fields in struct lwp no longer exists, so delete
references to it from genassym.cf.
Also, m68k/m68k/proc_subr.s is no longer used, says mhitch, so remove its use.

This brings the atari BOOT kernel back to a buildable state.
2007-05-18 22:58:51 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
macallan d4ddadbf9d include files.wsfb 2007-04-10 02:19:03 +00:00
tsutsui 298a18f6e7 Apply MI softintr(9) patch before it becomes rotten. Untested.
See also:
http://mail-index.netbsd.org/port-atari/2007/03/07/0000.html
2007-03-21 10:56:26 +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 f343bfa8eb Treat bus_space_handle_t as opaque, and use bus_space_vaddr(9) to
get device address.

XXX: This driver should be rewritten to use bus_space(9) more properly.
2007-03-06 14:45:31 +00:00
tsutsui d5aef94bf1 Change bus_space_handle_t from void * (formerly caddr_t) to u_long
to make things easier.
2007-03-06 14:42:44 +00:00
tsutsui 35788e9981 - remove volatile from *regkva member in struct grfabs_et_priv
and use temporary variables on register accesses
- also remove volatile from *memkva member in struct grfabs_et_priv
  because it isn't used to refer memory
XXX: I'm not sure if bm->plane should be volatile or not
     but I don't think previous code treats it as volatile anyway.
     (though I'm not sure how compiler handled "volatile caddr_t")
2007-03-06 14:40:25 +00:00
tsutsui 7bad4d945e - change pointers which actually required caddr_t to calculate address
from (void *) to (char *)
- add (char *) cast to appease -Wpointer-arith
2007-03-06 14:15:13 +00:00
tsutsui 46cc919e1f Make TX buffer (uint8_t *) and remove an unnecessary cast. 2007-03-06 14:13:02 +00:00
tsutsui a977b2956f Pass (char *) to mtod(9) on pointer arith. 2007-03-06 14:12:10 +00:00
tsutsui 1f79355c9b Add (char *) cast to appease -Wpointer-arith. 2007-03-06 14:10:07 +00:00
tsutsui bc4a41fd8b Make req_addr (char *) rather than adding an extra cast
since it's used only in this function to calculate buffer address.
2007-03-06 14:07:15 +00:00
tsutsui d319901154 Make io_data (char *) rather than adding an extra cast
since it's used only in this file to calculate buffer address.
2007-03-06 14:03:07 +00:00
he 582dc91458 More fixes after the caddr_t removal.
Mostly cast to char* for pointer arithmetic,
but also one missing indirection, and one "void *v, x;" fix.
2007-03-06 13:54:44 +00:00
tsutsui 7474a23441 Add a missed '*'. 2007-03-06 13:53:59 +00:00
tsutsui 57eb9123e8 Remove an unnecessary cast. 2007-03-06 13:53:32 +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
thorpej ab87c6666d TRUE -> true, FALSE -> false 2007-02-22 05:14:04 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
mrg 4410329b87 add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
				  bus_addr_t min_addr,
				  bus_addr_t max_addr,
				  bus_dma_tag_t *newtag,
				  int flags)
	void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to.  this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
2007-02-21 20:41:23 +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
reinoud 43061c75ae Rename the B_XXX flag to B_DEVPRIVATE flag since it was never used for
debugging and its main use is in device drivers. Its used there to signal
that the flagged buffer has a special meaning or should be handled
differently.

OK'd by Bill Sudenmund on tech-kern.
2007-02-15 18:33:26 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf 142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
jdc 06da305240 We don't need the cpu_startup() prototype here. It is already provided by
sys/systm.h.  Pointed out by skrll@.
2006-12-22 18:00:19 +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
he 25e5748c32 Add -Os to CFLAGS, so that the boot code fits within the constraints
again.  Sorry, I've not traced why this fit in the past, or what
changed to make it not fit anymore.
2006-12-01 13:52:46 +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 09cb1d6f1c s/existance/existence/, from Zafer. 2006-11-24 22:52:16 +00:00
wiz 6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
dsl 09cad86587 Make the install actually die when the boot code is too big (which it is).
No idea how long it has been bust for.
Other parts of this makefile are deeply sub-optimal.
2006-11-21 18:31:44 +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 65792a0340 More from Matt Fleming:
Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
2006-10-01 20:31:49 +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
mhitch 07b204f92f Sync with m68060 fix from amiga pmap.
Uvm changes over 17 months ago resulted in the 68040/060 segment table
page being entered with pmap_kenter(), which does not record the mapping
in the pv table.  Attempting to inhibit caching of that page as required
by the 68060 hardware no longer changes the PTE and caused varying degrees
of multiple faulting, sometimes resulting in an unusable system.  Apparently
very few people attempted to run a 68060 based system since that change.
Fix to to change the caching bits directly rather than using pmap_changebit().
2006-09-16 18:53:53 +00:00
bjh21 7c4318304d Regen 2006-09-03 13:54:27 +00:00
bjh21 e10108c7f2 Nothing in the kernel now tests __HAVE_NWSCONS, so stop defining it everywhere. 2006-09-03 13:51:23 +00:00
matt 87eed1926a Make sure .data is .long aligned. (fixes linker warning) 2006-09-01 19:11:56 +00:00
he 4493c76313 Use the common <dev/sun/vuid_event.h> header file instead of maintaining
separate copies in port-specific directories.  Add duplicate include
protection.  Makes the alpha and atari ports build usr.bin/kdump/ again.
2006-08-28 16:41:04 +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
christos b300b74469 Disable SYSTRACE by default on all kernels (discussed with core) 2006-08-12 15:29:52 +00:00
mhitch 4016823297 gcc4 fix: needs stdlib.h 2006-08-04 01:51:31 +00:00
mhitch 3264771d41 gcc4 fix: static devsw didn't match the prototype. 2006-08-04 01:50:30 +00:00
mhitch c97e01a899 gcc4 fixes: need to include stdlib.h; fix prototype and definition of
local error() function.
2006-08-04 01:48:02 +00:00
mhitch fa97ed2f83 More gcc4 "uninitilized" variables. 2006-08-04 01:45:05 +00:00
mhitch 425bfd4d05 gcc4 "uninitialized" variables; just like pmap_motorola.c and amiga/pmap.c. 2006-08-04 01:44:12 +00:00
drochner 84f50d1b92 don't install <machine/db_machdep.h>, this is kernel only 2006-07-26 19:54:56 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
ad 2b79369c7e - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
2006-07-19 21:11:37 +00:00
liamjfoy d00a9ac91b Add CARP to further platforms
ok christos, julian coleman and matthew green
2006-06-29 14:00:55 +00:00
yamt d73ce018b0 include kauth.h for kauth_cred_geteuid. 2006-05-15 09:26:18 +00:00
elad 8ccb6c9341 integrate kauth. 2006-05-14 21:55:09 +00:00
skrll a9f4c28a3d Fix a bunch of cast lvalues. 2006-05-10 06:24:02 +00:00
drochner 1168954c68 adjust comments for the new location of wskbdmap_mfii.c,
addresses PR kern/33290 by henry nelson
2006-04-19 10:31:44 +00:00
blymn 3c0adb7d99 Make i/o statistics collection more generic, include tape drives and
nfs mounts in the set of devices that statistics will be reported on.
2006-04-14 13:09:05 +00:00
thomas 2f48a02e05 Do not disable access to tseng private registers 2006-03-29 18:05:57 +00:00
pavel 1cf9828fc6 regen (added stf). 2006-03-28 22:03:47 +00:00
rpaulo 83ec5d90cd regen 2006-03-28 21:11:09 +00:00
pavel dc1372c547 Add stf to all kernel configs which have INET6 and gif, except the INSTALL
ones and those for specific machines of developers. PR 32304.

OK'ed by rpaulo.

N.B. stf is a cloning device, so it still must be enabled by
"ifconfig stf0 create".
2006-03-28 20:58:39 +00:00
thorpej bf53a8ce6f Use device_unit(). 2006-03-26 04:39:40 +00:00
drochner 47fbb9d86b adapt to uvm_fault() interface cleanup: kill the useless 3rd argument 2006-03-15 18:12:02 +00:00
lukem a1f606d3fd Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
2006-03-08 23:46:22 +00:00
he 377126348b Remove another instance of the macro triplet SET/CLR/ISSET, now
found in <sys/types.h>.
2006-03-06 18:42:58 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
wiz 5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
thorpej 458b3e43f7 Use device_parent(). 2006-02-23 05:37:46 +00:00
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
cube 6ff13154dd Remove 'count' argument for pseudo-devices that ignore it
(vnd, bpfilter, ppp, gif, gre, tun, sl, strip, faith, stf).
2006-02-05 05:01:48 +00:00
rpaulo 6d1dc467f2 regen 2006-02-04 02:27:23 +00:00
rpaulo 9093dbb4e6 bpfilter doesn't accept count anymore. 2006-02-04 02:25:57 +00:00
reinoud 9423fc52a7 Regen GENERIC files 2006-02-03 00:43:32 +00:00
reinoud f4c2e9d012 Add uncommented file-system UDF for generated config GENERIC files. 2006-02-03 00:40:16 +00:00
dsl 6f0f9f8763 Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
2006-01-29 21:42:40 +00:00
bouyer bf1a4d2af5 properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
  for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
2006-01-16 20:30:18 +00:00
he 143d7e2daf Make this build again by using ${S}/../common/lib/libc/Makefile.inc. 2005-12-30 00:24:48 +00:00
perry 50a256a3a0 __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
2005-12-24 23:23:59 +00:00
perry 2d65de2479 bare asm -> __asm 2005-12-24 22:45:33 +00:00
perry 5f1c88d70d Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:06:46 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt bc21da4cfb bus_dmamem_map: honour BUS_DMA_NOWAIT. noted by Manuel Bouyer.
bus_space_map: always do NOWAIT allocation as it used to be before yamt-km.

we have too many copies!
2005-11-24 13:08:32 +00:00
chs 72d7d84d98 regen 2005-11-03 16:49:09 +00:00
chs 59fddeceaa turn off DEBUG and DIAGNOSTIC in GENERIC kernels so that they
are compatible with the LKMs that are part of the release.
2005-11-03 16:48:29 +00:00
chs df1287ee8b fix crash dumps on m68k platforms, cpu_kcore_hdr_t is larger than
512 bytes now so we need a bigger buffer.  PR 26958.
2005-10-30 15:49:39 +00:00
yamt aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
yamt d597202302 make VMSWAP optional again. 2005-09-17 14:38:38 +00:00
yamt 7e71f567e4 include "conf/std". 2005-09-17 09:44:05 +00:00
kleink aece7a90fd Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges.  Noted by David Holland in PR kern/31126.
2005-09-06 21:40:37 +00:00
drochner 44bf0a7ee2 s/locdesc_t/int/g 2005-08-26 13:19:34 +00:00
christos 93c362d7ef Enable ptyfs by default on the non-install and non small/tiny/ramdisk kernels 2005-08-19 05:19:49 +00:00
christos 758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
yamt 97d20debb1 regen. 2005-07-31 04:05:25 +00:00
yamt 38ca5312d2 revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
2005-07-31 04:04:30 +00:00
yamt 8609a4e161 regen. 2005-07-30 06:37:15 +00:00
yamt 558fded29a add "options VMSWAP" to non INSTALL kernels. 2005-07-30 06:35:34 +00:00
yamt 1d0891101c defflag VMSWAP. 2005-07-30 06:33:33 +00:00
hubertf 673730506c Add support for reading cloop2 compressed filesystem image,
enable by putting VND_COMPRESSION into kernel config file.
Written by Cliff Wright, polished up slightly by me.
2005-07-17 00:08:27 +00:00
christos 2f382743c1 Add m68k sunos_machdep.h 2005-07-11 13:13:56 +00:00
tron 04b9c3437f Add (commented out) IPSEC_NAT_T option. 2005-07-07 17:05:46 +00:00
isaki 426d6d0839 cfmatch_t was removed at sys/device.h rev 1.75,
and there is no need to cast for NULL.
2005-07-03 10:22:25 +00:00
drochner 996c273eda adaptions to config_search() change, and minor autoconf fixes, mostly from Havard Eidnes 2005-06-30 17:03:51 +00:00
junyoung e63501d234 #include <lib/libsa/stand.h> rather than <stand.h> or "stand.h" 2005-06-28 21:00:41 +00:00
junyoung 9b06a3a704 - Use FS_OPS() macro.
- #include <lib/libsa/stand.h> rather than <stand.h>. Do the same thingfor
  ufs.h as well.
- Remove trailing spaces.
- Some other cosmetic changes.
2005-06-28 19:57:56 +00:00
junyoung 97412acee5 ANSIfy, KNF, remove trailing spaces, and etc. 2005-06-28 14:52:07 +00:00
junyoung a2e395a49a ANSI & KNF. 2005-06-28 14:22:21 +00:00
junyoung 265b2da145 Sync comment with reality.
While here, remove trailing spaces.
2005-06-28 14:14:00 +00:00
rpaulo 64fd052c74 Add file-system PTYFS (commented out) so that people know its existence.
Ok'ed by Christos Zoulas and Hubert Feyrer.
2005-06-25 12:05:15 +00:00
junyoung 17670568fe Use FS_OPS() macro. 2005-06-23 19:44:00 +00:00
junyoung 07350a5981 Drop trailing spaces. 2005-06-23 19:14:23 +00:00
jmc c85fb0b719 add memcmp. Why doesn't this use the regular libsa pullover? 2005-06-14 01:07:36 +00:00
he dd447992cc Add initialization of xgmsec, the assignment to it apparently depends
on the value in one of the data structures passed as arguments.
2005-06-10 22:08:39 +00:00
tsutsui 4e54a2cc7c - Rename options NEW_BUFQ_STRATEGY -> options BUFQ_READPRIO.
(still commented out)
- Add (also commented out) options BUFQ_PRIOCSCAN.

Suggested by perry and soda on tech-kern.
Please refer options(4) for details for these options.
2005-06-09 14:43:29 +00:00
he 5cc5caddf2 Adapt to compiling with -Wshadow and -Wcast-qual, by adding const
qualification in places and renaming a few local variables.
Also adds a couple uses of __UNVOLATILE() to allow passing volatile
variables to functions wanting e.g. caddr_t.
2005-06-04 14:42:36 +00:00
he 5cfd2bfc98 Add use of __UNCONST() when passing a constant string to some of the
general autoconf functions which typically take a "void*".  There may
be reason to revisit this later if the signature for the autoconf
functions can be adapted, but for now this gets the code building.
2005-06-04 14:35:53 +00:00
he dfaf8269a3 Remove the unused global variable "baud" because it is causing
shadowing warnings.
2005-06-04 14:31:15 +00:00
he e8576a0a7f Prefix local variables in macros with _, and add a character to
one variable name to avoid a shadowing warning.
2005-06-04 14:30:10 +00:00
tron a97eb895f6 Remove attachment for the piixide(4) driver from all non-x86 kernel
configurations because Intel IDE disk controllers only exist as part
of Intel chipsets for x86 systems.
2005-05-31 22:23:52 +00:00
christos f6b4c20f18 s/GENASSYM/GENASSYM_CONF/ so we can use "GENASSYM" as the program name. 2005-05-31 04:03:08 +00:00
chs 94622623d8 in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
2005-05-29 15:56:59 +00:00
jdc bca4709f30 Add some definitions of the (Falcon) IDE register locations and use these
to initialise the wdc register array.

Doesn't make the wdc probe work on the Falcon, but at least the kernel no
longer dies at boot time.
2005-05-10 20:28:35 +00:00
jdolecek 4d515665c5 assign major for nsmb(4) 2005-05-10 00:02:35 +00:00
lukem 3fd1802e62 Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.
2005-04-25 15:02:02 +00:00
skrll fb87303e67 Add lost RCSId. 2005-04-25 06:27:11 +00:00
yamt 6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
matt b6fca37cf6 Adapt to new dm_maxsegsz semantics. 2005-03-10 18:16:01 +00:00
matt a6db24a485 Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create).  dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
2005-03-09 19:04:43 +00:00
chs bd2d26b450 getitesp() can return NULL, so check for that in iteopen().
pointed out by Michael Hitch.
2005-03-02 08:14:26 +00:00
simonb 8d56c02e1c Regen for COMPAT_20 additions. 2005-02-25 13:52:21 +00:00
simonb ff8f0b23c9 Add COMPAT_20 (and COMPAT_16 in some cases) to kernel config files
that didn't have those options but had other earlier compat options.
2005-02-25 13:46:48 +00:00
thorpej df9803ce96 Part 1 of a cleanup pass over the SCSI subsystem. The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding.  Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes.  Place items described
by the SCSI Primary Commands document into scsi_spc.h.
2005-02-21 00:29:06 +00:00
dsl 4822cbaae2 Invert FFS_SNAPSHOT to FFS_NO_SNAPSHOT 2005-02-18 21:05:50 +00:00
yamt 18acc63fc4 remove uvm_map_protect from cpu_startup of several ports.
- they shouldn't be needed with the current fault handler.
- they causes assertion failure with the recent vm_map implementation.

discussed on tech-kern@.  reviewed by Chuck Silvers.
PR/29179 from Julio M. Merino Vidal.
2005-02-11 15:03:55 +00:00
dsl 05e2f6ebdb Add 'option FFS_SNAPSHOT' to most of the config files.
Commented out for kernels that appear to hace space constraints.
2005-02-11 08:25:53 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
hannken a524d180e1 Regen. 2005-01-31 16:58:31 +00:00
hannken d5fbb6936f Add file system snapshots to kernel configs.
- Ffs internal snapshots get compiled in unconditionally.

- File system snapshot device fss(4) added to all kernel configs that
  have a disk.  Device is commented out on all non-GENERIC kernels.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
2005-01-31 16:54:32 +00:00
rumble de81c2c878 Sprinkle options UFS_DIRHASH on GENERIC kernels. It's presently
commented out and labeled experimental pending further review and
testing.
2005-01-28 03:19:49 +00:00
chs fba432b011 make this the same as the other m68k platforms. 2005-01-23 17:32:56 +00:00
he e23b180fd3 Adapt to the change in type of ite_on() -- don't pretend that it returns
a value anymore (return type is now void).
2005-01-23 09:25:52 +00:00
chs ea145b7bd7 use a flag in the softc to indicate if an instance has been configured,
rather than a bit in 32-bit global variable indexed by unit number.
2005-01-19 02:13:02 +00:00
cube ec53a61e98 Add tap(4) support to a random^Wcarefully chosen set of kernel configs.
All those kernels have a line for both tun and bridge, and if either is
commented out, tap is commented out also.  With the exception of i386's
GENERIC_TINY.

XXX:  we _need_ some way of making this more simple.
2005-01-17 15:28:51 +00:00
yamt 95c82bfee4 introduce vm_map_kernel, a subclass of vm_map, and
move some kernel-only members of vm_map to it.
2005-01-01 21:02:12 +00:00
chs 0ded74691b for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
2004-12-13 02:14:13 +00:00
thorpej a974bfe8ce - Use the cmdlen specified in the scsipi_xfer structure. Keying off
the command group ID won't necessarily work for vendor-specific commands.
- Expand the storage in the SC_REQ structure to account for 16-byte commands.
2004-12-07 21:12:42 +00:00
chs cf58c69b3e use the m68k-common procfs_machdep.c on all m68k platforms. 2004-12-07 04:33:24 +00:00
thorpej 7a60e77293 bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
2004-11-28 17:34:45 +00:00
bouyer 4994bd88e1 Regen (initially for pdcsata(4), but it looks like the files were not
regenerated after some recent addition to kernel configs).
2004-11-24 20:52:23 +00:00
bouyer fe4d81db48 pdcsata(4), a driver for the Promise SATA150 (aka PDC203xx) serie of
controllers. Tested with a PDC20375 (2 SATA, one PATA) controller on sparc64.
Added to all kernel config file which had pdcide(4).
2004-11-24 20:49:17 +00:00
he 60c4c90899 Add casts to unsigned char for the arguments to the ctype.h macros/functions. 2004-11-12 10:18:46 +00:00
he cf13121ba3 Add a cast to unsigned char for an argument to toupper(). 2004-11-12 09:52:15 +00:00
christos 30fc143afa Add COMPAT_BSDPTY to the rest of the config files. 2004-11-10 17:54:02 +00:00
yamt 05f25dcc2a move buffer queue related stuffs from buf.h to their own header, bufq.h. 2004-10-28 07:07:35 +00:00
thorpej dc2f2fbe74 Centralize the declaration of booted_device and booted_partition. 2004-10-23 17:07:37 +00:00
yamt a47bee9f77 don't expose cpu_info to userland. 2004-09-26 21:44:26 +00:00
yamt d2fe4b34bb move some per-cpu data definitions to MI place so that they can be modified
without touching all ports.  discussed on tech-kern@.
2004-09-22 11:32:02 +00:00
drochner 2db688402b adapt to ISA "unknown address" namespace separation (purely mechanical,
as far as "grep" reaches)
2004-09-14 20:32:48 +00:00
manu 6e3c639957 IPv4 PIM support, based on a submission from Pavlin Radoslavov posted on
tech-net@
2004-09-04 23:29:44 +00:00
leo 86c572bcee Correct typo in copyright notice. (noticed by Hubert Feyrer). 2004-09-03 14:07:57 +00:00
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
jdolecek 64969161df use uvm_grow() to update stack segment size on stack page fault instead
of MD code
2004-08-28 17:53:00 +00:00
thorpej 9cc521a148 Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
2004-08-20 06:39:37 +00:00
thorpej 4b51cecfc2 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:08:04 +00:00
thorpej ab20886f7b Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.
2004-08-13 03:12:59 +00:00
drochner a5a5473c25 remove now unnecessary "pci_enumerate_bus" definitions 2004-07-29 16:55:25 +00:00
atatat f68a9f1ff2 Add "options SYSCTL_INCLUDE_DESCR" to a lot of configs, but commented
out in most of them.
2004-07-15 03:53:44 +00:00
bouyer 0f8b776e09 Regen, added P1003_1B_SEMAPHORE. 2004-06-28 21:09:22 +00:00
bouyer 21e9a36edc Add options P1003_1B_SEMAPHORE
to all GENERIC-like kernel config files where SYSV* options were already
present (commented out if the SYSV* options are commented out).
Fix lib/25897 and lib/25898.
2004-06-28 21:07:47 +00:00
abs 94d96eecb4 Regenerate from master config files 2004-06-26 07:34:43 +00:00
abs bd8eb3b5ed Add (commented out) ALTQ options to all GENERIC-like files 2004-06-26 07:32:05 +00:00
itojun 596aec9a47 have pf and pflog pseudo-device (commented out).
reviewed by matt, perry, christos
2004-06-22 14:09:49 +00:00
christos c22e4ed8cd ptm is now mandatory, depends on pty, and can be disabled with -DNO_DEV_PTM 2004-06-18 15:02:29 +00:00
christos 0399e839cf Add pseudo-device ptm on all the generic flavored kernels. 2004-06-16 15:07:39 +00:00
thorpej e33c2bb5d5 Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
2004-06-04 04:45:49 +00:00
he c9a13e2ac5 Include <machine/kbdmap.h> only outside the kernel, as that file
isn't present in that location in the source tree.
2004-05-19 08:44:20 +00:00
he 09b074c177 Add some mulitple include protection.
Include kbdmap.h from iteioctl.h so that kdump compiles, otherwise
the size of struct kbdmap as used in various ioctl defines is unknown.
2004-05-18 20:08:51 +00:00
wiz 0ef650eff0 Remove UCB ad clause from maximum entropy's license.
Ok'd by maximum entropy and board.
2004-05-12 00:38:11 +00:00
kleink 7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
leo edd0d1c8e7 Licence cleanup (suggested by wiz). 2004-03-25 10:17:19 +00:00
drochner 091c877e12 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 16:34:29 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
cl ea5ec0212d add kernel part of concurrency support for SA on MP systems
- move per VP data into struct sadata_vp referenced from l->l_savp
  * VP id
  * lock on VP data
  * LWP on VP
  * recently blocked LWP on VP
  * queue of LWPs woken which ran on this VP before sleep
  * faultaddr
  * LWP cache for upcalls
  * upcall queue
- add current concurrency and requested concurrency variables
- make process exit run LWP on all VPs
- make signal delivery consider all VPs
- make timer events consider all VPs
- add sa_newsavp to allocate new sadata_vp structure
- add sa_increaseconcurrency to prepare new VP
- make sys_sa_setconcurrency request new VP or wakeup idle VP
- make sa_yield lower current concurrency
- set sa_cpu = VP id in upcalls
- maintain cached LWPs per VP
2004-03-14 01:08:47 +00:00
bjh21 dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
bjh21 3d0535f928 Remove needless includes of <dev/pckbc/wskbdmap_mfii.h>. 2004-03-13 17:23:32 +00:00
jmc 6a03536b28 Toolize and use install to make mdec/std so it's in METALOG. Now a make release
works once again for atari
2004-03-12 17:52:54 +00:00
jmc ad0332662d daddr_t is forced to int32_t in sys/arch/atari/stand/Makefile.inc so correct
the printf formats to match this
2004-03-11 07:22:25 +00:00
jdc bfd698dc3d Catch up to the bootblock split into std and milan directories. 2004-03-09 20:14:27 +00:00
nathanw 797c90374e Centralize identical copies of proc_trampoline code.
(lots more opportunites here for the bored hacker, such as rei and trap0...)
2004-03-04 19:53:44 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
he 38d0807d97 Make these compile again after the latest adjustments. 2004-01-06 18:46:07 +00:00
wiz a5bf3b3c4c Spell controller with two ls. Inspired by miod@openbsd. 2004-01-04 16:19:43 +00:00
jdolecek 089abdad44 Rearrange process exit path to avoid need to free resources from different
process context ('reaper').

From within the exiting process context:
* deactivate pmap and free vmspace while we can still block
* introduce MD cpu_lwp_free() - this cleans all MD-specific context (such
  as FPU state), and is the last potentially blocking operation;
  all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free()
* process is now immediatelly marked as zombie and made available for pickup
  by parent; the remaining last lwp continues the exit as fully detached
* MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same
  for both 'process' and 'lwp' exit

uvm_lwp_exit() is modified to never block; the u-area memory is now
always just linked to the list of available u-areas. Introduce (blocking)
uvm_uarea_drain(), which is called to release the excessive u-area memory;
this is called by parent within wait4(), or by pagedaemon on memory shortage.
uvm_uarea_free() is now private function within uvm_glue.c.

MD process/lwp exit code now always calls lwp_exit2() immediatelly after
switching away from the exiting lwp.

g/c now unneeded routines and variables, including the reaper kernel thread
2004-01-04 11:33:29 +00:00
thorpej a963286f8d More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
2004-01-03 22:56:52 +00:00
thorpej 5bd80d8373 Rename "struct channel_softc" to "struct wdc_channel". 2004-01-03 01:50:52 +00:00
thorpej 527c829fa0 Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers.  Clean up the member names of these structures while at it.
2004-01-01 17:18:53 +00:00
thorpej 2dafabdb20 Simplfy allocation of the channel queue. 2003-12-31 02:45:04 +00:00
pk 70f20a1217 Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.
2003-12-30 12:33:13 +00:00
he a5915f4ecb Replace cmd_ioh with cmd_baseioh, to track changes to wdcvar.h, so
that this compiles again.  Untested for now.

Reviewed by leo.
2003-12-16 14:07:20 +00:00
thorpej 2f2ca9e66b Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
2003-12-14 01:32:01 +00:00
thorpej 9e321b3a18 Collapse the atabus declaration into "atabus* at ata? channel ?". 2003-12-13 23:24:47 +00:00
thorpej 98f7d12017 Split out the Silicon Image SATALink support into its own driver,
"satalink".
2003-12-13 23:13:40 +00:00
jmc 695a2a2f9f Change reference at bottom from sys/dev/majors to sys/conf/majors to match
reality
2003-12-10 02:04:00 +00:00
jmc 9a398a5661 Make libsa build first as other items depend on it (for -j builds) 2003-12-09 15:46:01 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
wiz ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
tsutsui 81d609b1f5 Remove obsolete comments about curproc. 2003-11-08 12:17:25 +00:00
dsl 2ffbd2ab99 Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
2003-11-04 10:33:15 +00:00
he ce7ac04a96 Extend the #ifdef M68040 so that the `sig' variable declaration is moved
in as well, as it's otherwise not used.
2003-11-02 15:55:16 +00:00
jdolecek 917bc10805 g/c local index() routine and switch to (libkern's) strchr() 2003-11-01 12:56:32 +00:00
cl ef56cc40ab Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
2003-10-31 16:44:34 +00:00
he b563d90538 Include <stdlib.h> to pick up exit() prototype. 2003-10-28 11:46:39 +00:00
he d820cc0029 Add -ffreestanding to CFLAGS, so that libsa prototypes do not conflict
with otherwise built-in functions and prototypes in the new gcc.
2003-10-28 11:41:46 +00:00
he 219781d5ed Add include of <string.h> to pick up strlen() prototype. 2003-10-28 11:38:04 +00:00
he 81c0d141d8 Rename those assembly files which should be passed through the C
preprocessor from .s to .S to pick up CPPFLAGS.
2003-10-28 11:34:59 +00:00
jdolecek 821f341675 add necessary majors for miscellaneous devices, such as missing
wscons/scsi/isdn devices
2003-10-24 08:18:36 +00:00
jdolecek ee510816af add wsfont major to archs which have the other wscons devices 2003-10-22 16:53:22 +00:00
jdolecek ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek 4e915c9ccd update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
2003-10-10 21:21:25 +00:00
bouyer 83af294c93 pciide_machdep.c depends on pciide_common, not pciide.
Pointed out and fix tested by Marc Recht.
2003-10-08 17:29:59 +00:00
bouyer 7fc9b29ccd Regen: Add new per-chip pciide drivers. 2003-10-08 11:53:10 +00:00
bouyer 11c3265271 Add new per-chip pciide drivers. 2003-10-08 11:52:50 +00:00
bouyer d29ea7aa72 Adapt for wdcattach() prototype change. 2003-10-08 11:06:05 +00:00
bouyer 7a7a287e2c Regen: add atabus. 2003-10-08 11:05:52 +00:00
bouyer f14a2e4df2 Add atabus. 2003-10-08 11:04:56 +00:00
thorpej 68723a995b * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.
2003-10-08 00:28:40 +00:00
jdolecek e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
cl e1614ccdf9 Cast through (void *) to appease gcc3. 2003-09-29 01:20:41 +00:00
cl 3f16119f55 Cast through (void *) to appease gcc3. 2003-09-27 20:01:58 +00:00
mycroft eefae40298 Hide the use of config_interrupts() in one place. 2003-09-25 19:29:48 +00:00
mycroft 864b96269c Modify the fdcattach() interface again, splitting it into two parts, so that
DRQ allocation is done earlier.
2003-09-25 19:06:19 +00:00
mycroft 3d7395ab71 Update for new attach method. 2003-09-25 01:12:43 +00:00
cl 4169237230 SA_SIGINFO support for m68k (port specific changes) 2003-09-22 14:26:57 +00:00
cl 20dfd3bdde regen 2003-09-22 14:12:29 +00:00
cl a4186d3dd8 add COMPAT_15/COMPAT_16 2003-09-22 14:11:15 +00:00
jdolecek 7cea8a1389 cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
2003-09-21 19:16:48 +00:00
mycroft d40837608f 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.
2003-09-19 21:35:56 +00:00
cl 3c10927ebe add MD part of SA/pthread pagefault handling on all m68k ports 2003-09-17 23:17:39 +00:00
dsl b98ddfffb3 libsa/bcmp.c now defines both bcmp and memcmp 2003-08-29 19:50:26 +00:00
he cb53c3ac12 The new ufs.o also needs memset, so add it. 2003-08-24 15:19:46 +00:00
itojun 4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
he 09c6022868 Add memcmp, memmove and bcmp to handle the new ufs.c. 2003-08-21 23:24:36 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
itojun 3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
thorpej 063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
lukem e803bea7e7 __KERNEL_RCSID() 2003-07-15 01:19:42 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
he da6b84e290 Defflag M060SP and PANICBUTTON, since the corresponding include files are
now referenced from atari_init.c and machdep.c.
The PANICBUTTON implementation appears to be incomplete, compared to
the other ports which have this option implemented.
2003-06-28 14:18:30 +00:00
he eff4d773fd Make sure to "mkdir -p" the destination directories under /usr/mdec. 2003-06-28 14:14:48 +00:00