Commit Graph

415 Commits

Author SHA1 Message Date
kleink 7affdab52e Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
2001-04-14 12:19:49 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
kleink 9133b51cd8 Replace the 'unsigned __COMPILER_INT64__' construct with a new name,
__COMPILER_UINT64__, to be supplied - if such a case is made, it shouldn't
be assumed that the unsigned type-specifier may be applied to it.
2001-04-12 22:01:18 +00:00
thorpej c031c366f6 Add spluba(). 2001-04-12 19:16:06 +00:00
ragge 4a933b0a25 VAX_STYP_690 added, from Lord Isildur. 2001-03-21 21:11:13 +00:00
thorpej 2c4c690f14 Add the BUS_DMA_STREAMING flag. 2001-03-07 22:42:16 +00:00
ragge aa13a12702 Support to control the leds on VAXstations, taken from Sun3 and ported
to vax by Shinmyoh Koji (yesu@rb3.so-net.ne.jp).
2001-02-18 10:44:20 +00:00
ragge 1af765a6dd Oops, forgot this file. 2001-02-05 13:20:10 +00:00
ragge 2c1941b3eb Giant update from Michael Kukat (michael@unixiron.org).
Fixes support for:
                       MicroVAX 3100m90
                       MicroVAX 3100m95
                       VAX 4000/100 (tested)
                       VAX 4000/105A (tested)
                       VAX 4000/108
                       VAX 4000/400 (tested)
                       VAX 4000/500 (tested)
                       VAX 4000/600
2001-02-04 20:36:26 +00:00
ragge e4d9af4b42 A bunch of new CPUs that are supported, from Michael Kukat
(michael@unixiron.org). Among them are 4000/400, 4000/500 and 4000/105A.
2001-01-28 21:01:52 +00:00
thorpej d74e432ed3 Make softclock a generic soft interrupt of the API is available,
adding the requisite void * argument to softclock().
2001-01-15 20:19:50 +00:00
thorpej 45de366b2e Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>.  This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
2001-01-14 23:50:28 +00:00
thorpej d85a75f583 Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
2001-01-14 02:00:37 +00:00
matt 27980172f6 Add the types needed by the new locale code. 2001-01-13 03:48:26 +00:00
takemura c5fd828440 replace 'long long' with int64_t to compile stand alone program with
compiler other than GCC.
2001-01-03 10:08:55 +00:00
matt 4622cfafe0 Redefine the memset/memmove/bcopy/bzero/memset macros to use more agressive
constraints in their inline asm.  Gcc generates much better code now.
2001-01-02 04:03:42 +00:00
ragge a81d92ef69 Add prototype. 2000-12-02 17:08:32 +00:00
chs 2116915a30 eliminate TRUNC_PAGE() and ROUND_PAGE() in favor of their
lowercase counterparts.  also, a little misc cleanup.
2000-11-21 05:49:07 +00:00
matt b605c997e2 Commit changes to SCSI working on the VS4000/9x. "Don't overthink the
plumbing!  Duh!".
2000-11-16 19:25:40 +00:00
matt 960800cbb8 Convert some spaces to tabs. 2000-11-15 00:49:31 +00:00
thorpej fb50850754 We use 4K VM pages on the VAX. Make PAGE_SIZE and friends into
compile-time constants.
2000-11-14 19:49:57 +00:00
ragge 7ac8ee6f59 By accident, a previously unused bit in the PTE got used as wired bit.
Because of this kvtophys() of wired pages did set the leftmost bit, causing
the pager to hang while swapping. This is now fixed by using another
free bit in the PTE as wired bit instead.
This fixes PR#11121.

