Commit Graph

83560 Commits

Author SHA1 Message Date
skrll 73f2f65977 Convert hp700 to __HAVE_GENERIC_TODR
Move the tod routines to dev/pdc.c as suggested by Izumi Tsutsui - we
access the tod device via the pdc.

Tested on a hp712/60 with a flat battery.
2006-09-15 07:51:17 +00:00
martin 092e3c8b7a Do not bother to save fpu state when we are about to get rid of it. 2006-09-15 07:42:38 +00:00
skrll d49ab36123 Do the NetBSD thing wrt resettodr in cpu_reboot. That is, remove OpenBSD
leftovers.
2006-09-15 06:11:40 +00:00
skrll f576f19cbb Fix comment. %t1 is the syscall # not curlwp. 2006-09-15 06:09:36 +00:00
he 8fabe65c5c Replace CPU_UPAID with cpu_number(), says martin. 2006-09-14 22:44:18 +00:00
he 0486aabc27 Make the sparc GENERIC_SUN4U kernel build by casting via an uintptr_t
before casting to a pointer.
2006-09-14 22:43:27 +00:00
plunky c4b4f61979 add bluetooth capability to alpha port 2006-09-14 18:08:06 +00:00
reinoud d1de30eaae Fix same panic problem as with cd.c when a scsi error happends on
read/write action. It would panic on a diagnosic assertion. When a scsi
read/write command fails, the whole extent is gone bad so mark all as not
done.
2006-09-14 17:54:34 +00:00
gdamore 51d37264ff Convert playstation2 to todr and tc. This is not compile tested, as the
current tree isn't buildable even by the cross tools (which I lack), due
to C99.  Approved in principle by martin@, simon@
2006-09-14 16:07:00 +00:00
martin 02fbfe2681 Vcons-ify the ffb driver, from macallan.
Also adds some redrawing when entering DDB.
2006-09-14 16:05:18 +00:00
gdamore 8e61a34d9f Update luna68k to MI todr and timecounters. 2006-09-14 15:04:07 +00:00
yamt 97194de33c kauth_register_scope: don't leak a listener
when no default listener is specified.
2006-09-14 11:37:07 +00:00
martin 65c4655dde mrg does not like me (ab)using dv_unit ;-)
Redo previous by just counting cpu instances, just like sparc does.
2006-09-14 09:00:14 +00:00
martin 8e5eebeeb2 Pass the current cpu unit no to alloc_cpuinfo and use it as ci_number
(instead of the UPA id). That way we have consistent cpu* names.
XXX - cpu_attach needs SMP work
2006-09-14 08:31:09 +00:00
mhitch 4adefbd6e8 Uvm changes over 17 months ago resulted in the 68040/060 segment table
page being entered with pmap_kenter(), which does not record the mapping
in the pv table.  Attempting to inhibit caching of that page as required
by the 68060 hardware no longer changes the PTE and caused varying degrees
of multiple faulting, sometimes resulting in an unusable system.  Apparently
very few people attempted to run a 68060 based system since that change.
Fix to to change the caching bits directly rather than using pmap_changebit().
2006-09-14 01:27:59 +00:00
gdamore 29dad6a290 Converted x68k to todr. Compile tested only, but it has a low probably
of breaking anything.
2006-09-14 01:18:11 +00:00
gdamore f2a34ea075 Convert sbmips to generic TODR. ok simonb@. 2006-09-14 00:03:45 +00:00
manu 717102f4bb Jumbo COMPAT_LINUX/COMPAT_LINUX32 bugfix, with the help of Nicolas Joly
- Fix shmat return value on amd64: it uses no black magic with retval[0]
- Fix integer overflows in sysinfo
- Implement sysinfo, mmap2, sched_getparam, sched_getscheduler, mremap,
  and madvise in COMPAT_LINUX32
