Commit Graph

330 Commits

Author SHA1 Message Date
briggs
2f76646af1 Some uncommitted poking around. No functional change. 2000-07-30 21:48:54 +00:00
briggs
9c85d4dc6a Add byte-swap and stride options to bus_space. Allocate as normal, then
call mac68k_bus_space_handle_swapped() or mac68k_bus_space_handle_set_stride().
Stride is untested.  Swapped code works for SMC ethernet.
2000-07-30 21:38:02 +00:00
kleink
e695f72a2e Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
2000-06-26 15:42:16 +00:00
thorpej
a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
thorpej
f51470a514 Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED.  These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case).  Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
2000-04-29 03:31:45 +00:00
tron
e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00
mycroft
9e21b6555a In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
2000-03-17 00:09:18 +00:00
scottr
5c7674d4dd Explicitly include headers needed by iopreg.h 2000-02-21 02:04:48 +00:00
scottr
8a00740789 Merge wscons work onto the main development branch. 2000-02-14 07:01:44 +00:00
thorpej
dded044fc2 Update for the NKMEMPAGES changes. 2000-02-11 19:25:12 +00:00
cgd
7d16ac338c add __BROKEN_CONFIG_UNIT_USAGE #define, becuase these ports do very
wrong things with device configuration data "cf_unit" information.
2000-02-05 00:13:22 +00:00
tsutsui
249975c3c9 Revert (accidentally removed) MAXSLP macro. 2000-01-27 09:47:12 +00:00
tsutsui
b0fbaa33fb Remove obsoleted macros. 2000-01-26 09:44:10 +00:00
drochner
8eb798e603 define a "BUS_SPACE_MAP_PREFETCHABLE" flag which basically means that
device accesses are idempotent (but should not be cached by the CPU)
2000-01-25 22:13:17 +00:00
kleink
11e6c54cfc C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
1999-12-23 10:15:05 +00:00
scottr
3310f57beb Replace references to PGOFSET with m68k_trunc_page() and m68k_page_offset(),
as appropriate.
1999-12-12 08:18:48 +00:00
ragge
0513268399 CL* discarding. 1999-12-04 21:13:19 +00:00
scottr
86a8f1d201 Sync cachectl1() implementation with other m68k ports. 1999-11-28 10:36:56 +00:00
kleink
1c2019b5a8 Rip protection against multiple inclusion from wrapper headers. 1999-11-09 21:34:03 +00:00
scottr
560a7ef713 Change the behavior of spladb() so that it raises the IPL only
high enough to block ADB interrupts.
1999-11-06 23:05:40 +00:00
mycroft
c3e1f6741d A foolish consistency. 1999-08-30 18:58:01 +00:00
simonb
06a92524c2 Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
1999-08-21 05:39:51 +00:00
thorpej
28fb7c1eb8 Define cpu_number() as discussed on tech-smp. 1999-08-10 21:08:05 +00:00
thorpej
eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
thorpej
654051453f Use an array for PSL values, rather than individual shortwords, like
the hp300 port.
1999-08-04 16:01:47 +00:00
briggs
a33d38257c Declare struct pmap kernel_pmap_store extern. 1999-07-21 03:18:21 +00:00
briggs
79fe772f46 Include a bit more info about what's not happening with IOP. 1999-06-28 04:33:21 +00:00
briggs
71a4446b04 Unfortunately, several changes that are intermingled:
- Add initial IOP support.  ADB doesn't work yet for me, but it's here so
  that others will be encouraged to work on it.  ADB_HW_IOP basically
  is configured as a NOP so that serial consoles will continue to work.
- Roll via1_intr and via2_intr into the intr.c scheme--this also required
  changing rtclock_intr to grovel the stack differently so that hardclock
  gets the right arguments and softclock() doesn't get all reentrant.
- Make via1 interrupts parallel to via2 interrupts--handlers get a pass-
  through pointer and we can register handlers.  Register via1 interrupt
  with intr_establish()--normally level 1, level 6 for A/UX scheme.
- Use intr_establish() to set real via2 interrupt handler instead of the
  hacked function pointer.
