Commit Graph

462 Commits

Author SHA1 Message Date
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
pk 0790f00e68 Maintain the DVMA map extent subregion boundaries in the bus_dma map
structure.
2000-06-24 22:47:45 +00:00
kleink 133ea38323 Add a WEAK_ALIAS() macro. 2000-06-23 12:18:45 +00:00
pk 5c1633af0d Fix pastos in bus_space_read_region_*() functions. 2000-06-21 13:41:23 +00:00
pk 9bf0d228f0 spl0() and spllowersoftclock() return void. 2000-06-09 10:43:52 +00:00
thorpej 814826fdda Fix typo. kern/10291. 2000-06-05 20:47:47 +00:00
thorpej 0e2f894851 Provide a CPU_IS_PRIMARY() macro in the MULTIPROCESSOR case. 2000-06-03 20:43:28 +00:00
pk 504ed6e58b Move switchexit() declaration in here. 2000-05-31 12:05:04 +00:00
pk 0985cc7d7e Remove obsolete function declarations.
Move switchexit() to cpu.h
2000-05-31 12:04:29 +00:00
pk fca92e02ab Fix a couple of typos. 2000-05-31 11:23:21 +00:00
thorpej 8d5520dccf - In the MULTIPROCESSOR case, initialize p_cpu before a process is
marked SONPROC.
- Fix a bug where all cpu_info structures except for the boot CPUs
  would exist at both a CPU-local VA (CPUINFO_VA) and a gloal VA;
  The boot CPU's existed only a CPUINFO_VA.
- Add a self-reference pointer to the cpu_info that references the
  global address in the MULTIPROCESSOR case.  Just allow it to reference
  the `local' VA in the single-processor case, as CPUINFO_VA is global
  enough when there's only one processor to care about.  Change curcpu()
  to return the global address.
2000-05-31 05:28: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
pk 1273031c4d Simplify the bus_dma(9) implementation:
- the `alignment' and `boundary' arguments in bus_dmamem_alloc() only
  serve as hints on how to break up a DMA transaction into chunks
  when necessary; it is not necessary on sparc DVMA hardware.

- exclusively use the VM page size (i.e. PAGE_SIZE et.al.) when computing
  resource allocations.

- remember the size of DVMA resource allocations in the private `_ds_sgsize'
  field in a dma segment descriptor.
2000-05-23 11:39:57 +00:00
mrg 296eaaa36d add two new CPU_ISXXX versions: CPU_ISSUN4U, CPU_ISSUN4MOR4U 2000-05-22 02:35:23 +00:00
pk 2d12c9e33b The bus_dma(9) implementation now allocates DVMA addresses in
bus_dmamap_load_*() routines only. Note that DMA memory buffers
allocated with bus_dmamem_alloc() _must_ be loaded by bus_dmamap_load_raw().
2000-05-09 22:39:35 +00:00
hannken 0b2854eb6c Fix for lint during build of libc. 2000-05-05 20:12:00 +00:00
pk f622dc8618 Define some more bits in the MXCC control register. 2000-05-05 11:07:15 +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
pk d4ac7f24ca Implement HyperSPARC specific pmap_{zero,copy}_page functions. 2000-05-01 14:06:41 +00:00
pk 784c538c3f Add definitions of HyperSPARC block fill/copy ASIs. 2000-05-01 14:05:53 +00:00
pk e327115496 FIx declaration in __ldstub. 2000-04-30 22:15:30 +00:00
pk 78391926bf Allow for CPU specific page clear and page copy functions. 2000-04-30 21:09:43 +00:00
pk 7373241c4c Rename MXCC control register.
Add MXCC stream register definitions.
2000-04-30 14:18:52 +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
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
pk 5eb7625f42 findzs() is now used only by the kgbd initialision code. 2000-03-21 12:48:45 +00:00
pk 86f03b383e Remove __BROKEN_CONFIG_UNIT_USAGE. 2000-03-19 14:43:13 +00:00
pk c969f1b7df Add `fb_is_console()', which is a helper function for frame buffer
device drivers used to decide whether or not to act as console output.
2000-03-19 13:48:44 +00:00
pk b0eba37586 Add fields to hold PROM info to be used in console device matching. 2000-03-19 13:45:23 +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
mycroft 02905321b2 Foolish consistency. Mainly, always use underscores and sys/endian.h. 2000-03-16 15:09:34 +00:00
jdc 48ba774212 Fix RCS ID.
Add port power management.
2000-03-14 21:23:45 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
kleink ad7dbd825c Define ISO C99 (unsigned) long long (min, max) symbols. 2000-03-07 19:33:00 +00:00
thorpej dded044fc2 Update for the NKMEMPAGES changes. 2000-02-11 19:25:12 +00:00
kleink 36e6bc645e Improve namespace test macros a bit. 2000-02-05 14:04:36 +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
kleink 82464e46d6 Add a C99-style va_copy macro. 2000-02-03 16:16:06 +00:00
danw f77befbc84 #define __HAVE_DEVICE_REGISTER on ports that have it, and check for
that, rather than a list of architecture defines, in config_attach
2000-02-01 04:01:19 +00:00
tsutsui b0fbaa33fb Remove obsoleted macros. 2000-01-26 09:44:10 +00:00
cjs cfc246f9d8 Don't explode when we've got a lot of RAM. Limit our space for buffers
to 1/4 of the kernel VM map.
2000-01-26 07:35:51 +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
pk 6b2ebb44a7 Move several PIL_* definitions into the scope of LOCORE stuff. 2000-01-21 13:22:55 +00:00
pk c6b6f3883a Remove old-style boot device recognition. 2000-01-11 12:59:43 +00:00
pk a744e28304 Cleanup the list of exported headers a bit. 2000-01-10 22:09:34 +00:00