- Fix improper types used in setgroups16/getgroups16
- Implement mmap2 for COMPAT_LINUX32
- Ifdef debug messages by DEBUG_LINUX
2006-09-13 19:55:49 +00:00
manu 99bb1b27be This file was not used anymore 2006-09-13 19:47:30 +00:00
spz f3dd46346c change the variable name in the CSR_TRACE macro so it doesn't collide with
a previous definition of 's' (which makes gcc4 warn)
Reviewed by <is>.
2006-09-13 16:45:58 +00:00
spz baf526d49e const'ify several char * to shut up gcc4 warnings
Reviewed by <is>
2006-09-13 16:43:51 +00:00
tsutsui 3a57046c1d Switch newsmips to timecounters. From gdamore@ on port-newsmips
with one tweak by me, and regressions passed on NWS-5000.
2006-09-13 14:50:42 +00:00
martin 2dce1200cc Avoid duplicate collon, from Stephan 'doomwarrior' in PR kern/34518 2006-09-13 14:45:24 +00:00
martin c6f8d9e1e1 Avoid NULL deref (this is called with lwp=NULL from ppp interrupt context) 2006-09-13 13:28:22 +00:00
mrg 2102e18c4b SMP cleanup. provide support for multiple CPUs in DDB. (SMP itself
is still not working.)

cpu.h:
- add a pointer for DDB regs in SMP environment to struct cpu_info
- remove the #defines for mp_pause_cpus() and mp_resume_cpus()
cpuset.h:
- remove CPUSET_ALL() and rename CPUSET_ALL_BUT() to CPUSET_EXCEPT()
  from petrov.
db_machdep.h:
- rename the members of db_regs_t to be the same as sparc
- change "db_regs_t ddb_regs" to "db_regs_t *ddb_regp" and change
  all references to suit
- redo DDB_REGS to no longer be a pointer to a fixed data structure
  but to one allocated per-cpu when ddb is entered
- move a bunch of prototypes in here
intr.h:
- remove SPARC64_IPI_* macros, no longer used
db_interface.c:
- change "db_regs_t ddb_regs" to "db_regs_t *ddb_regp" and change
  all references to suit
- make "nil" a 64 bit entity
- change the ddb register access methods to work in multiprocessor
  environment, it is now very much like sparc does it
- in kdb_trap() avoid accessing ddb_regp when it is NULL
- update several messages to include the cpu number
- unpause other cpus much later when resuming from ddb
- rename db_lock() to db_lock_cmd(), as the sparc-like code has
  db_lock as a simple lock
- remove "mach cpus" command, and replace it with "mach cpu" (which
  does the same) and also implement "mach cpu N" to switch to
  another cpus saved trapframe
db_trace.c:
- update for the ddb_regs -> ddb_regp change
genassym.cf:
- add TF_KSTACK as offsetof(struct trapframe64, tf_kstack)
ipifuncs.c:
- overhaul extensively
- remove all normal interrupt handlers as IPI's, we now handle
  them all specially in locore.s:interrupt_vector
- add a simplelock around all ipi functions - it's not safe for
  multiple cpus to be sending IPI's to each other right now
- rename sparc64_ipi_pause() to sparc64_ipi_pause_thiscpu() and,
  if DDB is configured, enable it to save the passed-in trapframe
  to a db_regs_t for this cpu's saved DDB registers.
- remove the "ipimask" system (SPARC64_IPI_* macros) and instead
  pass functions directly