- Reorganize adb-direct interrupts so that a function call is removed.
- Implement A/UX interrupts for all Quadras right now.  We may need to
  special case some Quadras, but Linux folks are reporting success on
  several models.
- Fix intrnames to be accurate for the normal, PSC, and A/UX interrupt
  configurations.
1999-06-28 01:56:55 +00:00
briggs
f9de07203c Add some constants from Linux/mac68k to note SCC, floppy, and SCSI registers.
Add some code, inspired by Linux/mac68k, to shutdown all DMA on the PSC
at startup and to disable and clear all interrupts except the SCC.
1999-06-28 01:41:13 +00:00
kleink
857dfc7058 Slightly rearrange the SSIR inline assembly implementation in order to avoid
making assumptions on C symbol name prefixes.
1999-06-15 15:26:34 +00:00
kleink
e1529b8f93 Pull in the right generic m68k header. (Where was my mind?) 1999-04-29 14:38:39 +00:00
thorpej
b8073b401b Garbage-collect the VM_MBUF_SIZE constant. Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.
1999-04-26 22:46:44 +00:00
kleink
ed74932033 Add COMPAT_SVR4 for m68k. 1999-04-19 21:22:56 +00:00
pk
b13e5d1469 Quote "AS IS" as in the majority of Carnegy Mellon notices. 1999-04-12 20:38:17 +00:00
scottr
d6fd16c828 vm_size_t -> vsize_t 1999-04-07 06:45:14 +00:00
pk
c40eb1cd97 Fix a pasto in copyright text which has been procreating like rabbits.. 1999-04-06 20:09:18 +00:00
scottr
fdd8445219 Prototype kvtop() here. 1999-04-06 03:40:23 +00:00
scottr
0848c89c55 The last change wasn't quite enough to build libc during a 'make build'.
Bump DFLDSIZ, too.
1999-03-31 14:58:15 +00:00
scottr
9c8f206e65 Bump DFLSSIZ so that we can build libc.so.*, and limit MAXSSIZ independently
of MAXDSIZ.
1999-03-31 06:53:56 +00:00
drochner
76fa1751fe Add a macro to check for sufficient pointer alignment in bus.h context,
"BUS_SPACE_ALIGNED_POINTER()".
Equal to the param.h "ALIGNED_POINTER()" normally, but obeys additional
requirements of the bus_space_xxx_n() macros. (BUS_SPACE_DEBUG)
1999-03-23 21:29:03 +00:00
minoura
e518820ca8 Pullin m68k/ieee.h. 1999-03-15 11:55:53 +00:00
scottr
e640c5d7cc Move all IPL setup to intr.c, and do some sanity checking. 1999-02-28 04:52:07 +00:00
is
19d0a457aa oops. void->int 1999-02-26 22:55:33 +00:00
is
f71d843a65 synchronize types, and s/curproc/p/ in one forgotten place 1999-02-26 22:37:57 +00:00
is
84971e3a6f mac68k part of pr 6152 fix, and missing bits for the others 1999-02-25 23:13:39 +00:00
scottr
66477a6be5 Rename via_shutdown() to via_powerdown() for clarity and consistency. 1999-02-20 09:57:35 +00:00
scottr
928c2f86e0 Fix a typo in the (unused!) splsched() macro. 1999-02-17 04:46:45 +00:00
thorpej
cb8268a3a5 Use <sys/disklabel_mbr.h>. 1999-01-27 21:00:05 +00:00
mycroft
082204fa3d Standardize format. 1999-01-22 14:12:07 +00:00
chuck
e6f055e44b MNN is no longer an option 1999-01-16 20:31:20 +00:00
bouyer
dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
scottr
faabac8cce Update video-related RBV constants to reflect reality. 1999-01-06 07:16:56 +00:00
scottr
e91873be5f G/C rbv_vidstatus() and related constant. 1999-01-06 05:54:38 +00:00
briggs
1082c49b69 Fix PR port-mac68k/6665 from Paul Goyette with some minor mods.
Cast values is bus_space macros to the appropriate types so we end up
with valid assembly.
1999-01-06 03:06:45 +00:00
scottr
84af636530 vm_offset_t -> {paddr_t, vaddr_t} 1998-12-22 08:47:05 +00:00
thorpej
49c62c4336 Changes to support fork_kthread():
- cpu_set_kpc() now takes void *arg third argument, passed to the
  entry point.
