Commit Graph

582 Commits

Author SHA1 Message Date
jdolecek f6cf4e5f93 move struct sys_config from mca_machdep.c to mca_machdep.h
fix copyright (overlooked in original commit)
use bitmask_snprintf() instead of printf("...%b") (though that part is commented
	out anyway ATM)
2000-07-09 10:35:11 +00:00
sommerfeld 56cc62bbec Return the full width of the counter here. 2000-07-02 21:05:14 +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
mrg b564830503 remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 08:44:03 +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
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
castor 512723f616 Fix integer overflow in calculation of VM_MAX_KERNEL_BUF. 2000-06-18 18:29:04 +00:00
mycroft ba354a1800 Disable pmap_copy() for now. 2000-06-15 13:35:27 +00:00
cgd a11660da22 make spl-lowering functions return void. 2000-06-08 23:03:13 +00:00
haya d1421ab5ac Remove unnecessary function arguments. 2000-06-06 08:20:06 +00:00
sommerfeld bbca3924cd Replace "timestamp" with "counter" in previous change, to avoid any
possible confusion that it has anything to do with accurate
measurement of time.

New names:
	__HAVE_CPU_COUNTER
	cpu_counter()
	cpu_hascounter()
2000-06-06 01:33:15 +00:00
sommerfeld fae21c7be1 Let rnd(4) know how to read the (pentium and higher) cycle counter:
If __HAVE_CPU_TIMESTAMP is defined, <machine/rnd.h> exists and defines
two functions:
  1) 	u_int32_t cpu_timestamp(void);
returns the 32 low order bits of a reasonably high frequency counter.
  2)	int cpu_havetimestamp(void);
returns non-zero if cpu_timestamp() actually works.

The timestamp counter should run at a frequency greater than 1 MHz
(otherwise, microtime would be sufficient); other than that, the exact
frequency and origin of the counter are unspecified.
2000-06-05 21:15:22 +00:00
mycroft 43a543fa88 Implement CLKF_INTR(), to count interrupt time separately. 2000-06-04 21:27:38 +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
mycroft e9deffe0bf Move a bunch of the COFF definitions into exec_coff.h, so they can be used by
other code.   XXX Not tested on SH3 yet.
2000-06-04 16:23:59 +00:00
thorpej 90ef824c6d Actually define the ACPI memory map entry (bi_memmap_entry). 2000-06-02 18:27:47 +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 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 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
jdolecek 8fedbd8497 Add i386-specific part of MicroChannel Architecture bus support, as
found in some older IBM PS/2 machines.

This code is based upon work by Scott D. Telford, with some minor bits
in arch/i386/mca/mca_machdep.c taken from FreeBSD.

XXX this is still very experimental and development version; use at your
XXX own risk
2000-05-11 16:38:10 +00:00
thorpej b193ffa77c Use __GNUC_PREREQ__(). 2000-05-05 00:20:22 +00:00
thorpej d3d81e3ad6 Make varargs and stdarg work with GCC 2.96 and later. 2000-05-03 21:54:06 +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 1dcdb13c04 Implement __cpu_simple_{,un}lock{,try}(), modeled after the Alpha
implementation.
2000-04-29 19:39:51 +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
thorpej 23694b5ab3 Glue in uvm_pageidlezero(). While here, improve some panic messages
in pmap.c, as requested by Jonathan Stone.
2000-04-24 17:18:16 +00:00
thorpej 8c5710a861 - Declare biosbasemem and biosextmem in <machine/cpu.h>, don't extern
them everywhere they're used.
- Avoid integer overflow when converting bios{base,ext}mem (in units of
  kilobytes) to bytes.
2000-04-21 18:37:20 +00:00
drochner 13c9f8d398 implement bus_space_vaddr() 2000-04-17 17:24:48 +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 9308187dbf Remove redundant decl of consinit() - it's in <sys/systm.h>.
Remove duplicate definition of delay() - we only need one in this file.
2000-03-29 03:54:03 +00:00
thorpej 6b45fb25a9 The assembler understands rdmsr, wrmsr, rdtsc, and rdpmc, so there's
no need to use .byte.
2000-03-28 19:17:29 +00:00
thorpej fd21635b22 Extern cpu_id and cpu_vendor[] here. 2000-03-28 19:16:05 +00:00
thorpej 0c4b7c7531 Add functions to read the TSC and Performance Counters. 2000-03-28 01:38:22 +00:00
thorpej f4f96605b9 Add/correct some MSRs, from Intel Architecture Software Developer's Manual,
Volume 3 (System Programming).
2000-03-27 23:15:57 +00:00
thorpej e84ce772ff Add some MSR-related calls. From FreeBSD. 2000-03-24 19:07:12 +00:00
thorpej b05796c812 Add some Model Specific Register definitions. From FreeBSD. 2000-03-24 19:06:07 +00:00
ws 7da71e5f9e Make IPKDB working again.
Add support for i386 debugging and pci-based ne2000 boards.
2000-03-22 20:58:25 +00:00
tron 8caeaa49bd Install "endian_machdep.h" required for "sys/endian.h". 2000-03-17 17:22:57 +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
mycroft 415cbeb83f This code has nothing to do with UCB. 2000-03-16 14:15:26 +00:00
drochner aa1de89bdf explicitely #include <sys/systm.h> #if BUS_SPACE_DEBUG to get a printf()
prototype
2000-03-15 16:44:48 +00:00
kristerw ce56ba78b7 Make the inline asm conform to what gcc thinks they should look like (per
discussions in http://gcc.gnu.org/ml/gcc-patches/1998-11/msg00004.html)

Approved by fvdl.
2000-03-13 21:10:24 +00:00
kleink a9ebf7bb8c Define ISO C99 (unsigned) long long (min, max) symbols. 2000-03-07 19:31:49 +00:00
thorpej dded044fc2 Update for the NKMEMPAGES changes. 2000-02-11 19:25:12 +00:00
thorpej dc80cc068b Move KERNBASE to 0xc0000000, giving the kernel a more-or-less full 1G
of virtual address space, leaving userland with 3G, and update comments
to match the new reality.

We knew we were going to have to bite this bullet eventually, and there
are a couple of outstanding PRs related to this issue (9389 and 9313).
Complete solution to those PRs is going to involve some sort of run-time
decision on how large kmem_map should be, as well as changing some data
structure allocation strategies in UVM.  However, this change will at
least allow the PR submitter to simply throw resources at the problem.
2000-02-11 07:00:11 +00:00