- in sparc64_send_ipi() always set the interrupt arguments to 0,
  the address and argument of the to be called function.  (the
  argument right now is the address of ipi_tlb_args variable, and
  part of the reason why only one CPU can send IPI's at a time.)
  don't wait forever for an IPI to complete.  some of this is
  from petrov.
- rename sparc64_ipi_{halt,pause,resume}_cpus() to
  mp_{halt,pause,resume}_cpus()
- new function mp_cpu_is_paused() used to avoid access missing
  saved DDB registers
- actually broadcast the flush in smp_tlb_flush_pte(),
  smp_tlb_flush_ctx() and smp_tlb_flush_all().  the other end may
  not do anything yet in the pte/ctx cases yet...
kgdb_machdep.c:
- rework for changed member names in db_regs_t.
locore.s:
- shave an instruction from syscall_setup() (set + ld -> sethi + ld)
- remove some old dead debug code
- add new sparc64_ipi_halt IPI entry point, it just calls the C
  vector to shutdown.
- add new sparc64_ipi_pause IPI entry point, which just traps into
  the debugger using the normal breakpoint trap.  these cpus usually
  lose the race in db_interface.c:db_suspend_others() and end up
  calling the C vector sparc64_ipi_pause_thiscpu().
- add #if 0'ed code to sparc64_ipi_flush_{pte,ctx}() IPI entry
  points to call the sp_ version of these functions.
- in rft_kernel (return from trap, kernel), check to see if the
  %tpc is at the sparc64_ipi_pause_trap_point and if so, call
  "done" not "retry"
- rework cpu_switch slightly:  save the passed-in lwp instead of
  using the one in curlwp
- in cpu_loadproc(), save the new lwp not the old lwp, to curlwp
- in cpu_initialize(), set %tl to zero as well.  from petrov.
- in cpu_exit(), fix a load register confusion.  from petrov.
- change some "set" in delay branch to "mov".
machdep.c:
- deal with function renames
pmap.c:
- remove a spurious space
trap.c:
- remove unused "trapstats" variable
- add cpu number to a couple of messages
2006-09-13 11:35:53 +00:00
elad bada0c776a Don't use KAUTH_RESULT_* where it's not applicable.
Prompted by yamt@.
2006-09-13 10:07:42 +00:00
gdamore cf407be292 Convert shark and ofppc to new common ofrtc and MI todr code. Tested
on shark.  Ok christos@, martin@.
2006-09-13 07:14:35 +00:00
gdamore 40774842f0 Convert shark to timecounters. Tested by numerous folks, ok christos@,
martin@.
2006-09-13 07:13:03 +00:00
uebayasi 30636ef7d5 Resolve conflict (extern struct devsw devsw[] vs. static struct devsw devsw[]). 2006-09-13 06:47:28 +00:00
gdamore 490f9510c6 Convert macppc to generic todr. ok macallan@. 2006-09-13 03:37:20 +00:00
dyoung 8a6588acaf In secmodel_bsd44_securelevel_system_cb(), compare dev_t dev with
NODEV, not 0, since 0 is a legit value for a dev_t.  Now I can
'mount /dev/wd0a /mnt' again.
2006-09-13 02:35:26 +00:00
christos d5978e20f4 - use c99 initializers
- add missing initializer
2006-09-13 01:01:20 +00:00
christos 1ae1244b82 avoid empty if body. 2006-09-13 00:57:29 +00:00
christos b4c0be5dc8 avoid empty if bodies. 2006-09-13 00:55:57 +00:00
christos e15ade632a Avoid empty if. 2006-09-13 00:54:00 +00:00
christos 46c5717199 avoid empty if body. 2006-09-13 00:52:07 +00:00
christos 6a76f8e0d2 Avoid empty body in if 2006-09-13 00:51:12 +00:00
christos 193447d4bd avoid empty if 2006-09-13 00:49:07 +00:00
christos 71aa807296 use a c99 initializer 2006-09-13 00:48:03 +00:00
christos 86e2f3a519 add missing initializer 2006-09-13 00:47:03 +00:00
gdamore 747bc86364 Comment nit (remove first person), from simon@. 2006-09-12 21:38:55 +00:00
gdamore ba5268f32b Centralize rtc_offset handling for ports that __HAVE_GENERIC_TODR and use
a simple second counter instead of the clock_ymdhms support.
2006-09-12 20:47:39 +00:00
plunky ad28493ad1 guard against a possible situation where the list of l2cap channels is changed
when the bluetooth code is not expecting it to be. During a disconnect, we can
detach the channel that is being disconnected, but its not really safe to detach
any others.
2006-09-12 18:18:01 +00:00
gdamore 39d7c2b083 Convert sequoia led's to getmicrotime() instead
of a hard coded reference to time.  This is necessary to
support timecountering.  Tested by pooka@
2006-09-12 17:50:53 +00:00
gdamore 01beb29b30 ANSIfy & KNF. 2006-09-12 17:07:14 +00:00
gdamore 2a1a021930 Remove attempt to incorrectly support fictional double leap seconds.
While here, make the comparisions for hour, min, and sec use ">" consistently
like the date comparisions.
2006-09-12 15:25:05 +00:00
gdamore 73700aff66 Fix to compile on platforms without __HAVE_GENERIC_TODR. Sorry about
that.  Pointed out jdc@ and he@.
2006-09-12 14:27:17 +00:00
martin 9a3b57af3c We need to call setroot() even if we don't know about the boot device. 2006-09-12 09:51:38 +00:00
elad de7ded0ba3 Fix typo. 2006-09-12 08:23:51 +00:00
elad 0e73c20464 Oops, add forgotten 'if'.
From Geoff Wing, thanks!
2006-09-12 07:51:29 +00:00
gdamore 58af66bd2c Add some optional debug (enabled with TODR_DEBUG) to see what your RTC
is giving you.  Also, while here, bump the threshold for "preposterous"
dates by 20 years.  Now any date earlier than late 1994 is considered
preposterous.
2006-09-12 05:47:47 +00:00
plunky 264c79359e Endian issues:
hci_event.c:
 - Convert memo->response.clock_offset to host-endian.

hci_ioctl.c:
 - printf format tweak (size_t)

hci_link.c:
 - Convert memo->response.clock_offset from host-endian.
 - Tweak a DIAGNOSTIC message.

l2cap_signal.c:
 - In l2cap_recv_config_req(), rp->scid is little-endian so make sure
   we convert from host-endian.

	from scw@
2006-09-11 22:12:39 +00:00
plunky 00d762682c hci_link.c:
- In hci_link_free(), do not unlink items from a LIST queue within
   a LIST_FOREACH() iterator.

rfcomm_session.c:
 - In rfcomm_session_recv_mcc_nsc(), do not unlink items from a LIST
   queue within a LIST_FOREACH() iterator.

	from scw@
2006-09-11 22:08:38 +00:00
plunky 4b5125cac5 btsco.c:
- sco_getopt(..., SO_SCO_MTU, ...) expects the address of a uint16_t,
   not an int. So change sc_mtu's type to uint16_t.
 - Try a little harder to ensure btsco_round_blocksize() does not
   return zero. Prevents a subsequent panic in audio_init_ringbuffer().

	from scw@
2006-09-11 21:59:09 +00:00
rittera 26b97f3a17 Added innitialization to bs in ndis_getstate_80211. It was causing a compiler warning. Pointed out by Kulcsar Ferenc 2006-09-11 21:17:18 +00:00
gdamore 9a6f8be8b3 Don't bother checking wday, that breaks some clock chips. Thank to Kurt Schreiner <ks at ub dot uni-mainz dot de>. 2006-09-11 20:48:55 +00:00
reinoud 2b551264c1 Aparently i've misread, backing out change. 2006-09-11 19:43:55 +00:00
gdamore f475d69b1b ANSIfy and KNF. 2006-09-11 19:14:57 +00:00
plunky ed4d8d47a0 also include service name in dictionary being sent to kernel.
(this is not used just yet, but it might be in the future and it will
be easier if we dont have to provide code to handle its absence)
2006-09-11 18:30:27 +00:00
reinoud 5411355304 Don't add one to the capacity returned of READ CAPACITY! it results in
reporting a sd* disc that is one sector too big (!) Normally not much a
problem in FFS since its clustered but other filingsystems *do* care.
2006-09-11 17:57:07 +00:00
gdamore dcc5a66350 Convert a2kbbc and a3kbbc to newer clock_ymdhms convenience routines in
kern_todr.
2006-09-11 17:18:00 +00:00
gdamore 6cfcc60e81 Convert netwinder and cats (and any other footbridge based system in the
future) to timecounters, using the dc21285_fclk.   ok nick@, chris@.
2006-09-11 15:18:23 +00:00
gdamore 4ee91c0828 Convert next68k to generic-todr and timecounter.
Tested by bouyer@.
2006-09-11 15:07:50 +00:00
nonaka 10179a2cac All supported model is PCLOCK == 33.33MHz 2006-09-11 13:54:14 +00:00
nonaka a7cd4d65eb adapt to new rs5c313 driver. 2006-09-11 13:48:57 +00:00
he d22aa0483f Add now-required includes, and correct newly added kauth call so
that it builds.
2006-09-11 12:06:39 +00:00
he 1a6aaf9a43 Add required includes for kauth. Fix the newly added kauth call
so that it builds.
2006-09-11 11:55:33 +00:00
jld fd184070b3 Convert TSC offset to nanoseconds correctly under Xen3. The hypervisor
appears to dynamically adjust its estimate of the CPU clock speed, and
scaling the TSC as intended is necessary to avoid time anomalies.
2006-09-11 06:57:30 +00:00
gdamore a78ddf8bdc ANSIfy, and KNF fixes. 2006-09-11 06:02:30 +00:00
matt b9525730ee deal with 'bool' definitions 2006-09-11 03:37:12 +00:00
matt ecaf18c847 Add AFLAGS+= ${AOPTS.${.IMPSRC:T}} 2006-09-11 03:12:48 +00:00
matt efc67dee86 Add a way for a user to know what nodes have changed when a node has been
inserted or removed.  Refactor node insertion to not require rebalancing
all the time or a loop if it does.  In rb_tree_swap_prune_and_rebalance,
don't call rb_tree_reparent_nodes, instead do the work ourselves (since
we will eventually undo half of the work of rb_tree_reparent_nodes).
2006-09-10 23:57:31 +00:00
matt 9bed3293b9 If __STDC__ and GNU C >= 3.0, define C99's bool, true, false 2006-09-10 23:49:21 +00:00
gavan 932a44eae6 Enable timecounters for iyonix 2006-09-10 23:15:58 +00:00
gavan 8814e529bd i80321 timecounter support.
Patch from Garrett D'Amore, tested by me.
2006-09-10 23:13:59 +00:00
jld a6927cc636 Re-arm the Xen interval timer in the timer event handler. This fixes
the case of HZ!=100, and might be beneficial otherwise.