- cpu_fork() allows parent to be non-curproc iff parent is proc0.
  When forking non-curproc, assume its state has already been saved.
- Adjust various pieces of machine-dependent code to account of all of this.
1998-11-11 06:41:23 +00:00
scottr
9d3eea92f4 Add DOS partition handling, from Ken Nakata in PR 4999, with
only slight tweaking by me.

XXX - does not currently handle NetBSD/i386 or 386BSD/FreeBSD partitions.
1998-10-30 06:48:51 +00:00
ender
2055d846f9 New ADB "bus" interface:
o Separate ms and kbd drivers
o aed device for compatibility
o debug message cleanup in hardware direct support (from scottr)
1998-10-23 01:16:22 +00:00
thorpej
d681cf055a configure() prototype is in <sys/device.h> 1998-10-06 20:50:15 +00:00
scottr
2d981dac3b The return value from intr_dispatch() is no longer necessary. 1998-08-25 04:03:56 +00:00
scottr
2aa56b1c61 Implement splaudio(). 1998-08-25 03:59:01 +00:00
scottr
f234add115 Add gestalt machine type for the PowerBook 190/190cs. 1998-08-22 05:47:37 +00:00
scottr
da5ce9387c Remove semicolons from the end of bus_space_*_multi_*(). From Ken Nakata
in PR 5965.
1998-08-16 05:36:17 +00:00
scottr
5a94869995 New framework for handling processor interrupts, derived in part from
the hp300 port.

- Interrupts 3-6 use this immediately.  Interrupt 7 is a special case,
and the VIA interrupts (1 and 2) will be addressed when that code is
rototilled.

- Modify the zs front end to register with the appropriate interrupt
controller:  through the PSC on the AV Quadras, and direct to
interrupt 4 on the rest.  Arrange to have the appropriate zsc_softc
supplied to us at interrupt time.

- Modify the direct ADB driver (and its PowerManager cousin) to call
intr_dispatch(), rather than zshard().  XXX This is a kludge, but at
least limits the brokenness to the ADB drivers, now.

As a side effect, this should fix PR 5590.  Thanks to Bill Studenmund for
correctly determining the cause of the problem reported there.
1998-08-12 06:58:42 +00:00
briggs
b3e5811a08 Patch from Takashi NAKAMURA <QZM00427@nifty.ne.jp> to support the
Contour 3-button mouse from the Contour Design Corp.
It looks like a Microspeed mouse.
1998-08-11 20:07:59 +00:00
veego
1b46ebe1d9 Add elf_machdep.h to the INCS list. 1998-07-12 17:53:29 +00:00
thorpej
639cc899cf Basic elf_machdep.h for m68k; doesn't include relocations, yet. 1998-07-12 01:17:58 +00:00
thorpej
6fb9a8addf Define one page free list, and put all pages on it. 1998-07-08 04:39:34 +00:00
scottr
398759b74e Whoops, forgot to bracket struct grfinfo with #ifdef GRF_COMPAT. 1998-07-01 14:52:21 +00:00
scottr
f170a53f0b Add a GRF_COMPAT option so that old-style grf ioctl() code can be
removed from the kernel.
1998-07-01 14:49:07 +00:00
cgd
651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
scottr
a57c68946c GC the old MACHINE_NONCONTIG code. 1998-04-26 21:12:03 +00:00
scottr
06487a637a Use VM_PSTRAT_BIGFIRST, and add a comment explaining the decision. 1998-04-26 20:06:26 +00:00
scottr
aa1b4c6045 Garbage collect the second (slot number) parameter to NuBus interrupt
handlers.  (Only slot_ignore() and slot_noint() need this, and we already
have a place to put this information.)  Adjust add_nubus_intr() so that if
the client_data arg is specified as NULL, pass the slot number as
client_data to the interrupt handler.
1998-04-25 21:27:40 +00:00
scottr
12e01e36dd Missed removal of MACHINE_NONCONTIG. Pointed out by Allen. 1998-04-25 06:48:05 +00:00
scottr
8bcac06284 Checkpoint of UVM work to date. This includes a fully-functioning
MACHINE_NEW_NONCONTIG interface implementation, which is now enabled
on all systems.  Thanks to Jason Thorpe for his work on the hp300 port,
from which most of the code used here was derived.

