summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Sort includes.jhb2001-05-217-7/+7
|
* - Assert that the vm mutex is held in pipe_free_kmem().jhb2001-05-211-1/+6
| | | | | | | | - Don't release the vm mutex early in pipespace() but instead hold it across vm_object_deallocate() if vm_map_find() returns an error and across pipe_free_kmem() if vm_map_find() succeeds. - Add a XXX above a zfree() since zalloc already has its own locking, one would hope that zfree() wouldn't need the vm lock.
* Axe unneeded spl()'s.jhb2001-05-213-10/+1
|
* syslog.h fails to compile with -Wwrite-stringsphk2001-05-211-2/+2
| | | | | PR: 27492 Submitted by: Alexey V. Neyman <avn@any.ru>
* Change pmap_emulate_reference() so that it only touches the vm_pagegallatin2001-05-211-1/+9
| | | | | | | | | flags if it is safe to do so, otherwise it will just alter the pmap state (eg, clear the appropriate PG_FOx bits). This gets alpha booting in the face of the vm_mtx introduction. Reviewed by: dfr
* catch these files up to their i386 neighbors to make alpha bootgallatin2001-05-215-20/+60
| | | | prior to the vm_mtx
* Update pc98 memory probe functions.nyan2001-05-214-572/+82
| | | | | | | | - pc98_getmemsize() function returns available memory size under 16MB. - getmemsize() function is merged from PC-AT's one. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) and NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp>
* Merged from sys/i386/isa/npx.c revisions 1.99 and 1.100.nyan2001-05-211-74/+29
|
* Merged from sys/i386/i386/machdep.c revisions 1.452 and 1.453.nyan2001-05-212-24/+24
|
* Merged from sys/boot/i386/btx/btx/btx.s revision 1.24.nyan2001-05-212-8/+8
|
* Submitted by: Juha-Matti Liukkonen, Cubical Solutions Ltd (jml@cubical.fi)hm2001-05-211-4/+4
| | | | | | | | | | | Reviewed by: hm Bug in i4btel driver read routine corrected. The conditions in the while() clause caused the receive queue to be referenced before checking if a channel is connected, leading to kernel panic (do a 'dd if=/dev/i4btel0 of=/dev/null' on an unconnected tel device, panic will follow). Correction was to reorder the while clause conditions to check for connectedness first.
* Move allocation of ExCA registers from the base driver into the busimp2001-05-213-34/+17
| | | | attachment code.
* Move setting of Vcc bit to before the vcc switch statement. Theimp2001-05-211-7/+5
| | | | | datasheets I have seem to indicate that generally this bit is viewed as a toggle. Correct comments to match code.
* Next step on the road to pci: power taming.imp2001-05-214-84/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work through the various power commands and convert them from a "is this a foo controller or a foo' controller or a foo''' controller" to a cabability based scheme. We have bits in the softc that tell us what kind of power control scheme the controller uses, rather than relying on being able to enumerate them all. Cardbus bridges are numerous, but nearly all implement the i82365sl-DF scheme (well, a few implement cirrus CL-PD67xx, but those were made by Cirrus Logic!). Add a pointer back to the softc in each pcic_slot so we can access these flags. Add comments that talk about the issues here. Also note in passing that there are two differ Vpp schemes in use and that we may need to adjust the code to deal with both of them. Note why it usually works now. We have 5 power management modes right now: KING, AB, DF, PD and VG. AB is for the i82365 stpes A, B and C. DF is for step DF. PD is the cirrus logic extensions for 3.3V while VG is the VADEM extensions for 3.3V. KING is for the IBM KING controller found on some old cards. # I'm looking for one of those old cards or a laptop that has the KING # bridge in it. We have to still cheat and treat the AB parts like the DF parts because pci isn't here yet. As far as I can tell, this is harmless for actual old parts and necessary to work with 3.3V cards in some laptops. This almost eliminates all tests for controller in the code. There are still a few unrelated to power that need taming as well.
* Next step towards pcic_pci: the ability to allocate mapped memory in attach.imp2001-05-213-11/+72
| | | | | | | | | | | | | | | | | | | o Introduce flags word to the softc. This will be used to control various aspects of the driver. Right now there are two bits defined, PCIC_IO_MAPPED and PCIC_MEM_MAPPED. One for ISA cards that are I/O mapped, the other is for PCI cards that are memory mapped. Only the ISA side is implemented with this commit. o Introduce a pcic_dealloc which will cleanly dealloc resources used. Right now it is only supported when called from probe/attach. o Keep track of resources allocated in the pcic_softc. o move pcictimeout_ch to the softc so we can support multiple devices in polling mode. o In ISA probe, set PCIC_IO_MAPPED. o Introduce and compute the slot mask. This will be used later when we expand the number of slots on ISA from 2 to 4. In such a case, we appear to have to use polling mode otherwise we get two different cards trying to drive the same interrupt line. I don't have hardware to test this configuration, so I'll stop here.
* Add description for 82801BA controller.kuriyama2001-05-212-0/+32
| | | | MFC after: 1 week
* Two comments and one bug fix:imp2001-05-212-3/+15
| | | | | | | | | | o Add defines for the VS[12]# bits in register 0x16. o Add comment about what we're doing reading register 0x16 (PCIC_CDGC) in the DF case. o Check bit VS1# rather than a random bit I was checking due to a bogus transcrition on my part from nakagawa-san's article. o Add note about IBM KING and 3.3V operation from information larned from wildboard.
* Aquire vm mutex when releasing sysv shm segments.alfred2001-05-201-0/+4
| | | | Obtained from: Dima Dorfman <dima@unixfreak.org>
* Throw away the complications in npxsave() and their infrastructure.bde2001-05-203-159/+69
| | | | | | | | | | | | npxsave() went to great lengths to excecute fnsave with interrupts enabled in case executing it froze the CPU. This case can't happen, at least for Intel CPU/NPX's. Spurious IRQ13's don't imply spurious freezes. Anyway, the complications were usually no-ops because IRQ13 is not used on i486's and newer CPUs, and because SMPng broke them in rev.1.84. Forcible enabling of interrupts was changed to write_eflags(old_eflags), but since SMPng usually calls npxsave() from cpu_switch() with interrupts disabled, write_eflags() usually just kept interrupts disabled.
* Use a critical region to protect almost everything in npxinit().bde2001-05-203-0/+18
| | | | | | | | | | | npxinit() didn't have the usual race because it doesn't save to curpcb, but it may have had a worse form of it since it uses the npx when it doesn't "own" it. I'm not sure if locking prevented this. npxinit() is normally caled with the proc lock but not sched_lock. Use a critical region to protect pushing of curproc's npx state to curpcb in npxexit(). Not doing so was harmless since it at worst saved a wrong state to a dieing pcb.
* Use a critical region to protect pushing of curproc's npx state tobde2001-05-201-1/+4
| | | | | curpcb in vm86_bioscall(). I don't know if the state is ever in the npx at that point.
* Use a critical region to protect saving of the npx state in savectx().bde2001-05-203-3/+12
| | | | | | | | Not doing this was fairly harmless because savectx() is only called for panic dumps and the bug could at worse reset the state. savectx() is still missing saving of (volatile) debug registers, and still isn't called for core dumps.
* fix vm_mtx related compiler warninggallatin2001-05-201-0/+1
|
* fix alpha-MD compile errors after the vm_mtx commitgallatin2001-05-2011-0/+11
|
* Update softdep_setup_directory_add prototype to reflect changes inmckusick2001-05-201-2/+3
| | | | | | actual function. Obtained from: Jim Bloom <bloom@jbloom.jbloom.org>
* Plug memoly leak in overlaps fragment cases.sumikawa2001-05-201-0/+6
| | | | Obtained from: KAME
* 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.
OpenPOWER on IntegriCloud