The set_timer_op in idle_block remains, to protect against a system_time
miscalculation's causing us to block without the timer set; so, while
there, spl-protect the processed_system_time read and set_timer_op.
2006-09-10 22:25:58 +00:00
gdamore 378f852e66 First pass at enabling a lot of ARM ports to convert swiftly to
__HAVE_GENERIC_TODR.  Just put #define __HAVE_GENERIC_TODR in types.h
if your port uses one of these files.
2006-09-10 22:04:18 +00:00
gdamore 800e6e3df3 Removal of stub clock stuff and convert to use MI routines for timecounter
and todr support.  ok cherry@.
2006-09-10 21:30:14 +00:00
cherry ab7f7a7df7 Re-fit to NetBSD: Try #1 2006-09-10 21:16:56 +00:00
cherry 19dda99daa Root Memory disk nits 2006-09-10 21:07:20 +00:00
plunky af7c47754c add bluetooth support to amd64 port, built by default in GENERIC kernels 2006-09-10 19:50:48 +00:00
plunky 24893ded9a add bluetooth support to sparc64, built by default in GENERIC 2006-09-10 19:49:28 +00:00
gdamore 3ed78c56f7 Enable __HAVE_GENERIC_TODR. ok gavan@ 2006-09-10 19:17:48 +00:00
gdamore b5e819f5d1 Do not supply our own versions of inittodr, etc. if a port declares
__HAVE_GENERIC_TODR.
2006-09-10 18:57:02 +00:00
riz c927ff3953 g/c unused SK_{SET,CLR}BIT macros 2006-09-10 18:39:27 +00:00
gdamore a012c5d7ea Allow for leap seconds. 2006-09-10 16:25:32 +00:00
plunky 4f1cbddc12 update to bluetooth device attachment:
remove pseudo-device btdev(4) and inherent limitations

