summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
Commit message (Collapse)AuthorAgeFilesLines
...
* oszsigcode -> szosigcodemarcel1999-12-042-2/+2
| | | | Pointed out by: bde
* Fix type of sf_addr.marcel1999-12-041-2/+2
| | | | Pointed out by: bde
* Moved scheduling-related code to kern_synch.c so that it is easier to fixbde1999-11-271-8/+1
| | | | | | | | and extend. The new function containing the code is named schedclock() as in NetBSD, but it has slightly different semantics (it already handles incrementation of p->p_cpticks, and it should handle any calling frequency). Agreed with in principle by: dufault
* Update the WaveLAN/IEEE driver:wpaul1999-11-251-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Convert to new bus attachment scheme. Thanks to Blaz Zupan for doing the initial work here. One thing I changed was to have the attach and detach routines work like the PCI drivers, which means that in theory you should be able to load and unload the driver like the PCI NIC drivers, however the pccard support for this hasn't settled down yet so it doesn't quite work. Once the pccard work is done, I'll have to revisit this. - Add device wi0 to PCCARD. If we're lucky, people should be able to install via their WaveLAN cards now. - Add support for signal strength caching. The wicontrol utility has also been updated to allow zeroing and displaying the signal strength cache. - Add a /sys/modules/wi directory and fix a Makefile to builf if_wi.ko. Currently this module is only built for the i386 platform, though once the pccard stuff is done it should be able to work on the alpha too. (Theoretically you should be able to plug one of the WaveLAN/IEEE ISA cards into an alpha with an ISA slot, but we'll see how that turns out. - Update LINT to use only device wi0. There is no true ISA version of the WaveLAN/IEEE so we'll never use an ISA attachment. - Update files.i386 so that if_wi is dependent on card.
* Optimize two cases in the MP locking code. First, it is not necessarydillon1999-11-191-3/+2
| | | | | | | | | | | | | | | to use a locked cmpexg when unlocking a lock that we already hold, since nobody else can touch the lock while we hold it. Second, it is not necessary to use a locked cmpexg when locking a lock that we already hold, for the same reason. These changes will allow MP locks to be used recursively without impacting performance. Modify two procedures that are called only by assembly and are already NOPROF entries to pass a critical argument in %edx instead of on the stack, removing a significant amount of code from the critical path as a consequence. Reviewed by: Alfred Perlstein <bright@wintelcom.net>, Peter Wemm <peter@netplex.com.au>
* Optimize two cases in the MP locking code. First, it is not necessarydillon1999-11-193-0/+4
| | | | | | | | | | | | | | | to use a locked cmpexg when unlocking a lock that we already hold, since nobody else can touch the lock while we hold it. Second, it is not necessary to use a locked cmpexg when locking a lock that we already hold, for the same reason. These changes will allow MP locks to be used recursively without impacting performance. Modify two procedures that are called only by assembly and are already NOPROF entries to pass a critical argument in %edx instead of on the stack, removing a significant amount of code from the critical path as a consequence. Reviewed by: Alfred Perlstein <bright@wintelcom.net>, Peter Wemm <peter@netplex.com.au>
* Segment registers can be read(write) to(from) memory locations as well asluoqi1999-11-151-4/+4
| | | | general registers.
* Fix clobbers so that GENERIC may compile with GCC 2.95.2.obrien1999-11-144-332/+336
| | | | | | | | | | | | | | | | | | | | Historically, the documentation of extended asm was lacking, namely you should NOT specify the same register as an input, and a clobber. If the register is clobbered, it should be specified as an output as well, e.g., by linking input and output through the "number" notation. (Beware of lvalues, some local variables needed...) URL:http://egcs.cygnus.com/faq.html In versions up to egcs-1.1.1, the compiler did not even warn about it, but it was liable to output bad code. Newer egcs are pickier and simply refuse to swallow such code. Note, since *addr changes, it needs to be an output operand. We might be excessive in saying that all memory has changed. Obtained from: OpenBSD w/extra thanks to Marc Espie <Marc.Espie@liafa.jussieu.fr>
* Reserve space for FPU state in struct sigcontext. Fix some style bugsmarcel1999-11-121-11/+18
| | | | | | and comments while there. Submitted by: bde
* Change the type of sf_addr in struct {o}sigframe from char* tomarcel1999-11-121-8/+9
| | | | | | | | register_t. Fix some style bugs and bitrotted comments. Submitted by: bde
* i8254_restore is called from apm_default_resume() to reloadiwasaki1999-10-301-0/+1
| | | | | | | | | | | | the countdown register. this should not be necessary but there are broken laptops that do not restore the countdown register on resume. when it happnes, it messes up the hardclock interval and system clock, which leads to the infamous "calcru: negative time" problem. Submitted by: kjc, iwasaki Reviewed by: Steve O'Hara-Smith <steveo@eircom.net> and committers. Obtained from: PAO3
* Eliminate remaining part of incorrect PCI bus numbering sanity check on ↵tegge1999-10-151-7/+0
| | | | systems with more than one PCI bus.
* * Implement bus_set/get/delete_resource for pci.dfr1999-10-141-2/+1
| | | | | | | * Change the hack used on the alpha for mapping devices into DENSE or BWX memory spaces to a simpler one. Its still a hack and should be a seperate api to explicitly map the resource. * Add $FreeBSD$ as necessary.
* Add a per-signal flag to mark handlers registered with osigaction, so weluoqi1999-10-113-4/+2
| | | | | | | | | | | | | | | can provide the correct context to each signal handler. Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK as we did before the linuxthreads support merge (submitted by bde). Move ps_sigstk from to p_sigacts to the main proc structure since signal stack should not be shared among threads. Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag. Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag. Reviewed by: marcel, jdp, bde
* Zap unneeded #includespeter1999-10-111-2/+0
| | | | Submitted by: phk
* Simplification of the signal trampoline and other cleanups.marcel1999-10-073-4/+21
| | | | | | | | | | | | | | | o Remove unused defines from genassym.c that were needed by the trampoline. o Add load_gs_param function to support.s that catches a fault when %gs is loaded with an invalid descriptor. The function returns EFAULT in that case. o Remove struct trapframe from mcontext_t and replace it with the list of registers. o Modify sendsig and sigreturn accordingly. This commit contains a patch by bde. Reviewed by: luoqi, jdp
* Re-introduction of sigcontext.marcel1999-10-042-29/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | struct sigcontext and ucontext_t/mcontext_t are defined in such a way that both (ie struct sigcontext and ucontext_t) can be passed on to sigreturn. The signal handler is still given a ucontext_t for maximum flexibility. For backward compatibility sigreturn restores the state for the alternate signal stack from sigcontext.sc_onstack and not from ucontext_t.uc_stack. A good way to determine which value the application has set and thus which value to use, is still open for discussion. NOTE: This change should only affect those binaries that use sigcontext and/or ucontext_t. In the source tree itself this is only doscmd. Recompilation is required for those applications. This commit also fixes a lot of style bugs without hopefully adding new ones. NOTE: struct sigaltstack.ss_size now has type size_t again. For some reason I changed that into unsigned int. Parts submitted by: bde sigaltstack bug found by: bde
* Use the rev 1.1.2.1 code from RELENG_3 for atomic operations ratherpeter1999-10-041-19/+38
| | | | than the non-atomic C macros.
* Typo: s/__GNUC_MINOR_/__GNUC_MINOR__/peter1999-10-041-1/+1
| | | | (__GNUC_MINOR__ on egcs in -current is "91" and is going to be "95" soon)
* Fix style bug: order includesmarcel1999-10-041-1/+1
| | | | Submitted by: bde
* Allow compilation with older versions of GCC, in order to make it possibleeivind1999-10-031-0/+23
| | | | to bootstrap and work with -current from older versions of FreeBSD.
* Fix style bugs caused by using the wrong file to copy from. That onemarcel1999-10-031-4/+12
| | | | | | | gets fixed later on. Reinstate the mysterious 4th argument to signal handlers and add some comments on that.
* sigset_t change (part 3 of 5)marcel1999-09-296-66/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- By introducing a new sigframe so that the signal handler operates on the new siginfo_t and on ucontext_t instead of sigcontext, we now need two version of sendsig and sigreturn. A flag in struct proc determines whether the process expects an old sigframe or a new sigframe. The signal trampoline handles which sigreturn to call. It does this by testing for a magic cookie in the frame. The alpha uses osigreturn to implement longjmp. This means that osigreturn is not only used for compatibility with existing binaries. To handle the new sigset_t, setjmp saves it in sc_reserved (see NOTE). the struct sigframe has been moved from frame.h to sigframe.h to handle the complex header dependencies that was caused by the new sigframe. NOTE: For the i386, the size of jmp_buf has been increased to hold the new sigset_t. On the alpha this has been prevented by using sc_reserved in sigcontext.
* Fix from Tor so that if we enter the debugger in the tristate going tomjacob1999-09-251-0/+1
| | | | | | SMP (other CPUs stopped but SMP mode not really started). Obtained from:Tor.Egge@fast.no
* Back out a portion of the last commit. DFLTPHYS and MAXPHYS cannotdillon1999-09-221-4/+0
| | | | | | | | | be set by a kernel conf option due to the struct buf structural dependancy (sizing of b_pages[]) creating a conflict with modules (which are not compiled with kernel config options overrides). We'll be able to sysctl these two later on when the buffer subsystem is revamped.
* Change default block size for user VBLK device access from 2K to PAGE_SIZEdillon1999-09-221-1/+7
| | | | | | (4K on an i386, 8K on an alpha). Make BLKDEV_IOSIZE, DFLTPHYS, and MAXPHYS kernel-configurable.
* Make pmap_mapdev() deal with non-page-aligned requests.peter1999-09-111-0/+1
| | | | Add a corresponding pmap_unmapdev() to release the KVM back to kernel_map.
* Add the CR4 values for P3 SIMD enabling support. FXSR tells the cpu thatpeter1999-09-101-0/+2
| | | | | | | | the OS does FXSAVE/FXRESTOR instructions (fast FPU save/restore) during context switching and also enables SIMD since this enables saving the extra CPU context that isn't saved with normal FPU regs. The other enables the SIMD instructions to use exception 16 (FPU) error reporting. Note, this doesn't turn on SIMD, just defines the bits.
* Invoke smp_rendezvous_action() using the a.out compatible asnames.hmsmith1999-09-101-0/+1
| | | | technique (bleagh).
* Set up FPU state on the AP.peter1999-09-051-0/+4
| | | | Tested by: phk
* Don't install stubs, make a compat symlink at buildworld time.peter1999-09-041-6/+0
| | | | All internal references to <machine/soundcard.h> are (hopefully :-) gone.
* Make <machine/soundcard.h> a stub which includes <sys/soundcard.h>dfr1999-09-041-1362/+4
|
* Some reorganization of sysarch() interface:luoqi1999-09-022-5/+17
| | | | | | | | | | 1. Move definitions of struct i386_*_args to the header file sysarch.h, since they are part of the sysarch API. struct i386_get_ldt_args and i386_set_ldt_args were identical, therefore make them into one struct i386_ldt_args. Libc should use these definitions as well. 2. Return a more sensible EOPNOTSUPP for unknown operations. Reviewed by: marcel
* $Id$ -> $FreeBSD$peter1999-08-2893-93/+93
|
* Reference the correct gdt[] entry on SMP. Remove the `generation' flag,jlemon1999-08-271-2/+1
| | | | and always reload the selectors for every bios call.
* Remove unneeded prototypes.phk1999-08-241-8/+1
|
* Modify the macros IMASK_UNLOCK, CPL_UNLOCK, and REL_FAST_INTR_LOCKalc1999-08-231-7/+3
| | | | to perform the s_unlock inline.
* Make "s_unlock" an inline function. (Inlining this function takesalc1999-08-221-2/+8
| | | | | less space than calling it. A callable version still exists for use by some assembly code.)
* Undo my previous commit and do it differently. Break the ffs() etc macrospeter1999-08-191-14/+27
| | | | | | | | into two parts - one to do the bsfl and the other to convert the result (base 0) to ffs()-like (base 1) in inline C. This enables the optimizer to be a lot smarter in certain cases, like where it knows that the argument is non-zero and we want ffs(known non zero arg) - 1. This appears to produce identical code to the old inline when the argument is unknown.
* Try using the builtin ffs() for egcs, it (by random inspection)peter1999-08-191-1/+5
| | | | | generates slightly better code and avoids the incl then subl when using ffs(foo) - 1.
* Update for MI switch code, and trim a heap of unused (I believe) entries.peter1999-08-191-56/+3
|
* Create callable (non-inline) versions of the atomic_OP_TYPE functionsalc1999-08-181-3/+14
| | | | | | | | | | | | that are linked into the kernel. The KLD compilation options are changed to call these functions, rather than in-lining the atomic operations. This approach makes atomic operations from KLDs significantly faster on UP systems (though somewhat slower on SMP systems). PR: i386/13111 Submitted by: peter.jeremy@alcatel.com.au
* Remove the SMBIOS detection and definitions; this should be handled in amsmith1999-08-181-29/+1
| | | | loadable module (under development).
* Add definitions for Interlink VersaPad.yokota1999-08-171-1/+25
|
* Search for and interrogate the PnP BIOS if found. This code just printsmsmith1999-08-171-4/+68
| | | | | the PnP device IDs in verbose mode; it does not (yet) save any resource data or contribute to the PnP process nor resource management.
* Mindbogglingly, many BIOS vendors expect to be able to load %ds withmsmith1999-08-171-8/+9
| | | | | | | | | | 0x40 and then access data stored in real-mode segment 0x40, even when called in protected mode. Microsoft unfortunately coddle these individuals, and so must we if we want to run their code. This change works around GPFs in some APM and PnP BIOS implementations. Obtained from: Linux
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-092-11/+2
| | | | may not compile, I can't test it.
* updating isdn4bsd to beta version 0.83hm1999-08-064-12/+124
|
* Reenable the APMIO_BIOS ioctl and translate arguments into the new formatmsmith1999-07-301-1/+11
| | | | | | (which is more like the old than I thought). Requested-by: imp
* Remove all vestiges of APMIO_BIOSmsmith1999-07-301-2/+1
| | | | Submitted by: N. Dudorov <nnd@mail.nsk.ru>
OpenPOWER on IntegriCloud