Many thanks to Chuck Silvers that found what the problem was!
2000-10-15 11:00:38 +00:00
matt 98e5e148fa Since cpu_switch (aka Swtch) is now called at splsched() with sched_lock
locked, cpu_exit needs to do that too.  Since in the lock debug case we
have to use a CALLS which wipes out R0-R6, change the convention for Swtch
so that the proc is passed in R6 and that R6 is clobbered.  This is so
Swtch itself doesn't have to save/restore the proc pointer explicitly.
2000-08-27 00:21:46 +00:00
thorpej 4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
thorpej 58e7a6954b Add spllock(). See spl(9) for details. 2000-08-22 19:46:26 +00:00
thorpej 23a7f255d4 Make sure we provide splsched() as described in spl(9). 2000-08-21 02:06:31 +00:00
tshiozak 51a53de0d5 Preparation for the future introduction of multibyte locale.
- MB_LEN_MAX is increased to 32.
 - To ensure binary compatibility for old executables
   under multibyte locale, versioned setlocale is added.
 - __mb_len_cur definision is added in setlocale.c
   and enable it in stdlib.h .
   It is also important for multibyte locale stuffs,
   but I just forgot.
2000-08-08 22:31:13 +00:00
ragge d254a73539 Remove some unneccessary TBIA's. Keep track of wired pages.
Fix PR#8503 (refcount error).
2000-08-08 19:06:52 +00:00
ragge e50ddafc0b Add badaddr() field. 2000-07-26 11:55:01 +00:00
ragge 550bb5fbb2 Make yeartonum/numtoyear visible. 2000-07-26 11:54:32 +00:00
ragge b38b1995fa Support for the KA88 CPU and the NMI backplane. 2000-07-26 11:47:15 +00:00
matt 8e9ff5814e More ELF changes (a.out still works). 2000-07-19 18:15:01 +00:00
matt ad99ca5ed2 use size_t instead of u_int. 2000-07-19 01:02:52 +00:00
matt ab5d2882a0 Move KA630 definitions from boot/boot/consio.c to here. 2000-07-19 01:01:58 +00:00
matt 5d9fda1ecd switch size_t, ptrdiff_t, & ssize_t to long int (signed or unsigned) for
__ELF__.
2000-07-17 02:52:24 +00:00
matt cb551c438d Reflect the new reality. 2000-07-13 03:18:22 +00:00
ragge 8658157274 Nexus vector number is 0x14-0x17, not 14-17! Fortunately, 3 wrong did
one right. Pointed out by Kenn Humborg (kenn@linux.ie).
2000-07-10 09:14:32 +00:00
ragge 63852b4193 Some defines for the 6000/400 CPU. 2000-07-06 17:42:49 +00:00
ragge 5c50116697 Console Communication Area (CCA) layout description.
Used on for example VAX 6000 machines.
2000-07-06 17:34:29 +00:00
matt 8fbc28d991 Revert WEAK_ALIAS back to ELF only.
Change ALTENTRY so there is no change of alignment or section
2000-07-03 23:05:32 +00:00
matt 4f1fa84a93 Rework ALTENTRY a bit. 2000-07-03 04:24:56 +00:00
matt c9e87920af GCC 2.96 wants the = constraint first. Older gcc(s) don't care. 2000-07-01 06:43:42 +00:00
matt 5ccb0f3e95 Add ELF support. 2000-07-01 06:42:54 +00:00
matt c9e3b4a94f a.out allow weak symbols too. 2000-07-01 06:42:06 +00:00
matt e9b3d6fc85 GCC 2.96 wants the = constraint first. Also change to be a bit more
efficient.  Instead of using indirect register access, change the
constraint to memory and use the value directly.  This allow PC-rel
access among other things.
2000-07-01 06:41:06 +00:00
matt 54a2dbe16a More GCC 2.96 changes. 2000-07-01 06:38:53 +00:00
itojun d738f90fd7 raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory.  MHLEN is too small
  already (less than 80) and there are chances for unwanted packet loss due
  to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
  (even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
  extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
2000-06-30 17:55:11 +00:00
matt 8231e1afca fix typo 2000-06-30 03:35:32 +00:00
mrg 7e590c46fe remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 07:07:52 +00:00
matt f77f36407d Use __builtin_va_list when GCC >= 2.96 2000-06-28 21:13:35 +00:00
matt 34def42c3d Add ELF support. 2000-06-27 06:17:28 +00:00
kleink bb2ed0f487 G/c _BSD_INTPTR_T_ and _BSD_UINTPTR_T_. 2000-06-27 05:53:22 +00:00
kleink 47b5c5e3b1 Resolve some formatting nits; add __intptr_t and __uintptr_t. 2000-06-27 04:58:51 +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
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
ragge bd66c9dafc Make the HDC9224 MFM device driver up-to-date; has been not-working
since NetBSD 1.2 (!) It also uses interrupts instead of polling now.
Also fix the DMA area locking between SCSI and MFM disks.
Still missing - floppy support.
2000-06-25 16:00:43 +00:00
kleink 133ea38323 Add a WEAK_ALIAS() macro. 2000-06-23 12:18:45 +00:00
matt 15511d1dcc Move COFF_LDPGSZ to ibcs2_machdep.h. Fix nmagic loader to deal with
subpage mappings.
2000-06-21 05:45:15 +00:00
ragge 8ea974e809 Put all cputype definitions in one file instead of separate files.
This was becoming unmaintainable.
2000-06-12 11:13:14 +00:00
matt 7f40194cbc Make spl0 & spllowersoftclock return void. 2000-06-11 23:33:37 +00:00
matt 0dc4d9cf90 export bus.h 2000-06-11 23:32:55 +00:00
ragge e7aefcd7ae Allow printf's from slave CPUs by stealing the v_putc function.
Easier than expected because the printout lock is hold in the higher levels.
2000-06-11 07:50:11 +00:00
ragge b826825917 Code to spin up other CPUs on a VAX 8200 system.
Haven't solved the printf() problem yet, though.
2000-06-10 14:59:38 +00:00
matt 2f85fe7adb Adjust to new evcnt stuff. 2000-06-05 00:09:17 +00:00
matt ac621687a3 Add coff_machdep.h (now need due to the recent exec_coff changes). 2000-06-04 21:06:18 +00:00
matt a8a863d4ea more cleanup. use __builtin_frame_address(0) instead of our funky
FRAMEOFFSET macro.  define an interrupt call frame and use that directly
instead of some magic offsets.  Make boot autoconf.o use the current
reality.
2000-06-04 19:30:14 +00:00
ragge c46119030a Forward declaration of `struct proc'. 2000-06-04 18:27:39 +00:00
ragge 1e19df4bfd Clean up the sbi_attach_args struct and put in tag/handle.
Move a nice macro to scb.h.
2000-06-04 17:58:19 +00:00
matt 0bd304e528 More event counter stuff. Plus a little cruft cleanup while doing it. 2000-06-04 06:16:53 +00:00
matt 7c24069048 Add extra argument to scb_vecalloc (a struct evcnt *)
Move ivec_dsp from trap.h to scb.h
Add interrupt counting to asc, le, ze, ncr, dz interrupts.
add common support for counting interrupts to cnm_idisp so
it can be done very efficiently.
2000-06-04 02:19:24 +00:00
matt baaa1154d5 no need to raise ipl since the definition of softintr_schedule is that
it's from at or above softipl.
2000-06-02 22:14:10 +00:00
matt b8cccfafd8 Move spl macros from <machine/param.h> to <machine/intr.h>
Fix botch on my part and make the IPL_* match reality on VAX.
Redefine spl macro using the symbolic IPL_ instead of being hardcoded.
Move schedsoftnet, schedsoftclock from <machine/cpu.h> to <machine/intr.h>
Add a _setsirr macro for schedsoft*.
Add softintr function and framework.
2000-06-02 21:47:02 +00:00
matt fb6a3dfb64 Include offsets in vs_cpu register in comments. 2000-06-02 21:39:54 +00:00
matt 22635242c9 Eliminate booted_from. extern'ed booted_device (for raidframe). nothing
outside autoconf.c in sys/arch/vax needs to deal with booted_device).
2000-05-31 23:55:51 +00:00
ragge 992002c2be Use the cpu_info struct to store cpu-specific data in the same way in
both uniprocessor and multiprocessor environments. Use the otherwise
unused internal CPU register SSP to store the cpu_info pointer.
The macros curcpu(), curproc, cpu_number() and need_resched() are now the
same in both uniprocessor and multiprocessor environments.
2000-05-29 20:00:55 +00:00
ragge 8293b12111 Write kvtopte() and kvtophys() as inline assembler. GCC create quite bad
code for them, and they are only 2-3 instructions each if written by hand.
2000-05-27 21:17:06 +00:00
ragge 98d0ab9e1c Use machine instead of vax in include path. 2000-05-27 16:44:14 +00:00
ragge 99baa81ae7 Rewrite cpu_fork(), it now looks like and works as other ports' cpu_fork()
(calling child_return() etc...). Have fun, Jason!
2000-05-27 16:33:04 +00:00
matt fa1474c2eb This need <sys/sched.h> to compile. 2000-05-27 03:23:22 +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
matt 37be92c0d1 Add loadfile() support. soon to be needed by bootblocks. 2000-05-25 20:25:22 +00:00
matt 88352edc02 Add prototype for findcpu in _STANDALONE. 2000-05-22 15:55:52 +00:00
matt 5ece00b8bc Obviously we don't use the symbol, but we might give it the correct value.
We support up to NVAX platforms.
2000-05-22 15:40:06 +00:00
matt 2d153651e5 Preliminary support for the VS4000/90 SGMAP. Needed for SCSI. Does not
quite work right yet.
2000-05-17 21:22:18 +00:00
ragge 0028464ae3 Add 4000/105 and VXT2000. From Michael Kukat. 2000-05-08 17:49:07 +00:00
thorpej 855b79db92 Let each platform typedef the new __cpu_simple_lock_t, which should
be the most efficient type used for the atomic operations in the
simplelock structure, and should also be __volatile.
2000-05-02 04:41:04 +00:00
ragge a5a1a12d83 #define __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED. 2000-05-01 12:09:32 +00:00
thorpej dc8f3d3b3f Oops, install <machine/lock.h> on these systems, too. 2000-04-29 03:45:42 +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
matt b7de2c5900 Add lcgreg.h. 2000-04-24 17:09:56 +00:00
matt 7964d80339 Initial definition of registers for VS400 LCG cards. Still needs more. 2000-04-24 17:09:03 +00:00
matt c10673838a Extend asc driver to include support for the VS400/9x.
Add VS4000/9x support vsbus_dma.c
2000-04-23 16:38:52 +00:00
ragge dd22df3dc8 Ops, forgot to commit this. 2000-04-22 08:19:49 +00:00
ragge 86d5f2d67d Add RPB number for VS4000 SCSI. 2000-04-18 20:23:54 +00:00
mhitch 6c0d2ca981 Add some defines gleaned from OpenVMS to enable cache on the 4000/VLC. 2000-04-18 16:23:42 +00:00
matt 9434b7b19e Add fix for VS4000 SCSI hangs on disk writes. Add a VAX_BUS_DMA_SPILLPAGE
and use it in the asc_vsbus driver.
2000-04-10 03:49:56 +00:00
ragge 9b917327ac Add insqti/remqhi macros. These macros are interlock queue instructions
used in multiprocessor systems as well as in uniprocessor environments
with intelligent I/O devices.
2000-04-09 16:37:09 +00:00
minoura 78b105698a Move dl* function definitions to libc on ELF.
Based on the patch supplied by Takuya Shiozaki <tshiozak@astec.co.jp>.
See http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html.
2000-04-02 15:35:47 +00:00
ragge f9f885519d First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.
2000-03-19 14:56:52 +00:00
tron e86957458a Install "machineendian_machdep.h". 2000-03-17 22:36:31 +00:00