add bthub(4) which autoconfigures at bluetooth controllers as they
are enabled. bluetooth devices now attach here.

btdevctl(8) and its cache is updated to handle new semantics

etc/rc.d/btdevctl is updated to configure devices from a list
in /etc/bluetooth/btdevctl.conf
2006-09-10 15:45:55 +00:00
bouyer 96c9f80c3d Hypercalls returns negative error codes, so return -error in ioctl
function.
2006-09-10 14:34:11 +00:00
tsutsui e5dc12ca9c Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.
2006-09-10 14:27:38 +00:00
gavan 843ed515f0 dsrtc_settime already takes a volatile struct timeval *, also qualify
with volatile for dsrtc_gettime.
2006-09-10 14:06:54 +00:00
tsutsui aca8f57145 Change dumb DELAY(9) macro into inline version with asm like
other mips ports for gcc4's aggressive optimization.
2006-09-10 11:12:20 +00:00
simonb f4ec8156e1 Add NetBSD RCS tag to top of file. 2006-09-10 11:03:14 +00:00
blymn eee340bffe Prevent a veriexec file from being truncated. 2006-09-10 10:59:44 +00:00
tsutsui 3134621b5b Fix splclock()/splx() mismatch in previous. 2006-09-10 08:09:46 +00:00
tsutsui ca3e00268a - add more sanity checks (from playstation2/clock.c)
- fix a typo
2006-09-10 07:06:48 +00:00
tsutsui 10e0e7415c Remove or comment out now unused code after MI mips3_clockintr migration. 2006-09-10 06:41:09 +00:00
tsutsui c231727267 Fix a typo (settime -> gettime) so that we can get time. 2006-09-10 06:39:00 +00:00
yamt 4d81bcfe21 unexport getnewbuf. 2006-09-10 06:35:42 +00:00
dbj 8bcbd194da make comment match logic in cache_lookup dvp unlock code 2006-09-10 05:51:33 +00:00
manu bdfbd98ac1 When getting the program argument or environement string, we previously
assumed that all the strings were stored in a row, separated by NUL chars,
 at the address pointed bu argv[0] (or envp[0]).

