Commit Graph

508 Commits

Author SHA1 Message Date
thorpej e207174eb0 Add functions to read EISA configuration data for MEM, IRQ, DMA, and IO.
XXX Just error stubs on the i386 right now -- someone needs to write
XXX EISA BIOS code for i386.
2000-08-11 00:43:18 +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
briggs 3f1e17a340 Define bus_space_*_stream_N functions as their non-stream counterparts. 2000-07-31 22:43:46 +00:00
thorpej d760e0b407 Add code to read the EISA configuration NVRAM as set up by
an EISA Configuration Utility.  Code to access this data
is forthcoming.

XXX This could probably be made MI at some point.
2000-07-29 23:18:46 +00:00
thorpej 3eedcb3009 Whitespace police. 2000-07-13 05:47:39 +00:00
thorpej 2c9058efbb Oops, g/c some stuff from previous. 2000-07-06 23:29:13 +00:00
thorpej 65780061bd Define some more CTB formats. 2000-07-06 22:46:54 +00:00
thorpej 01bd2a3496 The `rpb_phys_address_size' field is really 2 32-bit fields,
`rpb_phys_address_size' and `rpb_extended_va_size', per Brown Book.
2000-07-03 01:47:48 +00:00
simonb edf0a0d67e Pass the abst to alpha_pci_mem_unmap() so that the real size of the
mapped area can be unmapped.
2000-06-30 18:19:28 +00:00
mrg 80bb8049ba remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 09:02:51 +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
kleink 133ea38323 Add a WEAK_ALIAS() macro. 2000-06-23 12:18:45 +00:00
simonb 8e0ec9a961 s/ouwl/outl/ in macro definition. 2000-06-19 12:19:38 +00:00
thorpej 71cd989b8f Only include <machine/intr.h> if _KERNEL. Noted by enami tsugutomo. 2000-06-09 16:03:04 +00:00
cgd c2ebb05a74 make spl0() and spllowersoftclock() return void. Also, move spl0()
prototype from param.h to intr.h.  (there were some big XXXs in param.h
that said to do that, and intr.h is included by param.h, so...)
2000-06-09 01:40:12 +00:00
thorpej 81afcb3940 And more ANSI'ification! 2000-06-08 03:10:06 +00:00
thorpej 966b3da402 ANSI'ify. 2000-06-08 02:53:47 +00:00
thorpej 0bf91362b9 Add cpu_counter() for rnd(4), using the rpcc insn. 2000-06-08 02:19:20 +00:00
simonb e59356ecdd In __cpu_simple_lock_try(), use "return (v0 != 0);" instead of
"return (v0);" where v0 is an unsigned long and the function return
type is int.  Stops lint warnings when this file is included.

Fix from Jason Thorpe.
2000-06-07 01:49:13 +00:00
thorpej 2668e3b213 Switch to the new `evcnt' mechanism for counting interrupts. Maintain
a per-CPU interrupt counter for clock, device, and interprocessor
interrupts.
2000-06-05 21:47:10 +00:00
cgd cffb580806 Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
2000-06-04 19:14:14 +00:00
thorpej 70dc4d8718 Un-__P'ify kernel prototypes. 2000-06-04 05:23:18 +00:00
thorpej df4a5a7f43 Increment an interrupt depth counter in non-clock interrupt cases
so that we can get time spent in interrupt statistics.
2000-06-04 03:40:03 +00:00
thorpej cd423732b8 - Clean up clock interrupt code a bit, and provide a CPU_IS_PRIMARY()
macro in the MULTIPROCESSOR case (hardclock() wants it).
- Implement __GENERIC_SOFT_INTERRUPTS, and redefine the legacy
  software interrupts in terms of it.  Garbage-collect setsoftserial().
2000-06-03 20:47:36 +00:00
thorpej 392948ced8 Add EV57 and EV67 processor variants.
cvs: ----------------------------------------------------------------------
2000-06-03 14:12:28 +00:00
thorpej 79744e1563 Add a global patchable variable to enable debugging printfs in the
code that finds the boot device.
2000-06-01 17:12:38 +00:00
thorpej 5114577ab0 ISA DMA bounce buffer code, needed for a couple of SGMAP-less
systems, support for which will be hitting the tree soon.
2000-06-01 03:55:45 +00:00
thorpej 1cf70c169f Rearrange things a little so we can deal with systypes that aren't
densely packed.
2000-06-01 03:41:23 +00:00
matt c9aff328d9 Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
2000-06-01 00:49:49 +00:00
cgd 47449a63d2 kill __P in these files. (I had to look at them anyway with an eye for
adding some protos... and adding them with __P seems wrong, but mixing
__P and not __P in the same file seems wrong too, so...)
2000-06-01 00:04:50 +00:00
thorpej 370a47ecac Add a few systypes. 2000-05-31 18:29:17 +00:00
thorpej 0d866249d4 - In the MULTIPROCESSOR case, initialize p_cpu before a process is
marked SONPROC.
- Always make curproc, fpcurproc, astpending, and want_resched per-CPU
  variables in struct cpu_info.  Restructure code accordingly, and trim
  a few instructions from a few spots in various places in locore.
2000-05-31 05:14:26 +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 f6cea17c36 Rename the atomic operations to have generic machine-independent
names, and define __HAVE_ATOMIC_OPERATIONS to indicate their
existence.
2000-05-23 05:12:53 +00:00
thorpej 09e72ae7e2 Remove the adjustment of VM_PHYS_SIZE for `large memory machines'. The
only adjustment that was really necessary was for VM_KMEM_SIZE, and that
is no longer necessary because there is now generic auto-sizing for
kmem_map.
2000-05-22 17:13:53 +00:00
thorpej 26f56b9cab Only use __builtin_va_alist_t if using GCC 2.96 or later. Fixes
pkg/10080, from Matthias Scheler.
2000-05-12 23:49:11 +00:00
thorpej c52b8eabae Make stdarg/varargs work with GCC 2.96. 2000-05-10 17:53:45 +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
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
drochner 13c9f8d398 implement bus_space_vaddr() 2000-04-17 17:24:48 +00:00
simonb 856c6ff149 Remove duplicate CTL_MACHDEP definitions (duplicated in <alpha/cpu.h>). 2000-04-10 06:04:28 +00:00
chs 64bb56dcc8 add decls for fd driver. 2000-04-10 01:19:13 +00:00
thorpej 55287d7159 Print any architecture extensions present on the primary CPU. 2000-04-03 01:47:28 +00:00
thorpej dbcb4cee48 Fix a typo in a previous revision, and add bit names for amask bits for
use with bitmask_snprintf().
2000-04-03 01:10:17 +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
simonb 0edd529101 Extern declaration of cputype. 2000-03-29 03:50:40 +00:00