summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add SmartLink 5634PCV SurfRidersanpei2001-05-202-0/+2
| | | | | PR: kern/26952 Submitted by: Simon Dick <simond@irrelevant.org>
* Fix a range checking bug in ng_int32_parse which affected 64-bitjdp2001-05-191-4/+5
| | | | | | | | | | | | | | | | | | | | | machines. The code formerly read: long val; if (val < (long)-0x80000000 || ...) return EINVAL; The constant 0x80000000 has type unsigned int. The unary `-' operator does not change the type (or the value, in this case). Therefore the promotion to long is done by 0-extension, giving 0x0000000080000000 instead of the desired 0xffffffff80000000. I got rid of the `-' and changed the cast to (int32_t) to give proper sign-extension on all architectures and to better reflect the fact that we are range-checking a 32-bit value. This commit also makes the analogous changes to ng_int{8,16}_parse for consistency. MFC after: 3 days
* Must ensure that all the entries on the pd_pendinghd list have beenmckusick2001-05-191-3/+11
| | | | | | | | | | | | | | committed to disk before clearing them. More specifically, when free_newdirblk is called, we know that the inode claims the new directory block. However, if the associated pagedep is still linked onto the directory buffer dependency chain, then some of the entries on the pd_pendinghd list may not be committed to disk yet. In this case, we will simply note that the inode claims the block and let the pd_pendinghd list be processed when the pagedep is next written. If the pagedep is no longer on the buffer dependency chain, then all the entries on the pd_pending list are committed to disk and we can free them in free_newdirblk. This corrects a window of vulnerability introduced in the code added in version 1.95.
* #include <digi/*.h> -> #include <dev/digi/*.h>brian2001-05-193-9/+9
| | | | Suggested by: bde
* Fairwell digiio.h (moved to src/sys/sys)brian2001-05-191-61/+0
|
* digiio.h has moved to /usr/include/sysbrian2001-05-194-8/+8
|
* Add back the plain i82365 to the list of bridges that do specialimp2001-05-191-0/+1
| | | | | | | | | things to get 3.3V. It appears that some cardbus chipsets have id registers that say they are C step parts, but they really support the DF step 3.3V functionality. # Need to verify that IBM KING is handled properly since the MISC1 # register is really a cirrus logic only register.
* Initialize cinfo structure at compile time rather than run time sinceimp2001-05-192-34/+29
| | | | they are now constant.
* slots and next haven't been used in a while. GC them.imp2001-05-191-6/+0
|
* Add new 'loadavg' entry, fix overflow with meminfo.jlemon2001-05-194-16/+84
| | | | | PR: 27253, 27350 Submitted by: Jim Pirzyk
* Now that we've moved the mecia support out of pcic.c to its ownimp2001-05-191-12/+12
| | | | | driver, we no longer need to go through the cinfo.XXXX indirections. restore the direct calls that were replaced earlier.
* Use new kernel_sysctlbyname function. Remove private copy.jlemon2001-05-193-22/+2
|
* Add convenience function kernel_sysctlbyname() for kernel consumers,jlemon2001-05-192-1/+27
| | | | so they don't have to roll their own sysctlbyname function.
* Move ISA specific code into pcic_isa. This is the probe routine, theimp2001-05-193-262/+255
| | | | | get/setb1 routines. Also expose clrb and setb as pcic_{clrb,setb} so we can use it from the probe. pcic_probe is no longer needed.
* It turns out that Intel's i82365sl-DF step has the same ID as the VLSIimp2001-05-192-31/+62
| | | | | | | | | | | | | | | | | | | | | | | | | 82C146. The Intel i82365SL-DF supports 3.3V cards. The Step A/B/C parts do not appear to support this. This is hard to know for sure since it was deduced from "compatible" parts' data sheets and the article mentioned below. Rework the VLSI detection to be a little nicer and not depend on scanning cards twice. This would allow bad VLSI cards to coexist with a good intel card, for example. We now detect i82365SL-DF cards where before we'd detect a VLSI. For the most part, this is good, but we run a small chance of detecting a single slot 82C146 as a i82365SL-DF. Since I can't find a datasheet for the 82c146, I don't know if this is a problem or not. This work is based on an excellent article, in Japanese, by NAKAGAWA, Yoshihisa-san that appeared in FreeBSD Press Number 4. He provided a patch against PAO3 in his article. Since the pcic.c code has changed some since then, I've gone ahead and cleaned up his patch somewhat and changed how the code detects the buggy '146 cards. I also removed the comment asking if there were other cards that matched the 82C146 since we found one and additional information isn't necessary.
* remove my private assertions from tsleep.alfred2001-05-191-7/+2
| | | | add one assertion to ensure we don't sleep while holding vm.
* Regen syscalls that were made mpsafe via vm_mtxalfred2001-05-196-23/+23
| | | | | | obreak, getpagesize, sbrk, sstk, mmap, ovadvise, munmap, mprotect, madvise, mincore, mmap, mlock, munlock, minherit, msync, mlockall, munlockall
* Introduce a global lock for the vm subsystem (vm_mtx).alfred2001-05-1991-253/+1149
| | | | | | | | | | | | | | | | | | | vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
* Must be a bit less aggressive about freeing pagedep structures.mckusick2001-05-181-1/+1
| | | | | Obtained from: Robert Watson <rwatson@FreeBSD.org> and Matthew Jacob <mjacob@feral.com>
* Add a new ioctl to syscons, CONS_SCRSHOT. Given a userland buffer, itnik2001-05-182-0/+28
| | | | | | | | | | | copies out the current contents of the video buffer for a syscons terminal, providing a snapshot of the text and attributes. Based heavily on work originally submitted by Joel Holveck <joelh@gnu.org> for 2.2.x almost 30 months ago, which I cleaned up a little, and forward ported to -current. See also the usr.bin/scrshot utility.
* Currently there is no way to tell if write operation invoked viabp2001-05-182-2/+2
| | | | | | | vn_start_write() on the given vnode will be successful. VOP_LEASE() may help to solve this problem, but its return value ignored nearly everywhere. For now just assume that the missing upper layer on write means insufficient access rights (which is correct for most cases).
* Make _BSD_TIME_T_ (time_t) an `int' rather than `long'. This will helpobrien2001-05-183-3/+3
| | | | | | | flag errors where programmers assume time_t is a long, which it is not on 64-bit platforms. Submitted by: bde
* Style changes -- revert ordering to mostly two revs ago.obrien2001-05-185-291/+293
| | | | | | Embellish some comments, fix tab'ing. Requested by: bde
* - Use a timeout for the tsleep in scheduler() instead of having vmmeter()jhb2001-05-182-5/+22
| | | | | | | | | | | | | | | wakeup proc0 by hand to enforce the timeout. - When swapping out a process, keep the process locked via the proc lock from the first checks up until we clear PS_INMEM and set PS_SWAPPING in swapout(). The swapout() function now must be called with the proc lock held and releases it before returning. - Comment out the code to attempt to lock a process' VM structures before swapping out. It is broken in that it releases the lock after obtaining it. If it does grab the lock, it needs to hand it off to swapout() instead of releasing it. This can be revisisted when the VM is locked as this is a valid test to perform. It also causes a lock order reversal for the time being, which is the immediate cause for temporarily disabling it.
* Add workaround for embedded NICs, in particular, the 815E boards.jlemon2001-05-172-17/+44
| | | | | There appears to be a bug where the chip will lock up when running in 10Mb/s mode.
* During the code to pick a process to kill when memory is exhausted, keepjhb2001-05-171-3/+18
| | | | | | | the process in question locked as soon as we find it and determine it to be eligible until we actually kill it. To avoid deadlock, we don't block on the process lock but skip any process that is already locked during our search.
* - Don't panic on a try lock operation for a sleep lock if we hold a spinjhb2001-05-171-2/+6
| | | | | | | lock. Since we won't actually block on a try lock operation, it's not a problem. Add a comment explaining why it is safe to skip lock order checking with try locks. - Remove the ithread list lock spin lock from the order list.
* - Remove the global ithread_list_lock spin lock in favor of per-ithreadjhb2001-05-172-37/+34
| | | | | | | | | | | | sleep locks. - Delay returning from ithread_remove_handler() until we are certain that the interrupt handler being removed has in fact been removed from the ithread. - XXX: There is still a problem in that nothing protects the kernel from adding a new handler while the ithread is running, though with our current architectures this is not a problem. Requested by: gibbs (2)
* - Move the setting of bootverbose to a MI SI_SUB_TUNABLES SYSINIT.jhb2001-05-175-19/+15
| | | | | | | | - Attach a writable sysctl to bootverbose (debug.bootverbose) so it can be toggled after boot. - Move the printf of the version string to a SI_SUB_COPYRIGHT SYSINIT just afer the display of the copyright message instead of doing it by hand in three MD places.
* Use NHWI instead of APIC_IMEN_BITS.jhb2001-05-171-1/+1
|
* - Axe the IMEN_BITS and APIC_IMEN_BITS constants.jhb2001-05-172-8/+6
| | | | | | - Add back in a definition of NHWI which is preferred over ICU_LEN. Submitted by: bde
* Primary purpose of this commit is to enable support for the Aviatordmlb2001-05-174-300/+715
| | | | | | | | | | | | | | | | | | | | | | Pro and Raylink cards with version 5 firmware. Only infra-structure mode has been tested. Specific changes for this feature are: o Add RFC1042 encapsulation of IP datagrams o Add authentication and association o Decode of the beacon (although not used) Other changes have been made: o Pass command completion status to *_done (in place for adding proper error recovery) o Move a couple of state variables into the current network parameters structure. This is in prep. for dealing with roaming. MFC after: 1 week
* Disable the wi driver locking for now. The driver tries to tsleep with thejhb2001-05-171-2/+2
| | | | driver lock held on detach which can lead to annoying and useless panics.
* o Modify access control checks in p_candebug() such that the policy is asrwatson2001-05-171-3/+3
| | | | | | | | | | | | follows: the effective uid of p1 (subject) must equal the real, saved, and effective uids of p2 (object), p2 must not have undergone a credential downgrade. A subject with appropriate privilege may override these protections. In the future, we will extend these checks to require that p1 effective group membership must be a superset of p2 effective group membership. Obtained from: TrustedBSD Project
* Add a couple more codes for upcoming raylink driver additions.dmlb2001-05-171-9/+70
| | | | MFC after: 3 days
* Cleanupalfred2001-05-171-54/+50
| | | | | | | | | | | | | | | | | | | | | Remove comment about setting error for reads on EOF, read returns 0 on EOF so the code should be ok. Remove non-effective priority boost, PRIO+1 doesn't do anything (according to McKusick), if a real priority boost is needed it should have been +4. Style fixes: .) return foo -> return (foo) .) FLAG1|FlAG2 -> FLAG1 | FlAG2 .) wrap long lines .) unwrap short lines .) for(i=0;i=foo;i++) -> for (i = 0; i=foo; i++) .) remove braces for some conditionals with a single statement .) fix continuation lines. md5 couldn't verify the binary because some code had to be shuffled around to address the style issues.
* initialize pipe pointersalfred2001-05-171-0/+1
|
* pipe_create has to zero out the select record earlier to avoidalfred2001-05-171-1/+1
| | | | | | | returning a half-initialized pipe and causing pipeclose() to follow a junk pointer. Discovered by: "Nick S" <snicko@noid.org>
* Cosmetics to rev.1.89: removed argument names in a function prototype.ru2001-05-171-1/+1
|
* Backed out rev.1.8. Rev.1.8 was just to support a bogus unused includebde2001-05-171-2/+1
| | | | in ng_tty.c.
* Update to use the changed ioctl interface.sos2001-05-171-45/+42
|
* Change the ioctl interface to prepare for new functionality.sos2001-05-171-45/+50
|
* When a new block is allocated to a directory, an fsync of a filemckusick2001-05-174-39/+242
| | | | | | | | | | | | | whose name is within that block must ensure not only that the block containing the file name has been written, but also that the on-disk directory inode references that block. When a new directory block is created, we allocate a newdirblk structure which is linked to the associated allocdirect (on its ad_newdirblk list). When the allocdirect has been satisfied, the newdirblk structure is moved to the inodedep id_bufwait list of its directory to await the inode being written. When the inode is written, the directory entries are fully committed and can be deleted from their pagedep->id_pendinghd and inodedep->id_pendinghd lists.
* VOP getwritemount() can be invoked on vnodes with VFREE flag set (used inbp2001-05-172-8/+24
| | | | snapshots code). At this point upper vp may not exist.
* Use vop_*vobject() VOPs to get reference to VM object from upper or lower fs.bp2001-05-176-120/+120
|
* Do not leave an extra reference on vnode.bp2001-05-172-12/+4
| | | | | | PR: kern/27250 Submitted by: "Vladimir B. Grebenschikov" <vova@express.ru> MFC after: 2 weeks
* Allocate more memory if necessary.dcs2001-05-171-0/+3
|
* digiModel_t -> enum digi_modelbrian2001-05-174-18/+8
| | | | Remove a forgotton and unused structure.
* Consistently define the rune types.obrien2001-05-165-17/+86
| | | | Follow NetBSD's lead and add a _BSD_MBSTATE_T_ type.
* Move the int typedefs to the top so they can be used in defining other types.obrien2001-05-165-116/+126
| | | | | | Ensure every platform has __offsetof. Make multiple inclusion detection consistent with other <platform>/include/*.h files.
OpenPOWER on IntegriCloud