This was wrong: if the program changed argvs[0], we still read the
first string correctly, but the next strings did contain unexpected data.

The fix: read the whole argv (or envp) array, then copy the string one by
one, using their addresses in argv (or agrp)
2006-09-10 05:46:02 +00:00
riz c55d464580 Add msk and mskc. 2006-09-10 02:28:33 +00:00
riz 11d88bbe54 Add msk(4) info to the sk(4) manpage, and install links (from OpenBSD).
Also, add msk to DEVNAMES.
2006-09-09 23:52:27 +00:00
mrg 2012483547 significant clean up effort, largely from petrov@ via martin@.
- fix a bunch of comments for proc->lwp
- remove old TRAPTRACE, NOT_DEBUG, etc. code that has bit-rotted
- put some older DEBUG code under NOT_DEBUG
- add a bunch of new debugging/tracing code ("KTR") that depends on
other changes not yet present.
2006-09-09 22:47:12 +00:00
gdamore 56d0303ea2 Don't forget to call tc_init() to register the timecounter. 2006-09-09 22:40:42 +00:00
gdamore 3b99481ae2 Convert to timecounters. Compile tested only. Ok steve@. 2006-09-09 22:33:13 +00:00
gdamore 06674c98b5 Convet to MI todr. Ok steve@. 2006-09-09 22:28:27 +00:00
gdamore 7020797810 Convert to MI clock_ymdhms versions of todr calls. 2006-09-09 21:10:01 +00:00
tsutsui 79d97d7582 Switch hp300 to timecounter with MC6840 interval timer, which is
used for hardclcok(9). Old code is still left for reference.

XXX: possibly problematic if hardclock(9) is blocked more than 1/HZ,
XXX: but old microtime(9) implementation also had the similar problem.
2006-09-09 19:45:49 +00:00
riz d5e3d70afd Add msk(4), a driver for Marvell Yukon 2 gigabit ethernet chips,
from Mark Kettenis of OpenBSD.  There are still some outstanding
issues with this driver, namely:

 - Checksum offload is unsupported
 - There is a significant amount of code duplication from sk(4)
 - There remain some 'magic numbers'
 - Performance is not heavily tested, and likely to be lower than
   the chip is capable of in some cases.  Syncing some of the
   aforementioned 'magic numbers' with the Marvell FreeBSD driver
   should help here.

