Commit Graph

2510 Commits

Author SHA1 Message Date
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
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
jmmv
54a752b11b Properly use the return value of a bswap16 call. Caught when building
a kernel with -O0.
2007-09-01 22:01: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
hauke
e7c76ac0ee Leverage the new config(8) options for disabling features. This way,
it is easier to keep kernel configuration files up-to-date.

While we are here, disable a few compat options - NetBSD 1.5 has been
a while.

Tested on a Macintosh SE/30 with ae(4) ethernet card.
2007-09-01 20:11:40 +00:00
jmmv
2c9fe9540d Let this build if scsi support is not built into the kernel. 2007-09-01 14:44:08 +00:00
jmmv
4654a3acfd Fix build after dyoung's changes. 2007-09-01 14:27:56 +00:00
dyoung
dcd8923429 Change a bazillion occurrences of code resembling this,
error = (cmd == SIOCADDMULTI) ?
	    ether_addmulti(ifr, &sc->sc_ec) :
	    ether_delmulti(ifr, &sc->sc_ec);

	if (error == ENETRESET) {

to this,

	if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {

which does the same thing.

(A bazillion is a very large number.  This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)

Use ifreq_getaddr() twice in es(4).

Whitespace nits.
2007-09-01 07:32:22 +00:00
jmmv
ebcc6a8e1a Fix typo in comment. 2007-08-30 11:37:53 +00:00
jmmv
8583ef1822 Pack all global video-related variables into a structure for clarity.
A comment said that they weren't in a struct for speed reasons but...
this should not affect performance because these variables are mostly
used to set other variables (hence they are read few times).
2007-08-29 16:09:31 +00:00
jmmv
9220353379 Move the definition of multiple video-related variables into a new
header file (machine/video.h) so that we can kill all the "manual"
externs spread around the code (which were inconsistent among them).
2007-08-29 13:02:41 +00:00
jmmv
2b47cc7981 Split the global videosize variable into videowidth and videoheight:
makes the code clearer and avoids multiple parts of it having to know
how videosize was encoded.
2007-08-29 12:39:31 +00:00
jmmv
f871acd484 Enable tmpfs. 2007-08-26 21:19:01 +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
dogcow
18fbcfc528 remove historical include no longer needed; fixes build breakage. 2007-08-01 23:48:24 +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
ad
63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +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
hauke
3d7f38ec94 Fix a warning from gcc 4 about stripping the volatile qualifier by a cast
by doing the proper __UNVOLATILE() dance.
2007-06-23 15:32:56 +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
tsutsui
aa9fb9663f Switch mac68k's sn(4) Ethernet to MI SONIC driver.
Tested with Apple Ethernet CS Twisted-Pare Card on LC630 by me
and Quadra 650 on-board Ethernet by hauke@.
NuBus based cards and PowerBook variants are still untested.
2007-06-10 05:59:42 +00:00
tsutsui
792b0b8700 On my LC630 64KB DMA xfer causes timeout errors
so limit sc_maxxfer size to 63KB.
2007-06-08 15:03:51 +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
0264c643f5 Rather than attaching fpu as a usual device during cpu_configure(9),
initialize it explicitly in identifycpu() (before cpu_configure(9))
because after yamt-idlelwp merge savectx() is called before
cpu_configure(9) and it requires fputype initialized properly,
otherwise a kernel fails in savectx() if a machine doesn't have an FPU.
2007-06-02 12:07:03 +00:00
rjs
4bf1455184 Remove two unused global variables. 2007-05-22 00:23:57 +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
tsutsui
7d0fcadf39 Initialize curlwp as well as lwp0.l_addr right after MMU is enabled. 2007-05-21 15:19:17 +00:00
he
2cf15b5c24 Follow the pattern suggested by mhitch for the atari port and
remove inclusion of m68k/m68k/proc_subr.s, restoring the kernel
to a buildable state.
2007-05-20 15:06:40 +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
rjs
66b9a823ea Start yamt-idlelwp fixes. 2007-05-17 22:15:22 +00:00
ad
59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +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
hauke
90670ac801 Fix more fallout from caddr_t removal.
Since kbd_adbcomplete() uses the buffer parameter for accessing a
(sic!) data buffer, make it uint8_t *, instead of casting the pointer
everywhere it is actually used.

While here, fix prototype naming issue. One of these days, the code
should be converted to either all kbd_*, or all akbd_*.
2007-03-10 16:35:14 +00:00
tsutsui
25283a8672 In snintr(), reset the chip on fatal errors and
call snstart() after all events are handled.

XXX: We should switch to MI sys/dev/ic/dp83932.c.
2007-03-08 12:57:20 +00:00
tsutsui
002694356b Use volatile on access to DMA descriptors. 2007-03-08 12:54:15 +00:00
tsutsui
3c3f50b339 MI softintr(9)'fy.
Probably problematic, but LC630 is running at single user.
2007-03-08 02:24:39 +00:00
tsutsui
52d4f5af01 Remove lines not intended to commit in the previous. 2007-03-07 18:00:49 +00:00
tsutsui
4dfb61f1c6 Previous fix is not correct. sc_dmaaddr is actually
pointer against pointer, so just use proper casts
rather than bogus void pointers.
2007-03-07 17:22:19 +00:00
tsutsui
de8ce52c3b Add missed '*', use or add (char *) where pointer arithmetics are needed. 2007-03-07 13:57:30 +00:00
tsutsui
2e775e899c Change variables which are used to read byte stream data
from (void *) to (char *).
2007-03-07 13:54:49 +00:00
dillo
56c3e41252 Complete rename of hfsp to hfs, requested by thorpej. 2007-03-06 11:28:44 +00:00
dillo
23c2619e4d Add file-system HFSP (commented out) to GENERIC kernels of ports
on which Mac OS runs.
2007-03-05 23:30:18 +00:00
he
176f2ec48f Use char* for pointer arithmetic. 2007-03-05 21:31:30 +00:00
he
0e9b57828a Use a char* for pointer arithmetic. 2007-03-05 21:27:10 +00:00
he
6b92c489c9 Fix this so that it builds after sc_txbuf and sc_rxbuf no longer are void*. 2007-03-05 21:23:49 +00:00