XXX In spite of the fact that it works on the hp300, UVM does not (yet)
work well under load on mac68k.
1998-04-24 05:27:24 +00:00
scottr
da7d7ca568 Add magic number for driver map structure. (oops!) 1998-03-02 22:40:31 +00:00
scottr
c1ea2b45ff Integrate Macintosh partition map and driver descriptor map definitions. 1998-02-27 09:15:21 +00:00
cgd
3bbb7f7d45 Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
1998-02-18 02:05:32 +00:00
scottr
f49dd3ef30 Avoid declaring the "astpending" and "want_resched" globals in cpu.h,
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.

This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
1998-02-13 07:41:45 +00:00
mycroft
b5c132e4d2 Prototype __flt_rounds() consistently. 1998-02-03 01:26:20 +00:00
scottr
5b4a54759d Conform to spec, and make bus_space_copy() handle overlapping copies.
From Jason Thorpe.
1998-01-13 18:32:15 +00:00
perry
6f57e5c573 multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom) 1998-01-09 22:23:44 +00:00
thorpej
61567b54de Garbage-collect pm_stchanged; it's not used by anything. 1998-01-06 07:02:58 +00:00
thorpej
d11b109f2b Garbage-collect use of the PCB's copy of the user segment table pointer. 1998-01-06 06:51:40 +00:00
thorpej
b9f1b716f3 Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
1998-01-03 01:12:59 +00:00
thorpej
dd966fca05 Change an argument name to PMAP_ACTIVATE() to more accurately describe the
semantics of the argument.
1998-01-01 20:05:23 +00:00
thorpej
287b63b321 - Make pmap_activate() and pmap_deactivate() take a struct proc *.
- Define active_user_pmap() and use it in the appropriate places (from hp300
  port).
1998-01-01 19:52:50 +00:00
briggs
c1ed70f0d8 NetBSD RCSIds. 1997-11-07 13:31:15 +00:00
scottr
13fa4227b1 Update from John Wittkoski: bug fixes for Cuda support. 1997-11-07 07:33:11 +00:00
ender
e38a307461 Recognize Apple Standard Keyboard (ISO layout) 1997-11-05 08:21:47 +00:00
briggs
e658b8b476 Add in the if_mc ethernet driver for the AMD "MACE" part. This is the
internal ethernet on the Quadra/Centris 660av/840av.
Add initial support for the PSC (DMA controller) to support the above
(DMA SCSI remains unsupported).  This involved also changing the way
that several interrupts are handled.
Above from David Huang <khym@bga.com>
Since the interrupts changed somewhat, we must also make the ipls
dynamic, defaulting to their prior levels and adjusted for the AVs.
I modelled this on the hp300.
1997-11-04 03:44:42 +00:00
is
a16fd7d74e Make these compile after m68k/m68k.h 1.4->1.5. 1997-10-26 21:41:34 +00:00
scottr
8630149cba Convert to MI 8530 SCC driver, from Bill Studenmund. The new front end
also supports DTR/CTS flow control.
1997-10-20 08:13:26 +00:00
lukem
28558b28eb rcsid fascism 1997-10-13 14:22:22 +00:00
scottr
a7515413d8 Remove advertising clause. 1997-10-10 05:54:48 +00:00
thorpej
030188061e Copyright assigned to The NetBSD Foundation. 1997-10-04 17:36:56 +00:00
briggs
407e2e622f port-mac68k/4158: current kernel doesn't recognize some adb devices.
Patch applied.  Thanks to SUNAGAWA Keiki for the change-request.
1997-10-02 15:12:49 +00:00
briggs
13ceb16786 port-mac68k/4175: Need to add support for 33 MHz LC475/Q605.
Fix applied.  Thanks to David Johnston for the PR and the reminder.
1997-10-02 13:31:13 +00:00
leo
c5ba7a3102 Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
1997-09-20 12:06:37 +00:00