Tested on a motherboard with Marvell 88E8053 ethernet, under NetBSD/i386
and NetBSD/amd64.
2006-09-09 16:17:50 +00:00
elad eb92c9c9aa Authorize ntp_adjtime() on the correct scope. 2006-09-09 11:52:56 +00:00
tsutsui c1ba1fb63b Try to make this timecounter ready.
XXX untested since I have no HP-UX binary to test these syscalls
2006-09-09 11:27:19 +00:00
tsutsui 2ef029e9e9 Use microtime(9), rather than copying time directly. 2006-09-09 11:12:53 +00:00
tsutsui 57878c999b time.tv_sec -> time_second 2006-09-09 11:09:48 +00:00
mlelstv a7851eb473 initialize global est_fqlist to NULL in case nothing is found
in est_cpus table.
Don't use a fake table on the stack, est_fqlist points to it
and is used by the sysctl_helper.
2006-09-09 09:39:35 +00:00
tsutsui e6031402c8 volatile void -> void __attribute__((__noreturn__)) to appease gcc4. 2006-09-09 08:27:13 +00:00
matt d9bb545dc5 Shrink rb_tree to 4 pointers (2 if RBSMALL is defined). Move compare
functions to a separate rb_tree_ops structure.  Make every int explicit
in being signed or unsigned.  Use RBDEBUG to enable debug code.  Move
rbt_count to RBSTATS.  Use RBSMALL to not keep track of min/max.
2006-09-09 06:52:18 +00:00
tsutsui 21d899a826 Apply patch from Scott Reynolds in PR port-mac68k/32583
with some tweaks (add a comment and macro):
Handle odd byte case correctly in (ETHER_MIN_LEN-ETHER_CRC_LEN) padding
so that bus_space_set_region_2() won't be called with count==0.
2006-09-09 06:25:08 +00:00
tsutsui 4ab5c21e01 Apply patch in PR port-mac68k/33636 from Dave Huang (with wrapping long lines).
i.e. args in macro should be wrapped with parentheses.
2006-09-09 06:01:48 +00:00
matt 75de26ab17 Add rb_tree_find_node_{geq,leq}. Add stats. Make TAILQ DEBUG only.
Keep track of tree's min/max nodes for easier iteration.  Improve comments.
Move functions around to improve locality.
2006-09-09 05:55:51 +00:00
simonb cec3b712bd Use %p to print a pointer. 2006-09-09 04:12:00 +00:00
simonb 996ce3b799 Fix some cast-qual lossage. 2006-09-09 04:11:43 +00:00
simonb 30151b7fc1 Fix a white-space nit. 2006-09-09 04:01:37 +00:00
simonb 65d14d5f62 Add ath@pci.
Bump SYMTAB_SPACE.
2006-09-09 04:00:24 +00:00
simonb 1592ce0c68 Move the "reseting board..." printf to before the first code that can
reset a board.
2006-09-09 03:58:46 +00:00
tsutsui 5319672b12 Remove %fp and %a6 from a clobber description in __asm() statement.
It shouldn't be clobbered and there is nothing for compiler to do
in that case anyway as gcc4 complains.
2006-09-09 03:51:04 +00:00
dogcow 3601de35ef correct placement of '#ifdef's. 2006-09-09 03:32:17 +00:00
tsutsui b2cb5b0241 G/c now unused #includes. 2006-09-09 03:18:00 +00:00
tsutsui db93638de2 Switch news68k to timecounters. From gdamore on port-news68k. 2006-09-09 03:14:18 +00:00
gdamore 17d511c8a9 Convert arc to timecounters, using common mips3 timecounters. We have not
converted the platform to use the MIPS3 cp0 for the hardclock interrupt yet,
but that should be done as well.  In the meantime, there are no functional
changes.
2006-09-09 00:47:54 +00:00
gdamore 17d8d811d5 Add <machine/locore.h>, used by some other common MIPS code. 2006-09-09 00:46:08 +00:00
gdamore 780822fb96 whitespace fix. 2006-09-09 00:14:46 +00:00
gdamore 8639b95c43 Convert code to pick remove pasteware, picking up common implementations of
delay, mips3_init_tc, etc.
2006-09-09 00:14:27 +00:00
gdamore bf6fc8ef63 Various improvements to make the common mips3 clock handling more generally
useful.  The functions delay, cpu_initclocks, and setstatclcokrate have been
renamed to mips3_delay, mips3_initclocks, and mips3_setstatclockrate.

We provide weak aliases for the original names, so machdep code doesn't have
to provide wrapper routines.  (Giving good performance.)

I've moved mips3_clockintr, mips3_initclocks, and mips3_setstatclockrate to
their own mips3_clockintr file, because some ports may not be able to use
these, and its senseless to carry that baggage.
2006-09-08 23:39:27 +00:00
mrg fc3c59182c make this idempotent. 2006-09-08 23:08:05 +00:00
gdamore cc68dbd9e5 Rename init_mips3_tc to mips3_init_tc() for consistency, and make it
extern.
2006-09-08 22:14:14 +00:00
elad c2ea23c509 Add __KERNEL_RCSID(), requested by and okay xtraeme@. 2006-09-08 21:57:38 +00:00
elad 5f7169ccb1 First take at security model abstraction.
- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)
2006-09-08 20:58:56 +00:00
he 05fe6cd270 Provide ELF64_MACHDEP_ID_CASES and ELF64_MACHDEP_ENDIANNESS patterned
after the other 32-bit ports, so that the arm ports can build
usr.sbin/lockstat/.
2006-09-08 19:09:19 +00:00
tsutsui d7bf7d40db Remove last_clock_intr since it is only used for microtime(9). 2006-09-08 17:04:17 +00:00
martin e9814256e8 Print the correct UPA id for non-boot CPUs 2006-09-08 15:40:45 +00:00
blymn 6395103101 * Correct hashing macro so it uses FHANDLE_SIZE()
* Stop fhandle memory leaks and use the correct fhandle dealloc routine
  (thanks to Elad for these fixes)
* Remove include of kmem.h, it is not required.
2006-09-08 13:57:38 +00:00
tsutsui 4e1adf90bc Switch ews4800mips to a MIPS3 cp0 based timecounter. From gdamore
on port-ews4800mips.

XXX: ews4800mips can't use mips/mips/mips3_clock.c for now because
     it isn't configured to use internal clock interrupt for CPU INT 5,
     i.e. mips3_clockintr() is not needed and its own cpu_initclocks(9)
     is required.
2006-09-08 13:48:11 +00:00
manu 9f294e2262 When colecting a 32 bit process' argument or environement vector, we need
to convert 32 bits pointers to the 64 bit environement
2006-09-08 11:59:52 +00:00
xtraeme f286b0fde2 - Match CPUs with cpuid signature 0x6a0, they have a different
signature in the PST block but fid/vid match.
- Remove useless comments.
- Sync informative messages with est.c.
2006-09-08 09:55:13 +00:00
uebayasi c1a02ec4d9 Typo. 2006-09-08 06:38:55 +00:00
matt 958730091e Fix and simplify node removal. Add lots of assertions and comments. 2006-09-08 04:07:15 +00:00
reinoud 25522cfb86 Oeps! I overlooked the size argument of the SCSI call. It ought to be equal
to the number of bytes we are reading: READ_DISCINFO_BIGSIZE

sorry.
2006-09-08 00:33:18 +00:00
reinoud a5b62cb444 The size of struct scsipi_read_discinfo_data is not even due to the data[1]
pseudo array in the structure. The scsi command issued used
sizeof(scsipi_read_discinfo_data) but included thus the last byte that
wasn't going to be inspected anyway. Using the constant
READ_DISCINFO_BIGSIZE fixes the bug.

Even though SCSI adapters *should* accept odd lengths, the Sun U10
(sparc64's) crashes in bus_space_read_multi_stream_2(). That explains the
crash.

NOTE: somewhere in NetBSD/sparc64's atapibus support there is the
assumption on the even size; this needs to be fixed! (Hi Sparc64 portmaster
:-) )
2006-09-07 22:52:46 +00:00
xtraeme bdcb6691e9 - Fix Pentium M 770 table. I don't know why did work before but
the values were not correct... tested by seb@.
- Remove binary bits from struct fqlist members, why do we need them?
2006-09-07 22:50:50 +00:00
riz bc22f236a4 Regen. 2006-09-07 21:17:32 +00:00